Help with data.raw

Place to get help with not working mods / modding interface.
achman741
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Feb 26, 2014 4:01 am
Contact:

Help with data.raw

Post by achman741 »

I am currently having trouble with adding three values to a ore of another mod without adding it directly to another mod. Simply adding these to the resource prototype works but i don't know how to use data.raw to add these:

Code: Select all

infinite = true,
minimum = 175,
normal = 350,
I have tried this as well as couple other things but haven't gotten them to work:

Code: Select all

data.raw["resource"]["gold-ore"].infinite = true
table.insert(data.raw["item"]["gold-ore"].infinite = true)
I am trying to add those values to a mod ore, the endless resource mod does this to vanilla ores but i am unsure how to apply this to mod added ores.
cartmen180
Filter Inserter
Filter Inserter
Posts: 358
Joined: Fri Jul 25, 2014 2:53 pm
Contact:

Re: Help with data.raw

Post by cartmen180 »

if you put this code in data.lua you have to set the mod you want to overwrite as a dependency.
Easier would be to use data-updates.lua, this will always be loaded after every normal data.lua has been loaded.

Simply put this in there:

Code: Select all

data.raw["resource"]["gold-ore"].infinite = true
data.raw["resource"]["gold-ore"].minimum = 175
data.raw["resource"]["gold-ore"].normal = 350
Check out my mods
Post Reply

Return to “Modding help”