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

PGMV - The Community-Driven Plugin Library for RPG Maker MV

MV plugins

Before Common - BeforeCommon.js

Plugin desc : ver1.02/Before a skill or item is activated, a common event set for the skill or item will occur.

License : MIT License

Author : Yana

Website : https://w.atwiki.jp/pokotan/pages/3.html

Desc page : https://github.com/munokura/Yana-MV-plugins

Download Page : https://raw.githubusercontent.com/munokura/Yana-MV-plugins/refs/heads/master/Battle/BeforeCommon.js

File name : BeforeCommon.js

Help of plugin :

@plugindesc ver1.02/Before a skill or item is activated, a common event set for the skill or item will occur.
@author Yana
@url https://raw.githubusercontent.com/munokura/Yana-MV-plugins/master/Battle/BeforeCommon.js
@license MIT License

@help
English Help Translator: munokura
This is an unofficial English translation of the plugin help,
created to support global RPG Maker users.
Feedback is welcome to improve translation quality
(see: https://github.com/munokura/Yana-MV-plugins ).
Original plugin by Yana.
-----
------------------------------------------------------
How to Set Up
------------------------------------------------------

By writing
<BeforeCommon: x>
in the Note field of a skill or item, you can schedule the execution of a common event with ID x before the skill or item is activated.

The variable specified by IndexVariableID (activator index variable ID) stores the index of the actor, and the variable specified by TargetIndexVariableID (target index variable ID) stores the index of the target.
However, the target index is only stored when there is a single target, and
for enemy actions, the target is not determined at the time the common action is executed, so the target is set to -1 (unspecified).

-----------------------------------------------------
Terms of Use
------------------------------------------------------
This plugin is released under the MIT License.
http://opensource.org/licenses/mit-license.php
------------------------------------------------------
Update History:
ver. 1.02:
Fixed an error that occurred with MZ.

ver. 1.01:
Added a variable setting to save the target.
ver. 1.00:
Released

@param IndexVariableID
@text Invoker index variable ID
@desc This is the variable ID that stores the index of the triggerer. If the triggerer is an enemy, the value will be increased by +1000.
@default 11
@type variable

@param TargetIndexVariableID
@text Target index variable ID
@desc This is the ID variable that stores the target index. If there are two or more targets, the variable value is set to -1.
@default 12
@type variable

@param nullNumberCommonReserve
@text Book a common event #0
@desc The reservation action will be performed even if common event number 0 is specified. *Item to ensure compatibility with older versions
@default true
@type boolean

スポンサードリンク

-MV plugins

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