"Raw wood cannot be smelted", even though there is a recipe?

Place to get help with not working mods / modding interface.
User avatar
bigyihsuan
Filter Inserter
Filter Inserter
Posts: 299
Joined: Thu Jan 01, 2015 12:57 pm
Contact:

"Raw wood cannot be smelted", even though there is a recipe?

Post by bigyihsuan »

I'm trying to make a mod to add in two more fuels: charcoal and coal coke.

I followed the first three chapters of the modding tutorial on the wiki, and I have the recipes, graphics, and items set up. I don't need to have it as an entity. control.lua is empty.

the code so far:

Code: Select all

--in recipe.lua--
data:extend({
	{
		type = "recipe",
		name = "charcoal",
		category = "smelting",
		energy_required = 3.5,
		ingredients = {{"raw-wood", 1}},
		result = "charcoal"
	},
	{
		type = "recipe",
		name = "coal-coke",
		category = "smelting",
		energy_required = 3.5,
		ingredients = {{"coal", 1}},
		result = "coal-coke"
	},
})

Code: Select all

--in item.lua--
data:extend({
	{
		type = "item",
		name = "charcoal",
		icon = "__failure-industries_more-fuels__/graphics/icons/charcoal.png",
		flags = {"goes-to-main-inventory"},
		fuel_value = "6MJ",
		subgroup = "raw-material",
		order = "a[charcoal]",
		stack_size = 50
	}
	{
		type = "item",
		name = "coal-coke",
		icon = "__failure-industries_more-fuels__/graphics/icons/coal-coke.png",
		flags = {"goes-to-main-inventory"},
		fuel_value = "16MJ",
		subgroup = "raw-material",
		order = "b[coal-coke]",
		stack_size = 50
	}
})
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: "Raw wood cannot be smelted", even though there is a rec

Post by FreeER »

It's because the game only checks items with a fuel value to see if they can be used as fuel, not if it is part of a recipe. I think this is being worked on, but it has been a known issue for quite some time. I'm fairly certain you could use a crafting recipe (or use a dedicated category for some specific assembling machine to make it).
Post Reply

Return to “Modding help”