Format reference
Node
A node is one line of a dialogue. Node ids are unique within their dialogue. A node has next or options, never both; a node with neither ends the dialogue.
Node that ends the dialogue
OSF.osf source
scene.osf
Dialogue scene {
Node goodbye {
speaker: stranger
text: "Goodbye." // no next and no options: the dialogue ends here
}
}compiled by
osf buildscene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: scene
startNode: goodbye
nodes:
goodbye:
content:
speaker: Character.stranger
text: Goodbye.Node that is linked to the next node
OSF.osf source
scene.osf
Dialogue scene {
Node node_01 {
next: node_02
speaker: protagonist
text: "Where am I?"
}
Node node_02 {
text: "Total Darkness surrounds you." // no speaker: narration
}
}compiled by
osf buildscene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: scene
startNode: node_01
nodes:
node_01:
next: node_02
content:
speaker: Character.protagonist
text: Where am I?
node_02:
content:
text: Total Darkness surrounds you.Node with options
OSF.osf source
scene.osf
Dialogue scene {
Node node_01 {
speaker: stranger
text: "How are you?"
Option fine {
next: node_02
text: "Fine, thanks."
}
Option bye {
text: "Bye"
}
}
Node node_02 {
speaker: stranger
text: "Good."
}
}compiled by
osf buildscene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: scene
startNode: node_01
nodes:
node_01:
content:
speaker: Character.stranger
text: How are you?
options:
fine:
next: node_02
content:
text: Fine, thanks.
bye:
content:
text: Bye
node_02:
content:
speaker: Character.stranger
text: Good.Node that sets variables on start
OSF.osf source
scene.osf
Dialogue scene {
Node wake_up {
set: { is_dreaming: false, gold: 23 } // applied when the node starts
text: "You wake up. Your purse feels lighter."
}
}compiled by
osf buildscene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: scene
startNode: wake_up
nodes:
wake_up:
set:
is_dreaming: false
gold: 23
content:
text: You wake up. Your purse feels lighter.Fields
| .osf | YAML / JSON | Value |
|---|---|---|
text | content.text | Text. Required. See Content. |
speaker | content.speaker | Character id; Character.<id> in YAML and JSON. Omit for narration. |
title | content.title | Text: the shown speaker name, overriding the character’s. |
next | next | A node id in this dialogue, or Dialogue.<id>. See Links. |
set | set | Variable values, applied when the node starts. |
Option | options | A player choice, keyed by id. See Option. |
set
A map of variable ids to values, applied when the node starts. Each value must match the variable’s type.