Skip to main content
A presence-only flag set attached to a conversation, used for narrative branching. Declaration

Description

A simple set of string flags attached to a conversation. Think of it as a lightweight state bag — no values, just presence/absence. If you need to track quantities or structured data, lift it into your own game state and leave flags for narrative branching.

Methods

SetFlag(string)

Marks a single flag as set. Silently no-ops on null/empty input (and logs an error). Declaration
Parameters
string
required
Flag to be set.

SetFlags(List<string>)

Sets multiple flags in one go. Convenient when a node ends a whole questline. Declaration
Parameters
List<string>
required
List of flags to be set.

IsFlagSet(string)

True if flag has been set on this conversation. Declaration
Parameters
string
required
Flag to be checked.
Returns
bool
Value of the flag returned from the evaluation.

ClearFlag(string)

Unsets a single flag. No-ops if it wasn’t set to begin with. Declaration
Parameters
string
required
Flag to be cleared.

ClearFlags(List<string>)

Unsets a batch of flags. Useful when a major story beat resets a chapter’s state. Declaration
Parameters
List<string>
required
List of flags to be cleared.

GetAllSetFlags()

Returns a snapshot copy of every currently-set flag. Safe to iterate or persist. Declaration
Returns
List<string>
List of all the set flags.

ToggleFlag(string)

Inverts a flag’s presence — adds it if absent, removes it if present. Declaration
Parameters
string
required
Flag to be toggled.

ClearAllFlags()

Clears all the stored flags. Declaration