Body, Mind & Soul — API Reference
    Preparing search index...

    Class BodyMindSoulActorSheet

    Extend the basic ActorSheetV2 with some very simple modifications

    Hierarchy

    • any
      • BodyMindSoulActorSheet
    Index
    DEFAULT_OPTIONS: {
        actions: {
            addSubcategory: (event: any, target: any) => Promise<void>;
            addTag: (event: any, target: any) => Promise<void>;
            applyDamage: (event: Event, target: HTMLElement) => Promise<void>;
            applyRestore: (event: Event, target: HTMLElement) => Promise<void>;
            clearDamageLog: (event: any, target: any) => Promise<void>;
            configureActionGroups: (event: any, target: any) => Promise<void>;
            configureDecks: (event: any) => Promise<void>;
            configureNameList: (event: any, target: any) => Promise<void>;
            configureResistances: (event: any) => Promise<void>;
            configureResources: (event: any) => Promise<void>;
            createItem: (event: Event, target: any) => Promise<any>;
            cycleCompelCheckMode: (event: any, target: any) => Promise<void>;
            cycleDisposition: (event: any, target: any) => Promise<void>;
            cycleResistance: (event: any, target: any) => Promise<void>;
            deleteItem: (event: any, target: any) => Promise<void>;
            editImage: (event: any, target: any) => Promise<void>;
            editItem: (event: any, target: any) => Promise<void>;
            equipItem: (event: any, target: any) => Promise<void>;
            generateStats: (event: Event, target: HTMLElement) => Promise<void>;
            manageSnapshots: (event: any) => Promise<void>;
            queueAction: (event: any, target: any) => Promise<void>;
            removeTag: (event: any, target: any) => Promise<void>;
            rest: (event: Event, target: HTMLElement) => Promise<void>;
            roll: (event: Event) => Promise<any>;
            spendResource: (event: Event, target: HTMLElement) => Promise<void>;
            surveyEnvironment: (event: any, target: any) => Promise<void>;
            swingOverride: (event: Event, target: HTMLElement) => Promise<void>;
            toggleActionsVisible: (event: any, target: any) => Promise<void>;
            toggleExpression: (event: any, target: any) => Promise<void>;
            toggleFeature: (event: any, target: any) => Promise<void>;
            toggleItemSlot: (event: any, target: any) => Promise<void>;
            toggleRepresenting: (event: any, target: any) => Promise<void>;
            toggleSlot: (event: any, target: any) => Promise<void>;
            unequipItem: (event: any, target: any) => Promise<void>;
            useAction: (event: Event, target: HTMLElement) => Promise<void>;
            useGlyphAction: (event: any, target: any) => Promise<void>;
            useItem: (event: Event, target: HTMLElement) => Promise<void>;
            useItemAction: (event: any, target: any) => Promise<void>;
            viewDamageLog: (event: any, target: any) => Promise<void>;
            viewRollData: (event: any, target: any) => Promise<void>;
        };
        classes: string[];
        form: {
            handler: (
                this: BodyMindSoulActorSheet,
                event: SubmitEvent,
                form: HTMLFormElement,
                formData: FormDataExtended,
            ) => Promise<void>;
            submitOnChange: boolean;
            submitOnClose: boolean;
        };
        tag: string;
        window: { height: number; resizable: boolean; width: number };
    } = ...
    PARTS: {
        actions: { scrollable: string[]; template: string };
        attributes: { template: string };
        decks: { scrollable: string[]; template: string };
        description: { template: string };
        effects: { scrollable: string[]; template: string };
        features: { scrollable: string[]; template: string };
        header: { template: string };
        items: { scrollable: string[]; template: string };
        resists: { scrollable: string[]; template: string };
        tabs: { template: string };
        tags: { scrollable: string[]; template: string };
    } = ...
    TABS: {
        primary: {
            initial: string;
            labelPrefix: string;
            tabs: { icon: string; id: string; tooltip: string }[];
        };
    } = ...
    TEMPLATE_ROOT: string = "systems/body-mind-and-soul/templates/actor"
    • Attach drag-to-sort event listeners to a container element. Tracks the dragged item ID and highlights the drop target.

      Parameters

      • container: HTMLElement

        The container element

      • itemSelector: string

        CSS selector for sortable children

      • getItemId: Function

        Returns the sort ID for an element

      • onSort: Function

        Called with (sourceId, targetId) on drop

      • Optionalopts: { onDuplicate?: Function }
        • OptionalonDuplicate?: Function

          Called instead of onSort when Ctrl/Cmd is held during drop. Signature: (sourceId, ev) => Promise.

      Returns void

    • Parameters

      • partId: any
      • htmlElement: any
      • options: any

      Returns void

    • Build a subcategory-keyed lookup of actions, plus an _unassigned bucket.

      Parameters

      • actions: object[]

        Enriched action objects with system.subcategoryKey

      • subcategories: object[]

        Array of { key, label }

      Returns object

      { [subcategoryKey]: actions[], _unassigned: actions[] }

    • Scan all active effects and enabled features for modifications and build contributor tooltip maps for the attributes, vectors, and resistance tabs. Returns { attrTooltips, vectorTooltips, resistTooltips } where each value is a nested object of HTML strings (null when no contributors).

      Returns { attrTooltips: {}; resistTooltips: {}; vectorTooltips: {} }

    • Clear the card color for an item, restoring the default border.

      Parameters

      • itemId: string

      Returns Promise<void>

    • Duplicate an action item on the same actor (Ctrl/Cmd + drag). If dropped into a specific action group, the copy is reassigned there.

      Parameters

      • sourceId: any
      • ev: any

      Returns Promise<void>

    • Build context menu options for action card entries.

      Returns object[]

    • Build context menu options for action group tabs.

      Returns object[]

    • Build context menu options for deck entries.

      Returns object[]

    • Build context menu options for embedded item action entries.

      Returns object[]

    • Build context menu options for feature card entries.

      Returns object[]

    • Returns any

    • Build context menu options for primary tab bookmarks (GM/owner only).

      Returns object[]

    • Build context menu options for rune entries.

      Returns object[]

    • Context menu options for subcategory section headers (right-click to rename/delete).

      Returns {
          icon: string;
          label: string;
          onClick: (_event: any, el: any) => Promise<void>;
          visible: (el: any) => boolean;
      }[]

    • Parameters

      • group: any

      Returns any

    • Default drag → linked copy (origin = source); Ctrl/Cmd-drag → standalone.

      Parameters

      • event: any
      • effect: any

      Returns Promise<any>

    • Protected

      Handle dropping a Cards document (deck) onto the actor sheet.

      Parameters

      • event: DragEvent
      • cards: Cards

      Returns Promise<any>

    • Protected

      Handle a dropped document on the ActorSheet. Extends parent to handle Cards (decks).

      Parameters

      • event: DragEvent
      • document: Document

      Returns Promise<Document | null>

    • Protected

      Handle dropping a bmsEffect journal page onto the actor sheet. Creates an ActiveEffect from the page's data with origin pointing back to the page.

      Parameters

      • event: DragEvent
      • page: JournalEntryPage

      Returns Promise<any>

    • Protected

      Handle dropping an Item onto the actor sheet. Extends parent to assign groupKey and actionStyle when dropping actions into action tabs.

      Parameters

      • event: DragEvent
      • item: Item

      Returns Promise<any>

    • Open an Insert from Sideboard dialog for a specific deck.

      Parameters

      • deckId: string

      Returns Promise<any>

    • Parameters

      • context: any
      • options: any

      Returns void

    • Scry workflow: prompt for count, then open ScryDialog.

      Parameters

      • deckId: string

      Returns Promise<any>

    • Open the native color picker for a card entry and save the chosen color as an actor flag.

      Parameters

      • itemId: string

      Returns Promise<void>

    • Character-specific context modifications

      Parameters

      • context: object

        The context object to mutate

      Returns void

    • Build display data for the Decks tab. Maps deck IDs from actor data to deck objects with computed properties.

      Parameters

      • context: any

      Returns void

    • Parameters

      • options: any

      Returns Promise<any>

    • Parameters

      • context: any

      Returns void

    • Parameters

      • partId: any
      • context: any
      • options: any

      Returns Promise<any>

    • Build tile data for the resistances grid on the Attributes tab. Tiles show base resistance (editable via click-cycle) alongside the effective resistance after active-effect modifications and the global incoming damage multiplier. Neutral tiles (base === 1 && effective === 1) are flagged for dimming.

      Parameters

      • context: any

      Returns void

    • Build display data for the Decks tab's Temp Stacks / Draw Overrides panels. Read-only — entries are managed automatically by their owning effects and the consumption / expiry / AE-deletion sweeps.

      Parameters

      • context: any

      Returns void

    • Parameters

      • options: any

      Returns Promise<any>

    • — skip rendering tab parts that the viewer doesn't have access to.

      Parameters

      • partId: any
      • options: any

      Returns any

    • Reorder decks in system.decks array by swapping positions.

      Parameters

      • sourceDeckId: string
      • targetDeckId: string

      Returns Promise<void>

    • Sort items by re-indexing their position in the rendered order. Removes the source from its current position, inserts it at the target's position, then assigns sort = index * 1000 to every item in the list.

      Parameters

      • sourceId: string

        The item being dragged

      • targetId: string

        The item being dropped onto

      • typeFilter: string | null

        Optional item type to restrict to

      Returns Promise<void>

    • Add a subcategory to an action group.

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Private

      Handle applying damage to the actor.

      Parameters

      • event: Event

        The originating click event

      • target: HTMLElement

        The capturing HTML element

      Returns Promise<void>

    • Private

      Handle applying a restore to the actor.

      Parameters

      • event: Event

        The originating click event

      • target: HTMLElement

        The capturing HTML element

      Returns Promise<void>

    • Clear the NPC damage log after confirmation.

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Open the NPC Stat Generator dialog.

      Parameters

      • event: Event
      • target: HTMLElement

      Returns Promise<void>

    • Private

      Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset

      Parameters

      • event: Event

        The originating click event

      • target: any

      Returns Promise<any>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Parameters

      • event: any

      Returns Promise<void>

    • Handle clicking the Queue Action header button. Opens a dialog to manually queue a free-form action onto the combat tracker.

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Private

      Handle resting.

      Parameters

      • event: Event

        The originating click event

      • target: HTMLElement

        The capturing HTML element

      Returns Promise<void>

    • Private

      Handle clickable rolls.

      Parameters

      • event: Event

        The originating click event

      Returns Promise<any>

    • Private

      Handle spending a resource.

      Parameters

      • event: Event

        The originating click event

      • target: HTMLElement

        The capturing HTML element

      Returns Promise<void>

    • Process form submission for the sheet

      Parameters

      • this: BodyMindSoulActorSheet

        The handler is called with the application as its bound scope

      • event: SubmitEvent

        The originating form submission event

      • form: HTMLFormElement

        The form element that was submitted

      • formData: FormDataExtended

        Processed data for the submitted form

      Returns Promise<void>

    • Queue a "Survey Environment" action to the combat tracker, or resolve it immediately when outside combat.

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Handle clicking the swing override button to choose a starting swing.

      Parameters

      • event: Event
      • target: HTMLElement

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Toggle a rune expression checkbox (direct rune or socketed rune).

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Toggle an item-provided slot checkbox.

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Toggle whether the current user represents this actor. If a different user already represents this actor they are automatically displaced (enforced by toggleRepresentingActor).

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Toggle a slot checkbox (increment/decrement slot level value).

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Handle clicking an action to use it.

      Parameters

      • event: Event
      • target: HTMLElement

      Returns Promise<void>

    • Use an action embedded in a glyph item. Guards on geo synergy requirements and durability, then queues to combat or resolves instantly.

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Handle clicking a Use button on a usable item.

      Parameters

      • event: Event
      • target: HTMLElement

      Returns Promise<void>

    • Handle clicking an embedded item action on the Items tab.

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Open the damage log dialog for this NPC.

      Parameters

      • event: any
      • target: any

      Returns Promise<void>

    • Parameters

      • event: any
      • target: any

      Returns Promise<void>