Show a choice only when a condition holds
The goal
Section titled “The goal”A choice in a Show Dialogue is available only when something is true, for example when the Conspirator has enough gold. When it is picked, it can also cost something.
Do it, step by step
Section titled “Do it, step by step”- Open the choice on the card of the Show Dialogue node.
- In Available when, write a condition without braces, such as
conspirator.Gold >= 800ortarget.Alive and not scheme.Caught.GoldandCaughtstand for variables of your own database. - Turn on Hide when unavailable to hide the choice. Left off, it stays on the window and cannot be clicked.
- In Tooltip when unavailable, say why, for example “You need at least 800 gold.” It replaces the Tooltip while the condition fails.
- For a price, click + Add a change on the choice and pick Change a variable. Name the variable, set Operation to −, and write the amount. Change a variable takes a number variable every actor has; for a scheme or clan variable pick Change any variable.
- Link the output of the choice. Each choice has its own.
The condition says when the choice can be picked, and the change takes the gold when it is. Write the same number in both.
What you will see
Section titled “What you will see”While the condition fails, the player sees the choice disabled with your tooltip, or does not see it at all, and it comes back as soon as the condition holds. Changes run top to bottom when the choice is picked, before the flow goes on, and one that cannot be made is skipped while the others still happen.
An actor no player plays never picks a choice whose condition fails.
What can go wrong
Section titled “What can go wrong”- Every choice can be unavailable. A player is left with nothing to click, and an actor nobody plays stops the flow. Keep one choice with no condition.
- The price lands on the wrong actor. A new change starts with the Conspirator as its actor. Change it if the Target pays.
- No chance shows with the choice. The tooltip of a choice shows the odds of a Chance node, Odds from picks which node, and Automatic takes the first Chance the choice leads to, so a choice that leads to no Chance node has no odds to show.
How it connects
Section titled “How it connects”- Choices, hidden choices and how an actor nobody plays answers are on Dialogues and announcements.
- The condition language is on Texts, tokens and pacing, and the node is Show Dialogue.
- To show odds next to a choice, see Decide by chance with fair odds.