Internal
_itemCached result of .itemTypes
Internal
_rollCached roll data for this item.
Tracks various states which need to be tracked.
A list of all the active items with changes.
Stores all ItemChanges from carried items.
All items this actor is holding in containers.
Init item flags.
Internal
Retrieve valid skill change targets for this actor.
Returns first active owner, favoring players and GM as fallback.
Cached override
Actor's current race item.
The VisionPermissionSheet instance for this actor
Internal
Computes armor penalties for this actor.
The resulting penalties from armor.
Internal
Computes encumbrance values for this actor.
The resulting penalties from encumbrance.
Private
_getInternal
Internal
Parent document
Collection name
Created documents
Creation data for the documents
Create context options
Triggering user's ID
Rest
...args: any[]Protected
_prepareProtected
_prepareProtected
_prepareProtected
_resetProtected
_restingInternal
Resize token sizes based on actor size.
Ignores tokens with static size set.
New size key
Optional
options: object = {}Additional options
Add option to update token size on all scenes.
Wrapper for the static function, taking this actor as the only target.
Value to adjust health by.
Additional options.
await actor.applyDamage(10); // Cause 10 damage
await actor.applyDamage(-10): // Heal 10 damage
await actor.applyDamage(3, { asWounds: true }); // Apply 3 damage directly to Wounds instead of Vigor
Converts currencies of the given category to the given currency type
Optional
category: "currency" | "altCurrency" = "currency"Currency category, altCurrency is for weightless
Optional
type: CoinType = "pp"Target currency.
Updated document or undefined if no update occurred.
Weapon to create attack from
Enable and configure a new spellbook.
Optional
casting: { Book casting configuration
Spellcasting ability score ID
Has cantrips?
Class tag
Domain/School slots
Level offset
Casting progression type
Spell/spellcasting type
Spellbook type
// Create spellbook for inquisitor
actor.createSpellbook({ type: "spontaneous", progression: "med", ability: "wis", spells: "divine", class: "inquisitor", cantrips: true, domain: 0 });
Show defenses in chat
Optional
options: { Additional options
The roll mode to use for the roll; defaults to the user's current preference when null
.
Relevant token if any.
Deletes expired temporary active effects and disables linked expired buffs.
Optional
options: { Additional options
Combat to expire data in, if relevant
Time offset from world time
Optional
context: DocumentModificationContext = {}Document update context
Generates an array with all the active context-sensitive notes for the given context on this actor.
The context to draw from.
Optional
all: boolean = trueRetrieve notes meant for all.
Returns a list of already parsed context notes.
The context to draw notes from.
Optional
options: { Additional options
Whether to roll inline rolls or not.
The resulting notes, already parsed.
Get total currency in category.
Optional
category: "currency" | "altCurrency" = "currency"Currency category.
Optional
options: { Additional options
Return result in lowest denomination. If false, returns gold instead.
Protected
getProtected
Optional
options: { Additional options
If false, damage resistances (DR, ER) are omitted.
If false, damage vulnerabilities are omitted.
Return feat counts.
An object with a property value
which refers to the current used feats, and max
which refers to the maximum available feats.
Protected
getProtected
getProtected
getProtected
Retrieve information about a skill.
Skill ID
Optional
options: { Additional options
Roll data instance to use.
actor.getSkillInfo("per"); // Perception skill info
actor.getSkillInfo("crf.subSkills.alchemy"); // Craft (Alchemy) subskill info
Total coinage in both weighted and weightless.
Optional
options: { Additional options
Use copper for calculations and return.
Optional
deprecated: objectDeprecated options
Protected
getProtected
Returns Wound Threshold relevant data.
Provided valid rollData
Protected
getTest if actor is proficient with specified weapon.
Item to test
Optional
options: { Additional options
Allow item's proficiency override to influence the result.
Natural attacks incorrectly do not count as proficient.
Protected
importTotal coinage in both weighted and weightless.
Optional
options: { Additional options
Use copper for calculations and return.
Use ActorPF.getTotalMergedCurrency instead.
Protected
modifyProtected
parsePerform all changes related to an actor resting, including restoring HP, ability scores, item uses, etc.
Options affecting an actor's resting
Updates applied to the actor, if resting was completed
Protected
preProtected
prepareCMBProtected
prepareProtected
prepareProtected
prepareProtected
prepareRecharge all owned items.
Optional
options: RechargeActorItemsOptions = {}Additional options
pf1.documents.item.ItemPF.recharge
await actor.rechargeItems(); // Recharge items with default settings.
await actor.rechargeItems({ period: "week" }); // Recharge items as if week had passed.
Restore spellbook used slots and spellpoints.
Optional
options: { Additional options
If false, return update data object instead of directly updating the actor.
Roll data
Result of update or the update data.
Roll an Ability Test Prompt the user for input regarding Advantage/Disadvantage and any Situational Bonus
The ability ID (e.g. "str")
Optional
options: object = {}Additional options
The chat message if one was created, or its data if not. void
if the roll was cancelled.
await actor.rollAbilityTest("str");
Roll a generic attack
Optional
options: ActorRollOptions = {}The chat message if one was created, or its data if not. void
if the roll was cancelled.
await actor.rollAttack({ ranged: true }); // Basic ranged attack
await actor.rollAttack({ maneuver: true }); // Basic melee maneuver
Roll basic BAB check
Optional
options: ActorRollOptions = {}Additional options
The chat message if one was created, or its data if not. void
if the roll was cancelled.
Roll a Caster Level check using a particular spellbook of this actor
Spellbook identifier
Optional
options: ActorRollOptions = {}Roll options
The chat message if one was created, or its data if not. void
if the roll was cancelled.
await actor.rollCL("primary");
Roll a basic CMB check for this actor
Optional
options: ActorRollOptions & { The chat message if one was created, or its data if not. void
if the roll was cancelled.
Roll a concentration check using a particular spellbook of this actor
Spellbook identifier
Optional
options: ActorRollOptions = {}Roll options
The chat message if one was created, or its data if not. void
if the roll was cancelled.
Roll initiative for one or multiple Combatants associated with this actor. If no combat exists, GMs have the option to create one. 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.
Optional
options: { Options which configure how initiative is rolled
Formula for bonus to initiative
Create new Combatant entries for tokens associated with this actor.
Formula override for dice to roll
Reroll initiative for existing Combatants
Roll mode override
Skip roll dialog
For which token this initiative roll is for
The updated Combat document in which initiative was rolled, or null if no initiative was rolled
await actor.rollInitiative({ dice: "2d20kh", createCombatants: true, skipDialog: true });
@override
Roll a specific saving throw
Identifier for saving throw type.
Optional
options: ActorRollOptions = {}Roll options.
The chat message if one was created, or its data if not. void
if the roll was cancelled.
await actor.rollSavingThrow("ref", { skipDialog: true, dice: "2d20kh", bonus: "4" });
Roll a Skill Check
The skill id (e.g. "per", or "prf.subSkills.prf1")
Optional
options: ActorRollOptions = {}Options which configure how the skill check is rolled
The chat message if one was created, or its data if not. void
if the roll was cancelled.
await actor.rollSkill("per", { skipDialog: true, bonus: "1d6", dice: "2d20kh" });
Easy way to set a condition.
A direct condition key, as per PF1.conditions, such as shaken
or dazed
.
Whether to enable (true) the condition, or disable (false) it.
Optional
context: objectUpdate context
Condition ID to boolean mapping of actual updates.
await actor.setCondition("dazzled", true);
Set state of multiple conditions. Also handles condition tracks to minimize number of updates.
Condition ID to boolean mapping of new condition states.
Optional
context: object = {}Update context
Condition ID to boolean mapping of actual updates.
await actor.setConditions({ blind: true, sleep: false, shaken:true });
Internal
the item to add to the actor's resources
Optional
options: { extra options
Skips warning if item tag already exists in dictionary flags
True if resources were set
Protected
updateStatic
_onStatic
_translateStatic
applyApply rolled dice damage to the token or tokens which are currently controlled. This allows for damage to be scaled by a multiplier to account for healing, critical hits, or resistance If Shift is held, will prompt for adjustments based on damage reduction and energy resistances
The amount of damage to deal.
Optional
options: { Object containing default settings for overriding
Marks the damage as non-lethal
Apply damage to wounds directly instead of vigor, as needed for Wounds & Vigor variant health rule.
Critical multiplier as needed for Wounds & Vigor variant health rule. Set to 0 for non-critical hits.
Triggering element, if any.
Triggering event, if any
Forces the opening of a Dialog as if Shift was pressed
Default value for Damage Reduction
Override the targets to apply damage to
Static
chatStatic
getStatic
getStatic
getGet melee and reach maximum ranges.
Actor size as size key or number
Actor stature
Static
getStatic
getStatic
getReturn increased amount of spell slots by ability score modifier.
The associated ability modifier.
Spell level.
Amount of spell levels to increase.
pf1.documents.actor.ActorPF.getSpellSlotIncrease(2, 1); // => 1
pf1.documents.actor.ActorPF.getSpellSlotIncrease(6, 1); // => 2
pf1.documents.actor.ActorPF.getSpellSlotIncrease(6, 7); // => 0
Generated using TypeDoc
Extend the base Actor class to implement additional game system logic.