A singleton collection which holds a reference to the synthetic token actor by its base actor's ID.
A 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 ActorDelta.
A reference to the base, World-level Actor this token represents.
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.
A helper method to retrieve the underlying data behind one of the Token's attribute bars
The named bar to retrieve the attribute for
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
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.
Support the special case descendant document changes within an ActorDelta. The descendant documents themselves are configured to have a synthetic Actor as their parent. We need this to ensure that the ActorDelta receives these events which do not bubble up.
When the base Actor for a TokenDocument changes, we may need to update its Actor instance
Prepare detection modes which are available to the Token. Ensure that every Token has the basic sight detection mode configured.
Whenever the token's actor delta changes, or the base actor changes, perform associated refreshes.
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.
Retrieve any configured attributes for a given Actor type.
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