NarraLeaf

Variables

The nodes that declare a variable, read it, write it, and reach the persistent and story stores.

These nodes are the only way a graph touches a variable. Which scopes exist, how long each one lives, and what survives a save is covered on Variables; this page is the signatures.

Conventions

  • Get Var and Set Var project their value pin type from the selected variable. The pin is declared any, but on the card it takes the type of whatever you picked in Variable, and the editor uses that projected type for the pin label, the connection preview, and validation.
  • The Persistent and Saved pairs project their value pin the same way, from the variable's declared type. A Number variable gives a float pin, so it wires into + and other number inputs.
  • A later type change keeps your edges. Change a Var's Data type and any edge that no longer fits stays exactly where it is; validation reports a type mismatch instead of the editor quietly deleting the connection. You decide what to rewire.
  • The Persistent pair is latent. Get Persistent and Set Persistent suspend the graph until the read or write finishes, which keeps them out of a Blueprint Value, an inline story value and a branch condition.
  • Blueprint Value cannot declare. A widgetValue owner has no Var node at all. It can still read and write the variables it can reach, through Get Var and Set Var.
  • The Scene nodes belong to Story Action blueprints. Get Scene Var and Set Scene Var are offered nowhere else. The Saved pair is offered to every blueprint: in a Story Action blueprint it reaches the running story, and anywhere else it reaches the game being played. A Blueprint Value takes Get Saved Var and not Set Saved Var, and the value it shows follows every write to the variable.

Var

blueprint.local.declareVar · Pure

A declaration, not a step in the flow — and the only node here with no pins. Put it anywhere on the canvas; the runtime collects every Var in the blueprint before execution starts, and those declarations are what the Variable dropdowns offer.

On-card fields

FieldWhat
nameThe variable's name, as it appears in every Variable dropdown.
valueTypeData type: String, Integer, Float, Boolean, JSON, Array, Timer, AnimationToken, or Any.
defaultValueThe starting value. It is deep-copied into the store, so mutating the variable at runtime never edits the default you authored.

Picking Any locks Default to a disabled null. An Any variable always starts as null — there is no type to seed a sensible default from. Give it a value with Set Var before anything reads it.

Get Var

blueprint.local.get · Pure

Reads a variable the current blueprint can reach. Being pure, it has no exec pins: it is not a step in the chain, it is a value that resolves when something reads it.

PinDirectionTypeNotes
valueout · dataanyProjected to the selected variable's type.

On-card fields

FieldWhat
variableIdThe variable to read. The dropdown lists everything this blueprint can reach; entries that share a name carry a scope hint.

Set Var

blueprint.local.set

Writes a variable the current blueprint can reach, then continues through next.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
valuein · dataanyProjected to the selected variable's type.

On-card fields

FieldWhat
variableIdThe variable to write.

Get Persistent

blueprint.persistent.get · Latent

Reads a project-level Persistent variable from host-managed storage. It is latent because that storage is asynchronous, and it is an exec node rather than a pure read for the same reason — it sits in the chain and publishes the result on value when the read lands. Nothing saved under that variable yet gives you its authored default, not an empty value.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
valueout · dataanyThe stored value, or the variable's default. Projected to the selected variable's type.

On-card fields

FieldWhat
persistentVariableIdThe Persistent variable to read.

Set Persistent

blueprint.persistent.set · Latent

Writes a Persistent variable through host-managed storage, then continues through next. The write is awaited, so next means the value is committed.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
valuein · dataanyThe value to store. Projected to the selected variable's type.

On-card fields

FieldWhat
persistentVariableIdThe Persistent variable to write.

Get Scene Var

blueprint.scene.get

Reads a Scene variable from the running story's scene-local store. Note the exec pins: unlike Get Var, the story reads are steps in the chain, and value is only meaningful downstream of next.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
valueout · dataanyThe variable's current value.

On-card fields

FieldWhat
sceneVariableIdThe Scene variable to read.

Set Scene Var

blueprint.scene.set

Writes a Scene variable, then continues through next.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
valuein · dataanyThe value to write.

On-card fields

FieldWhat
sceneVariableIdThe Scene variable to write.

Get Saved Var

blueprint.saved.get

Reads a Saved variable from the saved store of the game being played, the one a save file carries. A screen can read one before any game has started, for example on the title screen: value is then the variable's declared default and found is false.

In a Blueprint Value the widget shows the new value whenever the variable is written, whether by a story row, a screen's blueprint or a save being loaded.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
valueout · dataanyThe variable's current value, or its declared default when found is false. Projected to the variable's declared type.
foundout · databooleanfalse when no running game holds the variable. Always true in a Story Action blueprint.

On-card fields

FieldWhat
savedVariableIdThe Saved variable to read.

Set Saved Var

blueprint.saved.set

Writes a Saved variable, then continues through next.

Outside a Story Action blueprint it writes into the game being played, and fails when no game is running, when the variable is not declared, or when the value cannot be stored in a save. The value is in the next save. The story's undo does not take the write back, and story lines already on screen do not change because of it.

PinDirectionTypeNotes
inin · exec—
nextout · exec—
valuein · dataanyThe value to write. Projected to the variable's declared type.

On-card fields

FieldWhat
savedVariableIdThe Saved variable to write.

On this page