Welcome to PGMZ! My goal is to make it easy for everyone to find and share great plugins for creating amazing games. As a plugin developer myself, I'm excited to grow this community with all of you.
Common Move Route MZ - CommonMoveRouteMZ.js
Plugin desc : Set events' custom move by common event
License : MIT License
Author : Sasuke KANNAZUKI(Thx to terunon)
Website : https://www.rpgmakerweb.com/products/rpg-maker-mz
Download Page : C:Program Files (x86)SteamsteamappscommonRPG Maker MZdlcBasicResourcespluginslaunch CommonMoveRouteMZ.js
File name : CommonMoveRouteMZ.js
Help of plugin :
* @target MZ
* @plugindesc Set events' custom move by common event
* @author Sasuke KANNAZUKI(Thx to terunon)
*
* @command set
* @text Set Common Event
* @desc Set Common Event for Events' Movement Route
*
* @arg eventId
* @text Event ID
* @desc The event to set movement route
* @type number
* @min 1
* @default 1
*
* @arg commonEventId
* @text Common Event ID
* @desc The common event that sets events' movement route
* @type common_event
* @default 1
*
* @arg flag
* @text Judge Formula
* @desc Whether to set movement route or not.
* @type string
* @default true
*
* @command set2
* @text Set Common Event(usable Variables)
* @desc Set Common Event for Events' Movement Route
* You also can set either variable or event's name
*
* @arg eventId
* @text Event ID
* @desc Event to set movement route
* You can set V+variableID (ex. V10) or event name
* @type string
* @default 1
*
* @arg commonEventId
* @text Common Event ID
* @desc The common event that sets event's route
* You can set V+variableID (ex. V10) or common event name
* @type string
* @default 1
*
* @arg flag
* @text Judge Formula
* @desc Whether to set movement route or not.
* @type string
* @default true
*
* @command setPlayer
* @text Set CommonEvent to Player
* @desc Set Common Event for player's Movement Route
*
* @arg commonEventId
* @text Common Event ID
* @desc The common event that sets events' movement route
* @type common_event
* @default 1
*
* @arg flag
* @text Judge Formula
* @desc Whether to set movement route or not.
* @type string
* @default true
*
* @command setPlayer2
* @text Set CommonEvent to Player(enable Variable)
* @desc Set Common Event for player's Movement Route
* You also can set either variable or event's name
*
* @arg commonEventId
* @text Common Event ID
* @desc The common event that sets event's route
* You can set V+variableID (ex. V10) or common event name
* @type string
* @default 1
*
* @arg flag
* @text Judge Formula
* @desc Whether to set movement route or not.
* @type string
* @default true
*
* @help
* This plugin runs under RPG Maker MZ.
* This plugin is the MZ version of CommonMoveRoute.js
*
* [Summary]
* Set events' move route to a common event
* In order to reduce the burden of setting each event's description,
* write a routine to common event and call from many events.
*
* The remarkable point of writing move route to common event,
* it enables to execute any event commands to the move route.
*
* Since the execution is not by event commands list contents
* but by move route, you can set event commands list when the event invokes.
*
* [Example of setting method]
* You can set move route by following 3 methods.
* 'Plugin Command', 'Script', and 'Set Movement Route -> Script'.
* When you want to set Common Event #4 to Event whose id is 19's move route,
* set like following:
* ** Script **
* this.toCommon(4); // set move route to this event.
* this.commandRoute(4); // the same as above
* this.toCommon2(19, 4); // most standard notation
* this.commandRoute2(19, 4); // the same as above
* ** 'Script' in Move Routing**
* this.toCommon(4); // set move route to the event set at the command
* this.commandRoute(4); // the same as above
* ** NOTE **
* If you need to set Player as a callee, either use Plugin Commands or
* call above as event Id is -1.
*
* [Example of advanced setting method 1]
* On above commans, you can set common event id and event id not only number,
* but also following notation.
* - V10, V25 and so on: the value of variable number whose id is after V.
* - common event name, or event name: the id that the name has.
* ** The example in Script **
* this.toCommon2('Aooni', 'randomMove');
* set common event named randomMove as the move route whose event name is
* 'Aooni'.
*
* [Example of advanced setting method 2]
* put one more parameter to above commands, the parameter is evaluated by
* the function eval(), and when the result is false, skip the execution.
* ** The Examples **
* CommonMoveRoute 19 4 true
* this.toCommon2(19, 4, $gameSwitches.value(15));
*
* [Plugin Commands]
* You can set above also by plugin command.
* This plugin provides 4 plugin commands.
* - set parameters by constant number
* - set parameters by variable and so on
* - set player's common event by constant number
* - set player's common event by variable and so on
*
* [Hint and note of setting commands]
* - When you run the event command that takes wait in the common event,
* the event may often move original custom move.
* So if you execute command with wait, check the event's custom move route.
* - You can call another common event on the above commands in common event.
* i.e. move route common event can do nesting.
* but make sure to avoid cyclic calling. If nesting depth become 100,
* it will invoke error.
*
* [Additional Information]
* - You need not to terminate move route common event. For example,
* repeat move route, or setting loop that never exit.
* The movement will stop when the event's page is changed.
* - If the move route common event is terminated, the event restart original
* route moving.
*
* [License]
* This plugin is the refine version of terunon's TN_commonMoveRoute.js.
* You can get the MV pluin at https://forum.tkool.jp/index.php?threads/146/
* (Japanese site). Very thanks to terunon.
*
* this plugin is released under MIT license.
* http://opensource.org/licenses/mit-license.php