Page 1 of 1

Help with data.raw

Posted: Fri Nov 07, 2014 11:58 pm
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.

Re: Help with data.raw

Posted: Sat Nov 08, 2014 8:22 am
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