Spielerando

Build a dialogue question menu that unlocks, repeats and ends cleanly

A conversation where you pick topics to ask about can trap the player with an empty list, hide a question forever behind a circle of conditions, or let them leave before the one thing they had to ask. Here is how to build the menu and check it.

Why this works

A conversation menu has no memory of its own; what you may ask follows entirely from what was already asked. Deriving the list fresh each time keeps it honest, and a separate look at the whole set of topics catches dead ends before a player does.

When not to use it

Wrong for free-form chat where the player types anything, or for a scene with only one or two lines to say. There a fixed exchange is simpler. Also avoid hiding topics in a game that wants players to wander back and reread.

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
  • 26 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 "Build a dialogue question menu that unlocks, repeats and ends cleanly" (read_entry question-menu-that-never-runs-dry) 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