Variables, conditions and memory
Variables
Section titled “Variables”Use exact Dialogue.Variable.* tags and the typed setters/getters on the Dialogue Component. Supported values are Boolean, Integer, Float, Text and Name. Getter return values indicate whether the variable exists with the requested type; use the output only on success.
Example:
Set Dialogue Boolean (Dialogue.Variable.HasKey, true)→ enter Choice with condition HasKey == true→ "Unlock the door" is availableVariables belong to that component. They are not automatically written to disk or copied to another component.
A Variable Schema asset declares tags, default values and descriptions. Create it using Content Browser → right-click → Advanced Dialogue Manager → Variable Schema. Open it to define the variables, then assign it to the Dialogue Asset’s Variable Schema field to initialize defaults on start and enforce relevant active-schema types. Existing compatible values are retained; incompatible values can be replaced by defaults on normal start.
Text can reference variables using named placeholders such as {Dialogue.Variable.Score}. Resolve Dialogue Text formats them for presentation.
Conditions
Section titled “Conditions”Choose Dialogue Variable for a typed comparison. Choose External Provider when the answer belongs to inventory, quests or another system. Condition groups combine rules with All/Any and optional rule inversion.
Configure Condition Handler Source:
- This Actor: the component owner must implement Advanced Dialogue Condition Provider.
- Another Object: assign the runtime object to Condition Handler. It must implement Advanced Dialogue Condition Provider.
Implement Evaluate Dialogue Condition as a synchronous, side-effect-free answer. It may run for multiple choices or branches. On Condition Evaluated is a diagnostic event, not the place to return that answer.
Memory
Section titled “Memory”The component records visits, selected stable choice IDs, starts, completions and current-run history. It also owns Selector sequencing/shuffle memory.
Use Was Choice Selected, Has Dialogue Completed and the count getters to tailor later conversations. Clear Dialogue Memory resets memory and Selector state, but not variables. Clear Dialogue Variables resets variables, but not memory.
Use Capture/Restore for persistence. The game separately saves consequences such as an unlocked door.