Search found 23 matches

by CruWiT
Fri May 28, 2021 10:46 am
Forum: Modding help
Topic: [SOLVED]Attempt to call a nil value
Replies: 5
Views: 3498

Re: Attempt to call a nil value

DaveMcW wrote: Fri May 28, 2021 10:38 am Can you zip the mod and attach it to a post?
Mod is work now thanks for try to help
by CruWiT
Fri May 28, 2021 10:26 am
Forum: Modding help
Topic: [SOLVED]Attempt to call a nil value
Replies: 5
Views: 3498

Re: Attempt to call a nil value

DaveMcW wrote: Fri May 28, 2021 10:20 am Your control.lua code works for me. What other mods do you have installed?
nothing just use this mod.
by CruWiT
Fri May 28, 2021 10:11 am
Forum: Modding help
Topic: [SOLVED]Attempt to call a nil value
Replies: 5
Views: 3498

[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_entity, ...
by CruWiT
Tue Aug 25, 2020 8:07 pm
Forum: Modding help
Topic: [SOLVED]on_player_built_tile error
Replies: 8
Views: 2151

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 the tile. ...
by CruWiT
Tue Aug 25, 2020 3:48 pm
Forum: Modding help
Topic: [SOLVED]on_player_built_tile error
Replies: 8
Views: 2151

Re: on_player_built_tile error

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
I know thats mod you right but I want create runtime settings for my mod. because sometimes I want on/off destroy decoratives.
by CruWiT
Tue Aug 25, 2020 3:43 pm
Forum: Modding help
Topic: [SOLVED]on_player_built_tile error
Replies: 8
Views: 2151

Re: on_player_built_tile error

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.
I try bigger area but doesn't change anything.
by CruWiT
Tue Aug 25, 2020 12:35 pm
Forum: Modding help
Topic: [SOLVED]on_player_built_tile error
Replies: 8
Views: 2151

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 decoratives on tiles d...
by CruWiT
Tue Aug 25, 2020 12:00 pm
Forum: Modding help
Topic: [SOLVED]on_player_built_tile error
Replies: 8
Views: 2151

[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.eve...
by CruWiT
Fri Aug 21, 2020 5:10 pm
Forum: Modding help
Topic: I want make addon
Replies: 6
Views: 1844

Re: I want make addon

darkfrei wrote: Fri Aug 21, 2020 8:54 am
CruWiT wrote: Thu Aug 20, 2020 3:54 pm Thanks but How can override this recipe to old orginal recipe?
Use 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.
Ok. I will try thanks your helps.
by CruWiT
Thu Aug 20, 2020 3:54 pm
Forum: Modding help
Topic: I want make addon
Replies: 6
Views: 1844

Re: I want make addon

Thanks but How can override this recipe to old orginal recipe?
by CruWiT
Thu Aug 20, 2020 12:56 pm
Forum: Modding help
Topic: I want make addon
Replies: 6
Views: 1844

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; ingredients...
by CruWiT
Thu Aug 20, 2020 10:52 am
Forum: Modding help
Topic: I want make addon
Replies: 6
Views: 1844

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?
by CruWiT
Tue Feb 18, 2020 1:33 pm
Forum: Modding help
Topic: [Solved]LuaGuiElement question
Replies: 3
Views: 1247

Re: LuaGuiElement question

@Deadlock989 @Bilka
I solve problem and now my script works thanks.
by CruWiT
Sun Feb 16, 2020 9:06 pm
Forum: Modding help
Topic: [Solved]LuaGuiElement question
Replies: 3
Views: 1247

[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(ev...
by CruWiT
Wed Jan 29, 2020 2:04 pm
Forum: Modding help
Topic: [SOLVED]unexpected symbol near '='
Replies: 6
Views: 2105

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:extend( ...
by CruWiT
Wed Jan 29, 2020 12:36 pm
Forum: Modding help
Topic: [SOLVED]unexpected symbol near '='
Replies: 6
Views: 2105

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...
by CruWiT
Wed Jan 29, 2020 11:28 am
Forum: Modding help
Topic: [SOLVED]unexpected symbol near '='
Replies: 6
Views: 2105

[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 ...
by CruWiT
Tue Jul 30, 2019 3:22 pm
Forum: Modding help
Topic: draw_animation Return ID ?
Replies: 1
Views: 750

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?
by CruWiT
Mon Apr 22, 2019 5:12 pm
Forum: Modding help
Topic: [SOLVED] Moddding tutorial?
Replies: 7
Views: 2540

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...

Go to advanced search