Page 1 of 1

[SOLVED] How do you change default recipes?

Posted: Sat Jan 21, 2017 11:04 pm
by ATMunn
Hi there,

I'm just starting out modding and I thought of an idea for a simple but useful mod I could make that would change some default recipes. However, I don't know how to do that. My guess would be that I can just set it up like I'm going to make my own recipe, but instead of putting in a new name, putting in a name of a recipe from the base game. Part of me thinks this would work fine, although the other part of me thinks it's going to be much more complicated than that. Can someone let me know the answer? I would go ahead and try it but I don't want to waste my time on something that might not work at all.

EDIT: Looks like it is pretty simple, but not exactly what I thought it was. See Daniel34's post if you're wondering how yourself.

Re: How do you change default recipes?

Posted: Sat Jan 21, 2017 11:28 pm
by daniel34
You can change the ingredients list by doing something like that in your data.lua file:

Code: Select all

data.raw.recipe["transport-belt"].ingredients =
{
	{"copper-plate", 1},
	{"iron-gear-wheel", 2}
}
This example changes the transport belt recipe, it doubles the amount of iron gears needed and changes the iron plate to copper plate.

You can see how existing recipes are implemented in your Factorio folder in data\base\prototypes\recipe. You then just need to add an info.json file with your mod description/version/... and you're done.

I've also attached a sample mod.

Re: How do you change default recipes?

Posted: Sun Jan 22, 2017 12:17 am
by ATMunn
I see, thanks. I'll update the main post so other people wondering the same thing can know how to do it.