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

    Item Document

    Provides baseline support for system datamodels and module added subtypes.

    Hierarchy (View Summary)

    Index

    Properties

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

    An object containing links to other items.

    scriptCalls: any

    Accessors

    • get actionTypes(): string[]

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

      Returns string[]

    • get addonMaterial(): Set<string>

      The item's material addons.

      Returns Set<string>

    • get alignmentChange(): object | null

      Returns object | null

    • get alignmentChangePriority(): number

      Returns number

    • get alignments(): string | null

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

      Returns string | null

    • get auraStrength(): number

      Aura strength as number from 0 to 4.

      Returns number

    • get autoDeductCharges(): boolean

      Consumes or adds charges by default.

      Returns boolean

    • get baseArmorProficiency(): "med" | "lgt" | "hvy" | "shl" | "twr" | null

      Retrieve armor proficiency type required by this item.

      Returns "med" | "lgt" | "hvy" | "shl" | "twr" | null

      • Null if no relevant proficiency found. Possibly an error.
      • If used on item that is not an armor or a shield.

      PF1 v10

    • get baseMaterial(): string | null

      Base material

      Returns string | null

    • get canUse(): boolean

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

      Returns boolean

    • get charges(): number

      Remaining charges

      Returns number

    • get defaultAction(): Action | undefined

      Returns Action | undefined

    • get defaultAmmo(): any

      Linked ammunition item if any.

      Returns any

    • get effect(): any

      An active effect associated with this item.

      Returns any

      • Most item types don't have associated effect.
    • get hasAction(): boolean

      Returns boolean

    • get hasActions(): any

      Returns any

    • get hasAttack(): boolean

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

      Returns boolean

    • get hasChanges(): boolean

      Returns boolean

    • get hasDamage(): boolean

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

      Returns boolean

    • get hasFiniteCharges(): boolean

      Finite charges

      Returns boolean

    • get hasSlots(): boolean

      Does the equipment subtype use slots.

      Returns boolean

    • get hitDice(): number

      Hit Dice

      Returns number

    • get isActive(): boolean

      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 boolean

      • This queries this.system.isActive for the actual state.
    • get isCharged(): boolean

      Returns boolean

    • get isPhysical(): boolean

      Whether or not this is a physical item.

      This queries system.isPhysical for actual truth.

      Returns boolean

    • 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 mythicTier(): number

      Mythic Tier

      Returns number

    • get normalMaterial(): string | null

      The item's actual material.

      Returns string | null

    • get subType(): ItemSubtypes | null

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

      Returns ItemSubtypes | null

    • get hasActions(): any

      Returns any

    • get hasChanges(): boolean

      Returns boolean

    • get isPhysical(): boolean

      Whether the item is tangible physical object in reality.

      Returns boolean

    Methods

    • Protected

      Finalize data after actor and items are guaranteed to be ready.

      Other items may not have yet run _finalizeData() however.

      Returns void

    • Internal

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

      Returns void

    • 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" } } } }
    • Protected Internal

      Updates protections and weaknesses with processed formulas.

      Called in ()

      Returns void

    • 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

    • Internal

      Duration of the buff in seconds.

      Parameters

      • Optionaloptions: { interactive?: boolean; rollData?: object }

        Additional options

        • Optionalinteractive?: boolean

          Directly triggered from user interaction

        • OptionalrollData?: object

          Roll data

      Returns Promise<number | null>

      Duration in seconds or null if if it has no duration.

    • 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
    • Returns labels for this item

      Parameters

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

        Additional options

        • OptionalactionId?: string

          ID of one of this item's actions to get labels for; defaults to first action

        • Optionalisolated?: boolean

          Is this isolated use? If true, more data is included.

        • OptionalrollData?: object

          Roll data to use.

      Returns Record<string, string>

      This item's labels

    • Item name

      Parameters

      • OptionalasPlayer: boolean = false

        If true, return value players see.

      Returns string

      • 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: any

      Returns Promise<object>

    • Recharges item's uses, if any.

      Parameters

      • options: {
            commit?: boolean;
            context?: object;
            exact?: boolean;
            maximize?: boolean;
            period?: "round" | "minute" | "hour" | "day" | "week" | "combat" | "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" | "combat" | "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<object | ItemBasePF | undefined>

      • Promise for the update, update data object, or undefined (no update needed).
    • Set item's active state.

      Parameters

      • active: boolean

        Active state

      • Optionalcontext: object

        Optional update context

      Returns Promise<ItemBasePF>

      • Update promise if item type supports the operation.

      ()

      • If item does not support the operation.
    • Internal

      Collect information on supplemental items and create them

      Parameters

      • items: ItemPF[]

        Array of items to draw supplemental data from

      • actor: ActorPF

        Owner

      Returns Promise<void>