Apply any transformations to the Actor data which are caused by ActiveEffects.
Retrieve an Array of active tokens which represent this Actor in the current canvas Scene. If the canvas is not currently active, or there are no linked actors, the returned Array will be empty. If the Actor is a synthetic token actor, only the exact Token which it represents will be returned.
An array of Token instances in the current Scene which reference this Actor.
Get all ActiveEffects that may apply to this Actor. If CONFIG.ActiveEffect.legacyTransferral is true, this is equivalent to actor.effects.contents. If CONFIG.ActiveEffect.legacyTransferral is false, this will also return all the transferred ActiveEffects on any of the Actor's owned Items.
Prepare a data object which defines the data schema used by dice roll commands against this Actor
Create a new Token document, not yet saved to the database, which represents the Actor.
The created TokenDocument instance
Get an Array of Token images which could represent this Actor
Handle how changes to a Token attribute bar are applied to the Actor. This allows for game systems to override this behavior and deploy special logic.
The attribute path
The target attribute value
Whether the 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 updated Actor document
Roll initiative for all Combatants in the currently active Combat encounter which are associated with this Actor. If viewing a full Actor document, all Tokens which map to that actor will be targeted for initiative rolls. If viewing a synthetic Token actor, only that particular Token will be targeted for an initiative roll.
Configuration for how initiative for this Actor is rolled.
A promise which resolves to the Combat document once rolls are complete.
Get this actor's dependent tokens. If the actor is a synthetic token actor, only the exact Token which it represents will be returned.
Register a token as a dependent of this actor.
The token.
Remove a token from this actor's dependents.
The token.
Prune a whole scene from this actor's dependent tokens.
The scene.
Perform preliminary operations before a Document of this type is created. Pre-creation operations only occur for the client which requested the operation. Modifications to the pending document before it is persisted should be performed with this.updateSource().
The initial data object provided to the document creation request
Additional options which modify the creation request
The User requesting the document creation
A return value of false indicates the creation operation should be cancelled.
Perform preliminary operations before a Document of this type is updated. Pre-update operations only occur for the client which requested the operation.
The differential data that is changed relative to the documents prior values
Additional options which modify the update request
The User requesting the document update
A return value of false indicates the update operation should be cancelled.
When an Actor is being created, apply default token configuration settings to its prototype token.
Data explicitly provided to the creation workflow
Options which configure creation
Additional workflows to perform when any descendant document within this Actor changes.
Update the active TokenDocument instances which represent this Actor.
Determine default artwork based on the provided actor data.
The source actor data.
Candidate actor image and prototype token artwork.
Test whether a given User has a sufficient role in order to create Documents of this type in general.
The User being tested
Does the User have a sufficient role to create?
Request wildcard token images from the server and return them.
The actor whose prototype token contains the wildcard image path.
The list of filenames to token images that match the wildcard search.
An object that tracks which tracks the changes to the data model which were applied by active effects
The statuses that are applied to this actor by active effects
Cache the last drawn wildcard token to avoid repeat draws
A cached array of image paths which can be used for this Actor's token. Null if the list has not yet been populated.
Default metadata which applies to each instance of this Document type.
The default icon used for newly created Actor documents.
Provide a thumbnail image path used to represent this document.
Provide an object which organizes all embedded Item instances by their type
Test whether an Actor document is a synthetic representation of a Token (if true) or a full Document (if false)
Retrieve the list of ActiveEffects that are currently applied to this Actor.
An array of ActiveEffect instances which are present on the Actor which have a limited duration.
Return a reference to the TokenDocument which owns this Actor as a synthetic override
Whether the Actor has at least one Combatant in the active Combat that represents it.
The allowed set of Actor types which may exist.
The client-side Actor document which extends the common BaseActor model.
ClientDocumentMixin
{@link documents.Actors} The world-level collection of Actor documents
{@link applications.ActorSheet} The Actor configuration application
Create a new Actor
Retrieve an existing Actor