Most automations are richer when ARC can remember something. How many wrong codes were entered? Which letters are on the readers? Is the secret door open? Variables and constants give a game a small memory and a little math, so automations can count, compare, and react.

Both live in the Editor: open your game and find Variables and Constants alongside the Automations and Scenes areas. They’re game-scoped — each belongs to one game and is available to that game’s automations and scenes.

Variables

A variable is a named value that can change while a game runs. Your automations can read it, compare it in a condition, and change it with an action.

Types

Every variable has a type. Pick the one that fits what you’re storing.

TypeHoldsExample
StringText"DEFENSE"
NumberWhole numbers and decimals3, 12.5
BooleanTrue or falsetrue
ListAn ordered set of values["red", "blue"]
MapNamed slots of values{ "north": "open", "south": "shut" }

Start value

Each variable has a Start value — what it holds when the game loads. A wrong-code counter starts at 0; a “door open” flag starts at false. ARC sets the variable to its start value at the beginning, and your automations take it from there.

What happens on game reset

When a game resets between sessions, you decide what each variable does:

  • Reset to start value — return to the start value you set. A counter goes back to 0.
  • Recompute from formula — for formula variables, work the value out again from scratch.
  • Clear — empty the variable to its type’s blank: "", 0, false, an empty list, or an empty map.
  • Keep — leave it exactly as it was at the end of the last session.

Pick reset behavior per variable

You set the reset choice on each variable individually. Most counters and flags want Reset to start value; the rare value you want to carry across sessions wants Keep.

Screenshot to capture The Variables editor table for a game: columns for name, type, start value, current value, and reset behavior, with one row showing a Formula badge.

Formula variables

A formula variable works its value out automatically from other values. You write an expression once, and ARC keeps the variable up to date whenever anything it depends on changes. Formula variables are read-only — automations can’t write to them, because the formula owns the value. They carry a Formula badge in the variables table.

An expression can reference other values by their ID, wrapped in braces:

  • {variable.id} — another variable’s current value
  • {constant.id} — a constant’s value
  • {device.id.state} — a device’s current state

You combine those references with:

  • Math: + - * / %
  • Comparisons: == != < <= > >=
  • Logic: and or not
  • A choice: if(condition, a, b) — use a when the condition is true, otherwise b

For example, a formula like if({variable.wrong-codes} >= 3, true, false) flags when a team has missed the code three times. ARC recomputes it the instant the counter changes, and any automation watching that flag reacts straight away.

Missing pieces are forgiving

If a formula references a value that isn’t set yet — an empty reader slot, say — that piece is treated as blank rather than throwing an error, so a partly-filled puzzle still computes cleanly.

Constants

A constant is a fixed, named value that never changes during a game. It’s the read-only sibling of a variable: same five types (String, Number, Boolean, List, Map), but you set the value once in the editor and no action can change it.

Constants are perfect for lookup tables and fixed settings. A classic example is a spell-a-word lock: a Map constant pairs each reader’s tag ID with the letter it represents, and a formula variable looks up letters in that constant to build the word. The mapping never changes, so it’s a constant; the assembled word does change as tags move, so it’s a (formula) variable.

Screenshot to capture The Constants editor showing a Map constant with several key/value rows used as a lookup table.

Changing a variable from an automation

In an automation’s Do column, the variable actions update a value as the room plays out. The available moves depend on the variable’s type.

ActionWorks onWhat it does
SetAnySet the variable to a value (a literal, another value, or a formula result).
AdjustNumberAdd to (or subtract from) the current number.
ToggleBooleanFlip true to false, or false to true.
ResetAnyReturn the variable to its start value.
ClearAnyEmpty the variable to its blank value.
AppendStringAdd text to the end of the current text.
Add / Remove itemListAdd an item to the list, or remove one.
Insert / Remove atListAdd or remove an item at a specific position.
Clear listListEmpty the list.
Set / Remove keyMapSet or remove a named slot in the map.
Clear mapMapEmpty the map.

A common pattern is a wrong-code counter: a Device state trigger on the keypad’s “wrong” signal runs an Adjust action that adds 1 to a number variable, and a separate automation watches that variable with a condition like “greater than or equal to 3” to offer a nudge.

Formula variables are read-only

You can’t point a variable action at a formula variable — its value comes from its expression. Change the values the formula reads, and the formula updates itself.

Where to go next

  • Game automations — use a variable in a condition or change it with an action.
  • Devices — the device states a formula can read.
  • Scenes — reusable sequences that can set values too.