Change textures of ores
Posted: Tue Jan 23, 2018 1:48 pm
I'm trying to change colors of iron and copper ores because the Internet is laughing at us.
I've found prototypes in file "prototypes/entity/demo-resources.lua" and it was looking pretty straightforward.
I can change icon of ore item with single line:
However, code to change how ore deposit looks isn't working:
The error is:
which is weird, because I can clearly see that this field is created in "demo-resources.lua".
I was tinkering with it a few hours and I've achieved nothing. I'm out of ideas what else I can try.
I'm pretty new to both Factorio mods and lua so don't make the answer more complicated than it has to be.
I've found prototypes in file "prototypes/entity/demo-resources.lua" and it was looking pretty straightforward.
I can change icon of ore item with single line:
Code: Select all
data.raw["item"]["iron-ore"].icon = "new texture.png"
Code: Select all
data.raw["item"]["iron-ore"].stages.sheet.filename = "new texture.png"
Code: Select all
Attempt to index field 'stages' (a nil value)
I was tinkering with it a few hours and I've achieved nothing. I'm out of ideas what else I can try.
I'm pretty new to both Factorio mods and lua so don't make the answer more complicated than it has to be.