Decide when a quest's counter resets: this level, this run, or forever
"Collect 10 coins in one level" and "collect 10 coins in total" read almost the same but break differently when the player loses, quits or restarts. Here is a small rule set that gives each quest its own reset moment and keeps a finished quest finished.
Why this works
How long a count lives is part of what the quest means, so it belongs to the quest and not to the thing being counted. One event can then feed many quests, each forgetting at its own moment, and a finished quest never reopens.
When not to use it
Skip it in a game with one short quest that always lasts exactly one level. A single fixed rule is clearer there. Also avoid it where players expect work to carry over after losing, as in slow-grind games; use the never-reset kind.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- A diagram of every state
- 22 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 "Decide when a quest's counter resets: this level, this run, or forever" (read_entry quest-progress-scope-run-level-total) 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