Spielerando

Keep picked-up items gone when the player leaves and re-enters a room

Walk out of a room and back in, and the medicine bottle you took is lying there again, ready to be taken for free. This entry remembers what was taken, handles a pickup that only half fitted into the bag, and lets chosen things grow back on purpose.

Why this works

A room is rebuilt each time you enter, so the only way for it to remember is to keep a note of what was taken and subtract it from what the room starts with. Each pickup gets its own steady name, and only the amount really picked up is struck off.

When not to use it

Do not use it for places meant to reset on every visit, such as a practice room, a roguelike floor or a shop shelf that restocks. There, rebuild the contents fresh from a seed and drop the record.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 21 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Keep picked-up items gone when the player leaves and re-enters a room" (read_entry room-pickups-stay-taken-after-reload) 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