Skip to content

Background data & formulas

Background data is the actual data behind your character — the values that exist whether or not you've put a widget on the page for them. Widgets are just a view onto this data.

Open the Data tab in Build mode to manage it. It has three sub-tabs: Variables, Tables, and Actions.

Variables

A variable has an id (used to reference it, e.g. hp or str_mod), a type, and a value:

TypeValueNotes
Numbera literal number
Booleana literal true/falseused by checkboxes
Stringliteral text, or text containing {varId} / ${expression} interpolation
Formulaa ${expression}-style expression stringalways evaluated, result becomes the variable's runtime value

Variables aren't shown on any page unless you add a widget that references or binds to them — you can keep as much reference data (proficiency bonus tables, campaign constants) in the background as you like without cluttering the visible sheet.

Formulas

A Formula variable's value is an expression, recalculated whenever the variables it references change. This is how derived stats work — e.g. an ability modifier variable defined as ${floor((str - 10) / 2)}, or a proficiency bonus that scales off character level.

Expressions use mathjs syntax, not JavaScript, with one extension: JS-style arrow lambdas (row => row.prepared) are rewritten into mathjs-compatible form so you can use them in functions like filter/map over table rows. See the expression syntax reference for full details and examples.

Formulas can only reference other background variables — there's no way to reference one sheet widget from another directly. If two widgets need to show the same computed value, point them both at the same background variable.

Circular references (a formula that depends on itself, directly or through a chain) are detected and reported rather than causing an infinite loop.

Formulas are hidden and read-only outside of Build mode — Play mode only shows the computed result.

Tables

A background table is a set of typed columns (number/string/boolean) and rows — useful for inventories, spell lists, attacks, or any repeated row data. Add rows and edit columns from the Tables sub-tab, or bind a table widget to render the table's rows directly on a page (optionally filtered — see the table widget reference).

Actions

Variables and tables store data; actions are how you change several of them at once from a single button press. See Actions.

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