Page 1 of 1
Recipie to make nothing
Posted: Sun Dec 17, 2017 5:09 pm
by Mango
Hi folks,
I'm trying to make incinerator.
The idea is it will be basicly furnace, that can destroy specific item to nothing while creating polution.
so how do I make a recipie that has no product?
Can I use something like this?
Code: Select all
data:extend(
{
{
type = "recipe",
name = "basic-waste",
category = "waste",
enabled = false,
energy_required = 17.5,
ingredients = {{"some.item-here", 1}},
result = nil
}
})
Re: Recipie to make nothing
Posted: Sun Dec 17, 2017 5:10 pm
by orzelek
Take a look at bob's mods void pump.
I think it uses special dummy void fluid thats produced with probability 0%. Since recipe needs to have result.
Re: Recipie to make nothing
Posted: Sun Dec 17, 2017 5:18 pm
by Mango
is it in Bob's Metals, Chemicals and Intermediates?
Edit: Found it, thanks.
Re: Recipie to make nothing
Posted: Fri Dec 22, 2017 4:22 pm
by Mango
So I decided I want to be able to burn all items in game.
I made this little function but it doesn't seem to work
Code: Select all
for _,i in pairs (data.raw.item) do
newRecipe.type = "recipe"
newRecipe.name = i.name .. "-waste"
newRecipe.category = "waste-smelting"
newRecipe.hidden = "true"
newRecipe.ingredients =
{
{i.name, 1},
}
newRecipe.results=
{
{type="item", name="smoke", amount=1, probability=0},
}
data:extend({newRecipe})
end
Factorio throws this error:
Failed to load mods: Prototype name (sulfuric-acid-barel-waste) does not match the key name (stone-brick-waste).
What am I doing wrong and what does it have to do with acid barels or bricks?
Re: Recipie to make nothing
Posted: Fri Dec 22, 2017 6:12 pm
by DaveMcW
You need to reset your temporary variable.
Code: Select all
for _,i in pairs (data.raw.item) do
local newRecipe = {}
newRecipe.type = "recipe"
newRecipe.name = i.name .. "-waste"
Re: Recipie to make nothing
Posted: Fri Dec 22, 2017 8:41 pm
by darkfrei
See also
viewtopic.php?f=34&t=53231
Items are not in data.raw.item only!