Page 1 of 1

multiple results in smelting recipe (need help)

Posted: Tue Jun 09, 2020 7:21 am
by Prapor
I'm new to modding and I'm naturally having problems
As a test, I wanted to make a mod that adds several technological tiers for smelting ore.
At the first tier, the player simply throws the ore into the oven, but at the exit gets little metal and a lot of slag. So the following recipe for some reason does not work - I only get the first result, the second disappears

Code: Select all

data:extend(
{
   {
   	type = "recipe",
   	name = "iron-plate-Tier1",
    	category = "smelting",
    	energy_required = 32,
    	ingredients = {{ "iron-ore", 10}},
	icon = "__MyMod__/graphics/icons/iron-plate.png",
	icon_size = 32,
	subgroup = "raw-material",
	results = 
	{
		{type="item", name="iron-plate", amount=1},
		{type="item", name="stone", amount=9}
	}	
   }
}
)
P.S. Sorry for my English, it's not my native language.

Re: multiple results in smelting recipe (need help)

Posted: Tue Jun 09, 2020 7:42 am
by boskid
Are you sure furnace does not choose existing vanilla recipe for iron plates? When multiple recipes match, only one will be choosen. For this reason some mods change furnaces to be based on AssemblingMachine instead of Furnace prototype to allow manually choosing recipe.

Re: multiple results in smelting recipe (need help)

Posted: Tue Jun 09, 2020 8:44 am
by Prapor
I disabled these recipes:

data.raw["recipe"]["copper-plate"].enabled=false
data.raw["recipe"]["iron-plate"].enabled=false

Re: multiple results in smelting recipe (need help)

Posted: Tue Jun 09, 2020 9:04 am
by boskid
Enabled in prototype only gives initial enabled state, if you are using save that already has them enabled for "player" force or you research tech that unlocks them (in vanilla there are no tech to unlock them since they are enabled by default), they will be available to use.

Just in case in 0.18.31 there will be "Recipe" debug property on CraftingMachines (assemblers, furnaces, silo)

Re: multiple results in smelting recipe (need help)

Posted: Tue Jun 09, 2020 10:00 am
by darkfrei
Does your furnace has enough output slots?