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

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

MV plugins

Conditionally Common Trait - ConditionallyCommonTrait.js

Plugin desc : ver1.01/Adds the ability to reserve common events when certain conditions are met.

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/Others/ConditionallyCommonTrait.js

File name : ConditionallyCommonTrait.js

Help of plugin :

@plugindesc ver1.01/Adds the ability to reserve common events when certain conditions are met.
@author Yana
@url https://github.com/munokura/Yana-MV-plugins
@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.
-----
About this Plugin
--------------------------------------------------------------------

This plugin adds a Traits that triggers a common event when certain conditions are met.
Enter the specified keyword in the memo of the object with the Traits.

------------------------------------------------------
How to Use
------------------------------------------------------

Write the following in the memo of an actor, enemy weapon, armor, class, state, or other object with a Traits:
<ConditionallyCommon:CommonID,Rate%>
trigger
</ConditionallyCommon>

If an actor or enemy with a Traits object with this description is present,
when the activation condition is met, the specified common ID will be reserved with a probability of %.

The activation condition is evaluated using eval, so please write a conditional expression that returns true/false.
Also, if ConditionallyCore.js is installed, the condition settings will be changed to that method.
Conditional expressions can use a = Trigger, v = Variable, and s = Switch.

Example: When Switch 1 is ON, pressing the Tab key will trigger Common Event 1 with a 10% chance.

<ConditionallyCommon: 1, 10%>
s[1]
Input.isTriggered('tab')
</ConditionallyCommon>

*If ConditionallyCore.js is installed, the same statement would be written as follows:
<ConditionallyCommon: 1, 10%>
script:s[1]
script:Input.isTriggered('tab')
</ConditionallyCommon>

--------------------------------------------------------------------
Terms of Use
------------------------------------------------------
This plugin is released under the MIT License.
http://opensource.org/licenses/mit-license.php
------------------------------------------------------
Update History:
Ver. 1.01:
Added a process to store the invoker's index in a variable.
Ver. 1.00:
Released

@param CountFrame
@desc This sets how many frames the determination is performed once.
@default 4

@param SubjectIndex
@desc The ID of the variable that stores the index of the invoker. If the stored index is an enemy, the value will be increased by +1000.
@default 12

スポンサードリンク

-MV plugins

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