Lunatic Pack - Action Beginning and End Effects (YEP)

From Yanfly.moe Wiki
Revision as of 18:34, 30 October 2019 by Yanfly (talk | contribs)
Jump to navigation Jump to search

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.



Download

System

This is a plugin created for RPG Maker MV.

For help on how to install plugins, click here.

For help on how to update plugins, click here.

Got errors with your RPG Maker MV plugin? Click here.


Masterarbeit Writer

Required Plugins

The following plugins are required in order to use this plugin.

Place the following plugins above this plugin located in the Plugin Manager.

Yanfly Engine Plugins

This plugin is a part of the Yanfly Engine Plugins library.


Introduction

This plugin requires the following plugins:
- Battle Engine Core

Place this plugin beneath the above listed plugin(s) in the plugin manager.

Sometimes, we'd like to add additional effects to our actions in battle.
These effects can range from adding more HP, applying a new state to the
user after everything else has happened, removing debuffs, playing an
animation, or even absorbing a fraction of all the total damage directly
dealt by the action this turn. This Lunatic Pack provides a new batch of
effects that you can use to empower your items and skills, or to even
globalize them as a result of 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

NotetagsMV.png

RPG Maker MV's editor is unable to allow for custom traits/properties that a game dev may wish to associate with a database object, event, map, etc. Notetags are used to work around such limitations by allowing the game dev to tag certain traits/properties using specific Notetags declared by the related plugin.

Here is a list of Notetag(s) that you may use.

---

Insert the following notetags into a skill, item, or state's notebox to give
it one of these effects:

---

Skill, Item, and State Notetags:

  <timing Action: effect>
  - Most of this plugin's notetags will follow the above format. 'timing' is
  to be replaced with either 'Begin' or 'End' while 'effect' is to be
  replaced by the entries in the following EFFECT section below.

  Insert multiple notetag entries to give your skills/items more effects. If
  a multitude of effects are present, then the order they'll occur will be:
  skill/item first, state effects based off of their state priority order
  from highest priority to lowest priority.

=-=-=-= Action TIMING =-=-=-=

  <Begin Action: effect>
  - If the timing is 'begin', then this effect will occur after the action's
  cost is used.

  <End Action: effect>
  - If the timing is 'end', it will occur after all action sequences are
  completed at the end of the current action.

=-=-=-= Action EFFECTS =-=-=-=

  --- Animation Effects ---

  <timing Action: Animation x>
  <timing Action: Animation x, Mirror>
  <timing Action: Animation x, Delay y>
  <timing Action: Animation x, Mirror, Delay y>
  - This will make the animation x play on the user performing the action.
  If you insert 'Mirror' into the effect line, then the animation will be
  mirrored. If you insert 'Delay y' and replace 'y' with a number value,
  the animation will be delayed y frames before playing the animation.
  SUGGESTED BY: Yanfly

  --- HP Effects ---

  <timing Action: +x HP>
  <timing Action: -x HP>
  - Replace 'effect' with the above format. Replace 'x' with a flat amount
  of HP you wish to apply to the user.
  SUGGESTED BY: Yanfly

  <timing Action: +x HP%>
  <timing Action: -x HP%>
  - Replace 'effect' with the above format. Replace 'x' with a HP equal to
  x% of the user's MaxHP to apply to the user.
  SUGGESTED BY: Yanfly

  <End Action: Drain x% Total HP Damage>
  - Can only work with end actions. Use the above format. Replace 'x' with
  the percentage of all total HP damage dealt directly by the user this
  action to recover as HP.
  SUGGESTED BY: Yanfly

  <End Action: Recoil x% Total HP Damage>
  - Can only work with end actions. Use the above format. Replace 'x' with
  the percentage of all total HP damage dealt directly by the user this
  action to self-damage as HP.
  SUGGESTED BY: Yanfly

  --- MP Effects ---

  <timing Action: +x MP>
  <timing Action: -x MP>
  - Replace 'effect' with the above format. Replace 'x' with a flat amount
  of MP you wish to apply to the user.
  SUGGESTED BY: Yanfly

  <timing Action: +x MP%>
  <timing Action: -x MP%>
  - Replace 'effect' with the above format. Replace 'x' with a MP equal to
  x% of the user's MaxMP to apply to the user.
  SUGGESTED BY: Yanfly

  <End Action: Drain x% Total MP Damage>
  - Can only work with end actions. Use the above format. Replace 'x' with
  the percentage of all total MP damage dealt directly by the user this
  action to recover as MP.
  SUGGESTED BY: Yanfly

  <End Action: Recoil x% Total MP Damage>
  - Can only work with end actions. Use the above format. Replace 'x' with
  the percentage of all total MP damage dealt directly by the user this
  action to self-damage as MP.
  SUGGESTED BY: Yanfly

  --- TP Effects ---

  <timing Action: +x TP>
  <timing Action: -x TP>
  - Replace 'effect' with the above format. Replace 'x' with a flat amount
  of HP you wish to apply to the user.
  SUGGESTED BY: Yanfly

  <timing Action: +x TP%>
  <timing Action: -x TP%>
  - Replace 'effect' with the above format. Replace 'x' with a TP equal to
  x% of the user's MaxTP to apply to the user.
  SUGGESTED BY: Yanfly

  --- Buff/Debuff Effects ---

  <timing Action: Add x Buff>
  <timing Action: Add x Buff, y Turns>
  <timing Action: Add x Debuff>
  <timing Action: Add x Debuff, y Turns>
  - Replace 'effect' with the above format(s). Replace 'x' with any of the
  following parameters: 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI',
  or 'LUK' to have the effect alter the respective stat. If using the format
  with 'y' turns, replace 'y' with the number of turns you wish for the buff
  or debuff to last. If 'y' is not used, it will last for 5 turns instead.
  SUGGESTED BY: Yanfly

  <timing Action: Remove x Buff>
  <timing Action: Remove x Debuff>
  - Replace 'effect' with the above format(s). Replace 'x' with any of the
  following parameters: 'MaxHP', 'MaxMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI',
  or 'LUK' to have the effect remove the respective buff/debuff from the
  user if the conditions are met.  If 'y' is not used, it will last for 5
  turns instead.
  SUGGESTED BY: Yanfly

  --- State Effects ---

  <timing Action: Add State x>
  - Replace 'effect' with the above format(s). Replace 'x' with the state ID
  you wish to add to the user.
  SUGGESTED BY: Yanfly

  <timing Action: Remove State x>
  - Replace 'effect' with the above format(s). Replace 'x' with the state ID
  you wish to remove from the user.
  SUGGESTED BY: Yanfly

Lunatic Mode

JavaScript.png

For advanced users who have an understanding of JavaScript, you can use the following features added by the plugin to further enhance what you can do with your game project.

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:

---

// ---------
// Animation
// ---------
if (data.match(/ANIMATION[ ](\d+)/i)) {
  var animationId = parseInt(RegExp.$1);
  var mirror = data.match(/MIRROR/i);
  if (data.match(/DELAY[ ](\d+)/i)) {
    var delay = parseInt(RegExp.$1);
  } else {
    var delay = 0;
  }
  user.startAnimation(animationId, mirror, delay);

...

// -------------------------------
// 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

  totalHpDamage          The total amount of HP damage dealt this action
  totalMpDamage          The total amount of MP damage dealt this action

  skip                   Default: false. If true, popups

---

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.

Changelog

Version 1.01:
- Bypass the isDevToolsOpen() error when bad code is inserted into a script
call or custom Lunatic Mode code segment due to updating to MV 1.6.1.

Version 1.00:
- Finished Plugin!