In other languages: Čeština Deutsch 日本語 Polski Русский Українська 简体中文

Stack: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (Add LDS to stack size table)
 
(54 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{sublinks}}
{{Languages}}
A stack is the basic element in Factorio to store [[Items]].
[[File:inventory_stacks.png|thumb|408px|right|Many stacks in the player's inventory.]]A stack is the basic element in Factorio to store items. One space in an inventory can hold one stack.


Don't mix a stack up with [[Power armor/Slot|Slot of power armor]] or other the slots for the modules (and planned slots for vehicles and other devices)! There is an affinity to [[Liquid/stack|liquid stacks]].
== Examples of stacks ==


== Usages of stacks ==
* The [[player|player's]] inventory
** Main inventory
** Armor, weapon, and ammunition stacks
** Logistic trash slots
** The player's hand (is also a stack)
* [[Vehicle]]s
** [[Car]] (fuel, ammunition, inventory)
** [[Tank]] (fuel, ammunition, inventory)
** [[Spidertron]] (ammunition, inventory)
** [[Railway|Train]] (wagons, engines for fuel)
* [[Chests]]: The archetypal example of stacks outside the player's inventory; a chest is basically just a group of stacks.
* Devices
** [[Furnace]]: Burner stack ([[Stone furnace|stone]] and [[Steel furnace|steel]] furnace only), input and output stack
** [[Assembling machine]]s and [[chemical plant]]s: 1 or more output and 1-6 input stacks, depending on item type being assembled
** [[Lab|Labs]]
** Burner-based: [[Boiler]], [[burner mining drill]], [[burner inserter]]
** [[Roboport]] (filtered for robots and repair packs only)
** [[Gun turret]]
* Special
** [[Inserters]] and [[Robots|worker robots]] (Small, variable-size stacks allow these entities to move items between other stacks. See also the [[Inserter capacity bonus (research)|inserter]] and [[Worker robot cargo size (research)|robot]] stack size bonus research topics.)


Stacks are included into nearly every device, which can handle items, but they are also at some (not so awaited) places. Full list of slots:
== How do stacks work? ==


* The player stacks
A stack can store a number of identical items.
** inventory-stacks
** toolbelt
** tool-, armor-, weapon- and ammunition stacks
** The players hand (is also a stack)
* [[Vehicle]]s contain also some stacks for [[Fuel]]
** [[Vehicle/Car]] (contains most stacks in game)
** [[Vehicle/Train]] (the wagons, but also the locomotive)
* [[Chests]]: eventually the best known example of stacks. Basically chests are nothing else then a group of stacks.
* Devices
** [[Furnaces]]: Burner-, incoming and outgoing stack
** [[Assembly]] and [[Chemical plant]]: Some in- and one outgoing stack, dependent of the assembly-type
** [[Labs]]
** Burner-based: [[Boiler]], [[Burner mining drill]], [[Burner inserter]]
** Roboport (filtered for robots and repair packs only)
** Gun turrets
* Special
** Inserter and Robots (they have some limited stacks, see stacksize bonus), so that they are able to move some items between stacks at once.  


== How does it work? ==
The first inserted item determines which item types can be stored. This also indirectly determines how many items can be stored in the stack, as this depends on the item type's maximum stack size.


A stack can store a number of (identical) items.
Only items can be stored within stacks; stacks cannot hold [[Fluid system|liquids]] or other entity types.


The first inserted item determines which item-types can be stored.
=== Stack size ===


That determines also, how many items can be stored (the number of items per stack depends on it's "size").
The number of items a stack can store. Stack size depends on the item; existing stack sizes and (non-exhaustive) examples include (click to expand):


Only items can be stored; you cannot not put the car - all stacks fully loaded - into a stack.
{| class="wikitable mw-collapsible mw-collapsed"
The stacks of the car would be emptied before that. The same with chests (till v0.9 mining a full chest, if you don't have enough stacks left in your inventory leads to the so called "chest explosion").
!style="width: 100px;" |Stack size
!Examples 
|-
| 1 || [[Nuclear fuel]], [[artillery shell]], [[satellite]], [[modular armor]], [[blueprint]].
|-
| 5 || [[Locomotive]], all [[Wagon|wagons]].
|-
| 10 || [[Roboport]], [[rocket fuel]], [[artillery turret]], [[atomic bomb]], [[low density structure]].
|-
| 20 || Some [[equipment modules]], [[pumpjack]]s.
|-
| 50 || All ores, [[stone]], [[coal]], all [[Module|modules]], [[electric mining drill]], [[electric furnace]], all [[Assembling machine|assemblers]], all [[chests]], all [[inserters]], [[gun turret]], [[laser turret]], all [[Electric_system#Distribution|power poles]] including [[substation]], both types of [[Robots|worker robots]], [[solid fuel]].
|-
| 100 || [[Iron plate]], [[copper plate]], [[steel plate]], [[processing unit]], [[iron gear wheel]], [[stone brick]], all types of [[concrete]], both isotopes of [[Uranium processing|processed uranium]], [[pipe]] (regular), all [[Belt transport system|belts]], [[wall]], [[landfill]].
|-
| 200 || [[Electronic circuit]], [[advanced circuit]], all types of [[Ammunition#Magazines|magazine]], all types of [[tank]] [[Ammunition#Tank shells|cannon shell]], [[copper cable]], both colors of circuit [[Circuit network|wire]], all types of [[science pack]] except space science pack.
|-
| 2,000 || Unique to [[space science pack]], present to allow stacking up to 2 [[Rocket|rockets]]' worth of packs in the [[rocket silo]]'s single output slot.
|}


=== Filtered stacks ===
=== Filtered stacks ===


There are also filtered stacks, either by default (for the burner/furnaces, or roboports) or manually set for the wagons or toolbelt (normally set vial middle-mouse-button, see [[Keyboard bindings]]).
Stacks can be filtered either by default (in burner-type entities, [[furnace]]s, [[roboport]]s, [[turret]]s, [[lab]]s, and other entities that can only accept one or a few item types in a particular slot), or manually by the player (normally set via the middle mouse button / scroll-wheel click, see [[Keyboard bindings]]). Manual filtering is available for [[cargo wagon]]s, [[car]]s, [[tank]]s, [[spidertron]]s and the player inventory, but not for other types of containers (in particular, [[chests]] of any type).
 
This can be used to ensure only one item type goes into the inventory space. [[Inserters]] (or [[Robots|bots]], where applicable) will not attempt to insert anything except the allowed item type into filtered slots, and manual insertion of other item types by the player is also not allowed unless and until the filter is cleared.


=== Damaged items ===
=== Damaged items ===


With identical we mean: Currently when you have a wall with different damage, they are two different items and so stored in different stacks.
Damaged items (i.e, damaged entities now stored as items) stack with other damaged items (of the same type), but not with undamaged items. When items with different amounts of damage are stacked together, the health of the items is averaged.
 
=== Physically? ===


A stack is some hightech hyper-space technology: Inserting the item transfers it to hyperspace-energy which can be reverted easily.
=== Items with durability ===
So a stack also compresses items, physically in the game (and in your computer RAM).


How a stack compresses so much items, is one of the [[Mysteries of the Factorio World]], but obviously it's some kind of high-tech.
Items with durability, such as [[science pack]]s and [[repair pack]]s, always stack with items of the same type, regardless of how much durability remains. The durability displayed on the stack is the durability of the first item. After that item is removed from the stack, a stack of items with full durabilities remains. This means that when multiple items with durabilities are stacked together, their durabilities are merged, which can result in a lower overall item count while the overall remaining durability stays the same.
The basics of this ultra-high technology is learned by children in the kindergarden, when they have to put away their toys.
 
The amount, how much items a stack can store, depends from the item. A train uses one stack, but you can put up to 500 alien eggs in a stack.


== Stack size bonuses ==
== Stack size bonuses ==


* [[Inserter item stack size bonus]],
Inserters and logistic robots can be boosted with research to hold and transfer more items, see:
* [[Logistic robot cargo]]


== Insertion limits ==
* [[Inserter capacity bonus (research)]]
 
* [[Worker robot cargo size (research)]]
* [[Inserters#Insertion limits|Inserters don't fill the stacks to the limits]]


== Stack limitation ==
== Stack limitation ==


In some devices the number of stacks, In which [[Inserters]] or [[Logistic robot]]s can insert is limit able.
[[File:Stack limiter.jpg|300px|thumb|frame|A [[wooden chest]] limited to three stacks. Once the third stack is full, inserters will no longer attempt to add items.]]


A big red X as the last "stack" enables you to that: press the red X, then the number of stacks you want to limit. The selected stacks are marked.
Optionally, the usable space in [[chests]] and [[Cargo wagon|wagons]] can be decreased below their default values. Typically, this is done to store a small amount of items in an automated process, without consuming the resources that would be required to fill the entire container.
(Some pics missing)


*  [[Inserters]] or [[Logistic robot]]s cannot insert into these stacks, but they can take items out.
To limit a container, click the red X at the end of the last stack. Then, click on one of the stacks to set the new limit. The unused stacks will be highlighted red (see right).
* the character (You) is still able to put items into the limited stacks.


== Different number of items for different item-types ==
When full, inserters will no longer add to a limited container. However, the player is still free to manually place items in the unused (red) slots.


For example: A stack with [[Items#Resources|Resources]] is limited generally to 50 items. But [[Items#Intermediate products|Intermediate products]] like iron plates stack double (100 items/stack). This is important, if you want to store or transport items by train. See also [[Transport/Compress by Pre-production]].
== Handling stacks ==


== Handling with stacks ==
There are some [[keyboard bindings]] to quickly handle movement of stacks between inventories, like moving half of a stack to another stack.


There are some [[Keyboard binding]] (not all are listed there!) to handle your stacks fast. Like moving half the stack to another stack.
== History ==


== History ==
In game version 0.10, the number of items which can be stored in a stack changed for most items from powers of 2 to multiples of 10. This change was mainly made because most people find it more intuitive to calculate numbers in a base-10 system.


In v0.9 the number of items, which can be stored in a stack changed for most items from dual numbers to decimal (base 2 vs. base 10). This was mainly made, because it is easier to calculate numbers based on the base-10-system (20 stacks á 50 items = 1000 items, 18 stacks á 64 items = ??? items) and because there have been stack-numbers, which where already based on decimal and there is no need - like in minecraft - to split up stacks by hand to half-stacks (that is, what automated crafting is thought for).
Example: Before the change, a stack could store 64 iron ore, while after the change it is 50. This created some controversy, as some players preferred the old stack sizes.


Example: before that change, a stack could store 64 iron ore, after that only 50. This has created a lot of discussions in the forum (TODO: find some). In the end there are now not much players anymore, which say, they want the old stack-numbers back. But if so, there is also a mod, which does that change!
{{C|Logistics{{!}}#Stack}} {{C|Storage{{!}}#Stack}}

Latest revision as of 19:33, 26 January 2024

Many stacks in the player's inventory.

A stack is the basic element in Factorio to store items. One space in an inventory can hold one stack.

Examples of stacks

How do stacks work?

A stack can store a number of identical items.

The first inserted item determines which item types can be stored. This also indirectly determines how many items can be stored in the stack, as this depends on the item type's maximum stack size.

Only items can be stored within stacks; stacks cannot hold liquids or other entity types.

Stack size

The number of items a stack can store. Stack size depends on the item; existing stack sizes and (non-exhaustive) examples include (click to expand):

Stack size Examples 
1 Nuclear fuel, artillery shell, satellite, modular armor, blueprint.
5 Locomotive, all wagons.
10 Roboport, rocket fuel, artillery turret, atomic bomb, low density structure.
20 Some equipment modules, pumpjacks.
50 All ores, stone, coal, all modules, electric mining drill, electric furnace, all assemblers, all chests, all inserters, gun turret, laser turret, all power poles including substation, both types of worker robots, solid fuel.
100 Iron plate, copper plate, steel plate, processing unit, iron gear wheel, stone brick, all types of concrete, both isotopes of processed uranium, pipe (regular), all belts, wall, landfill.
200 Electronic circuit, advanced circuit, all types of magazine, all types of tank cannon shell, copper cable, both colors of circuit wire, all types of science pack except space science pack.
2,000 Unique to space science pack, present to allow stacking up to 2 rockets' worth of packs in the rocket silo's single output slot.

Filtered stacks

Stacks can be filtered either by default (in burner-type entities, furnaces, roboports, turrets, labs, and other entities that can only accept one or a few item types in a particular slot), or manually by the player (normally set via the middle mouse button / scroll-wheel click, see Keyboard bindings). Manual filtering is available for cargo wagons, cars, tanks, spidertrons and the player inventory, but not for other types of containers (in particular, chests of any type).

This can be used to ensure only one item type goes into the inventory space. Inserters (or bots, where applicable) will not attempt to insert anything except the allowed item type into filtered slots, and manual insertion of other item types by the player is also not allowed unless and until the filter is cleared.

Damaged items

Damaged items (i.e, damaged entities now stored as items) stack with other damaged items (of the same type), but not with undamaged items. When items with different amounts of damage are stacked together, the health of the items is averaged.

Items with durability

Items with durability, such as science packs and repair packs, always stack with items of the same type, regardless of how much durability remains. The durability displayed on the stack is the durability of the first item. After that item is removed from the stack, a stack of items with full durabilities remains. This means that when multiple items with durabilities are stacked together, their durabilities are merged, which can result in a lower overall item count while the overall remaining durability stays the same.

Stack size bonuses

Inserters and logistic robots can be boosted with research to hold and transfer more items, see:

Stack limitation

A wooden chest limited to three stacks. Once the third stack is full, inserters will no longer attempt to add items.

Optionally, the usable space in chests and wagons can be decreased below their default values. Typically, this is done to store a small amount of items in an automated process, without consuming the resources that would be required to fill the entire container.

To limit a container, click the red X at the end of the last stack. Then, click on one of the stacks to set the new limit. The unused stacks will be highlighted red (see right).

When full, inserters will no longer add to a limited container. However, the player is still free to manually place items in the unused (red) slots.

Handling stacks

There are some keyboard bindings to quickly handle movement of stacks between inventories, like moving half of a stack to another stack.

History

In game version 0.10, the number of items which can be stored in a stack changed for most items from powers of 2 to multiples of 10. This change was mainly made because most people find it more intuitive to calculate numbers in a base-10 system.

Example: Before the change, a stack could store 64 iron ore, while after the change it is 50. This created some controversy, as some players preferred the old stack sizes.