How to mod instead of adding?

Place to get help with not working mods / modding interface.
Post Reply
xng
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Feb 14, 2014 1:04 pm
Contact:

How to mod instead of adding?

Post 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

User avatar
AlexPhoenix
Fast Inserter
Fast Inserter
Posts: 149
Joined: Tue Feb 18, 2014 7:48 am
Contact:

Re: How to mod instead of adding?

Post by AlexPhoenix »

Code: Select all

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

xng
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Feb 14, 2014 1:04 pm
Contact:

Re: How to mod instead of adding?

Post 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! ^^

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: How to mod instead of adding?

Post 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.

Post Reply

Return to “Modding help”