An object containing links to other items.
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
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.
AbstracteffectReturns true if any of this item's actions have an attack, see Action#hasAttack.
Returns true if any of this item's actions have a damage roll, see Action#hasDamage.
Finite charges
Whether or not this is a physical item.
This queries system.isPhysical for actual truth.
The item's actual material.
The item's subtype, or null if the item has no subtype
StaticsystemProtected_ProtectedFinalize data after actor and items are guaranteed to be ready.
Other items may not have yet run _finalizeData() however.
InternalPrepare data dependent on other items
This should be run in Item.prepareDerivedData() if no actor is present, or in actor's prepareDerivedData after document preparation is done.
InternalUpdate max uses
Protected_Protected InternalUpdates protections and weaknesses with processed formulas.
Called in ()
Generates lists of change targets this item can have.
The target key, as defined in PF1.buffTargets.
A list of changes
Finds, filters and alters changes relevant to a context, and returns the result (as an array)
The given context.
Determines the starting data for an ActiveEffect based off this item.
Additional options
Roll data
Returns labels for this item
Optionaloptions: { actionId?: string; isolated?: boolean; rollData?: object } = {}Additional options
OptionalactionId?: stringID of one of this item's actions to get labels for; defaults to first action
Optionalisolated?: booleanIs this isolated use? If true, more data is included.
OptionalrollData?: objectRoll data to use.
This item's labels
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.
StaticgetExperimentalGet Container Tree
Root item
Items to limit searching nested items from
Collection the root item is in
Optional_ids: Set<string> = ...Internal use
Optional_depth: number = 0Internal use
AbstractgetGet full description.
Item type dependant options for rendering the description.
OptionalactionId?: stringAction ID
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
Item name
OptionalasPlayer: boolean = falseIf true, return value players see.
Container
Parent item this is stored inside of.
Returns index entry for items in compendiums if the actual item is not cached.
Container
Unlike container this ensures the returned value is a document or nothing.
StaticgetExperimentalGet Container for given Entry
StatichasGeneric damage source retrieval for default action, includes default conditionals and other item specific modifiers.
All relevant changes, or undefined if action was not found.
Use pf1.models.item.SpellModel#casterLevel instead.
Determine if this spell is domain/school spell.
Use pf1.models.item.SpellModel#domain instead.
AbstractisInternalRoot item.
Specifically the item at bottom of the container tree.
Should the item show unidentified data
Use pf1.models.item.abstract.PhysicalItemModel.showIdentified instead.
Use pf1.models.item.SpellModel#slotCost instead.
Linked spellbook
Use pf1.models.item.SpellModel#spellbook instead.
Use pf1.models.item.SpellModel#effectiveLevel instead.
StatichasStatichasStaticisConverts currencies to the given currency type
Converts as much currency as possible to this type.
Optionaloptions: { interactive?: boolean } = {}Additional options
Optionalinteractive?: booleanWas this from user interaction?
The updated item
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.
Use pf1.models.item.SpellModel#getConcentrationDC instead.
InternalDuration of the buff in seconds.
Optionaloptions: { interactive?: boolean; rollData?: object }Additional options
Optionalinteractive?: booleanDirectly triggered from user interaction
OptionalrollData?: objectRoll data
Duration in seconds or null if if it has no duration.
AbstractgetSpell components
Additional options
Optionalcompact?: booleanRemove redundant components (e.g. M/DF becomes DF for divine caster)
Optionaloptions: { inLowestDenomination?: boolean } = {}Additional options affecting how the value is returned
OptionalinLowestDenomination?: booleanWhether to return the value in copper, or in gold (default)
The total amount of currency this item contains, in gold pieces
Use pf1.models.item.ContainerModel.getTotalCurrency instead.
Returns the displayed value of an item according to multiple options
Optionaloptions: {Various optional parameters affecting value calculations
OptionalforceUnidentified?: booleanOverride whether the value should use the unidentified price
Optionalidentical?: booleanTreat all items in stack as identical (same number of charges).
OptionalinLowestDenomination?: booleanWhether the value should be returned in the lowest denomination
Optionalmaximized?: booleanPretend as if the items were fresh (full charges)
Optionalrecursive?: booleanWhether the value of contained items should be included
OptionalsellValue?: numberThe sell value multiplier
Optionalsingle?: booleanReturn value of singular item instead of the actual stack. Disables recursive option.
The item's value
Use pf1.models.item.abstract.PhysicalItemModel.getValue instead.
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" | "combat" | "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.
Use pf1.models.item.SpellModel#usesSpellPoints instead.
StaticfromStaticgetGet the price of a consumable given the spell level and caster level.
Use pf1.models.item.SpellModel.getConsumablePrice instead.
StaticgetStatictoConvert spell into a consumable item.
Use pf1.models.item.SpellModel.toConsumable instead.
StatictoOpen Consumable conversion dialog.
Use pf1.models.item.SpellModel.toConsumablePrompt instead.
Sets a boolean flag on this item.
The name/key of the flag to set.
Update context
Whether something was changed.
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.
The name/key of the flag on this item.
Whether the flag was found on this item.
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.
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.
InternalExecutes 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.
InternalTest 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.
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.
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
Get all items linked by any means.
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
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.
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.
Generic charge addition (or subtraction) function that either adds charges or quantity, based on item data.
The amount of charges to add.
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?: any } = {}Additional options.
Optionaltoken?: anyRelevant token if any.
Chat message instance if one was created.
Use
Triggers action use workflow.
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?: PointerEvent | nullThe 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?: anyToken this action is for, if any.
Item document extension
Provides baseline support for system data models and module added subtypes.
Template: Model