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 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 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 the set of vision sources are initialized.
The collection of current vision sources
A hook event that fires when the CanvasVisibility layer has been refreshed.
The CanvasVisibility layer
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 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 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 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 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 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 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 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 module which provides documentation for the various hook events which are dispatched throughout the Foundry Virtual Tabletop client-side software.