A cached reference to the Actor document that this Token modifies. This may be a "synthetic" unlinked Token Actor which does not exist in the World.
A lazily evaluated reference to the Actor this Token modifies. If actorLink is true, then the document is the primary Actor document. Otherwise, the Actor document is a synthetic (ephemeral) document constructed using the Token's actorData.
An indicator for whether the current User has full control over this Token document.
A convenient reference for whether this TokenDocument is linked to the Actor it represents, or is a synthetic copy
Return a reference to a Combatant that represents this Token, if one is present in the current encounter.
An indicator for whether this Token is currently involved in the active combat encounter.
Define a sort order for this TokenDocument. This controls its rendering order in the PrimaryCanvasGroup relative to siblings at the same elevation. In the future this will be replaced with a persisted database field for permanent adjustment of token stacking. In case of ties, Tokens will be sorted above other types of objects.
Define a sort order for this TokenDocument. This controls its rendering order in the PrimaryCanvasGroup relative to siblings at the same elevation. In the future this will be replaced with a persisted database field for permanent adjustment of token stacking. In case of ties, Tokens will be sorted above other types of objects.
Create a synthetic Actor using a provided Token instance If the Token data is linked, return the true Actor document If the Token data is not linked, create a synthetic Actor using the Token's actorData override
A helper method to retrieve the underlying data behind one of the Token's attribute bars
The named bar to retrieve the attribute for
An alternative attribute path to get instead of the default one
The attribute displayed on the Token bar, if any
A helper function to toggle a status effect which includes an Active Effect template
The Active Effect data, including statusId
Options to configure application of the Active Effect
Whether the Active Effect is now on or off
Test whether a Token has a specific status effect.
The status effect ID as defined in CONFIG.statusEffects
Does the Token have this status effect?
Convenience method to change a token vision mode.
The vision mode to apply to this token.
Redirect updates to a synthetic Token Actor to instead update the tokenData override object. Once an attribute in the Token has been overridden, it must always remain overridden.
The provided differential update data which should update the Token Actor
Provided options which modify the update request
The updated un-linked Actor instance
Redirect creation of Documents within a synthetic Token Actor to instead update the tokenData override object.
The named embedded Document type being modified
The provided initial data with which to create the embedded Documents
Provided options which modify the creation request
The created Embedded Document instances
Redirect updating of Documents within a synthetic Token Actor to instead update the tokenData override object.
The named embedded Document type being modified
The provided differential data with which to update the embedded Documents
Provided options which modify the update request
The updated Embedded Document instances
Redirect deletion of Documents within a synthetic Token Actor to instead update the tokenData override object.
The named embedded Document type being deleted
The IDs of Documents to delete
Provided options which modify the deletion request
The deleted Embedded Document instances
Prepare detection modes which are available to the Token. Ensure that every Token has the basic sight detection mode configured.
When the Actor data overrides change for an un-linked Token Actor, simulate the pre-update process.
When the base Actor for a TokenDocument changes, we may need to update its Actor instance
When the Actor data overrides change for an un-linked Token Actor, simulate the post-update process.
Get an Array of attribute choices which could be tracked for Actors in the Combat Tracker
Inspect the Actor data model and identify the set of attributes which could be used for a Token Bar
The tracked attributes which can be chosen from
A nested object of attribute choices to display
Retrieve an Array of attribute choices from a plain object.
The object to explore for attributes.
Retrieve an Array of attribute choices from a SchemaField.
The schema to explore for attributes.
The client-side Token document which extends the common BaseToken document model.
ClientDocumentMixin
Scene The Scene document type which contains Token documents
TokenConfig The Token configuration application