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

    Class ItemScriptCall

    Script Call

    Hierarchy

    • any
      • ItemScriptCall
    Index

    Constructors

    Properties

    _id?: string

    Internal ID.

    category: string
    hidden?: boolean

    Hidden from normal user, even document owner.

    img?: any

    Script image. If type is macro, this is overwritten by the macro image.

    name?: {}

    Script name. If type is macro, this is overwritten by the macro name.

    type: "script" | "macro"
    value: string

    If type is script, this is the script body. If type is macro, this is the UUID to the macro.

    Accessors

    Methods

    • Delete this script call

      Parameters

      • options: object = {}

        Context options to pass to the update call

      Returns Promise<any>

    • Parameters

      • __namedParameters: { editable?: boolean } = {}

      Returns Promise<any>

    • Executes the script.

      Parameters

      • shared: object

        An object passed between script calls, and which is passed back as a result of ItemPF.executeScriptCalls.

      • extraParams: object = {}

        A dictionary containing extra parameters to pass on to the call.

      Returns Promise<any>

      • Script return value if any
    • Get macro delegate for executing this script call with.

      Returns Promise<Macro<"script" | "chat">>

      • Actual macro or its delegate
    • Creates a script call.

      Parameters

      • data: object[]

        Data to initialize the script call(s) with.

      • context: { parent?: ItemPF }

        An object containing context information.

        • Optionalparent?: ItemPF

          The parent entity to create the script call within.

      Returns Promise<ItemScriptCall[]>

      • The resulting script calls, or an empty array if nothing was created.
    • Returns {
          _id: StringField<
              { blank: false; initial: () => string; readonly: true; required: true },
              AssignmentType<
                  {
                      blank: false;
                      initial: () => string;
                      readonly: true;
                      required: true;
                  },
              >,
              string,
              string,
          >;
          category: StringField<
              { required: false },
              AssignmentType<{ required: false }>,
              InitializedType<{ required: false }>,
              InitializedType<{ required: false }>,
          >;
          hidden: BooleanField<
              { initial: false; required: false },
              AssignmentType<
                  SimpleMerge<{ initial: false; required: false }, DefaultOptions>,
              >,
              InitializedType<
                  SimpleMerge<{ initial: false; required: false }, DefaultOptions>,
              >,
              InitializedType<
                  SimpleMerge<{ initial: false; required: false }, DefaultOptions>,
              >,
          >;
          img: FilePathField<
              { blank: false; categories: "IMAGE"[]; required: false },
              AssignmentType<{ blank: false; categories: "IMAGE"[]; required: false }>,
              InitializedType<{ blank: false; categories: "IMAGE"[]; required: false }>,
              InitializedType<{ blank: false; categories: "IMAGE"[]; required: false }>,
          >;
          name: StringField<
              { initial: () => string; required: true },
              AssignmentType<{ initial: () => string; required: true }>,
              string,
              string,
          >;
          priority: NumberField<
              { initial: 0; integer: true; required: true },
              AssignmentType<{ initial: 0; integer: true; required: true }>,
              InitializedType<{ initial: 0; integer: true; required: true }>,
              InitializedType<{ initial: 0; integer: true; required: true }>,
          >;
          type: StringField<
              {
                  blank: false;
                  choices: readonly ["script", "macro"];
                  initial: "script";
                  nullable: false;
                  required: true;
              },
              AssignmentType<
                  {
                      blank: false;
                      choices: readonly ["script", "macro"];
                      initial: "script";
                      nullable: false;
                      required: true;
                  },
              >,
              InitializedType<
                  {
                      blank: false;
                      choices: readonly ["script", "macro"];
                      initial: "script";
                      nullable: false;
                      required: true;
                  },
              >,
              InitializedType<
                  {
                      blank: false;
                      choices: readonly ["script", "macro"];
                      initial: "script";
                      nullable: false;
                      required: true;
                  },
              >,
          >;
          value: StringField<
              { blank: true; nullable: false; required: true },
              AssignmentType<{ blank: true; nullable: false; required: true }>,
              string,
              string,
          >;
      }