Page 1 of 1
[2.0.55] Stack loader does not fully stack items
Posted: Tue Jun 10, 2025 8:42 pm
by nicklatkovich
Description
A stack loader fails to output a full stack onto the belt if the last slot in the source chest contains fewer items than the full stack size. For example, if a chest contains 201 items of an item with a stack size of 200, the loader will only place one item on the belt instead of a full stack. Example:

- 06-10-2025, 23-36-05.png (1.11 MiB) Viewed 1576 times
Steps to reproduce
1. Create a stack loader with a specific
max_belt_stack_size (e.g.:
data.raw["loader"]["express-loader"].max_belt_stack_size = 4)
2. Set the belt stack size bonus greater than zero (e.g., via console:
/c game.forces["player"].belt_stack_size_bonus = 3)
3. Place the loader to unload from a chest containing 201 items.
Expected result: The loader should place a full stack onto the belt.
Actual result: The loader places only a single item onto the belt.
This is an extreme example and guarantees an unstacked belt. However, in real gameplay scenarios, this bug leads to irregular stacking on the belt, where some items appear with stack sizes of only 1–3, causing noticeable "gaps".
Feature Request (optional):
Unrelated to the bug directly, but it would be helpful to have an option to prevent the output loader from inserting items if it cannot form a full belt stack. This would allow maintaining a fully stacked output belt at all times (as if stack inserters were used instead).
Re: [2.0.55] Stack loader does not fully stack items
Posted: Wed Jun 11, 2025 1:55 am
by Rseding91
Thanks for the report however this is working correctly. There is no such thing as a stack loader. The loader will simply output the max size it can, up to the prototype limit and research limit. If less items are available it outputs a smaller size.
There is no option to block and wait for more items. If you want that, that’s what stack inserters do.
Re: [2.0.55] Stack loader does not fully stack items
Posted: Wed Jun 11, 2025 2:20 am
by boskid
Re: [2.0.55] Stack loader does not fully stack items
Posted: Wed Jun 11, 2025 11:00 am
by boskid
Actually given that i was recently doing a lot of cleanup around inventories and item stacks, i found a relatively easy solution for this and starting from 2.0.56 loaders will properly create full belt stacks in the provided case.
Re: [2.0.55] Stack loader does not fully stack items
Posted: Mon Jun 23, 2025 10:56 am
by Kalixt
Same thing happens if you are placing modules into assemblers by hand. If you have 2 stacks of modules of 20 and 1 and you click on stack with 1, it will insert only one module.
Re: [2.0.55] Stack loader does not fully stack items
Posted: Mon Jun 23, 2025 11:00 am
by boskid
Kalixt wrote: Mon Jun 23, 2025 10:56 am
Same thing happens if you are placing modules into assemblers by hand. If you have 2 stacks of modules of 20 and 1 and you click on stack with 1, it will insert only one module.
How is this related to this bug report?
Re: [2.0.55] Stack loader does not fully stack items
Posted: Mon Jun 23, 2025 11:05 am
by Kalixt
boskid wrote: Wed Jun 11, 2025 11:00 am
... i was recently doing a lot of cleanup around inventories and item stacks...
not exactly to stack inserter, but it has something with inventory and stacks.
Re: [2.0.55] Stack loader does not fully stack items
Posted: Mon Jun 23, 2025 11:08 am
by boskid
Kalixt wrote: Mon Jun 23, 2025 11:05 am
not exactly to stack inserter, but it has something with inventory and stacks.
Modules inventory is designed to only accept 1 module per slot.