How to Build Quests That Do Not Get Stuck
A quest gets stuck when one of its steps needs something that is gone, such as a person, an item or a place. Have your AI model who is where and who holds what, and a checker will show you the exact path of scenes that leaves a quest with no way to finish.
Why does my quest get stuck?
Oskar the fisherman asks the player to find his lost net. Then the main story sends Oskar's boat away in chapter 3. A player who finds the net in chapter 4 has nobody to give it to. The quest stays open forever.
The AI wrote the quest and the main story at different times. Each one works alone. Nobody asked what happens when they meet, and "be careful with quests" will not find it. It only shows on the paths where the two cross.
Which facts and rules stop a quest getting stuck?
- Facts: who is where, who is alive, who holds what, and how far each quest has got.
- Every quest can be finished. While a quest is open, someone or something must still be able to finish it.
- Needed items stay reachable. Nothing the quest needs can be sold, dropped or used up without a replacement.
- Order does not matter. If the player already has the net when Oskar asks, the quest moves on.
- No quest needs what another used up.
The usual fix is a way out: another person, a replacement item or a different ending for the quest.
What does a real check look like?
Here is Oskar as a model. He asks for his net. The player can give it to him straight away, or chapter 3 comes first and his boat leaves. The model keeps a list of who can take the net.
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 EveryOpenQuestCanStillBeFinished is violated.
State 1: scene = "Start", quest = "not started", canTakeTheNet = {"Oskar"}
State 2: scene = "Oskar asks for his net", quest = "open", canTakeTheNet = {"Oskar"}
State 3: scene = "Chapter 3: Oskar's boat leaves", quest = "open", canTakeTheNet = {}
On the path Start, Oskar asks for his net, Chapter 3, the quest is still open, and the list of who can take the net is empty. That path is the proof.
The fix: Oskar's sister stays in the village and takes the net. We ran TLC again.
Model checking completed. No error has been found.
11 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 quests are good, and it says nothing about rules nobody wrote down.
Paste this to your AI
Do not just read my quests and tell me they work. Model them and check them with a tool.
1. Read all the quests and the main story. If you cannot see my files, ask me to paste them.
2. Create story-bible.md if it does not exist. Add a section called Quests, with the steps, what each step needs (person, item, place) and what finishes it.
3. Write a TLA+ model of the story in a folder called story-check.
- Facts, as state: who is where, who is alive, who holds what, and how far each quest has got.
- Steps: every scene, every quest step and every way to lose something: selling, dropping, using up, someone leaving or dying. Include doing steps early and skipping lines that start a quest.
- Rules, as invariants: while a quest is open, what it needs still exists and someone can still finish it. No quest needs something another quest used up.
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 quest or the main story that causes it.
6. Do not change my story yet. Suggest one way out for each path: another person, a replacement item or a different ending for the quest. 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 for every new quest, and again when the main story changes. Report only which rules held, how many states were checked and whether the check was cut off. Never tell me a quest is good. If you cannot tell what a step needs, 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 get stuck yourself.
- Do it backwards. Find the item before you talk to the person who wants it.
- Sell the item. Try to sell, drop or use up every quest item.
- Save in the middle. Save during a step, close the game, load and finish the quest. See save games that keep the story.
- Skip the talking. Click through every line as fast as you can. Does the quest still start?