Mod is work now thanks for try to help
Search found 23 matches
- Fri May 28, 2021 10:46 am
- Forum: Modding help
- Topic: [SOLVED]Attempt to call a nil value
- Replies: 5
- Views: 4397
Re: Attempt to call a nil value
- Fri May 28, 2021 10:26 am
- Forum: Modding help
- Topic: [SOLVED]Attempt to call a nil value
- Replies: 5
- Views: 4397
Re: Attempt to call a nil value
nothing just use this mod.DaveMcW wrote: Fri May 28, 2021 10:20 am Your control.lua code works for me. What other mods do you have installed?
- Fri May 28, 2021 10:11 am
- Forum: Modding help
- Topic: [SOLVED]Attempt to call a nil value
- Replies: 5
- Views: 4397
[SOLVED]Attempt to call a nil value
I just test some code from https://lua-api.factorio.com/latest/
This is error when I try start new game.
__Functionals__/control.lua:1: attempt to call a nil value
stack traceback:
__Functionals__/control.lua:1: in main chunk
this is my control.lua;
script.on_event
(
defines.events.on_built ...
This is error when I try start new game.
__Functionals__/control.lua:1: attempt to call a nil value
stack traceback:
__Functionals__/control.lua:1: in main chunk
this is my control.lua;
script.on_event
(
defines.events.on_built ...
- Tue Aug 25, 2020 8:07 pm
- Forum: Modding help
- Topic: [SOLVED]on_player_built_tile error
- Replies: 8
- Views: 2447
Re: on_player_built_tile error
TilePosition
Coordinates of a tile in a chunk on a LuaSurface where each integer x/y represents a different tile. This uses the same format as Position except it rounds any x/y down to whole numbers.
Also you need to specify an absolute area on the surface. Not a bounding box relative to ...
- Tue Aug 25, 2020 3:48 pm
- Forum: Modding help
- Topic: [SOLVED]on_player_built_tile error
- Replies: 8
- Views: 2447
Re: on_player_built_tile error
I know thats mod you right but I want create runtime settings for my mod. because sometimes I want on/off destroy decoratives.eradicator wrote: Tue Aug 25, 2020 3:42 pm Destroying decoratives doesn't require control stage code. You can just change the prototype.
First mod portal search hit: https://mods.factorio.com/mod/CleanedConcrete
- Tue Aug 25, 2020 3:43 pm
- Forum: Modding help
- Topic: [SOLVED]on_player_built_tile error
- Replies: 8
- Views: 2447
Re: on_player_built_tile error
I try bigger area but doesn't change anything.mrvn wrote: Tue Aug 25, 2020 2:49 pm Is the tiles position you get the corner or the center of the tile? This would affect your area.
And maybe make the area a bit bigger so decorations that are outside the tile but overlap it also get removed.
- Tue Aug 25, 2020 12:35 pm
- Forum: Modding help
- Topic: [SOLVED]on_player_built_tile error
- Replies: 8
- Views: 2447
Re: on_player_built_tile error
local tile_position = surface.get_tile(tile.position.x, tile.position.y)
should be
local tile_position = surface.get_tile(tile.position.x, tile.position.y).position
But also, why use tile_position, when you are looking up the tile from tile.position?
Error is gone thanks. But ...
- Tue Aug 25, 2020 12:00 pm
- Forum: Modding help
- Topic: [SOLVED]on_player_built_tile error
- Replies: 8
- Views: 2447
[SOLVED]on_player_built_tile error
I want create event when build a tile like stone-path and destroy decoratives. I use this links;
https://lua-api.factorio.com/latest/events.html#on_player_built_tile
https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives
this is my control.lua;
script.on_event(defines ...
https://lua-api.factorio.com/latest/events.html#on_player_built_tile
https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.destroy_decoratives
this is my control.lua;
script.on_event(defines ...
- Fri Aug 21, 2020 5:10 pm
- Forum: Modding help
- Topic: I want make addon
- Replies: 6
- Views: 2101
Re: I want make addon
Ok. I will try thanks your helps.darkfrei wrote: Fri Aug 21, 2020 8:54 amUse the same internal recipe name as it was before, not unique recipe name anymore; but instead of data.lua it must be in the file data-updates.lua or data-final-fixes.lua.CruWiT wrote: Thu Aug 20, 2020 3:54 pm Thanks but How can override this recipe to old orginal recipe?
- Thu Aug 20, 2020 3:54 pm
- Forum: Modding help
- Topic: I want make addon
- Replies: 6
- Views: 2101
Re: I want make addon
Thanks but How can override this recipe to old orginal recipe?
- Thu Aug 20, 2020 12:56 pm
- Forum: Modding help
- Topic: I want make addon
- Replies: 6
- Views: 2101
Re: I want make addon
I want make addon angelmods for unused materials like cobalt plate. How can learn make addons for mods. Any idea, tutorial, ide or program suggestion?
Write here ingredients, amounts and result for example.
See also https://wiki.factorio.com/Tutorial:Modding_tutorial
For Example I want ...
- Thu Aug 20, 2020 10:52 am
- Forum: Modding help
- Topic: I want make addon
- Replies: 6
- Views: 2101
I want make addon
I want make addon angelmods for unused materials like cobalt plate. How can learn make addons for mods. Any idea, tutorial, ide or program suggestion?
- Tue Feb 18, 2020 1:33 pm
- Forum: Modding help
- Topic: [Solved]LuaGuiElement question
- Replies: 3
- Views: 1456
Re: LuaGuiElement question
@Deadlock989 @Bilka
I solve problem and now my script works thanks.
I solve problem and now my script works thanks.
- Sun Feb 16, 2020 9:06 pm
- Forum: Modding help
- Topic: [Solved]LuaGuiElement question
- Replies: 3
- Views: 1456
[Solved]LuaGuiElement question
I want create right click event and 40 damage my character but I try "shift+right click" in game and notting happened. I look here https://lua-api.factorio.com/latest/LuaGuiElement.html but I don't understand I am new on modding. here is my control.lua ;
local function right_mouse_click(event ...
local function right_mouse_click(event ...
- Wed Jan 29, 2020 2:04 pm
- Forum: Modding help
- Topic: [SOLVED]unexpected symbol near '='
- Replies: 6
- Views: 2591
Re: unexpected symbol near '='
data:extend() expects a table of tables of Prototypes: `data:extend({prot1, prot2}).
In Lua you can use `{` instead of `(` to create a table as first parameter, so `data:extend{ }` equals `data:extend({ })`.
In your case, you use `data:extend(prot)`, which is not correct.
You can use:
data ...
- Wed Jan 29, 2020 12:36 pm
- Forum: Modding help
- Topic: [SOLVED]unexpected symbol near '='
- Replies: 6
- Views: 2591
Re: unexpected symbol near '='
new error in technology:lua:1 line, this is technology.lua file;
data:extend({
type = "technology",
effects = {
{
recipe = "deneme-ammo",
type = "unlock-recipe"
},
{
recipe = "deagle",
type = "unlock-recipe"
}
},
enabled = false,
icon = "__mermi__/graphics/technology/deagle.png",
icon_size ...
data:extend({
type = "technology",
effects = {
{
recipe = "deneme-ammo",
type = "unlock-recipe"
},
{
recipe = "deagle",
type = "unlock-recipe"
}
},
enabled = false,
icon = "__mermi__/graphics/technology/deagle.png",
icon_size ...
- Wed Jan 29, 2020 11:28 am
- Forum: Modding help
- Topic: [SOLVED]unexpected symbol near '='
- Replies: 6
- Views: 2591
[SOLVED]unexpected symbol near '='
This is my error;
prototypes/item/gun.lua:4: unexpected symbol near '='
This is my "gun.lua" file.
local deagle = table.deepcopy(data.raw["gun"]["pistol"])
deagle.name = "deagle",
deagle.icon = "__mermi__/graphics/icons/deagle.png",
deagle.icon_size = 64,
deagle.attack_parameters.cooldown = 5 ...
prototypes/item/gun.lua:4: unexpected symbol near '='
This is my "gun.lua" file.
local deagle = table.deepcopy(data.raw["gun"]["pistol"])
deagle.name = "deagle",
deagle.icon = "__mermi__/graphics/icons/deagle.png",
deagle.icon_size = 64,
deagle.attack_parameters.cooldown = 5 ...
- Mon Aug 19, 2019 3:47 pm
- Forum: Modding help
- Topic: map_gen_settings and autoplacers
- Replies: 19
- Views: 23435
- Tue Jul 30, 2019 3:22 pm
- Forum: Modding help
- Topic: draw_animation Return ID ?
- Replies: 1
- Views: 912
draw_animation Return ID ?
I want create new animation here is api;
https://lua-api.factorio.com/latest/Lua ... _animation
It says;
"Return value
Id of the render object"
What is this ID mean and where can I found ID number or string?
https://lua-api.factorio.com/latest/Lua ... _animation
It says;
"Return value
Id of the render object"
What is this ID mean and where can I found ID number or string?
- Mon Apr 22, 2019 5:12 pm
- Forum: Modding help
- Topic: [SOLVED] Moddding tutorial?
- Replies: 7
- Views: 2811
Re: Moddding tutorial?
You are missing a pair of curly braces:
data:extend({ -- open here
{
type = "recipe",
name = "stx3-furnace",
enabled = false, --Burası false olursa recipe teknoloji ile açılabilir.
ingredients = {
{"iron-plate", 5},
{"stone", 5}
},
result = "stx3-furnace"
}
}) -- close here
It's ...