Recipie to make nothing

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Mango
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Fri Feb 22, 2013 6:27 pm
Contact:

Recipie to make nothing

Post 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
  }
})
Hm.... so we have a mystery donor... intriguing.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Recipie to make nothing

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

User avatar
Mango
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Fri Feb 22, 2013 6:27 pm
Contact:

Re: Recipie to make nothing

Post by Mango »

is it in Bob's Metals, Chemicals and Intermediates?

Edit: Found it, thanks.
Hm.... so we have a mystery donor... intriguing.

User avatar
Mango
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Fri Feb 22, 2013 6:27 pm
Contact:

Re: Recipie to make nothing

Post 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?
Hm.... so we have a mystery donor... intriguing.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Recipie to make nothing

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

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

Re: Recipie to make nothing

Post by darkfrei »

See also viewtopic.php?f=34&t=53231
Items are not in data.raw.item only!

Post Reply

Return to “Modding help”