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

API Reference

The API object is available at globalThis.HEROMANCER.api and game.modules.get('hero-mancer').api. Both are set during the init hook.

For lifecycle events, see Hooks.

MethodBehavior
openWizard({ initialName })Opens the character creation wizard. initialName pre-fills the character name.
openWizardForPlayer(userId)Not implemented. The returned promise rejects with an error.
openLevelUp(actor)Opens level-up mode for a character actor. Returns the application, or null for non-characters.
MethodBehavior
openPendingApprovals()Opens or focuses the pending-approvals queue. Returns the application.
submitForApproval(payload)Async. Submits a character payload to the queue. Resolves to the page id on the primary Gamemaster’s client, or null when sent over the socket.
getPendingSubmissions()Returns pending submission journal pages, oldest first.
MethodBehavior
saveDraft(draft)Async. Saves a wizard draft field map for the current user.
getSavedDraft()Async. Resolves to the current user’s saved draft, or null.
clearSavedDraft()Async. Deletes the current user’s saved draft.
MethodBehavior
reindexCompendiums(type)Async. Rebuilds the cached index for an item subtype such as race, class, background, subclass, or feat. Resolves to { entries }.
getCompendiumEntries(type, { grouped })Returns cached entries for a subtype. grouped: true returns [{ folderName, docs }] by top-level folder. Empty until that subtype is indexed.
findJournalPage(doc)Async. Searches journal compendiums for the entry or page describing a document. Resolves to its uuid, or null.
buildProficiencies(docs)Returns proficiency categories (label, icon, items) from species, class, background, and subclass documents.

Rebuilt indexes skip entries on the exclusion list.

MethodBehavior
getInfo()Returns { version, enabled, compat }. compat holds booleans TOKENIZER, DSN, SPELL_BOOK, CALENDARIA, and TENACITY, and is null before the ready hook.