Need help to find a mistake
Need help to find a mistake
Hey guys
after i finished my mod i saw ingame that i cant use productive modules in my recipes
can someone have a look at this pls
http://www.file-upload.net/download-116 ... 1.zip.html
after i finished my mod i saw ingame that i cant use productive modules in my recipes
can someone have a look at this pls
http://www.file-upload.net/download-116 ... 1.zip.html
Re: Need help to find a mistake
Look at Factorio\data\base\prototypes\item\module.lua
There you see that the modules themselves are limited to certain items. You need to do something like:
There you see that the modules themselves are limited to certain items. You need to do something like:
Code: Select all
table.insert(data.raw.module["productivity-module"].limitation, "your recipe")
Re: Need help to find a mistake
thanks
i did it like u said but now i got an error: wrong number of arguments to insert ._.
im not that good in stuff like modding xD sry
i did it like u said but now i got an error: wrong number of arguments to insert ._.
im not that good in stuff like modding xD sry
Re: Need help to find a mistake
What code did you add exactly? Sounds like a typo.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Need help to find a mistake
I changed somethink by my own new errorcode: mistake near "productivitymodulelimitation"
Code: Select all
data:extend({
table.insert(data.raw.module[function productivitymodulelimitation()
return
"advanced-electronic-circuit",
"advanced-advanced-circuit",
"advanced-processing-unit"
])
})
Re: Need help to find a mistake
WTF are you trying to do there?iCamper wrote:I changed somethink by my own new errorcode: mistake near "productivitymodulelimitation"Code: Select all
data:extend({ table.insert(data.raw.module[function productivitymodulelimitation() return "advanced-electronic-circuit", "advanced-advanced-circuit", "advanced-processing-unit" ]) })
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Need help to find a mistake
i sayed im not that good at modding sorry men .... ._.
i just tryed to add it like it is in the normal list from factorio :/
sry sry ... :/
(its my first mod)
i just tryed to add it like it is in the normal list from factorio :/
sry sry ... :/
(its my first mod)
Re: Need help to find a mistake
Maybe you want
(not inside data:extend())
Code: Select all
table.insert(data.raw.module["productivity-module"].limitation, "advanced-electronic-circuit")
table.insert(data.raw.module["productivity-module"].limitation, "advanced-advanced-circuit")
table.insert(data.raw.module["productivity-module"].limitation, "advanced-processing-unit")
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Re: Need help to find a mistake
lol i thought that was just to simple O.O
TYYY
TYYY
- DedlySpyder
- Filter Inserter
- Posts: 253
- Joined: Fri Jun 20, 2014 11:42 am
- Contact:
Re: Need help to find a mistake
Whoops, I just realized I never did this for my mod. As a side note, you have to add it to each productivity module individually, so something like this for each item:
EDIT: Thanks MrDoomah for the correction.
Code: Select all
table.insert(data.raw.module["productivity-module"].limitation, "recipe_name")
table.insert(data.raw.module["productivity-module-2"].limitation, "recipe_name")
table.insert(data.raw.module["productivity-module-3"].limitation, "recipe_name")
Last edited by DedlySpyder on Mon May 30, 2016 10:03 pm, edited 1 time in total.
Re: Need help to find a mistake
Just remember, it is recipe_name and not the item_nameDedlySpyder wrote:Whoops, I just realized I never did this for my mod. As a side note, you have to add it to each productivity module individually, so something like this for each item:
Code: Select all
table.insert(data.raw.module["productivity-module"].limitation, "item_name") table.insert(data.raw.module["productivity-module-2"].limitation, "item_name") table.insert(data.raw.module["productivity-module-3"].limitation, "item_name")