multiple results in smelting recipe (need help)

Place to get help with not working mods / modding interface.
Post Reply
Prapor
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri Apr 22, 2016 7:38 pm
Contact:

multiple results in smelting recipe (need help)

Post 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.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2252
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: multiple results in smelting recipe (need help)

Post 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.

Prapor
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri Apr 22, 2016 7:38 pm
Contact:

Re: multiple results in smelting recipe (need help)

Post by Prapor »

I disabled these recipes:

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

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2252
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: multiple results in smelting recipe (need help)

Post 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)

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: multiple results in smelting recipe (need help)

Post by darkfrei »

Does your furnace has enough output slots?

Post Reply

Return to “Modding help”