Spielerando

Make a chest hold the same items every time the game is reloaded

A player opens a chest, sees a rare sword, quits without saving and reloads, and the chest now holds a stick. Rolling again on every open invites reload cheating and bug reports. This entry fixes the contents from the world and the chest itself.

Why this works

Contents that depend only on facts that never change can be worked out again whenever they are needed. Nobody can reload until something good appears, every machine sees the same chest, and the save keeps only what the player took.

When not to use it

Skip it when loot should surprise even on a second visit, or when you ship updates that change the table, because old chests change with it. Draw once and store the result in the save instead.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 33 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 "Make a chest hold the same items every time the game is reloaded" (read_entry chest-contents-stay-the-same-on-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