Skip to content

Module API

Yacabolet edited this page May 23, 2026 · 1 revision

Module API

The full DSCT API is available at game.modules.get('draw-steel-combat-tools').api. Intended for macro authors and module developers.


Forced Movement

Function Description
api.forcedMovement(options) Execute a forced movement programmatically
api.forcedMovementUI() Open the Forced Movement panel

Grab

Function Description
api.grab(options) Initiate a grab between two tokens
api.grabPanel() Open the Grab panel
api.endGrab(grabId, options) End an active grab

Teleport

Function Description
api.teleport(tokenId, position) Teleport a token to a position
api.burstTeleport(options) Teleport all tokens in a burst radius
api.teleportUI() Open the Teleport picker

Death Tracker

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

Ability Automation

Function Description
api.judgement(options) Apply the Judged condition
api.mark(options) Apply the Marked condition
api.aidAttack(options) Apply the Aid Attack edge
api.triggeredActions() Open the Triggered Actions panel
api.disguisePanel() Toggle I'm No Threat
api.damageConditionsUI() Open the D&C panel

Squad Labels

Function Description
api.squadLabels() Trigger an immediate re-label of all squads
api.renameSquads() Rename squads by their combat group

Transformation

Function Description
api.transform(options) Transform a token to a different actor
api.transformPicker(options) Open the actor-grid transformation picker
api.abyssalEvolution(options) Trigger Abyssal Evolution for a demon creature
api.monsterFilter Predicate factory library for filtering actors

Wall Builder

Function Description
api.wallBuilder() Open the Wall Builder panel
api.convertWalls(options) Batch-convert selected walls to a material
api.mergeWalls() Merge selected collinear wall segments

Setup & Utility

Function Description
api.installMacros() Install the macro compendium
api.distributeAbilities() Add DSCT abilities to all actors
api.fall(tokenId, distance) Trigger a fall for a token
api.parsePowerRollState(message) Parse power roll state from a chat message
api.applyRollMod(options) Apply a roll modifier
api.applyFrightened(options) Apply the Frightened condition
api.applyTaunted(options) Apply the Taunted condition
api.cleanupPixi() Clear all stale DSCT PIXI overlays
api.isFMActive() Returns true if an FM execution is in progress

Conditions (Advanced)

Function Description
api.setRollDialogLock(app, locked, reasons) Lock or unlock a roll dialog

Notes

  • All API functions are available from the browser console during a session.
  • Functions that modify world state (update actors, tokens, etc.) require Director privileges or are routed via socket automatically.
  • The api.monsterFilter predicate library returns composable filter functions for use with Array.prototype.filter on actor lists.

Clone this wiki locally