Skip to main content
Player choices allow your dialogue to respond to player decisions, creating interactive and branching conversations.

Adding Options to Dialogue

Options are choices presented to the player. When an entry has options, the dialogue pauses until the player chooses one.
1

Create an entry with options

Add options to a dialogue entry and specify where each option leads:
2

Display options in your UI

When a dialogue entry has options, create buttons for each one:
3

Handle player choice

When the player clicks an option, tell the DialogueEntry which option was chosen, then advance:

Rejoining Branches

After branching, you often want the dialogue to converge back to a common path:
Using gotos to rejoin branches lets you avoid duplicating dialogue that should appear regardless of the player’s choice.

Conditional Branching

Conditional entries let you branch based on game state without showing options to the player:
1

Create a condition function

Define a function that returns a boolean:
2

Add a conditional entry

Use add_conditional_entry() instead of add_text_entry():
Conditional entries are evaluated automatically when reached. The player never sees the condition itself - the dialogue just branches silently based on the result.

Complete Example

Entry Methods for Options

Conditional Entry Methods

Best Practices

If you forget to set a goto ID for an option, the dialogue will cancel when that option is chosen.
Instead of arbitrary numbers, use enums that describe what each branch represents:
Always remove option buttons before calling advance() to prevent the player from clicking them again.
The condition callable is called when the entry is visited, so you can check any game state (inventory, flags, stats, etc.).

Next Steps