Set Variable Node
Set Variable changes what the story remembers without asking the player for text or a choice.
Use Insert > Dialogue & Logic > Change Variable for route flags, counters, affinity points, unlocks, and short pieces of state that later conditions should read.
Properties
Section titled “Properties”| Field | What it does |
|---|---|
| Name | Optional editor-only name for the node. |
| Variable | Variable this node changes. |
| Operation | Operation allowed for the selected variable kind. |
| Value, Append Text, or Amount | Operand used by the operation when one is needed. |
| Next | Node that runs after the variable changes. |
Operations
Section titled “Operations”| Variable kind | Operations |
|---|---|
string | set, append |
number | set, increment, decrement |
boolean | set, toggle |
If older project data contains an invalid operation for the variable kind, VNC treats it as set. You should still fix the field in Properties so the route is clear.
Runtime behavior
Section titled “Runtime behavior”When the node runs, VNC reads the current variable value, applies the operation, stores the result, then continues to Next.
If the selected variable is missing, the node cannot update story state. Properties and Output should point you toward the missing variable before runtime testing.
Examples
Section titled “Examples”| Goal | Setup |
|---|---|
| Add affection | Number variable averyTrust, operation increment, amount 1. |
| Mark a route open | Boolean variable helpedAvery, operation set, value true. |
| Add text to a note | String variable clueList, operation append, append text , library key. |
| Flip a flag | Boolean variable lightsOn, operation toggle. |
Set Variable nodes are quiet, but they make later branches meaningful. Name them clearly when the route depends on them.