An open library of RPG Maker MZ plugins, powered by the community.

PGMZ - The Community-Driven Plugin Library for RPG Maker MZ

MZ plugins

NRP K Common Move Route MZ - NRP_K_CommonMoveRouteMZ.js

Plugin desc : v1.04 Set events' custom move by common event

License :
・Copyright: Retained
・Commercial Use: Allowed
・Modification: Allowed
・Redistribution: Allowed
・Details: See Download Page / In-plugin documentation

Author : Sasuke KANNAZUKI(Thx to terunon)(mod Takeshi Sunagawa)

Website : https://github.com/NewRPGProject/MZMV_Plugin/blob/main/NRP_K_CommonMoveRouteMZ.js

Download Page : https://raw.githubusercontent.com/NewRPGProject/MZMV_Plugin/main/NRP_K_CommonMoveRouteMZ.js

File name : NRP_K_CommonMoveRouteMZ.js

Help of plugin :

* CommonMoveRouteMZ.js is a launch plugin for RPG Maker MZ
 * by Sasuke KANNAZUKI (Thx to terunon).
 * This plugin is an addition to it by Takeshi Sunagawa.
 * 
 * According to the original specification, the action specified
 * in the common event will continue to run while the event is running,
 * but this can be stopped with a plugin parameter.
 * 
 * -------------------------------------------------------------------
 * [Here is the original explanation]
 * -------------------------------------------------------------------
 * 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

スポンサードリンク

-MZ plugins

Copyright© PGMZ - The Community-Driven Plugin Library for RPG Maker MZ , 2026 All Rights Reserved.