Recipes with 'or' ingredients

Place to get help with not working mods / modding interface.
User avatar
FreddyFact
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat May 20, 2017 8:25 pm
Contact:

Recipes with 'or' ingredients

Post by FreddyFact »

Hi there,
I'm making a mod of my own design but i wanted it so it could either use the default coal or my own added item 'charcoal'
But is it possible to have 1 recipe that can use different items while still needing only 1 of those to complete?

I have but a basic LUA understanding.

Code: Select all

		type = "recipe",
		name = "bag-of-coal",
		energy_required = 4,
		enabled = true,
		ingredients = 
		{
			{"coal", 10} or
			{"charcoal", 10},
		},
		result = "coal-bag"
Rseding91
Factorio Staff
Factorio Staff
Posts: 16017
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Recipes with 'or' ingredients

Post by Rseding91 »

The game engine doesn't support the concept of "or" in recipes.
If you want to get ahold of me I'm almost always on Discord.
Pandemoneus
Fast Inserter
Fast Inserter
Posts: 127
Joined: Fri May 08, 2015 2:25 pm
Contact:

Re: Recipes with 'or' ingredients

Post by Pandemoneus »

As Rseding said, you will have to make two separate recipes, one for coal and one for charcoal.
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires
Post Reply

Return to “Modding help”