Documentation menu

Format reference

Dialogue

A dialogue is a scene: a set of nodes and the node it starts at.

Schema

OSF.osf source
scene_01.osf
Dialogue scene_01 {
  name = "Scene 01: Oliver and Kael"

  Node node_01 {
    speaker: kael
    text: "Hello!"
  }
}
scene_01.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
  id: scene_01
  name: 'Scene 01: Oliver and Kael'
  startNode: node_01
  nodes:
    node_01:
      content:
        speaker: Character.kael
        text: Hello!

Dialogue start

start picks the first node. Without it, the first node in the file is the start. Either way, the resource always has startNode:

OSF.osf source
scene_02.osf
Dialogue scene_02 {
  start node_02   // without this line the first node, node_01, is the start

  Node node_01 {
    text: "Skipped on the way in."
  }

  Node node_02 {
    next: node_01
    text: "The dialogue starts here."
  }
}
scene_02.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
  id: scene_02
  startNode: node_02
  nodes:
    node_01:
      content:
        text: Skipped on the way in.
    node_02:
      next: node_01
      content:
        text: The dialogue starts here.

Fields

FieldValueRequired
idAfter Dialogue in .osf.yes
nameText. Translatable.no
start / startNodeA node id in this dialogue.in YAML and JSON
Node / nodesAt least one node, keyed by id.yes

Other nodes and dialogues are connected with next. See Links.