Limit inventory stack size in a container

Kabury
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Apr 07, 2021 5:41 pm
Contact:

Limit inventory stack size in a container

Post by Kabury »

It would be neat to be able to modify an inventory to have a custom stack size that applied globally to all of its slots.

This could come in useful when designing containers that hold smaller than normal stack sizes (mini-chests, mini-trains) that are capable of holding many different kinds of items, but not many of any. Or could be helpful to mods like https://mods.factorio.com/mod/deep-storage-unit

Of course items themselves already have stack sizes, so any of these behaviors could be used as interactions:

Use the smallest, stack size or custom.
Use the largest, stack size or custom.
Use stack size*custom
Ignore stack size, just use custom.

Of these, the last one is maybe the easiest to implement and is intuitive.

It seems some version of it is already possible within vanilla:

For example, when trying to insert into an inserter's hand, one can't exceed the hand stack size (though from discord discussion it's not an inventory)
06-03-2025, 09-34-17.png
06-03-2025, 09-34-17.png (26.89 KiB) Viewed 547 times
Or in the input inventory slots in an assembling machine.
06-03-2025, 09-35-48.png
06-03-2025, 09-35-48.png (45.87 KiB) Viewed 547 times
Thanks for your time.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4017
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Limit inventory stack size in a container

Post by boskid »

That is implemented in 2.0.56 by means of inventory_type="with_custom_stack_size" where you can set stack_size_max.
Kabury
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed Apr 07, 2021 5:41 pm
Contact:

Re: Limit inventory stack size in a container

Post by Kabury »

Thanks! :D
Post Reply

Return to “Implemented mod requests”