YEP.89 – State Categories

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

You can grab the plugin here:

English Mirror

Support Yanfly on Patreon: https://www.patreon.com/Yanfly?ty=h

This plugin allows you to set categories for your states. They can be one category, multiple categories, or no categories. With this in mind, there’s a few new features this plugin provides that pertains to this category system such as removal of states under a certain category and the ability to have them bypass certain key removal aspects such as on Death removal or Recover All removal.


Introduction


Please wait while you are redirected...or Click Here if you do not want to wait.

This plugin requires YEP_BuffsStatesCore. Make sure this plugin is located under YEP_BuffsStatesCore in the plugin list.

This plugin allows you to set categories for your states. They can be one category, multiple categories, or no categories. With this in mind, there’s a few new features this plugin provides that pertains to this category system such as removal of states under a certain category and the ability to have them bypass certain key removal aspects such as on Death removal or Recover All removal.


Notetags


Use the following notetags to alter various properties revolving around state categories for your database objects.

State Notetags:

<Category: text>
Adds the ‘text’ category to this state. You can insert multiples of this notetag to give a state multiple categories.

<Category: Bypass Death Removal>
Adds the ‘Bypass Death Removal’ category to the state. This is a category utilized by the plugin to bypass removal of it upon death.

<Category: Bypass Recover All Removal>
Adds the ‘Bypass Recover All Removal’ category to the state. This is a category utilized by the plugin to bypass removal of it upon using the Recover All event.

Skill and Item Notetags:

<Remove State Category: text>
Causes this action to remove all states from category ‘text’ from the action’s target. This will not attempt to remove passive states.

<Remove x State Category: text>
Causes this action to remove x states from category ‘text’ from the action’s target. The states removed will be the front x states of highest to lowest priority with the matching category text. This will not attempt to remove passive states.


Lunatic Mode – Custom State Category Removal


For those with JavaScript experience and would like to remove a dynamic number of states of a pertaining category, you can do so with the following notetags!

Skill and Item Notetags:

<Custom Remove State: category name>
value += user.level;
value -= target.level;
</Custom Remove State: category name>
The ‘value’ variable is the amount of states to be removed by the action. If there was a <Remove x State Category: text> in the skill/item notebox, then the ‘value’ variable will start off with that amount. If not, the ‘value’ variable will start off at 1.


Lunatic Mode – New JavaScript Functions


For those with JavaScript experience, you can use the following functions newly added with this plugin. The ‘battler’ variable refers to either an actor or an enemy.

— Functions —

battler.removeStateCategoryAll(‘text’);
– This will remove all states of the category ‘text’ from the battler. Replace ‘text’ with the category name but keep the quotes. This will not attempt to remove passive states.

battler.removeStateCategory(‘text’, x);
– This will remove x states of the category ‘text’ from the battler. Replace ‘text’ with the category name but keep the quotes. Replace x with a number. This will not attempt to remove passive states.

battler.isStateCategoryAffected(‘text’)
– This will return a ‘true’ or ‘false’ after checking if battler is affected by a state with category ‘text’. Replace ‘text’ with the category name but keep the quotes. This will check even passive states.

battler.getStateCategoryAffectedCount(‘text’);
– This will return a number value to see how many states (passives included) the battler is affected by with the category ‘text’. Replace ‘text’ with the category name but keep the quotes.


Happy RPG Making!