Skip to content

Module API

TheGenieOfTheCode edited this page Nov 4, 2026 · 3 revisions

Module API

Death Tracker exposes its tools on game.modules.get('draw-steel-death-tracker').api.

Function Description
api.revive() Open the Raise Dead picker
api.reviveAll() Revive all defeated tokens immediately
api.powerWordKill() Open the Power Word: Kill selector

Services

For other modules, Death Tracker also offers functions as CTLib services. Call them through ?., since they are only there while Death Tracker is enabled.

const { services } = game.modules.get('draw-steel-ctlib').api;
const settled = await services.get('settleDeaths')?.();

Settling deaths

Service Description
settleDeaths(timeout = 120000) Settle pending deaths now and wait until nothing is left to resolve, an open death picker included. Resolves true once settled, or false when timeout (in milliseconds) runs out first. On a player's client it asks the Director's client and waits for the answer.

Use it after dealing damage, before acting on who is still standing.

Undoing a death

Service Description
canUndoCausedDeath() Whether this user may undo a death caused by damage: the Primary Director always, anyone else while Players Can Undo Deaths Their Owned Actors Caused is on.
undoCausedDeath(tokenUuid) Revive a creature whose death came from damage you are undoing, along with the creatures that fell in the same death, the way an undo from Target Damage on Draw Steel 1.1, or from a target's section on Draw Steel 1.2, does. Put the Stamina back yourself first. Returns false when this user may not undo it; otherwise the revival follows half a second later on the Director's client.
deathGroupFor(tokenId) The ids of the tokens that would come back with this one, itself included. Empty when the token isn't defeated.
revivalHoverPreview(element, getTokenIds) While the pointer is over element, shows where the tokens from getTokenIds() fell, the same preview the Undo button in a death chat message shows.

Related Pages

Draw Steel: Death Tracker

Home


Getting Started


Deaths


The Director's Tools


Compatibility


Reference

Clone this wiki locally