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.
[SOLVED] How do you change default recipes?
[SOLVED] How do you change default recipes?
Last edited by ATMunn on Sun Jan 22, 2017 12:19 am, edited 1 time in total.
Re: How do you change default recipes?
You can change the ingredients list by doing something like that in your data.lua file:
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.
Code: Select all
data.raw.recipe["transport-belt"].ingredients =
{
{"copper-plate", 1},
{"iron-gear-wheel", 2}
}
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.
- Attachments
-
- recipe-example_1.0.0.zip
- (745 Bytes) Downloaded 721 times
Re: How do you change default recipes?
I see, thanks. I'll update the main post so other people wondering the same thing can know how to do it.