Page 1 of 1
Recipes with zero quantities
Posted: Fri Sep 04, 2015 11:36 pm
by Ranakastrasz
I accidently made a recipe which used zero plastic. Mainly because I assumed that the game when loading would ignore that piece of the code.
Instead, it shows up, as requiring zero plastic. However, while it shows up as white if you hover over the recipe in the assembler, it won't run unless you have at least one piece of plastic, which is never consumed.
This probably qualifies as a bug, but you could use this mechanic to add catalysts, or molds, or similar if you wanted.
Re: Recipes with zero quantities
Posted: Sat Sep 05, 2015 12:19 pm
by Klonan
If you make a recipe say, 0 plastics and 10 iron plate to make something, and you put this in an assembler, will the 1 plastic you input be 'used up' by the assembler, or will it remain in the ingredient slot?
This could be VERY useful as a catalyst, or something.
Re: Recipes with zero quantities
Posted: Sat Sep 05, 2015 5:13 pm
by reddutton
it may be a bug but as you said it can be usefull for the modding comunity to make it to where you have to have as set tool to make a certain item would be interesting thought if that tool could have a durability like the science pack and be consumed over time
Re: Recipes with zero quantities
Posted: Sat Sep 05, 2015 11:56 pm
by kovarex
Well, this behaviour seems to be fine.
Re: Recipes with zero quantities
Posted: Wed Dec 27, 2017 12:17 am
by Aprillion
There are catalysts in recipes now, e.g. "kovarex-enrichment-process" recipe in 0.16.7 contains 2 catalysts: uranium-235 and uranium-238, but the same items are also ingredients, so no idea how that works (didn't get that far into game yet ¯\_(ツ)_/¯).
Catalysts are not explained on
https://wiki.factorio.com/Kovarex_enrichment_process
edit: but I found
viewtopic.php?t=51654 which was the problem that seems to be solved with the current concept of "catalysts".
Any interaction of the 0 amount ingredient feature with the new catalysts feature?
P.S.: Console command for exploring the catalysts - which seem to be an array of {"item" :: LuaItemPrototype, "amount" :: uint} (different from
http://lua-api.factorio.com/latest/Conc ... Ingredient):
Code: Select all
/c
local recipe = game.player.force.recipes['kovarex-enrichment-process']
for i, ingredient in ipairs(recipe.ingredients) do
for k, v in pairs(ingredient) do
game.print('ingredient' .. i .. ' ' .. k .. ': ' .. tostring(v))
end
end
for i, catalyst in ipairs(recipe.catalysts) do
for k, v in pairs(catalyst) do
if type(v) == "table" and v.help then
v = '{name: ' .. v.name .. '} :: ' .. v.help():gsub('Help for ', ''):gsub(':.*', '')
end
game.print('catalyst' .. i .. ' ' .. k .. ': ' .. tostring(v))
end
end