> ## 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.

# ParleyYaml

> Namespace: KodeFlowStudios.Parley.YamlCore

The YAML Conversation Engine for Parley.

**Declaration**

```csharp theme={null}
public class ParleyYaml
```

#### Description

This class provides all your YamlCore features for making

## Constructor

### ParleyYaml(string, string, LanguageID?)

Loads and starts a YAML-backed conversation. Same contract as [GraphCore.ParleyGraph](/parlite/reference/scripting/graph-core/parley-graph): construct, hook up events, then drive it with player input.

**Declaration**

```csharp theme={null}
public ParleyYaml(string area, string conversation, LanguageID? languageID = null)
```

**Parameters**

<ParamField path="area" type="string" required>
  The area folder containing the conversation file.
</ParamField>

<ParamField path="conversation" type="string" required>
  The conversation file name without extension or language prefix.
</ParamField>

<ParamField path="languageID" type="LanguageID?" default="null">
  Optional language override. Defaults to the runner's current language when null.
</ParamField>

## Fields

### ConversationEnded

Flags whether the conversation has ended or not.

**Declaration**

```csharp theme={null}
public bool ConversationEnded
```

### Flags

Flag register for all of the instance's set flags.

**Declaration**

```csharp theme={null}
public FlagHandler Flags
```

### Meta

Metadata for the current instance, holds a [LanguageID](/parlite/reference/scripting/localization/language-id) and a [TextDirection](/parlite/reference/scripting/localization/text-direction).

**Declaration**

```csharp theme={null}
public MetaData Meta;
```

### CurrentLanguage

Holds the value of [FallbackLanguage](/parlite/reference/scripting/localization/localizer/#fallbacklanguage).

**Declaration**

```csharp theme={null}
public LanguageID CurrentLanguage
```

## Properties

### OnNextDialogue

Fires when the player advances. Await or subscribe as you like.

**Declaration**

```csharp theme={null}
public AwaitableEvent<string> OnNextDialogue { get; private set; }
```

### CurrentNode

The node currently selected. Null once the conversation ends.

**Declaration**

```csharp theme={null}
public DialogueNode CurrentNode { get; private set; }
```

## Methods

### BindNextEvent(InputAction)

Rebinds the "advance" signal to a different input action.

**Declaration**

```csharp theme={null}
public void BindNextEvent(InputAction inputAction)
```

**Parameters**

<ParamField path="inputAction" type="InputAction" required>
  The input action that will be binded to the event.
</ParamField>

### UnBindNextEvent(InputAction)

Detaches the input handler. Called automatically on end.

**Declaration**

```csharp theme={null}
public void UnBindNextEvent()
```

### GetCurrentChoices()

Returns the choices available on the current node, or an empty list if there aren't any.

**Declaration**

```csharp theme={null}
public List<ChoiceData> GetCurrentChoices()
```

**Returns**

<ResponseField name="result" type="List<ChoiceData>">
  The choices available on the current node. Empty if the current node is a plain dialogue line with no branching.
</ResponseField>

### ProgressDialogue(string)

Advances the conversation one step. Pass `"*"` to follow the current node's `NextNode`, or a specific node ID to jump. Handles flag-check branching inline — if the current node has `CheckFlags`, they're evaluated and the True/False branch is chosen before we move.

**Declaration**

```csharp theme={null}
public void ProgressDialogue(string nextNode = "*")
```

**Parameters**

<ParamField path="nextNode" type="string" default="*">
  Target node for the transition. When `null` or `"*"`, falls back to `CurrentNode.NextNode`.
</ParamField>

### 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**

```csharp theme={null}
public void ChoiceMade(int index)
```

**Parameters**

<ParamField path="index" type="int" required>
  Index of the Choice that has been made.
</ParamField>

### 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**

```csharp theme={null}
public async Task<int> GetPlayerChoice()
```

**Returns**

<ResponseField name="result" type="Task<int>">
  The index of the chosen choice.
</ResponseField>

### EndDialogue()

Ends the conversation: detaches input, flips the flag, and leaves the stage.

**Declaration**

```csharp theme={null}
public void EndDialogue()
```
