YEP.155 – Lunatic Pack – Skill Rewards – RPG Maker MV

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 Dropbox
English MIrror

Support Team Yanfly on Patreon

This plugin allows you to add a variety of effects to your items and skills to reward the player for good (or bad) gameplay. Certain effects can only trigger under specific conditions, such as defeating the target, landing a critical hit, or striking the target’s weakness. After these conditions have been met, the effects can range from refunding skill costs, adding buffs, removing debuffs, or even applying states.

*NOTE*: This plugin is best used with RPG Maker MV version 1.5.0+. You can still use this plugin with a lower version number, but you will have a much harder time altering the plugin parameters without it.


Introduction


This plugin requires the following plugins:

– Battle Engine Core
– Skill Core

Place this plugin beneath the above listed plugins in the plugin manager.

This plugin allows you to add a variety of effects to your items and skills to reward the player for good (or bad) gameplay. Certain effects can only trigger under specific conditions, such as defeating the target, landing a critical hit, or striking the target’s weakness. After these conditions have been met, the effects can range from refunding skill costs, adding buffs, removing debuffs, or even applying states.

*NOTE*: This plugin is best used with RPG Maker MV version 1.5.0+. You can still use this plugin with a lower version number, but you will have a much harder time altering the plugin parameters without it.


Notetags


For updated versions of the notetags, please refer to the plugin’s helpfile.


Lunatic Mode – Effect Code


For experienced users that know JavaScript and have RPG Maker MV 1.5.0+, you can add new notetag effects that can be used by the plugin or alter the effects of currently existing notetag effects from the plugin parameters entry: Effect Code. It should look something like this:

// ----------
// Flat Gains
// ----------
if (data.match(/([\+\-]\d+)[ ]HP/i)) {
 value = parseInt(RegExp.$1);
 user.gainHp(value);
 animation = animation || hpAnimation;

} else if (data.match(/([\+\-]\d+)[ ]MP/i)) {
 value = parseInt(RegExp.$1);
 user.gainMp(value);
 animation = animation || mpAnimation;

...

// -------------------------------
// Add new effects above this line
// -------------------------------
} else {
 skip = true;
}

Here’s what each of the variables used in this code bit refer to:

  --------------------   ---------------------------------------------------
  Variable:              Refers to:
  --------------------   ---------------------------------------------------
  item                   The item being used by this action
  skill                  The skill being used by this action

  isItem                 Returns true if action is an item
  isSkill                Returns true if action is a skill

  a                      Returns the action user
  user                   Returns the action user
  subject                Returns the action user

  b                      Returns the action's current target
  target                 Returns the action's current target

  s[x]                   Return switch x (true/false)
  v[x]                   Return variable x's current value

  user._result           The current results for the user
  target._result         The current results for the target
  userPreviousResult     The results for the user before any changes
  targetPreviousResult   The results for the target before any changes

  animation              The animation to be played. You can set it equal to
                         any of the following which corresponds to plugin
                         parameter settings:
                         - hpAnimation
                         - mpAnimation
                         - tpAnimation
                         - itemAnimation
                         - buffAnimation
                         - debuffAnimation
                         - addStateAnimation
                         - removeStateAnimation
                         - miscAnimation

  skip                   Default: false. If true, skips popups & animations

If you need to revert the Effect Code back to its original state, delete the plugin from your plugin manager list and then add it again. The code will be back to default.


Happy RPG Making!


Happy RPG Making!


These plugins and Tips & Tricks ideas are made possible thanks to our creative patrons on Patreon! The majority of our Tips & Tricks, Plugins, and Lunatic Pack ideas are placed within the Patreon-exclusive Sample Project for quick and easy access! If you'd like to make a Plugin Suggestion, Yanfly's Patreon-based Suggestion Box a visit here:


If you have any bugs to report, visit the following link:


If you have any questions about Action Sequences, visit the following link:



Thank you!