StaticDEFAULT_StaticPARTSStaticTABSStaticTEMPLATE_Attach drag-to-sort event listeners to a container element. Tracks the dragged item ID and highlights the drop target.
The container element
CSS selector for sortable children
Returns the sort ID for an element
Called with (sourceId, targetId) on drop
Optionalopts: { onDuplicate?: Function }
OptionalonDuplicate?: FunctionCalled instead of onSort when Ctrl/Cmd is held during drop. Signature: (sourceId, ev) => Promise
Build a subcategory-keyed lookup of actions, plus an _unassigned bucket.
Enriched action objects with system.subcategoryKey
Array of { key, label }
{ [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).
Clear the card color for an item, restoring the default border.
Duplicate an action item on the same actor (Ctrl/Cmd + drag). If dropped into a specific action group, the copy is reassigned there.
Build context menu options for action card entries.
Build context menu options for action group tabs.
Build context menu options for deck entries.
Build context menu options for embedded item action entries.
Build context menu options for feature card entries.
Build context menu options for primary tab bookmarks (GM/owner only).
Build context menu options for rune entries.
Context menu options for subcategory section headers (right-click to rename/delete).
Default drag → linked copy (origin = source); Ctrl/Cmd-drag → standalone.
Protected_Protected
Handle dropping a Cards document (deck) onto the actor sheet.
Protected_Protected
Handle a dropped document on the ActorSheet. Extends parent to handle Cards (decks).
Protected_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.
Protected_Protected
Handle dropping an Item onto the actor sheet. Extends parent to assign groupKey and actionStyle when dropping actions into action tabs.
Open an Insert from Sideboard dialog for a specific deck.
Scry workflow: prompt for count, then open ScryDialog.
Open the native color picker for a card entry and save the chosen color as an actor flag.
Character-specific context modifications
The context object to mutate
Build display data for the Decks tab. Maps deck IDs from actor data to deck objects with computed properties.
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.
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.
— skip rendering tab parts that the viewer doesn't have access to.
Reorder decks in system.decks array by swapping positions.
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.
The item being dragged
The item being dropped onto
Optional item type to restrict to
Static_Add a subcategory to an action group.
Static_Private Static_Private
Handle applying damage to the actor.
The originating click event
The capturing HTML element
Private Static_Private
Handle applying a restore to the actor.
The originating click event
The capturing HTML element
Static_Clear the NPC damage log after confirmation.
Static_Static_Static_Static_Static_Static_Static_Open the NPC Stat Generator dialog.
Private Static_Private
Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset
The originating click event
Static_Static_Static_Static_Static_Static_Static_Static_Handle clicking the Queue Action header button. Opens a dialog to manually queue a free-form action onto the combat tracker.
Static_Private Static_Private
Handle resting.
The originating click event
The capturing HTML element
Private Static_Private
Handle clickable rolls.
The originating click event
Private Static_Private
Handle spending a resource.
The originating click event
The capturing HTML element
Static_Process form submission for the sheet
The handler is called with the application as its bound scope
The originating form submission event
The form element that was submitted
Processed data for the submitted form
Static_Queue a "Survey Environment" action to the combat tracker, or resolve it immediately when outside combat.
Static_Handle clicking the swing override button to choose a starting swing.
Static_Static_Toggle a rune expression checkbox (direct rune or socketed rune).
Static_Static_Toggle an item-provided slot checkbox.
Static_Toggle whether the current user represents this actor. If a different user already represents this actor they are automatically displaced (enforced by toggleRepresentingActor).
Static_Toggle a slot checkbox (increment/decrement slot level value).
Static_Static_Handle clicking an action to use it.
Static_Use an action embedded in a glyph item. Guards on geo synergy requirements and durability, then queues to combat or resolves instantly.
Static_Handle clicking a Use button on a usable item.
Static_Handle clicking an embedded item action on the Items tab.
Static_Open the damage log dialog for this NPC.
Static_
Extend the basic ActorSheetV2 with some very simple modifications