Initial data from which to construct the Item
Optionalcontext: ConstructionContextConstruction context options
A Collection of ItemActions.
An object containing links to other items.
StaticsystemAn 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.
Consumes or adds charges by default.
Base material
Is this item usable at base level, disregarding per-action details.
Remaining charges
Linked ammunition item if any.
Abstracteffect{@inheritDoc ItemPF.hasActions:getter}
Returns true if any of this item's actions have an attack, see ItemAction#hasAttack.
Returns true if any of this item's actions have a damage roll, see ItemAction#hasDamage.
Finite charges
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.
AbstractisThe item's actual material.
InternalRoot item.
Specifically the item at bottom of the container tree.
Should the item show unidentified data
Use pf1.models.item.PhysicalItemModel.showIdentified instead.
The item's subtype, or null if the item has no subtype
A Universally Unique Identifier (uuid) for this Document instance.
StatichasStatichasStaticisInternalTest if specified link can be created.
The type of link.
The target item to link to.
Optionaloptions: object = {}Additional options
Whether a link to the item is possible here.
Configure item before data preparation.
Data model options
InternalThe type of link.
The target item to link to.
The link identifier for the item.
An array to insert into this item's link data.
Changed data
Context
Triggering user ID
InternalPrepare actions
InternalPrepare and update Changes collection.
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?
InternalPrepare ItemPF.scriptCalls collection.
InternalTransform 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
Optionaloptions: { recursive?: boolean } = {}Additional options
Optionalrecursive?: booleanCreate data recursively, meant for the real item document.
InternalUpdate max uses
Protected_Protected InternalUpdates protections and weaknesses with processed formulas.
Called in ()
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.
Sets a boolean flag on this item.
The name/key of the flag to set.
Update context
Whether something was changed.
Creates a link to another item.
The type of link.
The target item to link into this.
OptionalextraData: objectAdditional data to store int he link
Optionaloptions: object = {}Additional options
Display the chat card for an Item as a message in chat
OptionalmessageData: object = {}Optional data that will be merged into the message data.
Optionaloptions: { token?: TokenDocument } = {}Additional options.
Optionaltoken?: TokenDocumentRelevant 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.
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.
Get all items linked by any means.
Attack sources for a specific action.
Action ID
Optionaloptions: { rollData?: object } = {}Additional options
OptionalrollData?: objectRoll data instance
Array of value and label pairs for attack bonus sources on the main attack, or undefined if the action is missing.
Generates lists of change targets this item can have.
The target key, as defined in PF1.buffTargets.
A list of changes
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
Optionalbody?: booleanInclude main description
Optionalchatcard?: booleanIs this actually for chat card.
Optionalextended?: booleanInclude extended information that may not be useful in all circumstances.
Optionalfooter?: booleanInclude footer if it exists
Optionalheader?: booleanInclude header if it exists
Optionalinteractive?: booleanWas this from user interaction (allowing farther interactions)
OptionalrollData?: objectDefaults to ItemAction#getRollData/ItemPF#getRollData.
The chat data for this item (+action)
AbstractgetItem specific conditional sub targets.
Result key to label mapping.
AbstractgetItem specific conditional targets.
Key to target mapping.
Finds, filters and alters changes relevant to a context, and returns the result (as an array)
The given context.
Get full description.
Item type dependant options for rendering the description.
Description Data
Required to be async due to spell associated class map building.
Additional options
For supporting actions and changes in fromUuid()
Synced with Foundry v12.331
Get all item boolean flags as array.
The name/key of the flag to get.
The value stored in the flag.
Get all item dictionary flags as array of objects.
Returns labels for this item
Additional options
This item's labels
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
Optional_results?: Set<any>Internal use only.
Optionalrecursive?: booleanRetrieved 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"
Optionaloptions: { _results?: Set<string>; recursive?: boolean } = {}Additional options
Optional_results?: Set<string>Internal use only
Optionalrecursive?: booleanRetrieve links recursively.
Linked items or their compendium index data
Item name
OptionalasPlayer: boolean = falseIf true, return value players see.
AbstractgetDetermines the starting data for an ActiveEffect based off this item.
Additional options
Roll data
Optionaloptions: objectAdditional options
An object with data to be used in rolls in relation to this item.
InternalFetches all this item's script calls of a specified category
Category
The name/key of the flag on this item.
Whether the flag was found on this item.
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" | "combat" | "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.
Removes a boolean flag from this item.
The name/key of the flag to remove.
Update context
Whether something was changed.
Removes a dictionary flag from this item.
The name/key of the flag to remove.
Update context
Whether something was changed.
Removes all link references to an item.
The UUID of the item to remove links to.
Optionaloptions: { commit?: boolean } = {}Additional options
Optionalcommit?: booleanCommit changes to database. If false, resulting update data is returned instead.
Set item's active state.
Active state
Optionalcontext: objectOptional update context
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.
Update data
Context
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.
Static_InternalCollect information on supplemental items and create them
Array of items to draw supplemental data from
Owner
Static_InternalDetermine whether a given change set affects size
Item data
Static_InternalDetermine whether a given change set affect senses
An object containing changeFlags and changes to be inspected.
Static_On-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_On-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_On-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 item data
Initial item data
Optionalcontext: {Additional options.
Optionaloptions?: objectDialog context options.
Optionalpack?: null | stringPack ID parameter passed to Item.create() options
Optionalparent?: null | Actor<"base" | ModuleSubType>Parent parameter passed to Item.create() options
Optionaltypes?: string[]Item types to limit creation choices to.
Synchronized with Foundry VTT v13.347
StaticdefaultOverride to provide naming by subType potential.
Context where the name would be used
Optionalpack?: null | stringPack this would be within
Optionalparent?: null | DocumentParent document
OptionalsubType?: stringDocument subtype. Nonstandard option.
Optionaltype?: stringType
Synced with Foundry v13.351
StaticgetInternalAdd default artwork.
OptionalitemData: objectItem data
Staticmigrate
Class-like item
For base classes, NPC classes, racial HD, and mythic paths.
Deprecated