Spielerando

How to Keep Your Game Characters Consistent

Give every character a short sheet of fixed facts, then have your AI turn those facts into rules in a model and run a checker over every path. The checker shows you the exact scenes where someone acts against their sheet or changes for no reason.

Why does my character suddenly act like someone else?

Bram the blacksmith lost his left hand in a war, and he is rude to everyone. Twenty scenes later you ask for a funny scene in his shop, and he is suddenly your friend.

Maybe that is fine. If the player brought back his old hammer, he has a reason to warm up. But the player may never have done that. Without the facts in front of it, the AI writes a typical blacksmith, and nothing notices that this scene is wrong on one path and right on another.

Which facts and rules keep a character the same?

Start with a short sheet for each character. It gives the model its facts:

  • Fixed facts: Bram is a blacksmith, lost his left hand and lives alone.
  • Wants and fears: to be left in peace, and being pitied.
  • How he talks: short and dry. "Buy it or get out."
  • Can change: warms to the player after they bring back his hammer.

Then these become rules:

  • Fixed facts stay fixed. Bram never uses two hands.
  • Change needs a cause. A character only changes after the event that changes them has happened on this path.
  • Nobody knows what they never heard. A character only talks about what they saw or were told.
  • The dead do not speak.

What does a real check look like?

Here is Bram as a model. After the forge, the player either brings back the hammer or goes to the market. Both roads lead to the funny shop scene, where Bram is friendly.

We ran this invented story through TLC 2.19 on 2 November 2026. This is TLC's real output. We only left out its housekeeping lines and put each step on one line.

Error: Invariant BramOnlyWarmsForAReason is violated.
State 1: scene = "Start", happened = {}, bramIs = "rude"
State 2: scene = "Forge", happened = {}, bramIs = "rude"
State 3: scene = "Go to the market", happened = {}, bramIs = "rude"
State 4: scene = "Funny shop scene", happened = {}, bramIs = "friendly"

On the path Start, Forge, Go to the market, Funny shop scene, Bram is friendly, but nothing has happened that could change him. That path is the proof.

The fix: the shop scene gets a second version, where Bram stays rude if the hammer never came back. We ran TLC again.

Model checking completed. No error has been found.
10 states generated, 8 distinct states found, 0 states left on queue.

TLC looked at all 8 states the story can reach, and the rule held on every path.

Do I have to read any of this?

No. You never have to read the model or the checker's output, because your AI writes it, runs it and tells you the result in plain words. TLA+ is a language for modelling, and TLC is the tool that checks a model. If TLC cannot run on your computer, your AI can get a ready-made checker through our MCP server and run it in your project. Spielerando never looks at your story.

A pass means your rules held on every path in the model. It does not mean your characters are good, and it says nothing about rules nobody wrote down. How someone should sound is a separate job, see why all my characters sound the same.

Paste this to your AI

Do not just tell me my characters are consistent. Model them and check it with a tool.

1. Read my story and story-bible.md. If you cannot see my files, ask me to paste them.
2. In story-bible.md, add a sheet for each named character: fixed facts, what they want, what they fear, what they would never do, what can change about them and which event changes it. For each fact, name the scene it comes from. If nothing in the story says it, write "I do not know".
3. Write a TLA+ model of the story in a folder called story-check.
   - Facts, as state: who is alive, what each character knows, how each character treats the player, and what has happened.
   - Steps: every scene and choice, with what it needs and what it changes.
   - Rules, as invariants: fixed facts stay fixed. A character only changes after the event that changes them. Nobody talks about what they never saw or heard. The dead do not speak.
4. Run the TLC model checker on the model so that it walks every path. If TLC cannot run here, use get_recipe with story-model-check through Spielerando and run that checker in this project. If you can run neither, tell me, and do not claim that anything was checked.
5. For each broken rule, show me the exact path of scenes the checker found, in plain words, and quote the line of the sheet and the line of the scene that clash.
6. Do not change my story yet. Suggest one fix for each path and wait for me to pick.
7. After each fix, update the model, run the checker again and show me the result.

From now on, run the checker after every change to a character. Report only which rules held, how many states were checked and whether the check was cut off. Never tell me a character is good. If a sheet does not say how they would act, say "I do not know" and ask me. Do not guess.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

How to check it worked

  • Play the path it gave you. Follow those exact scenes in the game. You should see the character act wrongly yourself.
  • Ask for something they would never do. Ask for a scene where Bram begs for help. The next check should fail and name the path.
  • Check the body. Look at text and pictures together. Does he have one hand everywhere? Pictures are not in the model.
  • Visit everyone late in the game. Talk to each character near the end. Does anyone act as if the big events never happened?

Sources

Last updated: 2026-11-02