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

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

MZ plugins

Instant Event - InstantEvent.js

Plugin desc : It makes it easy to mass-produce elaborate events on map and in battle.

License : MIT License

Author : あわやまたな (Awaya_Matana)

Website : https://awaya3ji.seesaa.net/

Desc page : https://awaya3ji.seesaa.net/article/503552403.html

File name : InstantEvent.js

Help of plugin :

* @target MZ
* @base PluginCommonBase
* @orderAfter PluginCommonBase
* @plugindesc It makes it easy to mass-produce elaborate events on map and in battle.
* Introduces the concepts of so-called arguments and immediate functions.
* @author あわやまたな (Awaya_Matana)
* @url https://awaya3ji.seesaa.net/article/503552403.html
* @help Ver.1.1.2
* [Introduction]
* Considering the purpose of the plugin, for convenience we will refer to the "Event ID" as the "Target ID".
* This is because the event ID uses unique control characters so that it can be used for various numbers.
* An "argument" is an independent variable that cannot be interfered with from the outside.
* This is useful when you want to change the processing depending on the input value.
*
* [Plugin Commands]
* The target ID is basically a number used to specify "This Event",
* but it can also be used as a different number by using the following scripts and control characters.
*
* [Scripts]
* this._eventId    //Get the current target ID
* this._args[n]    //Get the argument (n is an integer greater than or equal to 0)
* this._pictureId  //Get the current replacement picture ID
*
* [Control characters (for plugin commands only)]
* ¥eventId    //Get the current target ID
* ¥args[n]    //Get the argument (n is an integer greater than or equal to 0)
* ¥pictureId  //Get the current replacement picture ID
*
* [Control characters (for "Show Text" only)]
* ¥Vpp[n]     //Add 1 to variable #n (Variable++)
* ¥Vmm[n]     //Subtract 1 from variable #n (Variable--)
* ¥Son[n]     //Switch #n ON (Switch ON)
* ¥Soff[n]    //Switch #n OFF (Switch OFF)
*
* ¥WfV[n,m]   //Wait until variable #n is equal to or greater than m (Wait for Variable)
* ¥WfS[n]     //Wait until switch n is ON (Wait for Switch)
* ¥WfS[n,false]   //Wait until switch n is OFF
*
* [Specifications]
* Instant parallel events will be deleted once their content has been achieved.
*
* Creating a new instant parallel event with a duplicate identifier will not delete the old one.
*
* If there are multiple instant parallel events with duplicate identifiers,
* "Delete Instant Parallel Events" and "Wait for Completion" will be performed on all of them.
*
* If the identifier is not specified or is blank, the blank itself becomes the identifier.
* Therefore, you can "Remove Instant Parallel Events" and "Wait for Completion" while leaving the identifier blank.
*
* Even if this._pictureId is 0, ¥pictureId will be set to 1.
* This is to ensure smooth test play.
*
* @param controlCharactersEnabled
* @text Enable Control Characters
* @desc Use control characters to manipulate variables and switches.
* @type boolean
* @default true
*
* @param timing
* @text Timing
* @desc Improvised parallel processing on the map occurs after the player's processing.
* @type boolean
* @default false
* @on After the player
* @off Default
*
* @param playerToEvent
* @text Treat the player as an event
* @desc When the target ID is -1, you will be able to handle the player using "This Event" or this.character(0).
* @type boolean
* @default true
*
* @command setupInstantEvent
* @text Instant Event
* @desc The commands in the "Skip" directly below will be extracted and executed in order.
*
* @arg targetId
* @text Target ID
* @desc Specify the ID of the operation target.
* For multiple entries, use ",", "-", or "to".
* @default ¥eventId
*
* @arg options
* @text Options
* @type struct<options>
* @desc Configure additional settings.
*
* @command setupInstantCommonEvent
* @text Instant Common Event
* @desc This will run the common event content with various functions added.
*
* @arg targetId
* @text Target ID
* @desc Specify the ID of the operation target.
* For multiple entries, use ",", "-", or "to".
* @default ¥eventId
*
* @arg commonEventId
* @text Common Event ID
* @desc Select a common event.
* @default 1
* @type common_event
*
* @arg options
* @text Options
* @type struct<options>
* @desc Configure additional settings.
*
* @command setupInstantParallelEvent
* @text Instant Parallel Event
* @desc Creates a disposable parallel process from the common event.
*
* @arg targetId
* @text Target ID
* @desc Specify the ID of the operation target.
* For multiple entries, use ",", "-", or "to".
* @default ¥eventId
*
* @arg options
* @text Options
* @type struct<parallelOptions>
* @desc Configure additional settings.
*
* @command setupInstantParallelCommonEvent
* @text Instant Parallel Common Event
* @desc Creates a disposable parallel process from the common event.
*
* @arg targetId
* @text Target ID
* @desc Specify the ID of the operation target.
* For multiple entries, use ",", "-", or "to".
* @default ¥eventId
*
* @arg commonEventId
* @text Common Event ID
* @desc Select a common event.
* @default 1
* @type common_event
*
* @arg options
* @text Options
* @type struct<parallelOptions>
* @desc Configure additional settings.
*
* @command removeParallelInstantEvent
* @text Remove Parallel Instant Event
* @desc Removes an instant parallel event.
*
* @arg id
* @text Identifier
* @desc The name to manage the event.
* %1:Target ID  %2:Map ID
* @default EV:%1
*
* @arg targetId
* @text Target ID
* @desc Specify the number to be entered in %1.
* For multiple entries, use ",", "-", or "to".
* @default ¥eventId
*
* @command removeAllParallelInstantEvents
* @text Remove All Parallel Instant Events
* @desc Removes all instant parallel events.
*
* @command waitForCompletion
* @text Wait for Completion
* @desc Waits for the specified instant parallel event to complete.
*
* @arg id
* @text Identifier
* @desc The name to manage the event.
* %1:Target ID  %2:Map ID
* @default EV:%1
*
* @command replacePictureId
* @text Replace Picture ID
* @desc Replaces the default picture event command numbers all at once.
*
* @arg pictureId
* @text Picture ID
* @desc Reset to 0.
* @default ¥eventId
*

スポンサードリンク

-MZ plugins

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