Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PluginManager

Static class that manages plugins

Hierarchy

  • PluginManager

Index

Constructors

Protected constructor

Properties

Static _errorUrls

_errorUrls: string[]

Static _path

_path: string

Static _scripts

_scripts: string[]

Methods

Static checkErrors

  • checkErrors(): void

Static loadScript

  • loadScript(name: string): void

Static onError

  • onError(e: Event): void

Static parameters

  • parameters(name: string): any
  • Returns all of the plugin parameters for an RPGMakerMZ plugin in a JSON Like String Format. Should typedef this for ease of parsing.

    Parameters

    • name: string

    Returns any

    Any

Static registerCommand

  • registerCommand(pluginName: string, commandName: string, lambda: (arg0: any) => void): void
  • Regsters a new plugin command in MZ using a lambda expression The Variable of the lambda should be transformed into the appropriate typed def struct for your use case for your command. Example Syntax For Commented Parameters

    //Should be in comment
    @command PluginCommandFunctionName
    @text My Plugin Command
    @desc Plugin Command Description Text
    @arg Actors
    @text Which Actors?
    @type actor[]
    @desc Select which Actor ID(s) to affect.
    @default ["1"]
    @arg State
    @text State
    @type state
    @desc Which State to apply?
    @default 1
    PluginManager.registerCommand("TestPlugin", "PluginCommandFunctionName", args => {
    // Get Arguments
    const actorIds = JSON.parse(args.Actors);
    const stateId = args.State;
    // Use the arguments
    for (const actorId of actorIds) {
    const actor = $gameParty.members().find(member => member.actorId() === Number(actorId));
    if (actor) {
    actor.addState(stateId);
    }
    }
    });

    Parameters

    • pluginName: string
    • commandName: string
    • lambda: (arg0: any) => void
        • (arg0: any): void
        • Parameters

          • arg0: any

          Returns void

    Returns void

Static setup

Generated using TypeDoc