Options
All
  • Public
  • Public/Protected
  • All
Menu

A module which provides documentation for the various hook events which are dispatched throughout the Foundry Virtual Tabletop client-side software.

Index

Events Active Effects

Events ActorSheet

Events Adventure

Events Application

Events Audio-Video

Events Canvas

Events CanvasLayer

Events CanvasVisibility

Events Cards

Events Chat

Events Combat

Events Compendium

Events CoreLifecycle

Events Document

Events EffectsCanvasGroup

Events Game

Events GameTime

Events HotReload

Events InteractionLayer

Events Note

Events PlaceableObject

Events PointSource

Events PrimaryCanvasObject

Events ProseMirrorEditor

Events ProseMirrorMenu

Events RollTableConfig

Events Token

Events User

Events Weather

Type Aliases

Active Effects Events

  • applyActiveEffect(actor: Actor, change: EffectChangeData, current: any, delta: any, changes: any): void
  • A hook event that fires when a custom active effect is applied.

    Parameters

    • actor: Actor

      The actor the active effect is being applied to

    • change: EffectChangeData

      The change data being applied

    • current: any

      The current value being modified

    • delta: any

      The parsed value of the change object

    • changes: any

      An object which accumulates changes to be applied

    Returns void

ActorSheet Events

  • A hook event that fires when some useful data is dropped onto an ActorSheet.

    Parameters

    • actor: Actor

      The Actor

    • sheet: ActorSheet

      The ActorSheet application

    • data: any

      The data that has been dropped onto the sheet

    Returns void

Adventure Events

  • preImportAdventure(adventure: Adventure, formData: any, toCreate: any, toUpdate: any): boolean | void
  • A hook event that fires when Adventure data is being prepared for import. Modules may return false from this hook to take over handling of the import workflow.

    Parameters

    • adventure: Adventure

      The Adventure document from which content is being imported

    • formData: any

      Processed data from the importer form

    • toCreate: any

      Adventure data which needs to be created in the World

    • toUpdate: any

      Adventure data which needs to be updated in the World

    Returns boolean | void

    False to prevent the core software from handling the import

  • importAdventure(adventure: Adventure, formData: any, created: any, updated: any): void
  • A hook event that fires after an Adventure has been imported into the World.

    Parameters

    • adventure: Adventure

      The Adventure document from which content is being imported

    • formData: any

      Processed data from the importer form

    • created: any

      Documents which were created in the World

    • updated: any

      Documents which were updated in the World

    Returns void

Application Events

  • renderApplication(application: Application, html: jQuery, data: any): void
  • A hook event that fires whenever an Application is rendered. Substitute the Application name in the hook event to target a specific Application type, for example "renderMyApplication". Each Application class in the inheritance chain will also fire this hook, i.e. "renderApplication" will also fire. The hook provides the pending application HTML which will be added to the DOM. Hooked functions may modify that HTML or attach interactive listeners to it.

    Parameters

    • application: Application

      The Application instance being rendered

    • html: jQuery

      The inner HTML of the document that will be displayed and may be modified

    • data: any

      The object of data used when rendering the application

    Returns void

  • A hook event that fires whenever this Application is first rendered to add buttons to its header.

    Parameters

    Returns void

  • closeApplication(application: any, html: jQuery[]): void
  • A hook event that fires whenever this Application is closed.

    Parameters

    • application: any
    • html: jQuery[]

      The application HTML when it is closed

    Returns void

  • A hook event that fires when the Scene controls are initialized.

    Parameters

    Returns void

  • hotbarDrop(hotbar: Hotbar, data: any, slot: number): void
  • A hook event that fires whenever data is dropped into a Hotbar slot. The hook provides a reference to the Hotbar application, the dropped data, and the target slot. Default handling of the drop event can be prevented by returning false within the hooked function.

    Parameters

    • hotbar: Hotbar

      The Hotbar application instance

    • data: any

      The dropped data object

    • slot: number

      The target hotbar slot

    Returns void

  • collapseSceneNavigation(sceneNavigation: SceneNavigation, collapsed: boolean): void
  • A hook event that fires whenever scene navigation is collapsed.

    Parameters

    Returns void

  • getApplicationEntryContext(html: jQuery, entryOptions: ContextMenuEntry[]): void
  • A hook event that fires when the context menu for entries in an Application is constructed. Substitute the Application name in the hook event to target a specific Application, for example "getActorDirectoryEntryContext".

    Parameters

    • html: jQuery

      The HTML element to which the context options are attached

    • entryOptions: ContextMenuEntry[]

      The context menu entries

    Returns void

  • collapseSidebar(sidebar: Sidebar, collapsed: boolean): void
  • A hook event that fires when the Sidebar is collapsed or expanded.

    Parameters

    • sidebar: Sidebar

      The Sidebar application

    • collapsed: boolean

      Whether the Sidebar is now collapsed or not

    Returns void

  • A hook event that fires when the Sidebar tab is changed.

    Parameters

    • app: SidebarTab

      The SidebarTab application which is now active

    Returns void

Audio-Video Events

  • globalVolumeChanged(volume: number): void
  • A hook event that fires when the user modifies a global volume slider. The hook name needs to be customized to include the type of global volume being changed, one of: globalPlaylistVolumeChanged, globalAmbientVolumeChanged, or globalInterfaceVolumeChanged.

    Parameters

    • volume: number

      The new volume level

    Returns void

  • rtcSettingsChanged(settings: AVSettings, changed: any): void
  • A hook event that fires when the AV settings are changed.

    Parameters

    • settings: AVSettings

      The AVSettings manager

    • changed: any

      The delta of the settings that have been changed

    Returns void

Canvas Events

  • canvasConfig(config: any): void
  • A hook event that fires immediately prior to PIXI Application construction with the configuration parameters.

    Parameters

    • config: any

      Canvas configuration parameters that will be used to initialize the PIXI.Application

    Returns void

  • canvasInit(canvas: Canvas): void
  • A hook event that fires when the Canvas is initialized.

    Parameters

    • canvas: Canvas

      The Canvas instance being initialized

    Returns void

  • canvasPan(canvas: Canvas, position: { x: number; y: number; scale: number }): void
  • A hook event that fires when the Canvas is panned.

    Parameters

    • canvas: Canvas

      The Canvas instance

    • position: { x: number; y: number; scale: number }

      The applied camera position

      • x: number

        The constrained x-coordinate of the pan

      • y: number

        The constrained y-coordinate of the pan

      • scale: number

        The constrained zoom level of the pan

    Returns void

  • canvasReady(canvas: Canvas): void
  • A hook event that fires when the Canvas is ready.

    Parameters

    • canvas: Canvas

      The Canvas which is now ready for use

    Returns void

  • canvasTearDown(canvas: Canvas): void
  • A hook event that fires when the Canvas is deactivated.

    Parameters

    • canvas: Canvas

      The Canvas instance being deactivated

    Returns void

  • canvasDraw(canvas: Canvas): void
  • A hook event that fires when the Canvas is beginning to draw the canvas groups.

    Parameters

    • canvas: Canvas

      The Canvas instance being deactivated

    Returns void

  • dropCanvasData(canvas: Canvas, data: any): void
  • A hook event that fires when some useful data is dropped onto the Canvas.

    Parameters

    • canvas: Canvas

      The Canvas

    • data: any

      The data that has been dropped onto the Canvas

    Returns void

  • highlightObjects(active: boolean): void
  • A hook event that fires when objects are highlighted on the canvas. Callers may use this hook to apply their own modifications or enhancements to highlighted objects.

    Parameters

    • active: boolean

      Is the highlight state now active

    Returns void

CanvasLayer Events

  • A hook event that fires with a CanvasLayer is initially drawn. The dispatched event name replaces "Layer" with the named CanvasLayer subclass, i.e. "drawTokensLayer".

    Parameters

    Returns void

  • A hook event that fires with a CanvasLayer is deconstructed. The dispatched event name replaces "Layer" with the named CanvasLayer subclass, i.e. "tearDownTokensLayer".

    Parameters

    Returns void

  • A hook event that fires when any PlaceableObject is pasted onto the Scene. Substitute the PlaceableObject name in the hook event to target a specific PlaceableObject type, for example "pasteToken".

    Parameters

    • copied: PlaceableObject[]

      The PlaceableObjects that were copied

    • createData: any[]

      The new objects that will be added to the Scene

    Returns void

CanvasVisibility Events

  • initializeVisionSources(sources: Collection<string, VisionSource>): void
  • A hook event that fires when the set of vision sources are initialized.

    Parameters

    • sources: Collection<string, VisionSource>

      The collection of current vision sources

    Returns void

  • A hook event that fires during light source initialization. This hook can be used to add programmatic light sources to the Scene.

    Parameters

    Returns void

  • A hook event that fires when the CanvasVisibility layer has been refreshed.

    Parameters

    Returns void

Cards Events

  • dealCards(origin: Cards, destinations: Cards[], context: { action: string; toCreate: any[][]; fromUpdate: any[]; fromDelete: any[] }): void
  • A hook event that fires when Cards are dealt from a deck to other hands.

    Parameters

    • origin: Cards

      The origin Cards document

    • destinations: Cards[]

      An array of destination Cards documents

    • context: { action: string; toCreate: any[][]; fromUpdate: any[]; fromDelete: any[] }

      Additional context which describes the operation

      • action: string

        The action name being performed, i.e. "deal", "pass"

      • toCreate: any[][]

        An array of Card creation operations to be performed in each destination Cards document

      • fromUpdate: any[]

        Card update operations to be performed in the origin Cards document

      • fromDelete: any[]

        Card deletion operations to be performed in the origin Cards document

    Returns void

  • passCards(origin: Cards, destinations: any, context: { action: string; toCreate: any[]; toUpdate: any[]; fromUpdate: any[]; fromDelete: any[] }): void
  • A hook event that fires when Cards are passed from one stack to another.

    Parameters

    • origin: Cards

      The origin Cards document

    • destinations: any
    • context: { action: string; toCreate: any[]; toUpdate: any[]; fromUpdate: any[]; fromDelete: any[] }

      Additional context which describes the operation

      • action: string

        The action name being performed, i.e. "pass", "play", "discard", "draw"

      • toCreate: any[]

        Card creation operations to be performed in the destination Cards document

      • toUpdate: any[]

        Card update operations to be performed in the destination Cards document

      • fromUpdate: any[]

        Card update operations to be performed in the origin Cards document

      • fromDelete: any[]

        Card deletion operations to be performed in the origin Cards document

    Returns void

  • returnCards(origin: Cards, returned: Card[], context: { toUpdate: Object; fromDelete: any[] }): void
  • A hook event that fires when Cards are dealt from a deck to other hands.

    Parameters

    • origin: Cards

      The origin Cards document.

    • returned: Card[]

      The cards being returned.

    • context: { toUpdate: Object; fromDelete: any[] }

      Additional context which describes the operation.

      • toUpdate: Object

        A mapping of Card deck IDs to the update operations that will be performed on them.

      • fromDelete: any[]

        Card deletion operations to be performed on the origin Cards document.

    Returns void

Chat Events

  • chatMessage(chatLog: ChatLog, message: string, chatData: { user: User; speaker: any }): void
  • A hook event that fires when a user sends a message through the ChatLog.

    Parameters

    • chatLog: ChatLog

      The ChatLog instance

    • message: string

      The trimmed message content

    • chatData: { user: User; speaker: any }

      Some basic chat data

    Returns void

  • renderChatMessage(message: ChatMessage, html: jQuery, messageData: any): void
  • A hook event that fires for each ChatMessage which is rendered for addition to the ChatLog. This hook allows for final customization of the message HTML before it is added to the log.

    Parameters

    • message: ChatMessage

      The ChatMessage document being rendered

    • html: jQuery

      The pending HTML as a jQuery object

    • messageData: any

    Returns void

Combat Events

  • combatStart(combat: Combat, updateData: { round: number; turn: number }): void
  • A hook event that fires when a Combat encounter is started.

    Parameters

    • combat: Combat

      The Combat encounter which is starting

    • updateData: { round: number; turn: number }

      An object which contains Combat properties that will be updated. Can be mutated.

      • round: number

        The initial round

      • turn: number

        The initial turn

    Returns void

  • combatTurn(combat: Combat, updateData: { round: number; turn: number }, updateOptions: { advanceTime: number; direction: number }): void
  • A hook event that fires when the turn of the Combat encounter changes.

    Parameters

    • combat: Combat

      The Combat encounter which is advancing or rewinding its turn

    • updateData: { round: number; turn: number }

      An object which contains Combat properties that will be updated. Can be mutated.

      • round: number

        The current round of Combat

      • turn: number

        The new turn number

    • updateOptions: { advanceTime: number; direction: number }

      An object which contains options provided to the update method. Can be mutated.

      • advanceTime: number

        The amount of time in seconds that time is being advanced

      • direction: number

        A signed integer for whether the turn order is advancing or rewinding

    Returns void

  • combatRound(combat: Combat, updateData: { round: number; turn: number }, updateOptions: { advanceTime: number; direction: number }): void
  • A hook event that fires when the round of the Combat encounter changes.

    Parameters

    • combat: Combat

      The Combat encounter which is advancing or rewinding its round

    • updateData: { round: number; turn: number }

      An object which contains Combat properties that will be updated. Can be mutated.

      • round: number

        The new round of Combat

      • turn: number

        The new turn number

    • updateOptions: { advanceTime: number; direction: number }

      An object which contains options provided to the update method. Can be mutated.

      • advanceTime: number

        The amount of time in seconds that time is being advanced

      • direction: number

        A signed integer for whether the turn order is advancing or rewinding

    Returns void

Compendium Events

  • updateCompendium(pack: CompendiumCollection, documents: Document[], options: any, userId: string): void
  • A hook event that fires whenever the contents of a Compendium pack were modified. This hook fires for all connected clients after the update has been processed.

    Parameters

    • pack: CompendiumCollection

      The Compendium pack being modified

    • documents: Document[]

      The locally-cached Documents which were modified in the operation

    • options: any

      Additional options which modified the modification request

    • userId: string

      The ID of the User who triggered the modification workflow

    Returns void

CoreLifecycle Events

  • init(): void
  • A hook event that fires as Foundry is initializing, right before any initialization tasks have begun.

    Returns void

  • i18nInit(): void
  • A hook event that fires once Localization translations have been loaded and are ready for use.

    Returns void

  • setup(): void
  • A hook event that fires when Foundry has finished initializing but before the game state has been set up. Fires before any Documents, UI applications, or the Canvas have been initialized.

    Returns void

  • ready(): void
  • A hook event that fires when the game is fully ready.

    Returns void

  • error(location: string, error: any, data: any): void
  • A hook event that fires whenever foundry experiences an error.

    Parameters

    • location: string

      The method where the error was caught.

    • error: any
    • data: any

    Returns void

Document Events

  • preCreateDocument(document: Document, data: any, options: DocumentModificationContext, userId: string): boolean | void
  • A hook event that fires for every Document type before execution of a creation workflow. Substitute the Document name in the hook event to target a specific Document type, for example "preCreateActor". This hook only fires for the client who is initiating the creation request.

    The hook provides the pending document instance which will be used for the Document creation. Hooked functions may modify the pending document with updateSource, or prevent the workflow entirely by returning false.

    Parameters

    • document: Document

      The pending document which is requested for creation

    • data: any

      The initial data object provided to the document creation request

    • options: DocumentModificationContext

      Additional options which modify the creation request

    • userId: string

      The ID of the requesting user, always game.user.id

    Returns boolean | void

    Explicitly return false to prevent creation of this Document

  • preUpdateDocument(document: Document, changes: any, options: DocumentModificationContext, userId: string): boolean | void
  • A hook event that fires for every Document type before execution of an update workflow. Substitute the Document name in the hook event to target a specific Document type, for example "preUpdateActor". This hook only fires for the client who is initiating the update request.

    The hook provides the differential data which will be used to update the Document. Hooked functions may modify that data or prevent the workflow entirely by explicitly returning false.

    Parameters

    • document: Document

      The Document instance being updated

    • changes: any

      Differential data that will be used to update the document

    • options: DocumentModificationContext

      Additional options which modify the update request

    • userId: string

      The ID of the requesting user, always game.user.id

    Returns boolean | void

    Explicitly return false to prevent update of this Document

  • preDeleteDocument(document: Document, options: DocumentModificationContext, userId: string): boolean | void
  • A hook event that fires for every Document type before execution of a deletion workflow. Substitute the Document name in the hook event to target a specific Document type, for example "preDeleteActor". This hook only fires for the client who is initiating the update request.

    The hook provides the Document instance which is requested for deletion. Hooked functions may prevent the workflow entirely by explicitly returning false.

    Parameters

    • document: Document

      The Document instance being deleted

    • options: DocumentModificationContext

      Additional options which modify the deletion request

    • userId: string

      The ID of the requesting user, always game.user.id

    Returns boolean | void

    Explicitly return false to prevent deletion of this Document

  • createDocument(document: Document, options: DocumentModificationContext, userId: string): void
  • A hook event that fires for every embedded Document type after conclusion of a creation workflow. Substitute the Document name in the hook event to target a specific type, for example "createToken". This hook fires for all connected clients after the creation has been processed.

    Parameters

    • document: Document

      The new Document instance which has been created

    • options: DocumentModificationContext

      Additional options which modified the creation request

    • userId: string

      The ID of the User who triggered the creation workflow

    Returns void

  • updateDocument(document: Document, change: any, options: DocumentModificationContext, userId: string): void
  • A hook event that fires for every Document type after conclusion of an update workflow. Substitute the Document name in the hook event to target a specific Document type, for example "updateActor". This hook fires for all connected clients after the update has been processed.

    Parameters

    • document: Document

      The existing Document which was updated

    • change: any

      Differential data that was used to update the document

    • options: DocumentModificationContext

      Additional options which modified the update request

    • userId: string

      The ID of the User who triggered the update workflow

    Returns void

  • deleteDocument(document: Document, options: DocumentModificationContext, userId: string): void
  • A hook event that fires for every Document type after conclusion of an deletion workflow. Substitute the Document name in the hook event to target a specific Document type, for example "deleteActor". This hook fires for all connected clients after the deletion has been processed.

    Parameters

    • document: Document

      The existing Document which was deleted

    • options: DocumentModificationContext

      Additional options which modified the deletion request

    • userId: string

      The ID of the User who triggered the deletion workflow

    Returns void

EffectsCanvasGroup Events

  • A hook event that fires when the LightingLayer is refreshed.

    Parameters

    Returns void

Game Events

  • pauseGame(paused: boolean): void
  • A hook event that fires when the game is paused or un-paused.

    Parameters

    • paused: boolean

      Is the game now paused (true) or un-paused (false)

    Returns void

GameTime Events

  • updateWorldTime(worldTime: number, dt: number, options: any, userId: string): void
  • updateWorldTime(worldTime: number, delta: number, options: any, userId: string): void
  • A hook event that fires when the official World time is changed.

    category

    Game

    Parameters

    • worldTime: number

      The new canonical World time.

    • dt: number

      The delta.

    • options: any

      Options passed from the requesting client where the change was made

    • userId: string

      The ID of the User who advanced the time

    Returns void

  • A hook event that fires when the World time has been updated.

    category

    GameTime

    Parameters

    • worldTime: number

      The new canonical World time

    • delta: number

      The time delta

    • options: any

      Options passed from the requesting client which triggered the update

    • userId: string

      The ID of the User who changed the world time

    Returns void

HotReload Events

  • A hook event that fires when a package that is being watched by the hot reload system has a file changed. The hook provides the hot reload data related to the file change. Hooked functions may intercept the hot reload and prevent the core software from handling it by returning false.

    Parameters

    Returns void

InteractionLayer Events

  • A hook event that fires with a InteractionLayer becomes active. The dispatched event name replaces "Layer" with the named InteractionLayer subclass, i.e. "activateTokensLayer".

    Parameters

    Returns void

  • A hook event that fires with a InteractionLayer becomes inactive. The dispatched event name replaces "Layer" with the named InteractionLayer subclass, i.e. "deactivateTokensLayer".

    Parameters

    Returns void

Note Events

  • activateNote(note: Note, options: any): void
  • A hook event that fires whenever a map note is double-clicked. The hook provides the note placeable and the arguments passed to the associated JournalSheet render call. Hooked functions may modify the render arguments or cancel the render by returning false.

    Parameters

    • note: Note

      The note that was activated.

    • options: any

      Options for rendering the associated JournalSheet.

    Returns void

PlaceableObject Events

  • A hook event that fires when a PlaceableObject is initially drawn. The dispatched event name replaces "Object" with the named PlaceableObject subclass, i.e. "drawToken".

    Parameters

    Returns void

  • A hook event that fires when a PlaceableObject is incrementally refreshed. The dispatched event name replaces "Object" with the named PlaceableObject subclass, i.e. "refreshToken".

    Parameters

    Returns void

  • A hook event that fires when a PlaceableObject is destroyed. The dispatched event name replaces "Object" with the named PlaceableObject subclass, i.e. "destroyToken".

    Parameters

    Returns void

  • A hook event that fires when a PlaceableObject is selected or deselected. Substitute the PlaceableObject name in the hook event to target a specific PlaceableObject type, for example "controlToken".

    Parameters

    • object: PlaceableObject

      The object instance which is selected/deselected.

    • controlled: boolean

      Whether the PlaceableObject is selected or not.

    Returns void

  • A hook event that fires when a PlaceableObject is hovered over or out. Substitute the PlaceableObject name in the hook event to target a specific PlaceableObject type, for example "hoverToken".

    Parameters

    • object: PlaceableObject

      The object instance.

    • hovered: boolean

      Whether the PlaceableObject is hovered over or not.

    Returns void

PointSource Events

  • A hook event that fires after RenderedPointSource shaders have initialized.

    Parameters

    Returns void

PrimaryCanvasObject Events

  • refreshOcclusion(object: OccludableObject): void
  • A hook event that fires when the occlusion of an OccludableObject refreshed.

    Parameters

    • object: OccludableObject

      The object whose occlusion is refreshed

    Returns void

ProseMirrorEditor Events

  • createProseMirrorEditor(uuid: string, plugins: any, options: { state: EditorState }): void
  • A hook event that fires whenever a ProseMirror editor is created. The hook provides the ProseMirror instance UUID, a list of plugins, and an object containing the provisional editor state, and a reference to the menu plugin. Hooked functions may append their own plugins or replace the state or menu plugin by replacing their references in the final argument.

    Parameters

    • uuid: string

      A UUID that uniquely identifies this ProseMirror instance.

    • plugins: any

      A list of plugins that will be loaded.

    • options: { state: EditorState }

      The provisional EditorState and ProseMirrorMenuPlugin.

      • state: EditorState

    Returns void

ProseMirrorMenu Events

  • getProseMirrorMenuDropDowns(menu: ProseMirrorMenu, config: { format: ProseMirrorDropDownConfig; fonts: ProseMirrorDropDownConfig }): void
  • A hook even that fires when a ProseMirrorMenu's drop-downs are initialized. The hook provides the ProseMirrorMenu instance and an object of drop-down configuration data. Hooked functions may append their own drop-downs or append entries to existing drop-downs.

    Parameters

    • menu: ProseMirrorMenu

      The ProseMirrorMenu instance.

    • config: { format: ProseMirrorDropDownConfig; fonts: ProseMirrorDropDownConfig }

      The drop-down config.

      • format: ProseMirrorDropDownConfig
      • fonts: ProseMirrorDropDownConfig

    Returns void

  • getProseMirrorMenuItems(menu: ProseMirrorMenu, config: ProseMirrorMenuItem[]): void
  • A hook even that fires when a ProseMirrorMenu's buttons are initialized. The hook provides the ProseMirrorMenu instance and an array of button configuration data. Hooked functions may append their own buttons to the list.

    Parameters

    • menu: ProseMirrorMenu

      The ProseMirrorMenu instance.

    • config: ProseMirrorMenuItem[]

      The button configuration objects.

    Returns void

RollTableConfig Events

  • A hook event that fires when some useful data is dropped onto a RollTableConfig.

    Parameters

    • table: RollTable

      The RollTable

    • sheet: RollTableConfig

      The RollTableConfig application

    • data: any

      The data dropped onto the RollTableConfig

    Returns void

Token Events

  • applyTokenStatusEffect(token: Token, statusId: string, active: boolean): void
  • A hook event that fires when a token Token should apply a specific status effect.

    Parameters

    • token: Token

      The token affected.

    • statusId: string

      The status effect ID being applied, from CONFIG.specialStatusEffects.

    • active: boolean

      Is the special status effect now active?

    Returns void

  • chatBubble(token: Token, html: jQuery, message: string, options: (new (text?: string, value?: string, defaultSelected?: boolean, selected?: boolean) => HTMLOptionElement)): void
  • A hook event that fires when some useful data is dropped onto a RollTableConfig.

    Parameters

    • token: Token

      The speaking token

    • html: jQuery

      The HTML of the chat bubble

    • message: string

      The spoken message text

    • options: (new (text?: string, value?: string, defaultSelected?: boolean, selected?: boolean) => HTMLOptionElement)

      Provided options which affect bubble appearance

        • new (text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement
        • Parameters

          • Optional text: string
          • Optional value: string
          • Optional defaultSelected: boolean
          • Optional selected: boolean

          Returns HTMLOptionElement

    Returns void

  • modifyTokenAttribute(data: { attribute: string; value: number; isDelta: boolean; isBar: boolean }, updates: objects): void
  • A hook event that fires when a token's resource bar attribute has been modified.

    Parameters

    • data: { attribute: string; value: number; isDelta: boolean; isBar: boolean }

      An object describing the modification

      • attribute: string

        The attribute path

      • value: number

        The target attribute value

      • isDelta: boolean

        Does number represents a relative change (true) or an absolute change (false)

      • isBar: boolean

        Whether the new value is part of an attribute bar, or just a direct value

    • updates: objects

      The update delta that will be applied to the Token's actor

    Returns void

  • targetToken(user: User, token: Token, targeted: boolean): void
  • A hook event that fires when a token is targeted or un-targeted.

    Parameters

    • user: User

      The User doing the targeting

    • token: Token

      The targeted Token

    • targeted: boolean

      Whether the Token has been targeted or untargeted

    Returns void

User Events

  • userConnected(user: User, connected: boolean): void
  • A hook event that fires whenever some other User joins or leaves the game session.

    Parameters

    • user: User

      The User who has connected or disconnected

    • connected: boolean

      Is the user now connected (true) or disconnected (false)

    Returns void

Weather Events

  • initializeWeatherEffects(weatherEffect: WeatherEffects, weatherEffectsConfig: any): void
  • A hook event that fires when initializing a weather effect

    Parameters

    • weatherEffect: WeatherEffects

      The weather effects canvas layer.

    • weatherEffectsConfig: any

      The weather effects config object.

    Returns void

Type Aliases

ApplicationHeaderButton: { label: string; class: string; icon: string; onclick: Function | null }

Type Parameters

    Type declaration

    • label: string
    • class: string
    • icon: string
    • onclick: Function | null