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

    Class ItemScriptCall

    Script Call

    Hierarchy

    • any
      • ItemScriptCall
    Index

    General

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

    • get hide(): boolean

      Returns boolean

    • get id(): string

      Returns string

    • get isMacro(): boolean

      Returns boolean

    • Opens up the editor for this script call

      Parameters

      • Optionaloptions: { 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

    Document

    metadata: Readonly<{ label: "Script Call"; name: "Script" }> = ...

    Metadata mimicking Foundry documents

    Required by pf1.applications.ScriptEditor

    • get documentName(): string

      Returns string

    • get uuid(): string

      Retrieve UUID

      Relies on pf1.documents.item.ItemBasePF.getEmbeddedDocument | Item#getEmbeddedDocument() override to function with fromUuid() and similar functions.

      Returns string

    • get documentName(): "Script"

      Returns "Script"

    • Delete this script call

      Parameters

      • options: object = {}

        Context options to pass to the update call

      Returns Promise<any>

    • Internal

      Returns void

    • Parameters

      • updateData: any
      • options: {} = {}

      Returns Promise<any>

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