Rest
...args: [data?: ItemDataConstructorData, context?: Context<ActorPF>]A Collection of ItemActions.
An object containing links to other items.
Static
Internal
systemA static object holding system-specific metadata applicable to all instances of this Document class.
Whether this item has actions.
Whether this item has changes and change flags.
Whether this item receives an identifier.
Whether this item is a physical one, possessing properties like quantity or weight.
An array containing all action types from this item's actions.
The 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.
Retrieve profiency type required by this tem.
Base material
Can equip currently?
Is this item usable at base level, disregarding per-action details.
Remaining charges
Linked ammunition item if any.
Abstract
effectAn 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
Does the equipment subtype use slots.
Is this item inside a container?
Is 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.
Broken state
Tests both explicit broken override and current health.
Whether the item is tangible physical object in reality.
Is 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.
Internal
Root 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.
Static
hasStatic
hasStatic
isWhether the item is tangible physical object in reality.
Internal
Weight scaling
For use with () across item types
Prepare 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?
Internal
Recharges item's uses, if any.
Options
Exact time period only
Recharge only if matching this time period
Roll data
Internal
Recharges item's uses, if any.
Options
Match only exact time period
Maximize instead of using recharge formula
Recharge only if it matches this time period
Roll data instance
Set charges to specific value
Internal
Transform given data so it becomes valid update data within parent item.
This can, for example, be used to generate batched update to the real item.
Update data
Optional
options: { Additional options
Create data recursively, meant for the real item document.
Generic charge addition (or subtraction) function that either adds charges or quantity, based on item data.
The amount of charges to add.
Updated document or undefined if no update is possible.
Creates a link to another item.
The type of link.
The target item to link into this.
Optional
extraData: objectAdditional data to store int he link
Display the chat card for an Item as a message in chat
Optional
altChatData: object = {}Optional data that will be merged into the chat data object.
Optional
options: { Additional options.
Relevant token if any.
Chat message instance if one was created.
Executes all script calls on this item of a specified category.
The category of script calls to call.
Optional
extraParams: Record<string, any> = {}A dictionary of extra parameters to pass as variables for use in the script.
Optional
shared: object = {}Shared data object
The shared object between calls which may have been given data.
Attack sources for a specific action.
Action ID
Optional
options: { Additional options
Roll data instance
Array of value and label pairs for attack bonus sources on the main attack, or undefined if the action is missing.
Generates ChatData for this item, either in a default configuration or for a specific action.
Optional
options: any = {}Options affecting how descriptions are enriched.
rollData
defaults to ItemAction#getRollData/ItemPF#getRollData.
secrets
defaults to Item#isOwner.
The chat data for this item (+action)
Abstract
getFinds, filters and alters changes relevant to a context, and returns the result (as an array)
The given context.
Abstract
getGet full description.
Item type dependant options for rendering the description.
Include main description body if such exists.
Instruct template to render chat card in mind.
Template data for rendering
Include header if such exists.
Passed to getDescriptionData
Roll data for transforming description
Description Data
Additional options
Include extra data to reflect it not being so easily available in context.
Roll data instance
Get item links of type
Link type
Include link data, return value changes from item array to object array
Optional
options: { Additional options
Internal use only.
Retrieved linked items recursively.
Retrieve list of linked items for a type, synchronously. Intended mainly for fetching child or charge links quickly.
Link type, e.g. "children", "charges", or "classAssociations"
Optional
options: { Additional options
Internal use only
Retrieve links recursively.
Linked items or their compendium index data
Internal
Fetches 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
Optional
options: { Additional options
Action this pertains to, if any.
Is this for a chat card?
Returns the displayed value of an item according to multiple options
Optional
options: { Various optional parameters affecting value calculations
Override whether the value should use the unidentified price
Treat all items in stack as identical (same number of charges).
Whether the value should be returned in the lowest denomination
Pretend as if the items were fresh (full charges)
Whether the value of contained items should be included
The sell value multiplier
Return value of singular item instead of the actual stack. Disables recursive option.
The item's value
Recharges item's uses, if any.
Options
Commit update directly. If false, returns the update data instead.
Update context
Use exact time period. Otherwise "week" for example will also recharge items with "day" period.
Recharge to full regardless of recharge formula.
Recharge period. Use "any" to ignore item's configuration.
Roll data instance to use for formulas.
Recharge to specific value, respecting maximum and minimum bounds.
Removes all link references to an item.
The UUID of the item to remove links to.
Optional
options: { Additional options
Commit changes to database. If false, resulting update data is returned instead.
Sets 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
The ID of the action to use, defaults to the first action
Whether to send a chat message for this action
Cost override. Replaces charge cost or slot cost as appropriate.
The base dice to roll for this action
The event that triggered the use, if any
Additional use options.
The roll mode to use for the chat message
Whether to skip the dialog for this action
Token this action is for, if any.
Protected
Static
Abstract
_adjustProtected
Adjust temporary item before creation
Optional
item: ItemPFTemporary document
Optional
data: objectCreation data
Optional
override: boolean = falseOverride values even if defined
Static
_createStatic
_hasStatic
_hasStatic
_onStatic
_onStatic
_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
Static
chatStatic
createItem create dialog.
Initial form data
Optional
context: { Additional options.
Dialog context options.
Pack ID parameter passed to Item.create() options
Parent parameter passed to Item.create() options
Item types to limit creation choices to.
Synchronized with Foundry VTT v12.331
Static
defaultOverride to provide naming by subType potential.
Context where the name would be used
Pack this would be within
Parent document
Type
Synced with Foundry v12.331
Static
get
Equipment item
Armor, shields, wondrous items, etc.