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 form" action can take a formId parameter instead of needing one action per form.
  • An optional confirm before execute flag, which shows a confirmation dialog before running — useful for anything destructive or easy to trigger by accident (e.g. a full HP restore when already at max).

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-forms pattern above: one action, several buttons, each passing a different formId.

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). All of the resulting changes land as a single undo step — one click, one undo, regardless of how many variables the action touched.

Example

An action named "Short rest" with two operations:

  • hp${min(hp + hp_die, hp_max)}
  • spell_slots_remaining${spell_slots_max}

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

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