How to limit the amount of stacks of not unique items.

wuyan

Member
Hello,

I now want to limit the amount of non unique items stacked in each grid. amount is set by attribute. For example, a grid can only stack up to 100 bullets. If there are 160 bullets, they will be stored in two grids, one grid with 100 bullets and the other grid with 60 bullets. Where should I start? any ideas?

Thanks!
 
Last edited:
I'm guessing you meant "stack" instead of "grid".
We have an ItemCollection called MultiStackItemCollection. It lets you have multiple stacks of the same common item and limit the stack size.
The only limitation is that it will always try to minmize the number of stacks, so you cannot manually split stacks easily. For that I'm afraid you'll probably need to create a custom ItemCollection.

From what you mentioned though, my guess is that the MultiStackItemCollection should be enough.
1628145658555.png
You can choose a default stack size limit. If you want one per item definition or category, you can use an int attribute with the name you set in the "Stack Size Limit Attribute Name"

I haven't thouroughly tested MultiStackItemCollections with the ItemShapeGrid, if you have any weird errors do let me know.

I hope that helps.
 
I'm guessing you meant "stack" instead of "grid".
We have an ItemCollection called MultiStackItemCollection. It lets you have multiple stacks of the same common item and limit the stack size.
The only limitation is that it will always try to minmize the number of stacks, so you cannot manually split stacks easily. For that I'm afraid you'll probably need to create a custom ItemCollection.

From what you mentioned though, my guess is that the MultiStackItemCollection should be enough.
View attachment 6736
You can choose a default stack size limit. If you want one per item definition or category, you can use an int attribute with the name you set in the "Stack Size Limit Attribute Name"

I haven't thouroughly tested MultiStackItemCollections with the ItemShapeGrid, if you have any weird errors do let me know.

I hope that helps.
Hi Sangemdoko, Thank you! I'll try!!
 
Top