Skip to content

Actions

An action is a named, reusable operation that updates one or more background variables at once. They're meant for anything that's more than a single checkbox toggle: a short rest that restores hit points and a limited resource together, an item that both decrements a count and applies an effect, or a "wildshape" button that sets several stats depending on which form was chosen.

Manage actions from the Actions sub-tab of the Data tab (Build mode).

Structure

An action has:

  • A name and optional description.
  • One or more operations — each one is a background variable id plus an expression to assign to it, e.g. hp = min(hp + 5, hp_max).
  • Optional parameters — named inputs (number/string/boolean, with an optional default) that operation expressions can reference alongside background variables. Parameters let one action serve multiple contexts: a single "activate wildshape" action can take a shapeId parameter instead of needing one action per shape.
  • An optional confirm before execute flag, which shows a confirmation dialog before running — useful for anything destructive or easy to trigger by accident.

Binding a button to an action

A button widget binds to one action and optionally supplies fixed values (or expressions) for that action's parameters — set this from the Inspector once the action exists. Different buttons can bind to the same action with different parameter values, which is the wildshape pattern above: one action, several buttons, each passing a different shapeId.

Execution

In Play mode, clicking a bound button runs every operation in the action, in order, against the current background data (and any parameters passed in). Each operation sees the results of the ones before it, so you can chain them — an operation that spends a resource can be followed by one that reads the value it just wrote.

Example

An action named "Long rest" with two operations:

  • hphp_max
  • spell_slots_remainingspell_slots_max

Bound to a single "Long rest" button, with confirmBeforeExecute on so it can't be triggered by an accidental tap.

Action operations on table data

An operation can target a table column instead of a scalar variable, by writing the target as tableId.columnId:

  • spells.preparedfalse clears the "prepared" box on every spell.
  • inventory.valuevalue * 2 doubles a column, row by row.

The expression is evaluated once per row, and any column ids it references resolve to that row's own cells; _row is the row's 1-based number. Global variables and action parameters are available too, so inventory.qtyqty - spent works with spent as a parameter.

To hit a single row rather than the whole column, add a 1-based row index: spells[3].prepared.

minisheet is offline-first — your sheets live on your device, with optional cloud backup.