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.

The Graph Conversation Engine for Parley. Declaration
	public class ParleyGraph

Description

This class provides all your GraphCore features for making

Constructor

ParleyGraph(string, string, LanguageID?)

Boots a conversation. Looks up the graph asset, wires up the “NextDialogue” input action (falling back to left mouse click if the project hasn’t defined one), and advances to the entry node. If the graph can’t be found the instance ends itself immediately - safe to construct without a try/catch. Declaration
public ParleyGraph(string area, string conversation, LanguageID? languageID = null)
Parameters
area
string
required
The area folder containing the conversation file.
conversation
string
required
The conversation file name without extension or language prefix.
languageID
LanguageID?
default:"null"
Optional language override. Defaults to the runner’s current language when null.

Fields

ConversationEnded

Flags whether the conversation has ended or not. Declaration
public bool ConversationEnded

Flags

Flag register for all of the instance’s set flags. Declaration
public FlagHandler Flags

Meta

Metadata for the current instance, holds a LanguageID and a TextDirection. Declaration
public MetaData Meta;

CurrentLanguage

Holds the value of FallbackLanguage. Declaration
public LanguageID CurrentLanguage

Properties

OnNextDialogue

Fires when the player advances. Await or subscribe as you like. Declaration
public AwaitableEvent<string> OnNextDialogue { get; private set; }

CurrentNode

The node currently selected. Null once the conversation ends. Declaration
public RuntimeDialogueNode CurrentNode { get; private set; }

Methods

BindNextEvent(InputAction)

Rebinds the “advance” signal to a different input action. Declaration
public void BindNextEvent(InputAction inputAction)
Parameters
inputAction
InputAction
required
The input action that will be binded to the event.

UnBindNextEvent(InputAction)

Detaches the input handler. Called automatically on end. Declaration
public void UnBindNextEvent()

GetCurrentChoices()

Returns the choices available on the current node, or an empty list if there aren’t any. Declaration
public List<ChoiceData> GetCurrentChoices()
Returns
result
List<ChoiceData>
The choices available on the current node. Empty if the current node is a plain dialogue line with no branching.

ProgressDialogue(string)

Advances the conversation. Pass "*" (the default) to follow the current node’s RuntimeDialogueNode.NextNodeID, or a specific node ID to jump there directly. No-ops on a Choice node — the player has to pick first. Declaration
public void ProgressDialogue(string nextNode = "*")
Parameters
nextNode
string
default:"*"
Target node for the transition. When null or "*", falls back to CurrentNode.NextNode.

ChoiceMade(int)

Records a choice pick and follows that choice’s branch. Invalid indices and missing target nodes are handled gracefully, bad input ends the conversation rather than throwing. Declaration
public void ChoiceMade(int index)
Parameters
index
int
required
Index of the Choice that has been made.

GetPlayerChoice()

Awaitable choice input. Throws if called while no choices are available — that’s almost always a sign the gameplay state and dialogue state have drifted out of sync, and we’d rather fail loudly than silently hang on a task that will never complete and causing a race. Declaration
public async Task<int> GetPlayerChoice()
Returns
result
Task<int>
The index of the chosen choice.

EndDialogue()

Ends the conversation: detaches input, flips the flag, and leaves the stage. Declaration
public void EndDialogue()