Show choices that need an item as open, grey or hidden, and never end up with none
A dialogue option that needs a key should appear in a way that suits the story: shown but greyed, or not shown at all. Either way the player must always have at least one real option left. This entry builds the list for the screen and guards against an empty menu.
Why this works
A player who sees a locked option learns what the world holds, and one who sees an empty menu learns only that the game broke. Always keeping one way out means a missing item changes the story but can never end it.
When not to use it
Skip it when running out of options is the point, such as a horror scene where being trapped is the fear, or a hard puzzle where the missing item is the whole challenge. There, let the dead end happen and make it a clear, deliberate ending.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 31 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 "Show choices that need an item as open, grey or hidden, and never end up with none" (read_entry choice-locked-by-missing-item-never-dead-ends) 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