A hook event that fires when a custom active effect is applied.
The actor the active effect is being applied to
The change data being applied
The current value being modified
The parsed value of the change object
An object which accumulates changes to be applied
A hook event that fires when some useful data is dropped onto an ActorSheet.
The Actor
The ActorSheet application
The data that has been dropped onto the sheet
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.
The Adventure document from which content is being imported
Processed data from the importer form
Adventure data which needs to be created in the World
Adventure data which needs to be updated in the World
False to prevent the core software from handling the import
A hook event that fires after an Adventure has been imported into the World.
The Adventure document from which content is being imported
Processed data from the importer form
Documents which were created in the World
Documents which were updated in the World
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.
The Application instance being rendered
The inner HTML of the document that will be displayed and may be modified
The object of data used when rendering the application
A hook event that fires whenever this Application is first rendered to add buttons to its header.
The array of header buttons which will be displayed
A hook event that fires whenever this Application is closed.
The application HTML when it is closed
A hook event that fires when the Scene controls are initialized.
The SceneControl configurations
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.
The Hotbar application instance
The dropped data object
The target hotbar slot
A hook event that fires whenever scene navigation is collapsed.
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".
The HTML element to which the context options are attached
The context menu entries
A hook event that fires when the Sidebar is collapsed or expanded.
The Sidebar application
Whether the Sidebar is now collapsed or not
A hook event that fires when the Sidebar tab is changed.
The SidebarTab application which is now active
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
.
The new volume level
A hook event that fires when the AV settings are changed.
The AVSettings manager
The delta of the settings that have been changed
A hook event that fires immediately prior to PIXI Application construction with the configuration parameters.
Canvas configuration parameters that will be used to initialize the PIXI.Application
A hook event that fires when the Canvas is initialized.
The Canvas instance being initialized
A hook event that fires when the Canvas is panned.
The Canvas instance
The applied camera position
The constrained x-coordinate of the pan
The constrained y-coordinate of the pan
The constrained zoom level of the pan
A hook event that fires when the Canvas is ready.
The Canvas which is now ready for use
A hook event that fires when the Canvas is deactivated.
The Canvas instance being deactivated
A hook event that fires when the Canvas is beginning to draw the canvas groups.
The Canvas instance being deactivated
A hook event that fires when some useful data is dropped onto the Canvas.
The Canvas
The data that has been dropped onto the Canvas
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.
Is the highlight state now active
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".
The layer being drawn
A hook event that fires with a CanvasLayer is deconstructed. The dispatched event name replaces "Layer" with the named CanvasLayer subclass, i.e. "tearDownTokensLayer".
The layer being deconstructed
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".
The PlaceableObjects that were copied
The new objects that will be added to the Scene
A hook event that fires when the set of vision sources are initialized.
The collection of current vision sources
A hook event that fires during light source initialization. This hook can be used to add programmatic light sources to the Scene.
The EffectsCanvasGroup where light sources are initialized
A hook event that fires when the CanvasVisibility layer has been refreshed.
The CanvasVisibility layer
A hook event that fires when Cards are dealt from a deck to other hands.
The origin Cards document
An array of destination Cards documents
Additional context which describes the operation
The action name being performed, i.e. "deal", "pass"
An array of Card creation operations to be performed in each destination Cards document
Card update operations to be performed in the origin Cards document
Card deletion operations to be performed in the origin Cards document
A hook event that fires when Cards are passed from one stack to another.
The origin Cards document
Additional context which describes the operation
The action name being performed, i.e. "pass", "play", "discard", "draw"
Card creation operations to be performed in the destination Cards document
Card update operations to be performed in the destination Cards document
Card update operations to be performed in the origin Cards document
Card deletion operations to be performed in the origin Cards document
A hook event that fires when Cards are dealt from a deck to other hands.
The origin Cards document.
The cards being returned.
Additional context which describes the operation.
A mapping of Card deck IDs to the update operations that will be performed on them.
Card deletion operations to be performed on the origin Cards document.
A hook event that fires when a user sends a message through the ChatLog.
The ChatLog instance
The trimmed message content
Some basic chat data
The User sending the message
The identified speaker data, see ChatMessage.getSpeaker
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.
The ChatMessage document being rendered
The pending HTML as a jQuery object
A hook event that fires when a Combat encounter is started.
The Combat encounter which is starting
An object which contains Combat properties that will be updated. Can be mutated.
The initial round
The initial turn
A hook event that fires when the turn of the Combat encounter changes.
The Combat encounter which is advancing or rewinding its turn
An object which contains Combat properties that will be updated. Can be mutated.
The current round of Combat
The new turn number
An object which contains options provided to the update method. Can be mutated.
The amount of time in seconds that time is being advanced
A signed integer for whether the turn order is advancing or rewinding
A hook event that fires when the round of the Combat encounter changes.
The Combat encounter which is advancing or rewinding its round
An object which contains Combat properties that will be updated. Can be mutated.
The new round of Combat
The new turn number
An object which contains options provided to the update method. Can be mutated.
The amount of time in seconds that time is being advanced
A signed integer for whether the turn order is advancing or rewinding
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.
The Compendium pack being modified
The locally-cached Documents which were modified in the operation
Additional options which modified the modification request
The ID of the User who triggered the modification workflow
A hook event that fires as Foundry is initializing, right before any initialization tasks have begun.
A hook event that fires once Localization translations have been loaded and are ready for use.
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.
A hook event that fires when the game is fully ready.
A hook event that fires whenever foundry experiences an error.
The method where the error was caught.
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.
The pending document which is requested for creation
The initial data object provided to the document creation request
Additional options which modify the creation request
The ID of the requesting user, always game.user.id
Explicitly return false to prevent creation of this Document
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.
The Document instance being updated
Differential data that will be used to update the document
Additional options which modify the update request
The ID of the requesting user, always game.user.id
Explicitly return false to prevent update of this Document
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.
The Document instance being deleted
Additional options which modify the deletion request
The ID of the requesting user, always game.user.id
Explicitly return false to prevent deletion of this Document
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.
The new Document instance which has been created
Additional options which modified the creation request
The ID of the User who triggered the creation workflow
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.
The existing Document which was updated
Differential data that was used to update the document
Additional options which modified the update request
The ID of the User who triggered the update workflow
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.
The existing Document which was deleted
Additional options which modified the deletion request
The ID of the User who triggered the deletion workflow
A hook event that fires in the EffectsCanvasGroup #createLayers private method.
The EffectsCanvasGroup instance
A hook event that fires in the EffectsCanvasGroup draw method.
The EffectsCanvasGroup instance
A hook event that fires in the EffectsCanvasGroup tearDown method.
The EffectsCanvasGroup instance
A hook event that fires when the LightingLayer is refreshed.
The EffectsCanvasGroup instance
A hook event that fires when the game is paused or un-paused.
Is the game now paused (true) or un-paused (false)
A hook event that fires when the official World time is changed.
The new canonical World time.
The delta.
Options passed from the requesting client where the change was made
The ID of the User who advanced the time
A hook event that fires when the World time has been updated.
The new canonical World time
The time delta
Options passed from the requesting client which triggered the update
The ID of the User who changed the world time
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.
The hot reload data
A hook event that fires with a InteractionLayer becomes active. The dispatched event name replaces "Layer" with the named InteractionLayer subclass, i.e. "activateTokensLayer".
The layer becoming active
A hook event that fires with a InteractionLayer becomes inactive. The dispatched event name replaces "Layer" with the named InteractionLayer subclass, i.e. "deactivateTokensLayer".
The layer becoming inactive
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.
The note that was activated.
Options for rendering the associated JournalSheet.
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".
The object instance being drawn
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".
The object instance being refreshed
A hook event that fires when a PlaceableObject is destroyed. The dispatched event name replaces "Object" with the named PlaceableObject subclass, i.e. "destroyToken".
The object instance being refreshed
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".
The object instance which is selected/deselected.
Whether the PlaceableObject is selected or not.
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".
The object instance.
Whether the PlaceableObject is hovered over or not.
A hook event that fires after RenderedPointSource shaders have initialized.
The RenderedPointSource being initialized.
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.
A UUID that uniquely identifies this ProseMirror instance.
A list of plugins that will be loaded.
The provisional EditorState and ProseMirrorMenuPlugin.
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.
The ProseMirrorMenu instance.
The drop-down config.
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.
The ProseMirrorMenu instance.
The button configuration objects.
A hook event that fires when some useful data is dropped onto a RollTableConfig.
The RollTable
The RollTableConfig application
The data dropped onto the RollTableConfig
A hook event that fires when some useful data is dropped onto a RollTableConfig.
The speaking token
The HTML of the chat bubble
The spoken message text
Provided options which affect bubble appearance
A hook event that fires when a token's resource bar attribute has been modified.
An object describing the modification
The attribute path
The target attribute value
Does number represents a relative change (true) or an absolute change (false)
Whether the new value is part of an attribute bar, or just a direct value
The update delta that will be applied to the Token's actor
A hook event that fires whenever some other User joins or leaves the game session.
The User who has connected or disconnected
Is the user now connected (true) or disconnected (false)
A hook event that fires when initializing a weather effect
The weather effects canvas layer.
The weather effects config object.
A module which provides documentation for the various hook events which are dispatched throughout the Foundry Virtual Tabletop client-side software.