### install Source: https://foundryvtt.com/api/v13/classes/foundry.ClientPackage.html Installs a package by adding it to the local game data. This method should be called after a package has been successfully installed. ```APIDOC ## install ### Description When a package has been installed, add it to the local game data. ### Method install ### Parameters None ### Request Example None ### Response #### Success Response (200) * **data** (void) - This method does not return a value. #### Response Example None ``` -------------------------------- ### options Source: https://foundryvtt.com/api/v13/classes/foundry.applications.ui.SceneControls.html Gets the configuration options for the Application instance. ```APIDOC ## options ### Description Application instance configuration options. ### Signature `get options(): Readonly` ``` -------------------------------- ### Get an Entry by Name Source: https://foundryvtt.com/api/v13/classes/foundry.abstract.SingletonEmbeddedCollection.html Retrieves an entry from the collection by its name. This example shows how to get an entry by name and handle cases where the name does not exist, including strict mode. ```javascript let c = new Collection([["a", "Alfred"], ["b", "Bob"], ["c", "Cynthia"]]); c.getName("Alfred"); // "Alfred" c.getName("D"); // undefined c.getName("D", {strict: true}); // throws Error ``` -------------------------------- ### SetupTour.fromJSON Source: https://foundryvtt.com/api/v13/classes/foundry.nue.tours.SetupTour.html Creates and returns a Tour instance by loading configuration from a specified JSON file. ```APIDOC ## SetupTour.fromJSON ### Description Creates and returns a Tour instance by loading configuration from a specified JSON file. ### Method Static ### Parameters #### Path Parameters - **filepath** (string) - Required - The path to the JSON file ### Response #### Success Response (200) - **Tour** (Tour) - The created Tour object ``` -------------------------------- ### Get Document Collection Name Source: https://foundryvtt.com/api/v13/classes/foundry.ClientDocument.html Returns the canonical name of the collection to which this document belongs. For example, 'Actor' for actor documents. ```javascript Document.collectionName; ``` -------------------------------- ### setupGame Source: https://foundryvtt.com/api/v13/classes/foundry.Game.html Fully sets up the game state, including documents, UI, and canvas, and triggers setup and ready events. ```APIDOC ## setupGame ### Description Fully set up the game state, initializing Documents, UI applications, and the Canvas. Triggers the hookEvents.setup and hookEvents.ready events. ### Method `setupGame()` ### Returns Promise ``` -------------------------------- ### SetupTour Constructor Source: https://foundryvtt.com/api/v13/classes/foundry.nue.tours.SetupTour.html Constructs a new SetupTour instance. It requires a TourConfig object and accepts optional configuration for ID and namespace. ```APIDOC ## new SetupTour ### Description Construct a Tour by providing a configuration. ### Parameters - **config** (TourConfig) - Required - The configuration of the Tour - **options** (object) - Optional - Additional options for configuring the tour - **id** (string) - Optional - A tour ID that supercedes TourConfig#id - **namespace** (string) - Optional - A tour namespace that supercedes TourConfig#namespace ### Returns SetupTour ``` -------------------------------- ### Filter Collection Entries Source: https://foundryvtt.com/api/v13/classes/foundry.abstract.SingletonEmbeddedCollection.html Filters the collection to find entries that match a specific condition. This example demonstrates filtering for entries starting with 'A'. ```javascript let c = new Collection([["a", "AA"], ["b", "AB"], ["c", "CC"]]); let hasA = c.filters(entry => entry.slice(0) === "A"); ``` -------------------------------- ### SetupTour._renderStep Source: https://foundryvtt.com/api/v13/classes/foundry.nue.tours.SetupTour.html Renders the current step of the tour. ```APIDOC ## SetupTour._renderStep ### Description Renders the current step of the tour. ### Method Protected ### Response #### Success Response (200) - **Promise** (Promise) - A promise that resolves when the step is rendered ``` -------------------------------- ### get Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Items.html Get an element from the DocumentCollection by its ID. ```APIDOC ## get ### Description Get an element from the DocumentCollection by its ID. ### Method `get(id: string, options?: { invalid?: boolean; strict?: boolean }): documents.Item` ### Parameters #### id - **id** (string) - The ID of the Document to retrieve. #### options - **options** (object) - Optional. Additional options to configure retrieval. - **invalid** (boolean) - Optional. Allow retrieving an invalid Document. - **strict** (boolean) - Optional. Throw an Error if the requested Document does not exist. ### Returns `documents.Item` - The Document if found. ### Throws If strict is true and the Document cannot be found. ``` -------------------------------- ### SetupTour Methods Source: https://foundryvtt.com/api/v13/classes/foundry.nue.tours.SetupTour.html Provides methods for controlling and querying the state of a tour, including starting, completing, navigating steps, and resetting. ```APIDOC ## SetupTour Methods ### `complete` - **complete**(): Promise Advance the tour to a completed state. ### `exit` - **exit**(): void Exit the tour at the current step. ### `next` - **next**(): Promise Progress the Tour to the next step. ### `previous` - **previous**(): Promise Rewind the Tour to the previous step. ### `progress` - **progress**(stepIndex: number): Promise Progresses to a given Step. - **stepIndex** (number) - Required - The step to progress to ### `reset` - **reset**(): Promise Reset the Tour to an un-started state. ### `start` - **start**(): Promise Start the Tour at its current step, or at the beginning if the tour has not yet been started. ``` -------------------------------- ### get Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.CombatEncounters.html Get an element from the Combat Encounters DocumentCollection by its ID. ```APIDOC ## get ### Description Get an element from the DocumentCollection by its ID. ### Method Not applicable (JavaScript method) ### Parameters * **id** (string) - Required - The ID of the Document to retrieve. * **options** (object) - Optional - Additional options to configure retrieval. * **invalid** (boolean) - Optional - Allow retrieving an invalid Document. * **strict** (boolean) - Optional - Throw an Error if the requested Document does not exist. ### Returns documents.Combat ### Throws If strict is true and the Document cannot be found. ``` -------------------------------- ### initialize Source: https://foundryvtt.com/api/v13/classes/foundry.nue.NewUserExperienceManager.html Initializes the new user experience, generating chat messages with hints for new worlds. ```APIDOC ## initialize ### Description Initialize the new user experience. Currently, this generates some chat messages with hints for getting started if we detect this is a new world. ### Method initialize ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * None ### Returns * void ### Request Example ```javascript // Example usage: NewUserExperienceManager.initialize(); ``` ### Response * void ``` -------------------------------- ### initialize Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Playlists.html Performs one-time initialization to begin playback of audio for playlists. ```APIDOC ## initialize ### Description Perform one-time initialization to begin playback of audio. ### Method `initialize(): Promise` ### Returns * **Promise** ``` -------------------------------- ### Get Actor Directory Application Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Actors.html Get a reference to the SidebarDirectory application for the Actors collection. ```javascript get directory(): DocumentDirectory ``` -------------------------------- ### get Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Playlists.html Get an element from the DocumentCollection by its ID. This allows direct retrieval of a playlist if its ID is known. ```APIDOC ## get ### Description Get an element from the DocumentCollection by its ID. ### Parameters #### Parameters * **id**: string - The ID of the Document to retrieve. * **options**: { invalid?: boolean; strict?: boolean } - Additional options to configure retrieval. * **invalid**: boolean - Allow retrieving an invalid Document. * **strict**: boolean - Throw an Error if the requested Document does not exist. ### Returns documents.Playlist ### Throws If strict is true and the Document cannot be found. ``` -------------------------------- ### _initializeApplicationOptions Source: https://foundryvtt.com/api/v13/classes/foundry.applications.apps.PermissionConfig.html Initializes configuration options for the Application instance. Protected method. ```APIDOC ## _initializeApplicationOptions ### Description Initialize configuration options for the Application instance. The default behavior of this method is to intelligently merge options for each class with those of their parents. Array-based options are concatenated Inner objects are merged Otherwise, properties in the subclass replace those defined by a parent. ### Method Protected ### Signature _initializeApplicationOptions(options: Partial): ApplicationConfiguration ### Parameters * **options** (Partial) - Options provided directly to the constructor ### Returns Configured options for the application instance ``` -------------------------------- ### Get Registered Actor Sheets Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Actors.html Get an array of currently registered sheet classes for Actor documents. ```javascript get registeredSheets(): DocumentSheet[] ``` -------------------------------- ### _initializeApplicationOptions Source: https://foundryvtt.com/api/v13/classes/foundry.applications.sidebar.tabs.ChatLog.html Initializes the application options for the ChatLog. This method is intended for internal use. ```APIDOC ## _initializeApplicationOptions ### Description Initializes the application options for the ChatLog. ### Method Internal ### Signature _initializeApplicationOptions(options: any): ApplicationConfiguration ### Parameters * **options** (any) - Options to initialize the application with. ### Returns ApplicationConfiguration ``` -------------------------------- ### Get Singleton Instance Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Actors.html Get a reference to the singleton instance of the WorldCollection for Actors, or null if not yet created. ```javascript get instance(): WorldCollection ``` -------------------------------- ### Get Folders Containing Actors Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Actors.html Get a reference to the set of Folders that contain Actor documents in this collection. ```javascript get folders(): Collection ``` -------------------------------- ### _onConfigure Source: https://foundryvtt.com/api/v13/classes/foundry.applications.apps.av.CameraViews.html Internal method to handle spawning the AV configuration dialog. It takes a PointerEvent and the target HTMLElement, returning a Promise that resolves to AVConfig. ```APIDOC ## _onConfigure ### Description Handle spawning the AV configuration dialog. ### Method (Implicitly invoked) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * event: PointerEvent - The triggering event. * target: HTMLElement - The action target. ### Response #### Success Response * AVConfig - A promise which resolves to AVConfig. ### Response Example ```json { "example": "AVConfig" } ``` ``` -------------------------------- ### Get Collection Name for Actor Items Source: https://foundryvtt.com/api/v13/classes/foundry.CanvasDocument.html Demonstrates how to get the collection name for 'items' within an Actor. ```javascript Actor.implementation.getCollectionName("items"); // returns "items" ``` -------------------------------- ### _initializeApplicationOptions Source: https://foundryvtt.com/api/v13/classes/foundry.applications.sidebar.tabs.ActorDirectory.html Initializes the options for the ActorDirectory application. This method is used internally to set up default configurations. ```APIDOC ## _initializeApplicationOptions ### Description Initializes the options for the ActorDirectory application. This method is used internally to set up default configurations. ### Parameters * **options** (any) - The options object to initialize. ### Returns (any) - The initialized options object. ``` -------------------------------- ### get Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.ChatMessages.html Get an element from the DocumentCollection by its ID. This method allows retrieval of a specific ChatMessage using its unique identifier. ```APIDOC ## get ### Description Get an element from the DocumentCollection by its ID. ### Method `get(id: string, options?: { invalid?: boolean; strict?: boolean }): documents.ChatMessage` ### Parameters #### Parameters - **id** (string) - Required - The ID of the Document to retrieve. - **options** (`{ invalid?: boolean; strict?: boolean }`) - Optional - Additional options to configure retrieval. - **invalid** (boolean) - Optional - Allow retrieving an invalid Document. - **strict** (boolean) - Optional - Throw an Error if the requested Document does not exist. ### Returns `documents.ChatMessage` - The ChatMessage document corresponding to the provided ID. ### Throws If strict is true and the Document cannot be found. ``` -------------------------------- ### Static get Source: https://foundryvtt.com/api/v13/classes/foundry.documents.BaseFogExploration.html Retrieves a World-level Document of this type by its ID. It can optionally accept database get operation parameters. ```APIDOC ## Static get ### Description Get a World-level Document of this type by its id. ### Method `Static` get ### Parameters #### Path Parameters * **documentId** (string) - Required - The Document ID * **operation** (DatabaseGetOperation) - Optional - Parameters of the get operation #### Returns null | Document ``` -------------------------------- ### setupPackages Source: https://foundryvtt.com/api/v13/classes/foundry.Game.html Configures package data for the currently enabled packages in the world. ```APIDOC ## setupPackages ### Description Configure package data that is currently enabled for this world. ### Method `setupPackages(data: object)` ### Parameters #### Request Body - **data** (object) - Required - Game data provided by the server socket ### Returns void ``` -------------------------------- ### play Method Source: https://foundryvtt.com/api/v13/classes/foundry.canvas.containers.AutumnLeavesWeatherEffect.html Starts the animation for all configured emitters in the particle effect. ```APIDOC ## play ### Description Begin animation for the configured emitters. ### Returns * `void` ``` -------------------------------- ### get Source: https://foundryvtt.com/api/v13/classes/foundry.abstract.SingletonEmbeddedCollection.html Get a document from the EmbeddedCollection by its ID. Allows for optional retrieval of invalid documents or strict checking for existence. ```APIDOC ## get ### Description Get a document from the EmbeddedCollection by its ID. ### Method get ### Parameters #### Path Parameters * **id** (string) - Required - The ID of the Embedded Document to retrieve. * **options** (object) - Optional - Additional options to configure retrieval. * **invalid** (boolean) - Optional - Allow retrieving an invalid Embedded Document. * **strict** (boolean) - Optional - Throw an Error if the requested Embedded Document does not exist. ### Returns * **any** - The retrieved document instance, or undefined. ### Throws If strict is true and the Embedded Document cannot be found. ``` -------------------------------- ### Get Collection Name Source: https://foundryvtt.com/api/v13/classes/foundry.documents.BaseActorDelta.html Get the appropriate name of an embedded collection within a Document. Useful for dynamic access to collections. ```javascript Actor.implementation.getCollectionName("items"); // returns "items" ``` -------------------------------- ### Application Constructor Source: https://foundryvtt.com/api/v13/classes/foundry.appv1.api.Application.html Initializes a new instance of the Application class. Configuration options control how the application is rendered. ```APIDOC ## constructor Application ### Description Initializes a new instance of the Application class. ### Parameters * **options** (ApplicationV1Options) - Optional - Configuration options which control how the application is rendered. ### Returns * Application ``` -------------------------------- ### Get CompendiumPack by Key Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.CompendiumPacks.html Get an element from the Collection by its key. Optionally, you can use strict mode to throw an error if the key does not exist. ```javascript let c = new Collection([["a", "Alfred"], ["b", "Bob"], ["c", "Cynthia"]]); c.get("a"); // "Alfred" c.get("d"); // undefined c.get("d", {strict: true}); // throws Error ``` -------------------------------- ### _configure Source: https://foundryvtt.com/api/v13/classes/foundry.canvas.rendering.shaders.AdaptiveDarknessShader.html Protected method for one-time initialization performed on creation. ```APIDOC ## _configure ### Description Protected method for one-time initialization performed on creation. ### Returns void ``` -------------------------------- ### Get Active Synthetic Tokens Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Actors.html Get a mapping of synthetic Token Actors currently active in the viewed Scene, keyed by Token ID. ```javascript get tokens(): Record ``` -------------------------------- ### initialize Source: https://foundryvtt.com/api/v13/classes/foundry.canvas.placeables.tokens.TokenRingConfig.html Registers and initializes the token ring configuration system. ```APIDOC ## initialize ### Description Register the token ring config and initialize it. ### Method Static ### Endpoint Not applicable (Static method) ### Parameters None ### Returns #### Success Response - **void** - This method does not return a value. ### Response Example ```json { "example": null } ``` ``` -------------------------------- ### Get Segment Style Source: https://foundryvtt.com/api/v13/classes/foundry.canvas.placeables.tokens.TokenRuler.html Protected method to get the style for a ruler segment connecting to a waypoint. It defines the line width, color, and alpha. ```typescript _getSegmentStyle( waypoint: DeepReadonly, ): { alpha?: number; color?: ColorSource; width: number } ``` -------------------------------- ### SetupTour._postStep Source: https://foundryvtt.com/api/v13/classes/foundry.nue.tours.SetupTour.html Performs clean-up operations after a tour step has been completed. ```APIDOC ## SetupTour._postStep ### Description Performs clean-up operations after a tour step has been completed. ### Method Protected ### Response #### Success Response (200) - **Promise** (Promise) - A promise that resolves when clean-up is complete ``` -------------------------------- ### connect Source: https://foundryvtt.com/api/v13/classes/foundry.Game.html Establishes a live connection to the game server using socket.io. ```APIDOC ## connect ### Description Establish a live connection to the game server through the socket.io URL. ### Method `connect(sessionId: string)` ### Parameters #### Query Parameters - **sessionId** (string) - Required - The client session ID with which to establish the connection ### Returns Promise> A promise which resolves to the connected socket, if successful ``` -------------------------------- ### Get Collection Name for Actor Items by Document Type Source: https://foundryvtt.com/api/v13/classes/foundry.CanvasDocument.html Demonstrates how to get the collection name for 'items' by providing the 'Item' document type. ```javascript Actor.implementation.getCollectionName("Item"); // returns "items" ``` -------------------------------- ### Dialog Example Source: https://foundryvtt.com/api/v13/classes/foundry.appv1.api.Dialog.html Example of how to construct and render a custom dialog instance with a title, content, and multiple buttons, each with a label, icon, and callback function. ```javascript let d = new Dialog({ title: "Test Dialog", content: "

You must choose either Option 1, or Option 2

", buttons: { one: { icon: '', label: "Option One", callback: () => console.log("Chose One") }, two: { icon: '', label: "Option Two", callback: () => console.log("Chose Two") } }, default: "two", render: html => console.log("Register interactivity in the rendered dialog"), close: html => console.log("This always is logged no matter which option is chosen") }); d.render(true); ``` -------------------------------- ### create Source: https://foundryvtt.com/api/v13/classes/foundry.Game.html Fetches World data and returns a Game instance. ```APIDOC ## create ### Description Fetch World data and return a Game instance. ### Method `create(view: string, sessionId: null | string)` ### Parameters #### Query Parameters - **view** (string) - Required - The named view being created - **sessionId** (null | string) - Optional - The current sessionId of the connecting client ### Returns Promise A Promise which resolves to the created Game instance ``` -------------------------------- ### initialize Source: https://foundryvtt.com/api/v13/classes/foundry.helpers.interaction.ClientKeybindings.html Initializes the keybinding values for all registered actions. This method should typically be called during the game's initialization process. ```APIDOC ## initialize ### Description Initializes the keybinding values for all registered actions. ### Method initialize ### Returns #### Success Response (200) - **void** ### Response Example ```javascript game.keybindings.initialize(); ``` ``` -------------------------------- ### Get Embedded Collection Name Source: https://foundryvtt.com/api/v13/classes/foundry.documents.BaseSetting.html Get the appropriate name for an embedded collection within a Document. This method aids in compatibility by providing the correct collection identifier. ```javascript Document.getCollectionName(name); ``` -------------------------------- ### System Package Compatibility Check Source: https://foundryvtt.com/api/v13/classes/foundry.packages.System.html Checks if all currently installed supported systems are compatible with the current Foundry VTT version. Returns true if all systems are compatible or if no supported systems are installed. ```APIDOC ## System Package Compatibility Check ### Description Checks if all supported systems which are currently installed are compatible. Returns true if all systems are compatible or if the package has no supported systems. Returns false otherwise, or if no supported systems are installed. ### Parameters #### Query Parameters - **systemCollection** (Collection) - Required - A collection which defines the set of available systems. ### Returns Promise True if all supported systems which are currently installed are compatible or if the package has no supported systems. Returns false otherwise, or if no supported systems are installed. ``` -------------------------------- ### SetupTour Accessors Source: https://foundryvtt.com/api/v13/classes/foundry.nue.tours.SetupTour.html Provides accessors for querying the current state and properties of the tour, such as its ID, title, description, and current step. ```APIDOC ## SetupTour Accessors ### `canStart` - **get canStart**(): boolean ### `currentStep` - **get currentStep**(): null | TourStep Return the current Step, or null if the tour has not yet started. ### `description` - **get description**(): string The human-readable description of the tour. ### `hasNext` - **get hasNext**(): boolean Returns True if there is a next TourStep ### `hasPrevious` - **get hasPrevious**(): boolean Returns True if there is a previous TourStep ### `id` - **get id**(): string The unique identifier of the tour. ### `key` - **get key**(): string The key the Tour is stored under in game.tours, of the form `${namespace}.${id}` ### `namespace` - **get namespace**(): string The package namespace for the tour. ### `status` - **get status**(): TourStatus The current status of the Tour ### `stepIndex` - **get stepIndex**(): null | number The index of the current step; -1 if the tour has not yet started, or null if the tour is finished. ### `steps` - **get steps**(): TourStep[] ### `title` - **get title**(): string The human-readable title for the tour. ### `Static activeTour` - **get activeTour**(): null | Tour Returns the active Tour, if any ### `Static tourInProgress` - **get tourInProgress**(): boolean Indicates if a Tour is currently in progress. ``` -------------------------------- ### Game Methods Source: https://foundryvtt.com/api/v13/classes/foundry.Game.html Contains methods for initializing and managing the game, including setting up the UI, handling connections, and logging out. ```APIDOC ## Methods _initializeView _initializeView(): void Initialize the view for the Game instance. activateListeners activateListeners(listeners: any[]): void Activate the event listeners for the Game instance. activateSocketListeners activateSocketListeners(): void Activate the socket event listeners for the Game instance. configureCursors configureCursors(): void Configure the mouse cursors for the Game instance. configureUI configureUI(): void Configure the user interface for the Game instance. getPackageScopes getPackageScopes(): Promise Get the scopes for all installed packages. initialize initialize(options?: object): Promise Initialize the Game instance and its core components. initializeCanvas initializeCanvas(): Promise Initialize the game canvas. initializeConfig initializeConfig(): Promise Initialize the game configuration. initializeDocuments initializeDocuments(): Promise Initialize the game documents. initializeGamepads initializeGamepads(): void Initialize the gamepad manager. initializeKeyboard initializeKeyboard(): void Initialize the keyboard manager. initializeMouse initializeMouse(): void Initialize the mouse manager. initializePacks initializePacks(): Promise Initialize the compendium packs. initializeRTC initializeRTC(): Promise Initialize the real-time communication module. initializeTrees initializeTrees(): void Initialize the document trees. initializeUI initializeUI(): Promise Initialize the user interface. logOut logOut(): Promise Log the current user out of the game. registerSettings registerSettings(): void Register the game settings. setupGame setupGame(): Promise Set up the game instance after initialization. setupPackages setupPackages(): Promise Set up the installed packages. shutDown shutDown(): Promise Shut down the game instance. toggleCharacterSheet toggleCharacterSheet(character: Actor | null): void Toggle the display of the character sheet. togglePause togglePause(paused?: boolean): Promise Toggle the paused state of the game. _onClickHyperlink _onClickHyperlink(event: MouseEvent): void Handle clicks on hyperlink elements. connect connect(): Promise Establish a connection to the game server. create create(data: object, options?: any): Promise Create a new Document in the World. getCookies getCookies(): object Get all cookies available to the client. getData getData(): object Get the game data. getWorldStatus getWorldStatus(): Promise Get the status of the world. ``` -------------------------------- ### Example: Retrieving a specific validation failure Source: https://foundryvtt.com/api/v13/classes/foundry.data.validation.DataModelValidationError.html This example shows how to catch a DataModelValidationError and use the `getFailure()` method to retrieve details about a specific validation failure, identified by its property path. It then logs the invalid value associated with that failure. ```javascript const changes = { "foo.bar": "validValue", "foo.baz": "invalidValue" }; try { doc.validate(expandObject(changes)); } catch ( err ) { const failure = err.getFailure("foo.baz"); console.log(failure.invalidValue); // "invalidValue" } ``` -------------------------------- ### AudioHelper.preloadSound Source: https://foundryvtt.com/api/v13/classes/foundry.audio.AudioHelper.html Initiates the loading of a sound file from a given source URL. This method returns a Promise that resolves with a Sound instance once the audio is loaded and ready for playback. ```APIDOC ## AudioHelper.preloadSound ### Description Begin loading the sound for a provided source URL adding its ### Method Static ### Parameters #### Path Parameters - **src** (string) - Required - The audio source path to preload ### Returns Promise The created and loaded Sound ready for playback ``` -------------------------------- ### sort Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.CompendiumCollection.html Get the sort order for this Compendium. ```APIDOC ## sort ### Description Get the sort order for this Compendium. ### Returns number ``` -------------------------------- ### get Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.Actors.html Retrieves an actor from the collection by its ID. ```APIDOC ## get ### Description Get an element from the DocumentCollection by its ID. ### Method get ### Parameters #### Path Parameters * id: string - The ID of the Document to retrieve. * `Optional`options: { invalid?: boolean; strict?: boolean } = {} - Additional options to configure retrieval. * ##### `Optional`invalid?: boolean - Allow retrieving an invalid Document. * ##### `Optional`strict?: boolean - Throw an Error if the requested Document does not exist. ### Returns documents.Actor - The Actor document. ### Throws If strict is true and the Document cannot be found. ``` -------------------------------- ### initializeUI Source: https://foundryvtt.com/api/v13/classes/foundry.Game.html Initializes the core user interface elements of the game. ```APIDOC ## initializeUI ### Description Initialize core UI elements. ### Method `initializeUI()` ### Returns void ``` -------------------------------- ### CombatantGroup.schema Source: https://foundryvtt.com/api/v13/classes/foundry.documents.CombatantGroup.html Get the schema for this Document class. ```APIDOC ## CombatantGroup.schema ### Description Get the schema for this Document class. Ensure that all Document classes share the same schema of their base declaration. ### Returns SchemaField ``` -------------------------------- ### hookEvents.setup Source: https://foundryvtt.com/api/v13/functions/hookEvents.setup.html The setup hook event fires once when Foundry has finished initializing but before the game state has been set up. It runs after all Documents are initialized, including Settings, but before the UI applications or Canvas have been initialized. This hook executes after `i18nInit` and before `ready`. ```APIDOC ## hookEvents.setup ### Description A hook event that fires once when Foundry has finished initializing but before the game state has been set up. Fires after all Documents are initialized, including Settings (you cannot read settings prior to this hook), but before the UI applications or Canvas have been initialized. Runs after `i18nInit` but before `ready`. ### Method Event Hook ### Endpoint None (Event-based) ### Parameters None ### Response #### Success Response - **void**: This hook does not return any value. ``` -------------------------------- ### initialize Source: https://foundryvtt.com/api/v13/classes/foundry.canvas.Canvas.html Initialize the Canvas by creating the HTML element and PIXI application. This should only be called once per client session. ```APIDOC ## initialize ### Description Initialize the Canvas by creating the HTML element and PIXI application. This step should only ever be performed once per client session. Subsequent requests to reset the canvas should go through Canvas#draw. ### Method POST (assumed) ### Endpoint /canvas/initialize ``` -------------------------------- ### shader Source: https://foundryvtt.com/api/v13/classes/foundry.canvas.primary.PrimarySpriteMesh.html Gets the shader bound to this mesh. ```APIDOC ## shader ### Description The shader bound to this mesh. ### Type * get shader(): BaseSamplerShader ### Returns BaseSamplerShader ``` -------------------------------- ### Instance Methods Source: https://foundryvtt.com/api/v13/classes/foundry.documents.BaseAmbientSound.html Details the instance methods available on a BaseAmbientSound document, covering user permissions, document cloning, and embedded document management. ```APIDOC ## Instance Methods ### `_configure` * _configure(__namedParameters?: { pack?: null; parentCollection?: null }): void #### Parameters * __namedParameters: { pack?: null; parentCollection?: null } = {} #### Returns void ### `_getParentCollection` * _getParentCollection(parentCollection?: null | string): null | string `Internal` Identify the collection in a parent Document that this Document belongs to, if any. #### Parameters * `Optional`parentCollection: null | string An explicitly provided parent collection name. #### Returns null | string ### `canUserModify` * canUserModify(user: BaseUser, action: string, data?: object): boolean Test whether a given User has permission to perform some action on this Document #### Parameters * user: BaseUser The User attempting modification * action: string The attempted action * `Optional`data: object = {} Data involved in the attempted action #### Returns boolean Does the User have permission? ### `clone` * clone( data?: object, context?: DataModelConstructionOptions & Pick< DataModelValidationOptions, "strict" | "fallback" | "dropInvalidEmbedded", > & _DocumentConstructionContext & DocumentCloneOptions, ): | Document | Promise> Clone a document, creating a new document by combining current data with provided overrides. The cloned document is ephemeral and not yet saved to the database. #### Parameters * `Optional`data: object = {} Additional data which overrides current document data at the time of creation * `Optional`context: DataModelConstructionOptions & Pick< DataModelValidationOptions, "strict" | "fallback" | "dropInvalidEmbedded", > & _DocumentConstructionContext & DocumentCloneOptions = {} Additional context options passed to the create method #### Returns | Document | Promise> The cloned Document instance ### `createEmbeddedDocuments` * createEmbeddedDocuments( embeddedName: string, data?: object[], operation?: DatabaseCreateOperation, ): Promise[]> Create multiple embedded Document instances within this parent Document using provided input data. #### Parameters * embeddedName: string The name of the embedded Document type * data: object[] = [] An array of data objects used to create multiple documents * `Optional`operation: DatabaseCreateOperation = {} Parameters of the database creation workflow #### Returns Promise[]> An array of created Document instances #### See Document.createDocuments ### `delete` * delete( operation?: Partial>, ): Promise> Delete this Document, removing it from the database. #### Parameters * `Optional`operation: Partial> = {} Parameters of the deletion operation #### Returns Promise> The deleted Document instance, or undefined if not deleted #### See Document.deleteDocuments ### `deleteEmbeddedDocuments` * deleteEmbeddedDocuments( embeddedName: string, ids: string[], operation?: DatabaseDeleteOperation, ): Promise[]> Delete multiple embedded Document instances within a parent Document using provided string ids. #### Parameters * embeddedName: string The name of the embedded Document type * ids: string[] An array of string ids for each Document to be deleted * `Optional`operation: DatabaseDeleteOperation = {} Parameters of the database deletion workflow #### Returns Promise[]> An array of deleted Document instances #### See Document.deleteDocuments ### `getEmbeddedCollection` * getEmbeddedCollection(embeddedName: string): DocumentCollection Obtain a reference to the Array of source data within the data object for a certain embedded Document name #### Parameters * embeddedName: string The name of the embedded Document type #### Returns DocumentCollection The Collection instance of embedded Documents of the requested type ``` -------------------------------- ### defaultOptions Source: https://foundryvtt.com/api/v13/classes/foundry.appv1.sheets.ItemSheet.html Gets the default options for the application. ```APIDOC ## defaultOptions ### Description Get the default options for the application. ### Returns - object ``` -------------------------------- ### _prepareContext Source: https://foundryvtt.com/api/v13/classes/foundry.applications.sheets.AmbientLightConfig.html Prepares the context for rendering the ambient light configuration application. This method gathers and structures data necessary for the application's display, including document details, user permissions, and specific light properties. ```APIDOC ## _prepareContext ### Description Prepares the context for rendering the ambient light configuration application. This method gathers and structures data necessary for the application's display, including document details, user permissions, and specific light properties. ### Signature `_prepareContext(options: any): Promise; document: AmbientLightDocument; gridUnits: any; isDarkness: any; light: AmbientLightDocument; lightAnimations: LightSourceAnimationConfig | DarknessSourceAnimationConfig; source: AmbientLightData; }> ### Parameters #### Path Parameters * `options` (any) - Description not available. ### Returns * `Promise; document: AmbientLightDocument; gridUnits: any; isDarkness: any; light: AmbientLightDocument; lightAnimations: LightSourceAnimationConfig | DarknessSourceAnimationConfig; source: AmbientLightData; }>` - A promise that resolves with the prepared render context. ``` -------------------------------- ### defaultOptions Source: https://foundryvtt.com/api/v13/classes/foundry.appv1.api.DocumentSheet.html Gets the default options for the Application. ```APIDOC ## defaultOptions ### Description Gets the default options for the Application. ### Returns any ``` -------------------------------- ### ownership Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.CompendiumCollection.html Get the visibility configuration of this compendium pack. ```APIDOC ## ownership ### Description The visibility configuration of this compendium pack. ### Returns Record< "PLAYER" | "TRUSTED" | "ASSISTANT" | "GAMEMASTER", "INHERIT" | "NONE" | "LIMITED" | "OBSERVER" | "OWNER" > ``` -------------------------------- ### BasePlaylist Instance Methods Source: https://foundryvtt.com/api/v13/classes/foundry.documents.BasePlaylist.html Instance methods allow for testing user permissions, cloning documents, and managing embedded documents. ```APIDOC ### canUserModify * canUserModify(user: BaseUser, action: string, data?: object): boolean Test whether a given User has permission to perform some action on this Document #### Parameters * user: BaseUser The User attempting modification * action: string The attempted action * `Optional`data: object = {} Data involved in the attempted action #### Returns boolean Does the User have permission? ### clone * clone( data?: object, context?: DataModelConstructionOptions & Pick< DataModelValidationOptions, "strict" | "fallback" | "dropInvalidEmbedded", > & _DocumentConstructionContext & DocumentCloneOptions, ): | Document | Promise> Clone a document, creating a new document by combining current data with provided overrides. The cloned document is ephemeral and not yet saved to the database. #### Parameters * `Optional`data: object = {} Additional data which overrides current document data at the time of creation * `Optional`context: DataModelConstructionOptions & Pick< DataModelValidationOptions, "strict" | "fallback" | "dropInvalidEmbedded", > & _DocumentConstructionContext & DocumentCloneOptions = {} Additional context options passed to the create method #### Returns | Document | Promise> The cloned Document instance ### createEmbeddedDocuments * createEmbeddedDocuments( embeddedName: string, data?: object[], operation?: DatabaseCreateOperation, ): Promise[]> Create multiple embedded Document instances within this parent Document using provided input data. #### Parameters * embeddedName: string The name of the embedded Document type * data: object[] = [] An array of data objects used to create multiple documents * `Optional`operation: DatabaseCreateOperation = {} Parameters of the database creation workflow #### Returns Promise[]> An array of created Document instances #### See Document.createDocuments ### delete * delete( operation?: Partial >, ): Promise> Delete this Document, removing it from the database. #### Parameters * `Optional`operation: Partial > = {} Parameters of the deletion operation #### Returns Promise> The deleted Document instance, or undefined if not deleted #### See Document.deleteDocuments ### deleteEmbeddedDocuments * deleteEmbeddedDocuments( embeddedName: string, ids: string[], operation?: DatabaseDeleteOperation, ): Promise[]> Delete multiple embedded Document instances within a parent Document using provided string ids. #### Parameters * embeddedName: string The name of the embedded Document type * ids: string[] An array of string ids for each Document to be deleted * `Optional`operation: DatabaseDeleteOperation = {} Parameters of the database deletion workflow #### Returns Promise[]> An array of deleted Document instances #### See Document.deleteDocuments ### getEmbeddedCollection * getEmbeddedCollection(embeddedName: string): DocumentCollection Obtain a reference to the Array of source data within the data object for a certain embedded Document name #### Parameters * embeddedName: string The name of the embedded Document type ``` -------------------------------- ### CombatEncounters.viewed Source: https://foundryvtt.com/api/v13/classes/foundry.documents.collections.CombatEncounters.html Gets the currently viewed Combat encounter. ```APIDOC ## viewed ### Description The currently viewed Combat encounter. ### Returns null | documents.Combat ``` -------------------------------- ### _initializeApplicationOptions Source: https://foundryvtt.com/api/v13/classes/foundry.applications.sidebar.tabs.JournalDirectory.html Initializes the options for the JournalDirectory application. This method is used internally to set up the application's configuration. ```APIDOC ## _initializeApplicationOptions ### Description Initializes the options for the JournalDirectory application. This method is used internally to set up the application's configuration. ### Parameters * **options** (any) - The options to initialize the application with. ### Returns Any - The result of the initialization. ``` -------------------------------- ### initialize Source: https://foundryvtt.com/api/v13/classes/foundry.abstract.EmbeddedCollectionDelta.html Initializes the collection, with an option to perform a full initialization. ```APIDOC ## initialize ### Description Initializes the collection. ### Method initialize ### Parameters * **__namedParameters**: { full?: boolean } = {} ### Returns void ```