Hooks
Hero Mancer fires hooks so other modules and macros can react to character creation, the approval workflow, and level-up. Every hook fires through Hooks.callAll under the heroMancer. namespace. Register a listener with Hooks.on, for example Hooks.on("heroMancer.Created", (data) => { ... }).
For programmatic access to Hero Mancer beyond these hooks, see the API reference.
Fired hooks
Section titled “Fired hooks”| Hook | When it fires | Callback arguments |
|---|---|---|
heroMancer.Ready | The module is fully initialized, including approval, level-up, and socket registration. | MODULE |
heroMancer.documentsReady | Compendium entries for a document type have been fetched, normalized, and sorted. Consumers may push to promises to mutate entries before the final sort. | type, entries, promises |
heroMancer.WizardOpened | The wizard window has finished its first render. | { app, fsm } |
heroMancer.PreCreate | The base actor has been created, before advancements, items, and equipment are applied. | { actor, draft } |
heroMancer.Created | The character is fully built, with equipment, summary, customization, and player assignment applied. | { actor } |
heroMancer.ApprovalSubmitted | A draft has been submitted to the Gamemaster approval queue. | { flagData } |
heroMancer.ApprovalApproved | On the submitter’s side, their submission was approved. | { pageId, payload, characterName, actorUuid } |
heroMancer.ApprovalRejected | On the submitter’s side, their submission was rejected. The payload allows the draft to be restored. | { pageId, reason, payload } |
heroMancer.LevelUpStarted | The level-up window has rendered for an existing character. | { actor, app } |
heroMancer.LevelUpCompleted | A level-up has been committed to the actor. | { actor, newLevel } |