Documentation menu

Format reference

Variable

Story state that options can require and nodes or options can set. In set and requires, a variable is referenced by its bare id.

Schema: Boolean

OSF.osf source
variables/is_player_alive.osf
Variable is_player_alive: Boolean = true
variables/variables/is_player_alive.yaml
apiVersion: story/v1
kind: Variable
data:
  id: is_player_alive
  type: boolean
  default: true

Schema: Integer

OSF.osf source
variables/gold.osf
Variable gold: Integer = 70
variables/variables/gold.yaml
apiVersion: story/v1
kind: Variable
data:
  id: gold
  type: integer
  default: 70

Schema: String

OSF.osf source
variables/faction.osf
Variable faction: String = "none"
variables/variables/faction.yaml
apiVersion: story/v1
kind: Variable
data:
  id: faction
  type: string
  default: none

Type

Boolean, Integer or String in .osf, compiled to lowercase boolean, integer or string. The default must match the type, and so must every value a node or option sets or requires.