A Collection of ItemActions.
An object containing links to other items.
Static InternalsystemA static object holding system-specific metadata applicable to all instances of this Document class.
An array containing all action types from this item's actions.
AbstractactiveThe item's material addons.
The item's alignment attributes, or null if the item has no alignment attributes
Generic damage source retrieval for default action, includes default conditionals and other item specific modifiers.
All relevant changes, or undefined if action was not found.
Return attack sources for default action.
Array of value and label pairs for attack bonus sources on the main attack.
Aura strength as number from 0 to 4.
Consumes are adds charges by default.
Base material
AbstractcanIs this item usable at base level, disregarding per-action details.
Remaining charges
Linked ammunition item if any.
AbstracteffectAn active effect associated with this item.
{@inheritDoc ItemPF.hasActions:getter}
Returns true if any of this item's actions have an attack, see ItemAction#hasAttack.
Whether the item is tangible physical object in reality.
Returns true if any of this item's actions have a damage roll, see ItemAction#hasDamage.
Finite charges
Is this item inside a container?
AbstractisIs the item is fully functional.
This returns composite result of if the item is equipped, has quantity, is not disabled, is not out of charges, etc. and is not representative if the item can be set active or not via setActive.
Whether the item is tangible physical object in reality.
AbstractisIs the owning actor proficiency at using this as weapon.
Maximum possible charges this item can have.
The keys of data variables to memorize between updates, for e.g. determining the difference in update.
The item's actual material.
InternalRoot item.
Specifically the item at bottom of the container tree.
Should the item show unidentified data
The item's subtype, or null if the item has no subtype
A Universally Unique Identifier (uuid) for this Document instance.
StatichasStatichasStaticisWhether the item is tangible physical object in reality.
Abstract_addPrepare data potentially dependent on other items.
This should be run at in Item.prepareDerivedData() if no actor is present, or in actor's prepareDerivedData after document preparation is done.
Is this final call to this?
Abstract_preInternalRecharges item's uses, if any.
Options
AbstractadjustCreates a link to another item.
The type of link.
The target item to link into this.
OptionalextraData: objectAdditional data to store int he link
Executes all script calls on this item of a specified category.
The category of script calls to call.
OptionalextraParams: Record<string, any> = {}A dictionary of extra parameters to pass as variables for use in the script.
Optionalshared: object = {}Shared data object
The shared object between calls which may have been given data.
Generates ChatData for this item, either in a default configuration or for a specific action.
Optionaloptions: {Options affecting how descriptions are enriched.
rollData
OptionalactionId?: stringThe ID of an action on this item to generate chat data for, defaults to ItemPF.defaultAction
Optionalchatcard?: booleanIs this actually for chat card.
Optionalextended?: booleanInclude extended information that may not be useful in all circumstances.
Optionalinteractive?: booleanOptionalrollData?: objectDefaults to ItemAction#getRollData/ItemPF#getRollData.
The chat data for this item (+action)
AbstractgetAbstractgetFinds, filters and alters changes relevant to a context, and returns the result (as an array)
The given context.
AbstractgetGet full description.
Item type dependant options for rendering the description.
Optionalbody?: booleanInclude main description body if such exists.
Optionalchatcard?: booleanInstruct template to render chat card in mind.
Optionaldata?: objectTemplate data for rendering
Optionalheader?: booleanInclude header if such exists.
Optionalidentified?: booleanEnforce identified description retrieval
Optionalisolated?: booleanPassed to getDescriptionData
OptionalrollData?: objectRoll data for transforming description
Get item links of type
Link type
Include link data, return value changes from item array to object array
Optionaloptions: { _results?: Set<any>; recursive?: boolean } = {}Additional options
Retrieve list of linked items for a type, synchronously. Intended mainly for fetching child or charge links quickly.
Linked items or their compendium index data
AbstractgetInternalFetches all this item's script calls of a specified category
Category
Per item type chat data.
A partial of a chat data object that can be modified to add per item type data.
The labels for this item.
Additional property strings
A rollData object to be used for checks
Optionaloptions: { actionId?: string; chatcard?: boolean } = {}Additional options
Recharges item's uses, if any.
Options
Optionalcommit?: booleanCommit update directly. If false, returns the update data instead.
Optionalcontext?: objectUpdate context
Optionalexact?: booleanUse exact time period. Otherwise "week" for example will also recharge items with "day" period.
Optionalmaximize?: booleanRecharge to full regardless of recharge formula.
Optionalperiod?: "round" | "minute" | "hour" | "day" | "week" | "any"Recharge period. Use "any" to ignore item's configuration.
OptionalrollData?: objectRoll data instance to use for formulas.
Optionalvalue?: numberRecharge to specific value, respecting maximum and minimum bounds.
AbstractsetSets a dictionary flag value on this item.
The name/key of the flag to set.
The flag's new value.
Update context
Whether something was changed.
Use an attack, using SharedActionData
Options
OptionalactionId?: stringThe ID of the action to use, defaults to the first action
OptionalchatMessage?: booleanWhether to send a chat message for this action
Optionalcost?: numberCost override. Replaces charge cost or slot cost as appropriate.
Optionaldice?: stringThe base dice to roll for this action
Optionalev?: null | EventThe event that triggered the use, if any
Optionaloptions?: UseOptionsAdditional use options.
OptionalrollMode?: stringThe roll mode to use for the chat message
OptionalskipDialog?: booleanWhether to skip the dialog for this action
Optionaltoken?: TokenDocumentToken this action is for, if any.
Protected Static Abstract_adjustStatic_createStatic_hasStatic_hasStatic_onOn-Create Operation
Post-create processing so awaiting the original operation has all secondary updates completed when it returns.
Documents
Operations and context data
Triggering user
Static_onOn-Delete Operation
Post-delete processing so awaiting the original operation has all secondary updates completed when it returns.
Documents
Operations and context data
Triggering user
Static_onOn-Update Operation
Post-update processing so awaiting the original operation has all secondary updates completed when it returns.
Documents
Operations and context data
Triggering user
StaticcreateItem create dialog.
Initial form data
Optionalcontext: {Additional options.
Synchronized with Foundry VTT v12.331
StaticdefaultOverride to provide naming by subType potential.
Context where the name would be used
Synced with Foundry v12.331
Staticget
Override and extend the basic :class:
Itemimplementation