Spielerando

Saving fails or duplicates characters when they hold each other, like an owner and a pet

When two things in the game know about each other, a naive save either refuses to run or writes the same thing twice, and after loading they are strangers. Here is how to save links and rebuild them so shared things stay one thing.

Why this works

In the world, a pet and its owner are two things that know each other, but a saved file is a flat list. Replacing each link by a name tag, and reconnecting them after everything exists, keeps every thing single and every link true.

When not to use it

Skip it when things never refer to each other, or the game is a flat list such as a score table. Then plain records are enough; reach for name tags only when one thing really needs to know another.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 39 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 "Saving fails or duplicates characters when they hold each other, like an owner and a pet" (read_entry save-things-that-point-at-each-other) 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