Page 1 of 1

Recipes with 'or' ingredients

Posted: Mon May 29, 2017 12:01 pm
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"

Re: Recipes with 'or' ingredients

Posted: Mon May 29, 2017 3:09 pm
by Rseding91
The game engine doesn't support the concept of "or" in recipes.

Re: Recipes with 'or' ingredients

Posted: Mon May 29, 2017 9:29 pm
by Pandemoneus
As Rseding said, you will have to make two separate recipes, one for coal and one for charcoal.