Spielerando

After loading my save, two soldiers act as one and orders go to the wrong one

When two units end up with the same number, commands, selections and targets quietly mix them up. This entry gives your AI an audit that finds the clashes and a repair that renumbers fairly, and warns about orders that are now ambiguous.

Why this works

An id is a promise that exactly one thing owns it. Repairing means keeping the first owner, since references were made while it was alone, and giving the others new ids above the highest one in use, so no old reference can hit them.

When not to use it

Skip the repair if you can still find why ids clash, for example a counter that restarts at 1 after load. Fix the counter first, then the repair is needed only for old saves.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 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 "After loading my save, two soldiers act as one and orders go to the wrong one" (read_entry strategy-two-units-share-one-id-after-load) 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