Lunatic Pack - Passive Condition Cases (YEP)

From Yanfly.moe Wiki
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:
- Auto Passive States

Passive States can be a powerful addition to a game, but if they are always
active throughout a battle, they can be a little too powerful. Sometimes,
you will want to limit the extent at which your passive states will be
active by imposing conditional cases upon them. If all of the passive's
conditional cases have been met, then the passive will become active. This
plugin adds a multitude of conditional cases for you to be able to use in
your game and limit certain passive states from having their effects active
at all times.

*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 state's notebox to give it a passive
condition case.

State Notetags:

  <Passive Condition Cases>
   condition
   condition
  </Passive Condition Cases>
  - Use the above format for adding conditions to your passive states.
  Replace the 'condition' text in between the <Passive Condition Cases>
  and </Passive Condition Cases> notetags with any of the following
  conditions below to prompt a condition type. You can insert multiple
  conditions to make a passive state require more conditions to be met
  before they can be active.

=-=-=-= Conditions List =-=-=-=

  --- Switch On/Off ---

  Switch x On
  Switch x Off
  - Replace 'x' with a number value. This will make a conditional check if
  an event switch x is on or off. If the conditional check is met, then the
  conditional passive will become active if other conditions are met.
  SUGGESTED BY: Yanfly

  --- Numerical Comparison Check ---

  x >= y
  x <= y
  x > y
  x < y
  x != y
  x = y
  - This will require the condition to make a simple comparison check
  between x and y. These number comparisons will be '>=', '<=', '>', '<',
  '!=', and '=' (aka greater than or equal to, less than or equal to,
  greater than, less than, not equal to, and equal to respectively). Replace
  'x' and 'y' with a number, a percentage, 'HP', 'MP', 'TP', 'HP%', 'MP%',
  'TP%', 'MAXHP', 'MAXMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', 'LUK', or
  'VARIABLE X' for comparison purposes.

  If a percentage is being checked, it will be checked as if the % has
  been dropped off. For example, '50%' will be '50'.

  SUGGESTED BY: Yanfly

  --- Has/Not State ---

  Has State x
  - Replace 'x' with the ID of the state you wish to check. If the user is
  affected by that state, then this conditional passive will become active
  as long as all other conditions are met.
  SUGGESTED BY: Goldschuss

  Not State x
  - Replace 'x' with the ID of the state you wish to check. If the user is
  not affected by that state, then this conditional passive will become
  active as long as all other conditions are met.
  SUGGESTED BY: Goldschuss

  --- Has/Not Buff/Debuff---

  Has x Buff
  - Replace 'x' with 'MAXHP', 'MAXMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', or
  'LUK'. This will make a check to see if the user is currently buffed in
  that parameter. If the user is, the the conditional passive will become
  active as long as all other conditions are met.
  SUGGESTED BY: Yanfly

  Has x Debuff
  - Replace 'x' with 'MAXHP', 'MAXMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', or
  'LUK'. This will make a check to see if the user is currently debuffed in
  that parameter. If the user is, the the conditional passive will become
  active as long as all other conditions are met.
  SUGGESTED BY: Yanfly

  Not x Buff
  - Replace 'x' with 'MAXHP', 'MAXMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', or
  'LUK'. This will make a check to see if the user is currently not buffed
  in that parameter. If the user is, the the conditional passive will become
  active as long as all other conditions are met.
  SUGGESTED BY: Yanfly

  Not x Debuff
  - Replace 'x' with 'MAXHP', 'MAXMP', 'ATK', 'DEF', 'MAT', 'MDF', 'AGI', or
  'LUK'. This will make a check to see if the user is currently not debuffed
  in that parameter. If the user is, the conditional passive will become
  active as long as all other conditions are met.
  SUGGESTED BY: Yanfly

  --- Total Buffs/Debuffs ---

  Total Buffs >= x
  Total Buffs <= x
  Total Buffs > x
  Total Buffs < x
  Total Buffs != x
  Total Buffs = x
  - Replace 'x' with a number value you wish to check relative to the number
  of buffs the user is currently affected by. If the turn check passes, the
  conditional passive will become active if other conditions are met.
  SUGGESTED BY: Alejandro SQ

  Total Debuffs >= x
  Total Debuffs <= x
  Total Debuffs > x
  Total Debuffs < x
  Total Debuffs != x
  Total Debuffs = x
  - Replace 'x' with a number value you wish to check relative to the number
  of debuffs the user is currently affected by. If the turn check passes,
  the conditional passive will become active if other conditions are met.
  SUGGESTED BY: Alejandro SQ

  --- Alive/Dead ---

  Alive Actors/Enemies/Allies/Foes >= x
  Alive Actors/Enemies/Allies/Foes <= x
  Alive Actors/Enemies/Allies/Foes > x
  Alive Actors/Enemies/Allies/Foes < x
  Alive Actors/Enemies/Allies/Foes != x
  Alive Actors/Enemies/Allies/Foes = x
  - Replace 'x' with a number value you wish to check relative to the number
  of alive actors in the party, enemies in the troop, user's allies, or the
  user's foes. Use only one of the four above keywords ('actors', 'enemies',
  'allies', or 'foes'). If the member count check passes, the conditional
  passive will become active as long as all other conditions are met.
  SUGGESTED BY: Yanfly

  Dead Actors/Enemies/Allies/Foes >= x
  Dead Actors/Enemies/Allies/Foes <= x
  Dead Actors/Enemies/Allies/Foes > x
  Dead Actors/Enemies/Allies/Foes < x
  Dead Actors/Enemies/Allies/Foes != x
  Dead Actors/Enemies/Allies/Foes = x
  - Replace 'x' with a number value you wish to check relative to the number
  of dead actors in the party, enemies in the troop, user's allies, or the
  user's foes. Use only one of the four above keywords ('actors', 'enemies',
  'allies', or 'foes'). If the member count check passes, the conditional
  passive will become active as long as all other conditions are met.
  SUGGESTED BY: Yanfly

  --- Turn Count ---

  Battle Turns >= x
  Battle Turns <= x
  Battle Turns > x
  Battle Turns < x
  Battle Turns != x
  Battle Turns = x
  - Replace 'x' with a number value you wish to check relative to the number
  of turns that passed in battle. If the turn check passes, the conditional
  passive will become active as long as all other conditions are met.
  SUGGESTED BY: Yanfly

  --- Has Weapon/Armor ---

  Has Weapon x
  - The user must be an actor or else this condition returns false. Replace
  'x' with the weapon ID you wish to check if the user has. If the user has
  it equipped, the condition will pass and will become active as long as
  all other conditions are met.
  SUGGESTED BY: Yanfly

  Not Weapon x
  - The user must be an actor or else this condition returns false. Replace
  'x' with the weapon ID you wish to check if the user should not have. If
  the user doesn't have it equipped, the condition will pass and will become
  active as long as all other conditions are met.
  SUGGESTED BY: Yanfly

  Has Armor x
  - The user must be an actor or else this condition returns false. Replace
  'x' with the armor ID you wish to check if the user has. If the user has
  it equipped, the condition will pass and will become active as long as
  all other conditions are met.
  SUGGESTED BY: Yanfly

  Not Armor x
  - The user must be an actor or else this condition returns false. Replace
  'x' with the armor ID you wish to check if the user should not have. If
  the user doesn't have it equipped, the condition will pass and will become
  active as long as all other conditions are met.
  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:

---

// -------------
// Switch On/Off
// -------------
if (data.match(/SWITCH[ ](\d+)[ ]ON/i)) {
  var switchId = parseInt(RegExp.$1);
  condition = $gameSwitches.value(switchId);

} else if (data.match(/SWITCH[ ](\d+)[ ]OFF/i)) {
  var switchId = parseInt(RegExp.$1);
  condition = !$gameSwitches.value(switchId);

...

// -------------------------------
// 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:
  --------------------   ---------------------------------------------------
  condition              Current condition setting. If it returns true, then
                         the current condition case passes. Otherwise, no.
                         The passive state needs all its condition cases to
                         to become an active passive state.

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

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

  skip                   Default: false. If true, returns the previous rate

---

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!