Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kodeflowstudios.com/llms.txt

Use this file to discover all available pages before exploring further.

A presence-only flag set attached to a conversation, used for narrative branching. Declaration
	public class FlagHandler

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
public void SetFlag(string flag)
Parameters
flag
string
required
Flag to be set.

SetFlags(List<string>)

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

IsFlagSet(string)

True if flag has been set on this conversation. Declaration
public bool IsFlagSet(string flag)
Parameters
flag
string
required
Flag to be checked.
Returns
result
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
public void ClearFlag(string flag)
Parameters
flag
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
public void ClearFlags(List<string> _flags)
Parameters
_flags
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
public List<string> GetAllSetFlags()
Returns
result
List<string>
List of all the set flags.

ToggleFlag(string)

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

ClearAllFlags()

Clears all the stored flags. Declaration
public void ClearAllFlags()