Documentation menu

Introduction

Examples

Workflow example

Edna names her price. The node has a speaker, a character defined in its own file, and one line of text:

OSF.osf source
characters/edna.osf
Character edna {
  name        = "Edna"
  description = "Runs the academy's pawn shop."
}
academy/01_hallway.osf
Dialogue 01_hallway {

  Node price {
    speaker: edna
    text: "Umm.. 70 gold? Yes, yes, 70 gold we'll get for it."
  }
}
characters/edna.yaml
apiVersion: story/v1
kind: Character
data:
  id: edna
  name: Edna
  description: Runs the academy's pawn shop.
academy/01_hallway.yaml
apiVersion: dialogue/v1
kind: Dialogue
data:
  id: 01_hallway
  startNode: price
  nodes:
    price:
      content:
        speaker: Character.edna
        text: Umm.. 70 gold? Yes, yes, 70 gold we'll get for it.

Each Character, Variable and Dialogue becomes one resource file. The resources are larger than the source, which is why people write .osf and let osf build produce the YAML.

Keep it in Git

An OSF project is a folder of text files, so it belongs in version control next to your game. When you commit, the diff shows exactly which lines of dialogue changed:

@@ academy/01_hallway.osf @@
   Node price {
     speaker: edna
-    text: "Umm.. 70 gold? Yes, yes, 70 gold we'll get for it."
+    text: "Umm.. 80 gold? Yes, yes, 80 gold we'll get for it."
   }

Run osf fmt -check and osf validate in CI so every change keeps the project formatted and valid. See Your first project.