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

    Extend the basic ActorSheet class to do all the PF things! This sheet is an Abstract layer which is not used.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Parameters

      • object: ActorPF

        A Document instance which should be managed by this form.

      • Optionaloptions: Partial<Options>

        Optional configuration parameters for how the form behaves. (default: {})

      Returns ActorSheetPF

    Properties

    _activeEdits: Record<string, string> = {}
    _commitItemUsesBound: (event: Event) => Promise<any> = ...

    Type declaration

      • (event: Event): Promise<any>
      • Internal

        Commit changes from _setItemUses

        Parameters

        • event: Event

        Returns Promise<any>

    _filters: Record<string, Record<string, Set<string>>> = ...

    Track the set of item filters which are applied

    effectiveSearch: {} = {}
    searchCompositioning: boolean = false

    Item search

    searchDelay: number = 250
    searchDelayEvent: null
    searchRefresh: boolean = true
    _warnedAppV1: boolean = true
    EDIT_TRACKING: string[] = ...

    Which fields to track edits for

    Accessors

    • get defaultOptions(): {
          classes: string[];
          dragDrop: { dragSelector: string }[];
          scrollY: string[];
          tabs: {
              contentSelector: string;
              group: string;
              initial: string;
              navSelector: string;
          }[];
      }

      Returns {
          classes: string[];
          dragDrop: { dragSelector: string }[];
          scrollY: string[];
          tabs: {
              contentSelector: string;
              group: string;
              initial: string;
              navSelector: string;
          }[];
      }

    Methods

    • Internal

      Filters item by sheet section config.

      Parameters

      • item: Item<"base" | ModuleSubType>

        Item to filter

      • section: object

        Section to filter by

      Returns boolean

    • Allow drag start always. Foundry blocks this if sheet is not editable, which blocks copying items.

      Parameters

      • selector: string

        Selector string

      Returns boolean

    • Protected

      Determine if the item can have its range shown on this sheet.

      Parameters

      • item: Item<"base" | ModuleSubType>

      Returns boolean

    • Opens a dialog to edit a skill.

      Parameters

      • skillId: string

        The id of the skill in question.

      • OptionalsubSkillId: string

        The id of the subskill, if appropriate.

      Returns Promise<void>

    • Internal

      Filter inventory section

      Called in ()

      Parameters

      • category: object

        Category data

      • section: object

        Section data

      • filters: Set<string>

        Active filters

      Returns void

    • Protected

      Parameters

      • fullId: string

        Target ID

      • context: object

        Context object to store data into

      Returns Promise<void>

      • If provided ID is invalid.
    • Parameters

      • event: DragEvent

        Drag start event

      • type:
            | "initiative"
            | "attack"
            | "cl"
            | "bab"
            | "cmb"
            | "concentration"
            | "defenses"
            | "abilityScore"
      • OptionalsubType: string

        Type specific subtype

      Returns void

    • Parameters

      • event: any
      • data: any

      Returns Promise<undefined | ItemPF[] | _Override<Item<"base" | ModuleSubType>, {}>[]>

    • Handle the final creation of dropped Item data on the Actor. This method is factored out to allow downstream classes the opportunity to override item creation behavior.

      Parameters

      • itemData: any

        The item data requested for creation

      Returns Promise<undefined | _Override<Item<"base" | ModuleSubType>, {}>[]>

    • Protected

      Handle rolling an Ability check, either a test or a saving throw

      Parameters

      • event: Event

        The originating click event

      Returns void

    • Protected

      Parameters

      • event: Event

        Triggering event

      • callback: Function

        Submission handler

      • displayValue: number = null

        An alternate value to fill in the input field

      Returns void

    • Handle standard form submission steps

      Parameters

      • event: any

        The submit event which triggered this handler

      • __namedParameters: { preventClose?: boolean; preventRender?: boolean; updateData?: null } = {}

      Returns Promise<void>

      A promise which resolves to the validated update data

    • Protected

      Parameters

      • item: object

        Item render data

      • section: object

        Item section

      • context: object

        Render context

      Returns void

    • Internal

      Insert a spell into the spellbook object when rendering the character sheet

      Parameters

      • data: object

        The Actor data being prepared

      • spells: any[]

        The spell data being prepared

      • bookKey: string

        The key of the spellbook being prepared

      Returns object

      • Spellbook data
    • Activate event listeners using the prepared sheet HTML

      Parameters

      • html: JQuery<HTMLElement>

        The prepared HTML object ready to be rendered into the DOM

      Returns void

    • Parameters

      • __namedParameters: { inLowestDenomination?: boolean; recursive?: boolean } = {}

      Returns number

    • Parameters

      • __namedParameters: { inLowestDenomination?: boolean; recursive?: boolean } = {}

      Returns number

    • Add some extra data when rendering the sheet to reduce the amount of logic required within the template.

      Returns Promise<
          {
              actor: ActorPF;
              choices: {};
              config: config;
              cssClass: string;
              document: ActorPF;
              editable: boolean;
              effects: EmbeddedCollection<ActiveEffect<"base" | ModuleSubType>, ActorPF>;
              hasHD: boolean;
              isCharacter: boolean;
              isGM: boolean;
              itemTypes: ItemTypesMap;
              limited: boolean;
              options: Options;
              owner: boolean;
              race: null | {};
              skillsLocked: boolean;
              sourceData: {};
              unchainedActions: SettingInitializedType<"core", KeyFor<"core">>;
              units: {
                  distance: {
                      overland: "PF1.Distance.miShort" | "PF1.Distance.kmShort";
                      tactical: "PF1.Distance.ftShort" | "PF1.Distance.mShort";
                  };
                  weight: string;
              };
              usesAnySpellbook: boolean;
          },
      >

    • Protected

      Toggle inline display of an item's summary/description by expanding or hiding info div

      Parameters

      • elem: JQuery<HTMLElement>

        The element to open. Likely will have the item class in CSS.

      • Optionalinstant: boolean = {}

        Whether to instantly show the expansion (true), or animate it (false)

      Returns Promise<void>