Add a sort button that tidies the bag and joins half-empty stacks
A sort button that only reorders still leaves three half stacks of the same potion, and one that reshuffles on every press makes players lose track of their things. This entry gives a stable order and tidies the leftovers too, so the second press changes nothing.
Why this works
A tidy bag helps only if the same bag always ends up in the same order. Joining partial stacks first and then using a complete ordering means the button is predictable, and pressing it twice cannot undo the first press.
When not to use it
Do not sort a bag that players arrange by hand as a memory aid, such as items placed at fixed spots for quick keys. Sorting would scramble that layout. Offer sorting as a choice, and let marked slots stay.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 32 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Add a sort button that tidies the bag and joins half-empty stacks" (read_entry sort-bag-and-merge-half-stacks) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP