Start
When the sheet calculates
Learn to make the sheet apply a rule for you. Start by changing a number in the example below, check the result, then build your own rule in the same editor used by the sheet.
An automation is a rule the sheet applies on its own, such as adding a bonus or spending mana. In the editor, a rule becomes a diagram: each box is a step (also called a node) and the lines show which step comes next. You do not need to write formulas to get started.
Change Strength from 3 to 2 and watch the bonus change. Then open the editor and change the bonus.
Follow the instructions to create the same bonus rule, one step at a time.
Learn to spend mana, heal, improve a skill or count equipped items. The rest of the guide is reference: come back to it when a question comes up.
This example's rule is: “if Strength is 3 or more, give a +2 bonus; otherwise, give 0”. The fields below represent a sample character. The highlighted path shows the steps the rule followed.
Change these numbers freely. The examples use a sample sheet and do not change your characters.
To enlarge only the diagram, use View nodes in full screen in its corner; Escape or Back to guide closes it. Open in the sheet editor opens the same editing screen used by characters. Click a step to see its fields. The test is only a simulation; Save returns to the guide with your changes, and Reset example undoes everything.
Test result: Bonus +2
Before opening the editor, think about what you want the sheet to do. Then break that idea into small steps, connected by lines.
Write down what you want to happen: “if my Strength is 3 or more, I get +2; if it is lower, I get 0”. That sentence has one question and two possible results.
In the editor, Start marks where the rule begins. The If step asks the question. Each Bonus step provides one of the results. The lines say which result applies in each case. A loose step, with no line coming from Start, is never used.
Step (or node): a box in the diagram that does one thing, such as asking something or giving a bonus. Line (or connection): links one step to the next and sets the order. Flow: the whole diagram of a rule.
Condition: a yes-or-no question, such as “do I have at least 2 Mana?”. Trigger (or event): what makes the rule start, such as using a spell or rolling dice.
Variable: a nickname that reads a number from the sheet; @forca means “the Strength value”. Expression: a small calculation, such as @forca + 2. Target: the sheet field that will change, such as current Health.
Card: in this guide, always a resource card on the sheet, such as an item, spell or ability. The variable names used here (@forca, @vida, @mana) are examples: on your sheet, use the names the editor suggests as you type.
There are two kinds of rule. The first always applies: it begins at Start and recalculates on its own whenever the sheet changes. Use it for bonuses that depend on other values, for showing or hiding parts of the sheet and for effects of equipped items.
The second happens once, when something is done: it begins at Trigger. Use it to spend mana when casting a spell, roll an attack when clicking a button or react to a roll.
Example: a shield gives defense while it is equipped (always applies); a spell spends mana each time it is cast (happens once). The kind of rule depends on where you open the automation, and the editor only offers the steps that make sense there.
Read the diagram from Start or Trigger, following the lines. Moving a step on screen only tidies the diagram: the lines set the order. On an If step, the Yes path runs when the answer is yes and the No path when it is no.
To spend mana and then roll, connect Trigger → Change value → Roll dice. When one action depends on another, line them up like this. Two lines leaving the same point create two separate paths.
If you need more than two alternatives, use the Switch step (see the reference). It checks several questions in order and has a Default path for when none match.
Every automation lives in the settings of some part of the sheet. First switch to edit mode: click the pencil icon in the right-hand bar, or right-click a block and choose Edit block. Then hover the block, click More options and choose Edit Card. Sheets for different systems may arrange their blocks differently, but the buttons are the same.
An attribute's modifier: in the attributes block, open Edit Card → Content tab and click the attribute to expand it. Under Modifier, switch from Formula to Flow and click Edit modifier flow. The number the rule returns becomes the attribute's modifier.
Show, hide or change a block: in Edit Card, open the Appearance tab and look for Block flow, under Presentation. Click Edit flow. There you will find steps such as Show or hide, Field visibility, Modify field, Text, Theme and Image.
A bonus is an extra number; a modifier is the number the attribute uses in rolls; visibility decides whether something appears. Some skill blocks also have a bonus flow button on each row.
Button: in the buttons block, open Edit Card → Content → Card buttons and open the button. Turn on Advanced mode (flow) and, under Triggers, click Edit flow. If the button is an on/off switch, there is one rule for turning on and another for turning off.
Canvas (the sheet's free-drawing block): in Edit Card, open the Automations tab and select a field. For a button, use Button action → Create button nodes. For a number field, use Nodes on click and create the click nodes; from then on, clicking the field runs the rule instead of the default roll.
An attribute's roll: in the expanded attribute, under Roll, switch to Flow and click Edit flow. Some screens already connect Trigger to Roll dice; others allow only certain actions. If a step does not show up in search, check that you opened the automation in the right place.
In edit mode, click the Edit card pencil (or click the card and then Edit). The card editor has a menu on the left; automations live under Behavior and Automation.
Under Behavior, on the Consumable row, the branch icon opens the Use flow: it runs every time the card is used. On the Equippable row, the same icon opens While equipped (applies while the card is equipped and is undone on unequip) and the lightning icon opens On equip (runs once and is not undone).
Under Automation → Passive effects, click Add effect. While present applies while the card is on the sheet. On roll reacts to the rolls you choose. In the context menu adds an option to the card's right-click (or long-press) menu. Example: a shield that gives defense only while equipped uses While equipped.
You have seen the sample bonus work. Now build the same rule on your sheet: first the question, then the result on each path.
Goal: an attribute gets a +2 modifier when Strength is at least 3, and 0 when it is lower. Open an attribute's modifier flow, as explained in Where to open an automation. The diagram at the start of this guide works as a model.
The comparison >= 3 means “3 or more”. If you would rather not type, Visual mode asks the same question with menus.
Start → If (@forca >= 3)
Yes → Bonus (2)
No → Bonus (0)If the same path goes through Bonus 2 and then Bonus 3, the result is 3, not 5: the last Bonus replaces the previous one. To get 5, use a single Bonus with 5, or with the expression 2 + 3.
To add values from other fields, do the whole calculation in a single Bonus in Expression mode, as in the example below. This can wait until after the first exercise.
Bonus in expression mode:
@bonus_item + @bonus_treinoThe editor has two parts: the diagram, which shows the order of the steps, and the side panel, which shows the fields of the selected step.
Click the big + in the top bar (Add step), search for what you need and choose the step. The + that appears on a line inserts a step in the middle of it. Click the new step to open the side panel and fill in its fields.
To connect two steps, drag from one step's output dot to the other step's input dot. Each output has a name: Next continues the rule; Yes and No are If's answers; Answer and Cancel are Ask's outputs; Chosen and Cancel are Choose's outputs.
At the top of the panel, give the step a recognizable name (its Step name), such as Spend mana. Drag steps to arrange the diagram. Notes only hold reminders: they do nothing in the rule.
Fixed uses exactly what you type: for a bonus that is always +2, choose Fixed and type 2. Expression calculates: @nivel / 2 means “half the level”. When in doubt, start with Fixed.
Target is the field that will change. In Change value, click Pick on the sheet and then the field you want, instead of typing its name. For Health, Mana and other vitals, check whether you picked the current value or the maximum.
For a condition, prefer the visual builder: choose the field, the comparison and the value from menus. If you need a formula, the editor suggests names as you type. The Variables and expressions section covers that part.
With the diagram selected: Tab opens Add step; Ctrl+Z undoes; Ctrl+Shift+Z or Ctrl+Y redoes; Ctrl+C and Ctrl+V copy and paste; Ctrl+D duplicates; Delete removes; Escape closes search or clears the selection. On a Mac, use Command instead of Ctrl.
While you type in a field, keys go to that field, not to the diagram. In step search, use the arrow keys to choose and Enter to add.
This part is for when a number needs to change along with the sheet. For most simple rules, Fixed mode and the visual builder are enough.
A variable is a nickname for a sheet value. @forca reads Strength; @forca + 2 takes that value and adds 2. If Strength is 3, the result is 5. The @ tells the editor it is a variable.
Use the names the editor suggests. For names with spaces, wrap them in braces: @{Força Bruta}. Modifiers and maximums usually have their own names, such as @forca_mod and @vida_max.
A variable name that does not exist counts as 0. This is the most common cause of wrong results. Writing tips: use a dot for decimals (1.5), * to multiply (@forca * 2) and quotes around text ("fire").
@nivel + 2
floor((@forca - 10) / 2)
clamp(@vida + 5, 0, @vida_max)
@{Força Bruta} * 2A condition is a question. @vida > 0 asks whether Health is above zero. @forca >= 3 asks whether Strength is 3 or more. > is greater than; >= is greater than or equal; < is less than; <= is less than or equal.
== asks whether two values are equal (two equal signs) and != asks whether they differ. and means both questions must be yes. or means one is enough. not flips the answer. Parentheses group things, as in arithmetic.
The If step chooses a whole path. If you only want to choose between two values inside a calculation, use if(question, value if yes, value if no). Text must match letter by letter: Fight and fight are different.
@forca >= 3 and @vida > 0
$event.attribute == "agilidade"
if(@nivel >= 5, 2, 1)
if(@vida <= 0, "Down", "Standing")You only need this in rules that use roll data or an earlier step's result. $event reads what started the rule (for example, the roll). $sheet reads the whole sheet. $("Step name") reads the result of a step that already ran.
In a roll rule, $event offers formula, total, dice, skillName and attribute. What exists depends on the trigger: before the dice are rolled, total and dice do not exist yet.
$sheet holds attributes, skills, Health, Mana, fields, cards and the sheet's memory (memory). When something is a list, [0] picks the first item, [1] the second, and so on. When a value does not exist, it shows up as null, which means “empty”.
To use $("Step name"), copy the Step name exactly and do not reuse that name on another step. The step you read must have run earlier, on the same path. Ask returns the answer itself. Choose returns the chosen item, with information such as name, total and targets (that item's fields).
When a value may be empty, coalesce(value, 0) uses 0 in its place. Only empty values are replaced: a 0 or blank text stays as it is.
$("Roll dice").total
$("Ask")
$("Choose").targets.misc
$sheet.skills[0].name
coalesce($sheet.memory.usos, 0)In number or condition fields, write the calculation directly. In text or dice fields, in Expression mode, put only the calculated part between {{ and }}. For example: Total: {{ @forca + 2 }} shows Total: 5 when Strength is 3. In the Ask step's options, {{ }} calculates values in both modes. In Fixed mode, write one option per line, without quotes or brackets. In Expression mode, write a list of quoted texts, as in the example below: the list is evaluated first, then the {{ }} parts of each option. If @pm is 10, the options show 1 die - 10 MP and 2 dice - 20 MP. Options that become empty after evaluation are hidden.
To roll 1d20, use the Roll dice step: an expression on its own does not roll dice. Dice formulas can use sheet variables; the rolling guide explains options such as keeping the highest die and exploding dice.
Text in expression mode:
Total: {{ $("Roll dice").total }}
Dice in expression mode:
1d20 + {{ @forca_mod }}
Ask options in Fixed mode:
1 die - {{ @pm }} MP
2 dice - {{ @pm * 2 }} MP
Ask options in Expression mode:
["1 die - {{ @pm }} MP", "2 dice - {{ @pm * 2 }} MP"]
Condition in expression mode:
@vida > 0A function is a ready-made calculation you use in a formula. max(@dano - 2, 0) subtracts 2 from damage but never goes below 0. clamp(@vida + 5, 0, @vida_max) adds 5 to Health and keeps the result between 0 and the maximum.
min picks the lowest value and max the highest. floor rounds down, ceil rounds up and round rounds to the nearest.
For lists: sum adds, avg averages, len counts the items, first and last pick the first and last, and contains checks whether something is in the list. For text: upper and lower switch to upper or lower case.
There are other math functions, such as square root, power and trigonometry. You do not need them to get started; the expression guide inside the editor lists all of them.
max(@dano - 2, 0)
ceil(@nivel / 4)
round(2.5)
contains(["forca", "agilidade"], $event.attribute)
join($event.dice, " + ")This part is optional at first. Use lists when a rule needs to look at several cards or skills at once. Use memory when it needs to remember something from one use to the next.
Filter list takes a list from the sheet (attributes, skills, cards, fields…) and keeps only the items that answer yes to a question. Inside that question, $item is the item being looked at.
Example: name the filter Equipped, choose Resources and use the question $item.equipped == true (“is this card equipped?”). Then, in Sum or count, use $("Equipped") as the list. Count says how many cards passed; Sum with field quantity adds up their quantities.
A rule cannot go backwards: do not connect a step back to an earlier one. To go through several items, use Filter list and Sum or count.
Filter on Resources:
$item.equipped == true
List for Sum or count:
$("Equipped")
Operation: Sum
Field: quantityStore value gives a name to a result so later steps can use it. If it is a number, they can read it as @name; other kinds of value are read with $("Step name"). With Local scope, the value lasts only while the rule runs and does not appear in any sheet field. In a card's passive effects, numbers and yes/no values are available as @name across the whole sheet while the effect is active. Removing the card or deactivating the effect removes its publication.
With Sheet memory scope, the value is kept for the next time the rule runs. Read it with $sheet.memory.name. This only works in rules that begin at Trigger; in rules that begin at Start, nothing is stored.
Usage counter example: store coalesce($sheet.memory.usos, 0) + 1 in the memory usos. Memory is invisible to the player; to change a number shown on the sheet, use Change value.
Name: usos
Scope: Sheet memory
Value in expression mode:
coalesce($sheet.memory.usos, 0) + 1For an empty list, Count and Sum give 0. Min, Max, Average, First and Last are empty (null). If you need a number in those cases, use coalesce($("Sum or count"), 0).
To sum, say which field to add up, such as quantity or total. Without the field, the sum does not use the numbers you expect.
Pick a rule close to your idea and follow the instructions above each diagram. Open the example in the editor to inspect its fields. In action examples, the test describes what it would do; it does not change a real sheet.
Goal: an ability costs 2 Mana and rolls only if you can pay. On your sheet, this belongs to a button action or a card's On use automation.
Test result:
What should happen: With Mana 3, the rule requests spending 2, then rolls. With Mana 1, it only shows the message. The test describes actions without subtracting points from a real character.
Also check: The line from the spending to the roll sets the order: keep it. In real use, the spending is not refunded automatically if something goes wrong with the roll.
Goal: ask how much to heal and add it to Health without exceeding its maximum. On your sheet, use a button action or a card's On use automation.
Test result:
What should happen: Health 8, maximum 10 and answer 5 produce Health 10. The editor uses answer 0 in the simulation and shows Health 8. This is expected: the player answers the question in real use.
Also check: Set replaces Health with the calculated total. Add would add that total to Health again; so keep Set with this formula.
Goal: a card adds a four-sided die to Agility rolls. On your sheet, open the card's On roll automation and choose the skills or block that should start it.
Test result:
What should happen: An Agility roll receives +1d4 before calculation. Another attribute's roll receives no extra part. This example's simulation uses Agility.
Also check: agilidade is the attribute's internal name in this example; on your sheet it may be different. This rule decides the extra die before the roll has a total.
Goal: receive a +1 bonus per equipped card. Open a bonus calculation. This example has two equipped cards, Sword and Shield, and an unequipped Potion.
Test result: Bonus +2
What should happen: The example's two equipped cards give +2. Each card counts once, even if its quantity field lists multiple units.
Also check: To count units, use Sum and enter the quantity field. To count cards, keep Count.
Goal: choose a skill and increase its extra bonus by 1. Use an action, such as a card's On use. The sample sheet offers Acrobatics for this choice.
Test result:
What should happen: The chosen skill's extra bonus increases by 1 when the action runs. The simulation chooses Acrobatics automatically; it does not change your character's skill.
Also check: The test for the Skills source may use a sample item without an attached field. This example therefore uses Own options with a sample target. Check actual choices on a test sheet.
Goal: keep a counter that goes up on each use. Open the ability's use action. Memory is a value stored on the sheet, invisible to the player, that the rule can read on the next use.
Test result:
What should happen: Each real use increases the counter by 1. This guide's simulation shows the next write as 3 because sample memory starts at 2. The counter does not automatically appear as a visible field.
Also check: Use a name only this rule uses: other automations on the same sheet can read the same memory. Storing 0 resets the counter; storing null deletes the value.
Use this list when you know what you want to do but do not know which step to pick. Read When to use it first. You do not need to memorize all 30 steps; the editor lists those available for that part of the sheet.
Search by name, group or purpose: bonus, health, choice, image, card… The steps available in the editor depend on where you opened the automation.
33 / 33 nodes found
Where the automation starts being calculated.
Runs the automation when the event happens.
Goes to Yes or No depending on the condition.
Several paths: follows the case that matches, or Default.
Stores a value for the next steps.
Reads the item this modification is attached to. Returns empty outside a modification.
Takes a sheet list (skills, attributes…) or any list and keeps the items that match a condition.
Sums, counts or takes the min/max of a list.
Sets the bonus this automation gives.
Shows or hides the block.
Shows or hides a field.
Changes a field while the automation applies.
Shows a text in the block.
Changes the category of an item block.
Adds a card while it applies.
Changes the sheet theme while it applies.
Replaces a sheet image while it applies.
Rolls a dice formula.
Adds a part (e.g. +1d4) to the roll this automation answers, before the result.
Replaces the formula of the roll this automation answers, or cancels the roll, before the result.
Shows a label and a description on the last roll's card.
Changes a sheet value once.
Puts a card in the character's resources.
Change a property or uses of a selected card or list of cards from a schema.
Waits for the cards present to finish their automations and receives their adjustments.
Opens a window with text and, optionally, choices.
Asks for an answer, multiple choices, or a form with mixed field types.
The player picks a skill, attribute, vital, card or one of your options; the next steps use the choice.
Shows a sheet page on top.
Plays an audio file.
Opens an image, audio or video in the preview.
Changes the sheet theme.
Swaps the character photo or the canvas background.
Before using a rule on a character, check that it works when the answer is yes and when it is no. The editor test shows the difference without touching the sheet.
The test is already on when you open the editor (the flask button, Live test, turns it on and off). The result appears just below the top bar; click it to open What the test would do, with the path taken and what would change. If the rule should spend 2 Mana, look for that there. In tests, dice always give the same result so you can compare attempts; Roll again draws new numbers. The test uses the sheet's current values: to try another value, change it on a test sheet. In On roll rules, the Test event section lets you choose where the roll came from and its total.
The test is only a simulation: it does not spend points, give cards or save anything to the sheet. Save stores the rule, which takes effect when it is actually used. In this page's examples, Save changes only the example.
In tests, Ask answers by itself: 0 for number questions, yes for confirmations and the first option in lists. Choose also picks by itself. That is why the healing example shows Health 8 staying at 8: the simulated answer was 0. To test real answers and the Cancel button, use a test sheet.
In the bonus example, Strength 3 should give +2 and Strength 2 should give 0. Make similar checks for your rule. Remember that real actions really change the sheet; try them on a test sheet first. To make one, go to Characters, open the character's Sheet actions menu and choose Duplicate: the copy gets (copy) in its name and you can change it freely.
The editor may convert an older rule to the new format and leave notes about what needs review. Read the notes and test before saving. Until you save, the old version stays in use.
The Join and Stop steps may appear in older rules, but they are no longer in the step list. You do not need them: a path ends on its own when there are no more lines. If an old Join waits for paths that never happen together (such as the Yes and No of the same If), the rule gets stuck there; replace it with direct lines.
Find the problem you are seeing below and go through the checks in order.
Follow the lines from Start or Trigger. The step must be connected to the start, and the If answer must lead to it. A disabled step is skipped: the rule moves on without doing what it would do.
In rules with a Trigger, check that it is the right trigger. On a card, the rule must be in the right moment (use, equip or roll). For On roll, the rolls selected on the card must include the one you are making.
The most common cause is a wrong variable name: a name that does not exist counts as 0. Pick the editor's suggested name again. When comparing text, use quotes and the field's internal name, which may differ from what the sheet displays (for example, agilidade rather than Agility). The visual builder picks the right name for you.
To ask whether two values are equal, use two signs: ==. A single sign (=) does not work. In text or dice fields, the calculation must go between {{ and }}.
Each part of the sheet offers only the steps that make sense there. For example: Roll dice does not appear in a bonus calculation, and Add to roll and Replace roll only appear in a card's On roll.
This guide covers character sheets. Steps such as Change door and Token light belong to VTT scene automations (the game map), which have their own list.
Pick the field by clicking it with Pick on the sheet instead of typing its name. For Health, Mana and other vitals, check whether you picked the current value or the maximum.
If the field comes from a Choose step, connect the change to the Chosen output (not Cancel) and use $("Choose").targets.misc as the target, as in the skill example.
Add to roll happens before the dice are rolled. That is why it cannot depend on the result of the same roll: $event.total and $event.dice do not exist yet at that moment.
Between the Trigger and Add to roll, use only decision and calculation steps, such as If, Switch, Store value and lists. Ask, Choose, Change value or another Roll dice on that path stop the bonus from being added in time. If you need to ask something before rolling, create an action that asks and then makes its own roll with Roll dice.
If two paths reach the same step, it runs twice. In Switch, the All cases option runs every case that is yes; First case runs only the first one.
To save, every step needs a different name, lines cannot go back to an earlier step and required fields must be filled in. Review issues shows what is missing.
If an item's bonus should disappear when you unequip it, do not use Change value: it changes the field once and does not undo it later. Use a While equipped rule.