Skip to content
3 Death Saves
Wiki updated as of 0.4.2 (Sep 2026)

Hooks

Rollies fires four hooks, each prefixed with the rollies module id.

Fires on active non-GM clients when a participant’s roll is broadcast during a rolloff.

  • rolloffId: id of the rolloff or bracket match this roll belongs to.
  • combatantId: id of the combatant who rolled.
  • total: the roll total.
  • name: display name of the combatant.
  • img: image for the combatant, falling back to the actor portrait.

Fires on active non-GM clients once per bracket match. Pair rolloffs do not fire it.

  • tournamentId: id of the parent tournament.
  • matchId: id of the match that just completed.
  • winner: data for the winning combatant.
  • loser: data for the losing combatant.
Hooks.on('rollies.matchComplete', (data) => {
console.log(`Match ${data.matchId}: ${data.winner.name} beat ${data.loser.name}`);
});

Fires on every active client, GM included, when a bracket tournament declares a winner. Pair rolloffs do not fire it. It fires even when Show Winner Announcements is off.

  • tournamentId: id of the tournament whose winner was just declared.

Fires on the primary GM client once a rolloff has a final winner. A bracket fires it once, after the final match. A tie that re-rolls does not fire it.

  • combatId: id of the combat the rolloff belongs to.
  • mode: pair or bracket.
  • winner: { id, name, img } for the winning combatant.
  • losers: array of { id, name, img } for every combatant that lost.
Hooks.on('rollies.rolloffResolved', (data) => {
console.log(`${data.winner.name} won a ${data.mode} rolloff in combat ${data.combatId}`);
});

Rollies sets rollies.rolloffResolution to true in the update options of every initiative change it applies. Read it in updateCombatant to tell a rolloff result from a normal initiative roll.

Hooks.on('updateCombatant', (combatant, changes, options) => {
if (options.rollies?.rolloffResolution) console.log(`${combatant.name} won a rolloff`);
});