Spoilage mechanics: Difference between revisions
Thrawcheld (talk | contribs) (→Production and freshness: example of a catalytic recipe) |
Thrawcheld (talk | contribs) (capitalisation; use italics for emphasis, not asterisks) |
||
Line 51: | Line 51: | ||
=== Production and freshness === | === Production and freshness === | ||
Items that are generated by means other than a machine (or the player) executing a recipe are generated at 100% freshness. This includes harvesting [[ | Items that are generated by means other than a machine (or the player) executing a recipe are generated at 100% freshness. This includes harvesting [[yumako]]s and [[jellynut]]s, as well as extracting [[biter egg]]s from [[captive biter spawner]]s. | ||
If no spoilable inputs are used to generate a spoilable output, then the freshness of the output is determined by the recipe (usually 100% fresh, but [[nutrients]] created from [[spoilage]] are 50% fresh). Note that [[ | If no spoilable inputs are used to generate a spoilable output, then the freshness of the output is determined by the recipe (usually 100% fresh, but [[nutrients]] created from [[spoilage]] are 50% fresh). Note that [[recycler]] recipes are no different; if a non-spoilable item can be recycled to a spoilable input, that input item will have 100% freshness (the [[biochamber]] recipe is one such example). | ||
If a recipe generates a spoilable product using one or more spoilable inputs, the freshness of the spoilable input products may be transferred to the freshness of the output. If the recipe only has one spoilable input, then the freshness percentage is transferred directly to the output. If a recipe uses multiple spoilable inputs, then the freshness of the output is the average freshness of the input. | If a recipe generates a spoilable product using one or more spoilable inputs, the freshness of the spoilable input products may be transferred to the freshness of the output. If the recipe only has one spoilable input, then the freshness percentage is transferred directly to the output. If a recipe uses multiple spoilable inputs, then the freshness of the output is the average freshness of the input. | ||
Line 61: | Line 61: | ||
While items can spoil while in a machine's input slots, once the item has been consumed to start a production cycle, the item cannot spoil. | While items can spoil while in a machine's input slots, once the item has been consumed to start a production cycle, the item cannot spoil. | ||
The freshness of inputs can transfer to outputs. But the freshness of the fuel used to power the building producing the spoilable product is irrelevant. The [[ | The freshness of inputs can transfer to outputs. But the freshness of the fuel used to power the building producing the spoilable product is irrelevant. The [[biochamber]] uses [[nutrients]] as fuel, but so long as the recipe itself does not use nutrients as an ingredient, the freshness of those nutrients does not matter to the freshness of the output. | ||
=== Freshness effects === | === Freshness effects === | ||
For most spoilable items, their freshness matters only in that the freshness can transfer during production. For [[ | For most spoilable items, their freshness matters only in that the freshness can transfer during production. For [[agricultural science pack]]s however, there is an additional effect. Freshness affects the science value produced by a lab when the pack is being consumed. As such, a pack that is consumed while 50% fresh will only generate 50% the science value of a 100% fresh science pack. | ||
Note that freshness does not affect the fuel value of any spoilable that has a fuel value. So long as the fuel is consumed before it spoils, it will impart all of its energy to the device. | Note that freshness does not affect the fuel value of any spoilable that has a fuel value. So long as the fuel is consumed before it spoils, it will impart all of its energy to the device. | ||
Line 71: | Line 71: | ||
== Spoil products == | == Spoil products == | ||
Most items which can spoil will transform into [[ | Most items which can spoil will transform into [[spoilage]], but some items spoil into other things. Some items transform into entities on the map. | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 94: | Line 94: | ||
If a recipe consumes or generates a spoilable item, the machine executing that recipe gains a number of "trash slots" appropriate for the spoil products of these types. If a stack in its input or output slots spoils, then those items are moved to the machine's trash slots. The machine may not continue to operate if its trash slots are full. Any output inserter can take from trash slots, so you may need to filter inserters to specifically remove trash. | If a recipe consumes or generates a spoilable item, the machine executing that recipe gains a number of "trash slots" appropriate for the spoil products of these types. If a stack in its input or output slots spoils, then those items are moved to the machine's trash slots. The machine may not continue to operate if its trash slots are full. Any output inserter can take from trash slots, so you may need to filter inserters to specifically remove trash. | ||
If an inserter is aimed at a machine which has trash slots based on spoilable input items, and the item it attempts to insert into the machine spoils before insertion is complete, the inserter will insert the item into the machine's trash slots. It will | If an inserter is aimed at a machine which has trash slots based on spoilable input items, and the item it attempts to insert into the machine spoils before insertion is complete, the inserter will insert the item into the machine's trash slots. It will ''not'' do so if the item has spoiled before it was picked up (and it will not pick up spoiled items). | ||
If a machine's output is full, then spoil-based trash slots don't function. If input or fuel stacks spoil, they will remain in the those locations (blocking further inputs or fuel) until the machine's outputs have been emptied. In particular, this can affect [[ | If a machine's output is full, then spoil-based trash slots don't function. If input or fuel stacks spoil, they will remain in the those locations (blocking further inputs or fuel) until the machine's outputs have been emptied. In particular, this can affect [[captive biter spawner]]s. Eggs kept in the spawner do not spoil, but this can put the spawner in the "output full" state. If the [[bioflux]] fuel spoils, it can block new bioflux from being inserted into the machine. | ||
[[Lab]]s and [[ | [[Lab]]s and [[biolab]]s have pass-through logic that allows science packs to be passed from one machine to another. While this works for [[agricultural science pack]]s, it does not work for spoilage. So each lab must have its own inserter specifically to remove any spoilage. | ||
While inserters can be filtered, spoilable items can cause filters to be bypassed if the item spoils after being picked up. The inserter will not attempt to put the item back even if the spoiled item type violates the rules of the filter. | While inserters can be filtered, spoilable items can cause filters to be bypassed if the item spoils after being picked up. The inserter will not attempt to put the item back even if the spoiled item type violates the rules of the filter. | ||
If an inserter is holding an item that spoils, it will immediately turn and attempt to insert the item in its destination. Note that this overrides the general rule of [[ | If an inserter is holding an item that spoils, it will immediately turn and attempt to insert the item in its destination. Note that this overrides the general rule of [[stack inserter]]s that they only turn when they have a full hand size. This is done to prevent stack inserters from getting stuck. | ||
==Trivia== | ==Trivia== | ||
* [[Fish]] spoil time is 7550 seconds, or 453,000 in-game ticks, most likely a reference to V453000, one of the Factorio developers | * [[Fish]] spoil time is 7550 seconds, or 453,000 in-game ticks, most likely a reference to V453000, one of the Factorio developers. | ||
{{C|Logistics}} | {{C|Logistics}} |
Revision as of 12:22, 3 December 2024
This article is a stub, and not comprehensive. |
---|
You can help this wiki by expanding it. |
Space Age expansion exclusive feature.
For the article encompassing the spoilage item, see Spoilage.
Spoilage is a mechanism whereby an item type, after a fixed period of time, will spontaneously transform into a different item, or sometimes an entity (or nothing at all). Most items which can spoil are either produced on Gleba or produced from Gleba resources.
Spoil time and freshness
Any type of item which can spoil has a spoil time, the maximum time it takes for the item to spoil. An item's freshness is a percentage of how far the item is from spoiling. 100% freshness means that the item is at its maximum spoil time away from spoiling, and 0% meaning that it has spoiled.
Spoiling can happen at any time. It can happen while an item is in a chest, in the input or output slots of a machine, in the hand of an inserter, etc. Almost nothing can arrest the process of spoilage.
Item | Time |
---|---|
Raw fish | 2 hours, 5 minutes, 50 seconds |
Bioflux | 2 hours |
Jellynut | 1 hour |
Yumako | 1 hour |
Agricultural science pack | 1 hour |
Biter egg | 30 minutes |
Pentapod egg | 15 minutes |
Nutrients | 5 minutes |
Jelly | 4 minutes |
Yumako mash | 3 minutes |
Copper bacteria | 1 minute |
Iron bacteria | 1 minute |
Freshness and stacking
When spoilable items form a stack (inserters picking up items, items being placed in containers, items being placed in a production machine, etc), the freshness of the resulting stack is determined by the average freshness of all items being combined. If you take a stack of 10 items with freshness 50% and add one item of freshness 100%, the result is a stack of 11 items with a freshness of 54.5%.
As such, all items in a stack will spoil at the same time. If spoiling spawns an entity, one entity will be spawned per item in the stack.
Production and freshness
Items that are generated by means other than a machine (or the player) executing a recipe are generated at 100% freshness. This includes harvesting yumakos and jellynuts, as well as extracting biter eggs from captive biter spawners.
If no spoilable inputs are used to generate a spoilable output, then the freshness of the output is determined by the recipe (usually 100% fresh, but nutrients created from spoilage are 50% fresh). Note that recycler recipes are no different; if a non-spoilable item can be recycled to a spoilable input, that input item will have 100% freshness (the biochamber recipe is one such example).
If a recipe generates a spoilable product using one or more spoilable inputs, the freshness of the spoilable input products may be transferred to the freshness of the output. If the recipe only has one spoilable input, then the freshness percentage is transferred directly to the output. If a recipe uses multiple spoilable inputs, then the freshness of the output is the average freshness of the input.
That having been said, catalytic recipes (recipes which consume and produce an item of the same type, for example iron bacteria cultivation) do not transfer freshness to their catalytic product; their outputs are always 100% fresh.
While items can spoil while in a machine's input slots, once the item has been consumed to start a production cycle, the item cannot spoil.
The freshness of inputs can transfer to outputs. But the freshness of the fuel used to power the building producing the spoilable product is irrelevant. The biochamber uses nutrients as fuel, but so long as the recipe itself does not use nutrients as an ingredient, the freshness of those nutrients does not matter to the freshness of the output.
Freshness effects
For most spoilable items, their freshness matters only in that the freshness can transfer during production. For agricultural science packs however, there is an additional effect. Freshness affects the science value produced by a lab when the pack is being consumed. As such, a pack that is consumed while 50% fresh will only generate 50% the science value of a 100% fresh science pack.
Note that freshness does not affect the fuel value of any spoilable that has a fuel value. So long as the fuel is consumed before it spoils, it will impart all of its energy to the device.
Spoil products
Most items which can spoil will transform into spoilage, but some items spoil into other things. Some items transform into entities on the map.
Item | Special effect on spoiling |
---|---|
Copper bacteria | Turns into copper ore |
Iron bacteria | Turns into iron ore |
Biter egg | Spawns a big biter |
Pentapod egg | Spawns a wriggler |
Special spoiling effects
When an item spoils, it transforms into a different item, or even an entity. Because spoiling can happen at any time, the game must account for this possibility in a variety of ways.
If a recipe consumes or generates a spoilable item, the machine executing that recipe gains a number of "trash slots" appropriate for the spoil products of these types. If a stack in its input or output slots spoils, then those items are moved to the machine's trash slots. The machine may not continue to operate if its trash slots are full. Any output inserter can take from trash slots, so you may need to filter inserters to specifically remove trash.
If an inserter is aimed at a machine which has trash slots based on spoilable input items, and the item it attempts to insert into the machine spoils before insertion is complete, the inserter will insert the item into the machine's trash slots. It will not do so if the item has spoiled before it was picked up (and it will not pick up spoiled items).
If a machine's output is full, then spoil-based trash slots don't function. If input or fuel stacks spoil, they will remain in the those locations (blocking further inputs or fuel) until the machine's outputs have been emptied. In particular, this can affect captive biter spawners. Eggs kept in the spawner do not spoil, but this can put the spawner in the "output full" state. If the bioflux fuel spoils, it can block new bioflux from being inserted into the machine.
Labs and biolabs have pass-through logic that allows science packs to be passed from one machine to another. While this works for agricultural science packs, it does not work for spoilage. So each lab must have its own inserter specifically to remove any spoilage.
While inserters can be filtered, spoilable items can cause filters to be bypassed if the item spoils after being picked up. The inserter will not attempt to put the item back even if the spoiled item type violates the rules of the filter.
If an inserter is holding an item that spoils, it will immediately turn and attempt to insert the item in its destination. Note that this overrides the general rule of stack inserters that they only turn when they have a full hand size. This is done to prevent stack inserters from getting stuck.
Trivia
- Fish spoil time is 7550 seconds, or 453,000 in-game ticks, most likely a reference to V453000, one of the Factorio developers.