Page 1 of 1

How to mod instead of adding?

Posted: Sun Mar 09, 2014 12:48 pm
by xng
I've done a few mods for myself to make things convenient or "better" for me, usually by adding new stuff that works more towards the way I want it. It's very simple as it mostly is just a matter of copying and pasting.

This is more adding than modding though, and my question is: How do you change for example a recipe instead of adding a new one?

To have a good example to work with, how would I change this stone furnace found in base-mod...

Code: Select all

{
    type = "recipe",
    name = "stone-furnace",
    ingredients = {{"stone", 5}},
    result = "stone-furnace"
},
.. to simply demand 10 stones instead to be built? And 1 wood?

Thanks in advance to the heroes who answers this. <3

Re: How to mod instead of adding?

Posted: Sun Mar 09, 2014 1:10 pm
by AlexPhoenix

Code: Select all

data.raw["recipe"]["stone-furnace"].ingredients={{"stone",10},{"raw-wood",1}}
will do what you want:)

Re: How to mod instead of adding?

Posted: Sun Mar 09, 2014 1:18 pm
by xng
Ah, so it is just to overwrite and it will replace the data with the new table like that!

Thank you very much! ^^

Re: How to mod instead of adding?

Posted: Sun Mar 09, 2014 5:36 pm
by slpwnd
You need to make sure that your mod is loaded after what you are modding. This is done by placing the mod (including base) into your mod dependencies.