Inventory
Learning paths through this topic
Add items to a bag by filling stacks, then empty slots, and report the rest
Picking up 25 potions when the bag has two half-full stacks should not delete five of them or create a stack of 25. This entry fills the right places in the right order and tells you what did not fit, so nothing silently disappears.
Let a store that became too small lose its excess gradually
When an enemy burns a granary, the grain above the new limit cannot just disappear in one frame, and it cannot stay forever either. This entry lets the extra rot away at a steady share each turn, never less than one piece, and stops exactly at the new limit.
Hand over a story gift even when the bag is already full
A character presses an important key into your hand in a cutscene, and the bag has no room. The scene cannot stop and the key cannot vanish. This entry decides what happens to it, what happens to ordinary gifts, and how the player collects the rest later.
Stop players from dropping or selling an item the story still needs
In a story game one thrown-away letter or sold amulet can leave the player stuck with no way forward and no idea why. This entry shows how to protect such things in every place they could leave the bag, and when to let go of the protection again.
Place more supplies when the player is short and fewer when they are stocked
A survival horror game feels fair when the bullets turn up just as you run dry, and cheap when they turn up while your pockets are full. This entry sets the amount of a find from what the player already carries, always gives something to someone with nothing, and stays repeatable.
Take a defeated army's loot only as far as the bag has room
After a won battle the field is covered in piles, and the victorious hero's bag holds only a few more. Taking the first piles in list order fills it with rubbish. This entry tops up piles the hero already carries, then spends the empty places on the most valuable piles and leaves the rest on the field.
Show a torn diary as readable pieces with honest gaps where pages are missing
When a story is spread over pages the player finds in any order, reading what they have should already make sense, and the gaps should be marked without saying what is in them. This entry assembles the text from the pages held, joins neighbouring gaps and notices when it is whole.
Show the player where this turn's gold came from and went to
A player sees the treasury rise by thirty and wants to know why. This entry gathers every gain and loss of the turn by its cause, lists the biggest first, folds the small ones into a single line, and warns when the books do not add up, which means a mistake in the game.
Equip a two-handed weapon and put the shield back without losing anything
Equipping a big two-handed axe has to move the shield out of the way, and if the bag is full something must not just disappear. Equipment swaps go wrong in the corners: what moves where, and what happens when it cannot. This entry settles the rules.
Allow undoing a purchase only while it cannot break later prices
Players misclick, and an undo button for builds feels kind. But if the price of the next barracks depends on how many you own, undoing an old one changes what the later ones should have cost. This entry keeps a ledger of what was really paid and allows only safe steps back.
Decide who gets a one-of-a-kind relic when several players grab it at once
Two armies reach the same relic in the same moment, and each player's computer sees a different winner. This entry decides by the game's own step count and the distance, never by when a message happened to arrive, and keeps a dropper from picking the relic straight back up.
Price each upgrade level without rounding errors creeping in
Each level of a building costs a bit more than the last, and in some spots the shown price is one more than the maths says, because a computer adds tiny errors that rounding up turns into a whole unit. This entry gets the same price on every device, and the total for several levels.