Pathfinder 1e for Foundry VTT
    Preparing search index...

    Class ItemPhysicalPF

    Abstract class for physical items.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    _activeStateChange _addTypeRollData _buildEmbedHTML _canCreateItemLink _configure _createInlineEmbed _embedDescription _generateLinkData _getArmorCostMultiplier _getArmorWeightMultiplier _onCreate _onDelete _onMemorizedUpdate _onUpdate _preCreate _prepareActions _prepareChanges _prepareDependentData _prepareIdentifier _prepareScriptCalls _prepareTraits _preUpdate _preUpdateNumericValueGuard _rechargeActions _rechargeUses _resetChargesOnQuantityUpdate _sizeAdjustedHealth _transformContainerUpdateData _updateInheritedCharges _updateMaxUses _updateProtectionsAndWeaknesses addCharges addItemBooleanFlag adjustContained createItemLink displayCard executeScriptCalls getAllDamageSources getAllLinkedItems getAttackSources getChangeTargets getChatData getConditionalSubTargets getConditionalTargets getContextChanges getCostMultiplier getDefaultChargeCost getDefaultChargeFormula getDescription getDescriptionData getEmbeddedDocument getItemBooleanFlags getItemDictionaryFlag getItemDictionaryFlags getLabels getLinkedItems getLinkedItemsSync getName getProficiency getRawEffectData getRollData getScriptCalls getValue getWeightMultiplier hasItemBooleanFlag memorizeVariables prepareBaseData prepareDerivedData prepareDurability prepareResources prepareWeight recharge removeItemBooleanFlag removeItemDictionaryFlag removeItemLink render setActive setItemDictionaryFlag update use _adjustNewItem _createSupplements _hasSizeUpdate _hasVisionUpdate _onCreateOperation _onDeleteOperation _onUpdateOperation createDialog defaultName getDefaultArtwork migrateData

    Constructors

    • Parameters

      • data: CreateData

        Initial data from which to construct the Item

      • Optionalcontext: ConstructionContext

        Construction context options

      Returns ItemPhysicalPF

    Properties

    _memoryVariables: undefined | null | {}
    actions: undefined | Collection<ItemAction, Methods<ItemAction>>

    A Collection of ItemActions.

    changes: undefined | Collection<any, Methods<any>>
    links: undefined | Record<string, ItemPF>

    An object containing links to other items.

    scriptCalls: undefined | Collection<string, ItemScriptCall>
    system: Readonly<
        InsertKeys<
            {
                hasActions: true;
                hasChanges: true;
                hasIdentifier: true;
                isPhysical: true;
                subtypeName: false;
            },
            { isPhysical: true },
        >,
    > = ...

    A static object holding system-specific metadata applicable to all instances of this Document class.

    Accessors

    • get actionTypes(): string[]

      An array containing all action types from this item's actions.

      Returns string[]

    • get activeState(): any

      If the item can be activated via setActive.

      isActive can return variable state independent of the toggle that setActive controls, this returns .

      Returns any

    • get addonMaterial(): string[]

      The item's material addons.

      Returns string[]

    • get alignments(): null | string

      The item's alignment attributes, or null if the item has no alignment attributes

      Returns null | string

    • get allDamageSources(): undefined | ItemChange[]

      Generic damage source retrieval for default action, includes default conditionals and other item specific modifiers.

      Returns undefined | ItemChange[]

      All relevant changes, or undefined if action was not found.

    • get attackSources(): undefined | object[]

      Return attack sources for default action.

      Returns undefined | object[]

      Array of value and label pairs for attack bonus sources on the main attack.

    • get auraStrength(): number

      Aura strength as number from 0 to 4.

      Returns number

    • get autoDeductCharges(): boolean

      Consumes are adds charges by default.

      Returns boolean

    • get baseMaterial(): null | string

      Base material

      Returns null | string

    • get canEquip(): boolean

      Can equip currently?

      Returns boolean

    • get canUse(): any

      Is this item usable at base level, disregarding per-action details.

      Returns any

    • get charges(): number

      Remaining charges

      Returns number

    • get defaultAction(): undefined | ItemAction

      Returns undefined | ItemAction

    • get defaultAmmo(): undefined | Item<"base" | ModuleSubType>

      Linked ammunition item if any.

      Returns undefined | Item<"base" | ModuleSubType>

    • get defaultSchool(): null | string

      The default spell school of this items aura, if any

      Returns null | string

    • get effect(): null | ActiveEffect<"base" | ModuleSubType>

      An active effect associated with this item.

      Returns null | ActiveEffect<"base" | ModuleSubType>

      • Most item types don't have associated effect.
    • get effectiveCl(): number

      Effective caster level of this item.

      Returns number

    • get fullDescription(): any

      Returns any

    • get hasAction(): boolean

      Returns boolean

    • get hasActions(): any

      {@inheritDoc ItemPF.hasActions:getter}

      Returns any

    • get hasAttack(): boolean

      Returns true if any of this item's actions have an attack, see ItemAction#hasAttack.

      Returns boolean

    • get hasChanges(): any

      Whether the item is tangible physical object in reality.

      Returns any

      • You can utilize this with raw data via CONFIG.Item.documentClasses[type]?.isPhysical
    • get hasDamage(): boolean

      Returns true if any of this item's actions have a damage roll, see ItemAction#hasDamage.

      Returns boolean

    • get hasFiniteCharges(): boolean

      Finite charges

      Returns boolean

    • get inContainer(): boolean

      Is this item inside a container?

      Returns boolean

    • get isActive(): any

      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.

      Returns any

    • get isBroken(): boolean

      Broken state

      Tests both explicit broken override and current health.

      Returns boolean

    • get isCharged(): boolean

      Returns boolean

    • get isPhysical(): any

      Whether the item is tangible physical object in reality.

      Returns any

      • You can utilize this with raw data via CONFIG.Item.documentClasses[type]?.isPhysical
    • get isProficient(): boolean

      Is the owning actor proficiency at using this as weapon.

      Returns boolean

      PF1 v10

    • get isSingleUse(): boolean

      Returns boolean

    • get maxCharges(): number

      Maximum possible charges this item can have.

      Returns number

      • Can return zero. Usually signifying something has reduced the potential uses below usability.
      • Can return infinity, signifying lack of limits.
    • get memoryVariables(): string[]

      Returns string[]

      The keys of data variables to memorize between updates, for e.g. determining the difference in update.

    • get normalMaterial(): null | string

      The item's actual material.

      Returns null | string

    • get rootItem(): Item<"base" | ModuleSubType>
      Internal

      Root item.

      Specifically the item at bottom of the container tree.

      Returns Item<"base" | ModuleSubType>

    • get showUnidentifiedData(): boolean

      Should the item show unidentified data

      Returns boolean

    • get subType(): null | string

      The item's subtype, or null if the item has no subtype

      Returns null | string

    • get uuid(): string

      A Universally Unique Identifier (uuid) for this Document instance.

      Returns string

    • get hasActions(): true

      Returns true

    • get hasChanges(): boolean

      Returns boolean

    • get isPhysical(): boolean

      Whether the item is tangible physical object in reality.

      Returns boolean

      • You can utilize this with raw data via CONFIG.Item.documentClasses[type]?.isPhysical

    Methods

    • Internal Experimental

      Return active state change from data if present

      This is a hack to allow item-type agnostic active state change detection.

      Parameters

      • changed: any

      Returns any

    • Internal

      Add item type specific roll data.

      Parameters

      • result: any

        Roll data

      Returns void

    • Parameters

      • config: any
      • options: {} = {}

      Returns Promise<HTMLElement | HTMLCollection | DocumentFragment>

    • Internal

      Test if specified link can be created.

      Parameters

      • type: string

        The type of link.

      • item: Item<"base" | ModuleSubType>

        The target item to link to.

      • Optionaloptions: object = {}

        Additional options

      Returns Promise<boolean>

      Whether a link to the item is possible here.

    • Configure item before data preparation.

      Parameters

      • options: object = {}

        Data model options

      Returns void

    • Parameters

      • content: any
      • config: any
      • options: any

      Returns Promise<null | HTMLElement>

    • Copy from foundry.documents.JournalEntryPage#_embedTextPage

      Parameters

      • config: any
      • options: {} = {}

      Returns Promise<DocumentFragment>

      foundry.documents.JournalEntryPage#_embedTextPage

    • Internal

      Parameters

      • type: string

        The type of link.

      • item: object

        The target item to link to.

      • uuid: string

        The link identifier for the item.

      Returns any[]

      An array to insert into this item's link data.

    • Returns any

    • Internal

      Weight scaling

      For use with () across item types

      Returns number

      • Weight multiplier
    • Parameters

      • data: object

        Creation data

      • context: object

        Context

      • userId: string

        Triggering user ID

      Returns void

    • Internal

      Parameters

      • context: object

        Context

      • userId: string

        Triggering user ID

      Returns void

    • Parameters

      • changed: any
      • context: any

      Returns void

    • Parameters

      • changed: object

        Changed data

      • context: object

        Context

      • userId: string

        Triggering user ID

      Returns void

    • Parameters

      • data: any
      • context: any
      • user: any

      Returns Promise<void>

    • Internal

      Prepare actions

      Returns void

    • Internal

      Prepare and update Changes collection.

      Returns void

    • 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.

      Parameters

      • final: boolean = false

        Is this final call to this?

      Returns void

    • Internal

      Initialize identifier

      Returns void

    • Internal

      Prepare ItemPF.scriptCalls collection.

      Returns void

    • Internal

      Returns void

    • Parameters

      • changed: object

        Changed data

      • context: object

        Context

      • user: User

        Triggering user

      Returns Promise<void>

    • Internal

      Parameters

      • system: object

        System data

      Returns void

    • Internal

      Recharges item's uses, if any.

      Parameters

      • options: { exact: boolean; period?: string; rollData?: object } = {}

        Options

        • exact: boolean

          Exact time period only

        • Optionalperiod?: string

          Recharge only if matching this time period

        • OptionalrollData?: object

          Roll data

      Returns undefined | object

      • Update data or undefined if no update is needed.
    • Internal

      Recharges item's uses, if any.

      Parameters

      • options: {
            exact?: boolean;
            maximize?: boolean;
            period?: string;
            rollData?: object;
            value?: number;
        } = {}

        Options

        • Optionalexact?: boolean

          Match only exact time period

        • Optionalmaximize?: boolean

          Maximize instead of using recharge formula

        • Optionalperiod?: string

          Recharge only if it matches this time period

        • OptionalrollData?: object

          Roll data instance

        • Optionalvalue?: number

          Set charges to specific value

      Returns Promise<undefined | object>

      • Update data or undefined if no update is necessary.
    • Reset charges when quantity is changed to simulate a stack.

      • If charges are 0
      • ... and quantity is reduced, reset to max

      Parameters

      • changed: object

        Changed data

      Returns Promise<void>

    • Internal

      Adjust HP value by item size.

      In reference to rules established at Table 7-12 of CRB p. 175

      Returns number

      • Size adjusted health
    • 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.

      Parameters

      • data: object

        Update data

      • Optionaloptions: { recursive?: boolean } = {}

        Additional options

        • Optionalrecursive?: boolean

          Create data recursively, meant for the real item document.

      Returns object

      • Transformed update data
      _transformContainerUpdateData({ name: "new name" })
      // => { system: { items: { [itemID]: { name: "new name" } } } }
    • Internal

      Update this item's charges based on provided item.

      Parameters

      • source: Item<"base" | ModuleSubType>

        Charge source

      Returns void

    • Internal

      Update max uses

      Returns void

    • Protected Internal

      Updates protections and weaknesses with processed formulas.

      Called in ()

      Returns void

    • Generic charge addition (or subtraction) function that either adds charges or quantity, based on item data.

      Parameters

      • value: number

        The amount of charges to add.

      Returns Promise<void | ItemPhysicalPF>

      Updated document or undefined if no update is possible.

    • Sets a boolean flag on this item.

      Parameters

      • flagName: string

        The name/key of the flag to set.

      • context: object = {}

        Update context

      Returns Promise<boolean>

      Whether something was changed.

    • Adjust data if the item is in container.

      Returns void

    • Creates a link to another item.

      Parameters

      • type: "charges" | "children" | "supplement" | "classAssociations"

        The type of link.

      • item: Item<"base" | ModuleSubType>

        The target item to link into this.

      • OptionalextraData: object

        Additional data to store int he link

      • Optionaloptions: object = {}

        Additional options

      Returns Promise<boolean>

      • Whether a link was created.
    • Display the chat card for an Item as a message in chat

      Parameters

      • OptionalmessageData: object = {}

        Optional data that will be merged into the message data.

      • Optionaloptions: { token?: TokenDocument } = {}

        Additional options.

        • Optionaltoken?: TokenDocument

          Relevant token if any.

      Returns Promise<void | ChatMessage<"base" | ModuleSubType>>

      Chat message instance if one was created.

    • Executes all script calls on this item of a specified category.

      Parameters

      • category: string

        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

      Returns Promise<object>

      The shared object between calls which may have been given data.

    • Get all items linked by any means.

      Returns Promise<Item<"base" | ModuleSubType>[]>

      • Linked items
    • Attack sources for a specific action.

      Parameters

      • actionId: string

        Action ID

      • Optionaloptions: { rollData?: object } = {}

        Additional options

        • OptionalrollData?: object

          Roll data instance

      Returns undefined | object[]

      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.

      Parameters

      • target: string

        The target key, as defined in PF1.buffTargets.

      Returns Record<string, string>

      A list of changes

    • Generates ChatData for this item, either in a default configuration or for a specific action.

      Parameters

      • Optionaloptions: {
            actionId?: string;
            body?: boolean;
            chatcard?: boolean;
            extended?: boolean;
            footer?: boolean;
            header?: boolean;
            interactive?: boolean;
            rollData?: object;
        } = {}

        Options affecting how descriptions are enriched. rollData

        • OptionalactionId?: string

          The ID of an action on this item to generate chat data for, defaults to ItemPF.defaultAction

        • Optionalbody?: boolean

          Include main description

        • Optionalchatcard?: boolean

          Is this actually for chat card.

        • Optionalextended?: boolean

          Include extended information that may not be useful in all circumstances.

        • Optionalfooter?: boolean

          Include footer if it exists

        • Optionalheader?: boolean

          Include header if it exists

        • Optionalinteractive?: boolean

          Was this from user interaction (allowing farther interactions)

        • OptionalrollData?: object

          Defaults to ItemAction#getRollData/ItemPF#getRollData.

      Returns Promise<ChatData>

      The chat data for this item (+action)

    • Item specific conditional sub targets.

      Parameters

      • result: object

        Result key to label mapping.

      Returns void

    • Item specific conditional targets.

      Parameters

      • results: Record<string, object>

        Key to target mapping.

      Returns void

    • Finds, filters and alters changes relevant to a context, and returns the result (as an array)

      Parameters

      • context:
            | "mwdamage"
            | "twdamage"
            | "rwdamage"
            | "sdamage"
            | "mattack"
            | "wdamage"
            | "nattack"
            | "rattack"
            | "tattack"
            | "rdamage"
            | "mdamage"
            | "ndamage"
            | "tdamage" = ...

        The given context.

      Returns ItemChange[]

      • The matching changes.
      • Always returns empty array if no actor is present.
    • Return cost multiplier affecting this item.

      Such as item size dictating how costly an armor is.

      Returns number

      • Multiplier, 1 for most items regardless of size.
    • Get default charge cost for all actions.

      Parameters

      • Optionaloptions: { rollData?: object } = {}

        Additional options

        • OptionalrollData?: object

          Roll data instance

      Returns number

      Number for default cost.

    • Default charge formula.

      Returns string

      Charge formula

    • Get full description.

      Parameters

      • options: {
            actionId: any;
            body?: boolean;
            chatcard?: boolean;
            data?: object;
            header?: boolean;
            identified?: boolean;
            isolated?: boolean;
            rollData?: object;
        } = {}

        Item type dependant options for rendering the description.

        • actionId: any
        • Optionalbody?: boolean

          Include main description body if such exists.

        • Optionalchatcard?: boolean

          Instruct template to render chat card in mind.

        • Optionaldata?: object

          Template data for rendering

        • Optionalheader?: boolean

          Include header if such exists.

        • Optionalidentified?: boolean

          Enforce identified description retrieval

        • Optionalisolated?: boolean
        • OptionalrollData?: object

          Roll data for transforming description

      Returns Promise<string>

      • Full description.
    • Description Data

      Required to be async due to spell associated class map building.

      Parameters

      • options: { actionId?: string; isolated?: boolean; rollData?: object } = {}

        Additional options

        • OptionalactionId?: string

          ID of an action. Default action is used if undefined.

        • Optionalisolated?: boolean

          Include extra data to reflect it not being so easily available in context.

        • OptionalrollData?: object

          Roll data instance

      Returns Promise<object>

      • Description context data
    • For supporting actions and changes in fromUuid()

      Synced with Foundry v12.331

      Parameters

      • embeddedName: any
      • id: any
      • options: any

      Returns any

    • Get all item boolean flags as array.

      Returns string[]

      • Flag keys
    • Parameters

      • flagName: string

        The name/key of the flag to get.

      Returns undefined | string | number

      The value stored in the flag.

    • Get all item dictionary flags as array of objects.

      Returns Record<string, any>

      • All dictionary flags
    • Returns labels for this item

      Parameters

      • __namedParameters: {} = {}

        Additional options

      Returns Record<string, string>

      This item's labels

    • Get item links of type

      Parameters

      • type: string

        Link type

      • includeLinkData: boolean = false

        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?: boolean

          Retrieved linked items recursively.

      Returns Promise<object[] | Item<"base" | ModuleSubType>[]>

      • Linked items, or objects with linked items and additional data
    • Retrieve list of linked items for a type, synchronously. Intended mainly for fetching child or charge links quickly.

      Parameters

      • type: string

        Link type, e.g. "children", "charges", or "classAssociations"

      • Optionaloptions: { _results?: Set<string>; recursive?: boolean } = {}

        Additional options

        • Optional_results?: Set<string>

          Internal use only

        • Optionalrecursive?: boolean

          Retrieve links recursively.

      Returns object[] | Item<"base" | ModuleSubType>[]

      Linked items or their compendium index data

      const childItems = item.getLinkedItemsSync("children");
      
    • Item name

      Parameters

      • forcePlayerPerspective: boolean = false

        If true, return value players see.

      Returns any

      • Item name
    • Parameters

      • Optionalweapon: boolean = true

        Get proficiency as a weapon. Armor otherwise.

      Returns boolean

      • Whether or not the owner of the item is proficient.
      • If item type does not support proficiency.

      PF1 v10

    • Determines the starting data for an ActiveEffect based off this item.

      Parameters

      • options: { rollData: object } = {}

        Additional options

        • rollData: object

          Roll data

      Returns Promise<object>

      • Active Effect creation data
    • Parameters

      • Optionaloptions: object

        Additional options

      Returns object

      An object with data to be used in rolls in relation to this item.

    • Internal

      Fetches all this item's script calls of a specified category

      Parameters

      • category: string

        Category

      Returns ItemScriptCall[]

      • Script calls within the category.
    • Returns the displayed value of an item according to multiple options

      Parameters

      • Optionaloptions: {
            forceUnidentified?: boolean;
            identical?: boolean;
            inLowestDenomination?: boolean;
            maximized?: boolean;
            recursive?: boolean;
            sellValue?: number;
            single?: boolean;
        } = {}

        Various optional parameters affecting value calculations

        • OptionalforceUnidentified?: boolean

          Override whether the value should use the unidentified price

        • Optionalidentical?: boolean

          Treat all items in stack as identical (same number of charges).

        • OptionalinLowestDenomination?: boolean

          Whether the value should be returned in the lowest denomination

        • Optionalmaximized?: boolean

          Pretend as if the items were fresh (full charges)

        • Optionalrecursive?: boolean

          Whether the value of contained items should be included

        • OptionalsellValue?: number

          The sell value multiplier

        • Optionalsingle?: boolean

          Return value of singular item instead of the actual stack. Disables recursive option.

      Returns number

      The item's value

    • Return weight multiplier affecting this item.

      Such as item size dictating how heavy an armor is.

      Returns number

      • Multiplier, 1 for most items regardless of size.
    • Parameters

      • flagName: string

        The name/key of the flag on this item.

      Returns boolean

      Whether the flag was found on this item.

    • Internal

      Memorize quantity and level for later diffing.

      Returns void

    • Returns void

    • Returns void

    • Internal

      Prepare hardness and hit points

      Returns void

    • Internal

      Prepare item resources.

      Returns void

    • Prepare this item's WeightData

      Parameters

      • Optionalinitialize: boolean = true

        Initialize. Only used by containers.

      Returns void

    • Recharges item's uses, if any.

      Parameters

      • options: {
            commit?: boolean;
            context?: object;
            exact?: boolean;
            maximize?: boolean;
            period?: "round" | "minute" | "hour" | "day" | "week" | "any";
            rollData?: object;
            value?: number;
        } = {}

        Options

        • Optionalcommit?: boolean

          Commit update directly. If false, returns the update data instead.

        • Optionalcontext?: object

          Update context

        • Optionalexact?: boolean

          Use exact time period. Otherwise "week" for example will also recharge items with "day" period.

        • Optionalmaximize?: boolean

          Recharge to full regardless of recharge formula.

        • Optionalperiod?: "round" | "minute" | "hour" | "day" | "week" | "any"

          Recharge period. Use "any" to ignore item's configuration.

        • OptionalrollData?: object

          Roll data instance to use for formulas.

        • Optionalvalue?: number

          Recharge to specific value, respecting maximum and minimum bounds.

      Returns Promise<undefined | object | ItemPhysicalPF>

      • Promise for the update, update data object, or undefined (no update needed).
    • Removes a boolean flag from this item.

      Parameters

      • flagName: string

        The name/key of the flag to remove.

      • context: object = {}

        Update context

      Returns Promise<boolean>

      Whether something was changed.

    • Removes a dictionary flag from this item.

      Parameters

      • flagName: string

        The name/key of the flag to remove.

      • context: object = {}

        Update context

      Returns Promise<boolean>

      Whether something was changed.

    • Removes all link references to an item.

      Parameters

      • uuid: string

        The UUID of the item to remove links to.

      • Optionaloptions: { commit?: boolean } = {}

        Additional options

        • Optionalcommit?: boolean

          Commit changes to database. If false, resulting update data is returned instead.

      Returns Promise<undefined | object | Item<"base" | ModuleSubType>>

      • Updated document, update data, or undefined
    • Parameters

      • force: any
      • context: any

      Returns void

    • Set item's active state.

      Parameters

      • active: any

        Active state

      • context: any

        Optional update context

      Returns Promise<Item<"base" | ModuleSubType>>

      • Update promise if item type supports the operation.
      • If item does not support the operation.
    • Sets a dictionary flag value on this item.

      Parameters

      • flagName: string

        The name/key of the flag to set.

      • value: string | number

        The flag's new value.

      • context: object = {}

        Update context

      Returns Promise<boolean>

      Whether something was changed.

    • Parameters

      • data: object

        Update data

      • context: object = {}

        Context

      Returns Promise<Item<"base" | ModuleSubType>>

      • Updated item
    • Use an attack, using SharedActionData

      Parameters

      • options: {
            actionId?: string;
            chatMessage?: boolean;
            cost?: number;
            dice?: string;
            ev?: null | Event;
            options?: UseOptions;
            rollMode?: string;
            skipDialog?: boolean;
            token?: TokenDocument;
        } = {}

        Options

        • OptionalactionId?: string

          The ID of the action to use, defaults to the first action

        • OptionalchatMessage?: boolean

          Whether to send a chat message for this action

        • Optionalcost?: number

          Cost override. Replaces charge cost or slot cost as appropriate.

        • Optionaldice?: string

          The base dice to roll for this action

        • Optionalev?: null | Event

          The event that triggered the use, if any

        • Optionaloptions?: UseOptions

          Additional use options.

        • OptionalrollMode?: string

          The roll mode to use for the chat message

        • OptionalskipDialog?: boolean

          Whether to skip the dialog for this action

        • Optionaltoken?: TokenDocument

          Token this action is for, if any.

      Returns Promise<void | ActionUse | SharedActionData>

      • Action use, shared data, or nothing.
      • On some invalid inputs.
    • Protected

      Adjust temporary item before creation

      Parameters

      • Optionalitem: ItemPF

        Temporary document

      • Optionaldata: object

        Creation data

      • Optionaloverride: boolean = false

        Override values even if defined

      Returns void

    • Internal

      Collect information on supplemental items and create them

      Parameters

      • items: Item<"base" | ModuleSubType>[]

        Array of items to draw supplemental data from

      • actor: Actor<"base" | ModuleSubType>

        Owner

      Returns Promise<void>

    • Internal

      Determine whether a given change set affects size

      Parameters

      • data: object

        Item data

      Returns boolean

      • Contains size targeting change
    • Internal

      Determine whether a given change set affect senses

      Parameters

      • changes: object

        An object containing changeFlags and changes to be inspected.

      Returns boolean

      • Vision alteration detected
    • On-Create Operation

      Post-create processing so awaiting the original operation has all secondary updates completed when it returns.

      Parameters

      • documents: Document[]

        Documents

      • operation: any

        Operations and context data

      • user: User

        Triggering user

      Returns Promise<void>

    • On-Delete Operation

      Post-delete processing so awaiting the original operation has all secondary updates completed when it returns.

      Parameters

      • documents: Document[]

        Documents

      • operation: any

        Operations and context data

      • user: User

        Triggering user

      Returns Promise<void>

    • On-Update Operation

      Post-update processing so awaiting the original operation has all secondary updates completed when it returns.

      Parameters

      • documents: Document[]

        Documents

      • operation: any

        Operations and context data

      • user: User

        Triggering user

      Returns Promise<void>

    • Item create dialog.

      Parameters

      • data: object = {}

        Initial item data

      • createOptions: {} = {}
      • __namedParameters: {} = {}

      Returns Promise<null | Item<"base" | ModuleSubType>>

      Synchronized with Foundry VTT v13.347

    • Override to provide naming by subType potential.

      Parameters

      • context: {
            pack?: null | string;
            parent?: null | Document;
            subType?: string;
            type?: string;
        } = {}

        Context where the name would be used

        • Optionalpack?: null | string

          Pack this would be within

        • Optionalparent?: null | Document

          Parent document

        • OptionalsubType?: string

          Document subtype. Nonstandard option.

        • Optionaltype?: string

          Type

      Returns string

      Synced with Foundry v12.331

    • Internal

      Add default artwork.

      Parameters

      • OptionalitemData: object

        Item data

      Returns { img: string }

      • Default image
    • Parameters

      • source: any

      Returns AnyMutableObject