Format reference
Option
An option is a choice the player can pick on a node. Option ids are unique within their node.
Option that ends the dialogue
OSF.osf source
scene.osf
Dialogue scene {
Node node_01 {
text: "Anything else?"
Option bye {
text: "Bye" // no next: choosing it ends the dialogue
}
}
}compiled by
osf buildscene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: scene
startNode: node_01
nodes:
node_01:
content:
text: Anything else?
options:
bye:
content:
text: ByeOption that leads to the next node
OSF.osf source
scene.osf
Dialogue scene {
Node node_01 {
text: "Hello."
Option how_are_you {
next: node_02
text: "How are you?"
}
}
Node node_02 {
text: "Fine, thanks."
}
}compiled by
osf buildscene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: scene
startNode: node_01
nodes:
node_01:
content:
text: Hello.
options:
how_are_you:
next: node_02
content:
text: How are you?
node_02:
content:
text: Fine, thanks.Option that starts another dialogue
OSF.osf source
01_intro_scene.osf
Dialogue 01_intro_scene {
Node node_03 {
text: "Am I dreaming?"
Option say_no {
next: Dialogue.02_shadows_speak // starts the other dialogue at its start node
text: "No. Fool"
}
}
}compiled by
osf build01_intro_scene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: 01_intro_scene
startNode: node_03
nodes:
node_03:
content:
text: Am I dreaming?
options:
say_no:
next: Dialogue.02_shadows_speak
content:
text: No. FoolOption with required variables
OSF.osf source
scene.osf
Dialogue scene {
Node node_01 {
text: "The door is locked."
Option leave {
requires: { is_dreaming: true, gold: 0 } // shown only when every value matches
text: "Bye"
}
}
}compiled by
osf buildscene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: scene
startNode: node_01
nodes:
node_01:
content:
text: The door is locked.
options:
leave:
requires:
is_dreaming: true
gold: 0
content:
text: ByeOption that sets variables
OSF.osf source
scene.osf
Dialogue scene {
Node node_01 {
text: "Am I dreaming?"
Option say_yes {
next: node_02
set: { is_dreaming: true } // applied when the player chooses it
text: "Yes, you are."
}
}
Node node_02 {
text: "Strange"
}
}compiled by
osf buildscene.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
id: scene
startNode: node_01
nodes:
node_01:
content:
text: Am I dreaming?
options:
say_yes:
set:
is_dreaming: true
next: node_02
content:
text: Yes, you are.
node_02:
content:
text: StrangeFields
| .osf | YAML / JSON | Value |
|---|---|---|
text | content.text | Text. Required. |
next | next | As for nodes; omit to end the dialogue. |
requires | requires | Variable values; the option is shown only when all match. |
set | set | Variable values, applied when the option is chosen. |
requires
A map of variable ids to values that must all be equal for the option to be shown. Only equality is supported.