Skip to reading
The Dialogue Designer

Appendix E. Put names and values in a sentence

Edition 0.86.3.4

Build branching conversations with choices, conditions, actions, timed responses, voices, portraits and custom windows.

Download PDFView PDF page

Dialogue text and response labels can include wildcards. The runtime replaces them when it presents the text, so one authored sentence can refer to the current player or a changing story value.

Source table from Appendix E. Put names and values in a sentence, page 75
TokenReplacement
@PlayerNameThe active player’s display name.
@PlayerIdThe active player’s record ID; mostly useful for debugging.
@SceneNameThe current scene’s name.
@ScoreThe score variable, with zero as its fallback.
$$trustThe current value of the variable named trust.
$$_dialogue_speakerThe current speech name; useful on a custom GUI name label.

For example, enter “Welcome back, @PlayerName.” in a Line. With Ivo active, the displayed greeting includes Professor Ivo. Change the player and the same authored sentence follows the new active player’s name.

Define your own variable before using it. A Line such as “Your trust score is $$trust.” displays the current value; it does not add to that value. A Number may display as 0.0. For special formatting, prepare a separate display string in a script. Use an Action to change trust when the story calls for it.

Unknown variable tokens remain visible, which is useful for catching a spelling error. If $$truts appears in Play, check the variable’s exact ID rather than editing its display name.

Preserve tokens in translated text. Recorded speech is not assembled from variable values. If a voice must say a changing name or number, plan separate recordings/Lines or wording that avoids speaking the changing value.

Page 75 of 77Permalink
Go to page