Actions
An action is a button on a token that does something: attack, heal, cast, change form. Actions are what turn a token from a picture into a playable piece.
Where actions come from
| Source | Notes |
|---|---|
| The system module | A character's attacks, spells, and abilities usually produce actions automatically |
| The campaign | Campaign actions are available to every token in the campaign |
| The token itself | Actions you add to one specific token |
Using them
While impersonating a token, its actions appear in the action bar.
- Click an action to run it.
- 1–9 fire quick actions.
- Shift + 1–9 assigns the hovered action to that digit.
Some actions target. When one does, you are asked to pick a target token (or several) before it runs.
Targeting, damage, and healing
- Actions that deal damage apply it to the target's hit points, respecting damage types the campaign has defined.
- H enters heal/harm mode for applying changes directly without an action.
- Damage and healing are recorded in the Combat Log.
Writing your own
Simple actions are configured in a form. More complex ones are small JavaScript programs with access to the acting token, its target, dice, and chat.
// A basic attack
const attack = await roll('1d20+5');
sendMessage(`${token.name} attacks for ${attack}`);
if (target) {
const damage = await roll('1d8+3');
target.applyDamage(damage, 'slashing');
}
The editor has autocomplete for the available functions, and a Test panel that runs the action without sending anything to chat.
The full reference is in Action API.
Campaign functions
Reusable helper functions, defined once on the campaign and available inside every action. Use them when three actions all need the same maths.
Safety
Action code runs in your browser with a restricted set of capabilities — it cannot reach arbitrary websites or your files. It can modify your campaign's data, so only run actions from people you trust, exactly as you would with a spreadsheet macro.