Difference between revisions of "Enemy Levels (YEP)"

From Yanfly.moe Wiki
Jump to navigation Jump to search
(Created page with "{{MvPlugin |preview=<youtube>https://www.youtube.com/watch?v=32CpPp7w5-k</youtube> |link1=<html><iframe src="https://itch.io/embed/399501" height="167" width="552" frameborder...")
 
Line 20: Line 20:
 
============================================================================
 
============================================================================
  
The TP system in RPG Maker MV is rather limiting. A lot of the TP system is
+
This plugin allows enemies to function off of a leveling system. An enemy's
hardcoded in giving RPG Maker MV users very little control over how much TP
+
level will be increased relative to the player under specific rulings and
gain a battler can receive from particular actions and situations. This
+
will increase its stats based on its level.
plugin gives you the ability to adjust how much TP battlers will acquire
 
various actions, different TP modes, and letting players selecting and pick
 
what TP mode they want for each actor.
 
  
 
============================================================================
 
============================================================================
Instructions - TP Mode Parameters
+
Default Level Types
 
============================================================================
 
============================================================================
  
TP Modes are given to your actors for them to decide how they want to gain
+
When an enemy is made in battle, it will create its initial level off of a
TP over the course of battle. You can decide the rulings for each TP Mode.
+
set of rules. These are the various rules you can change the 'Default Type'
 +
plugin parameter to reflect.
  
Here is an overview of what each TP Mode Parameter does:
+
Type:
  
  Name
+
- Type 0 - Lowest level of all actors that have joined the player party.
  - This is the name of the TP Mode. This is what appears in the TP Mode
+
- Type 1 - Lowest level of all actors that are in the battling party.
  selection menu in the Skill Menu (if you have it enabled).
+
- Type 2 - Average level of all actors that have joined the player party.
 +
- Type 3 - Average level of all actors that are in the battling party.
 +
- Type 4 - Highest level of all actors that have joined the player party.
 +
- Type 5 - Highest level of all actors that are in the battling party.
  
  Icon
+
After the level type has been determined for the enemy, random level
  - This is the icon used for the TP Mode in the TP Mode selection menu in
+
fluctuations are then added.
  the Skill Menu (if you have it enabled).
 
  
  Help Line 1
+
============================================================================
  Help Line 2
+
Notetags
  - This is the help description used for the TP Mode in the TP Mode
+
============================================================================
  selection menu in the Skill Menu (if you have it enabled).
 
  
  Preserve
+
You can use these notetags to adjust how enemy levels are handled
  - If set to true, then the user carries any earned TP from on battle to
+
individually per enemy.
  the next battle. If set to false, the at the start and each of each battle
 
  the user's TP value is cleared.
 
  
  Initial TP
+
Enemy Notetags:
  - This is the formula to determine how much TP is gained at the start of
 
  battle. Previously, this was reserved for non-preserved TP values. Now, it
 
  can be used regardless.
 
  
   Regen TP
+
   <Show Level>
   - This is how much TP is regenerated during the regeneration phase for the
+
   <Hide Level>
   user. Typically, the regeneration phase occurs at the end of each turn.
+
   This will cause the enemy to show or hide its level upon target selection.
  
   Take HP DMG
+
   <Minimum Level: x>
   - This is how much TP is generated from the user taking HP damage. The
+
  <Maximum Level: x>
   amount of damage taken can be retrieved from the 'value' variable.
+
   This sets the enemy's minimum and maximum levels respectively to x. This
 +
   will cause the enemy, upon the start of battle, to adjust levels within
 +
  this particular range. Any skills that alter enemy levels are able to
 +
  bypass these limits unless if it were to bypass the maximum cap.
  
   Deal HP DMG
+
   <Static Level: x>
   - This is how much TP is generated from the user dealing HP damage. The
+
   This sets the enemy's starting level to exactly x. This will cause the
   amount of damage taken can be retrieved from the 'value' variable.
+
   enemy, upon the start of battle, to adjust levels within this particular
 +
  range. Any skills that alter enemy levels are able to bypass these limits
 +
  unless if it were to bypass the maximum cap.
  
   Heal HP DMG
+
   <Starting Level Type: x>
   - This is how much TP is generated from the user healing HP damage. The
+
   This sets the enemy's starting level type to x from 0 to 5. Refer to the
   amount of damage taken can be retrieved from the 'value' variable.
+
   'Default Level Types' party of the Help File.
  
   Ally HP DMG
+
   <Positive Level Fluctuation: x>
   - This is how much TP is generated from an ally taking HP damage. The
+
  <Negative Level Fluctuation: x>
   amount of damage taken can be retrieved from the 'value' variable.
+
   This sets the positive/negative level fluctuation for the enemy. Any level
 +
   fluctuation is calculated at the start of battle, but after the starting
 +
  level type has been determined.
  
   Take MP DMG
+
   <Level Fluctuation: x>
   - This is how much TP is generated from the user taking MP damage. The
+
   This sets both the positive and negative level fluctuation for the enemy
   amount of damage taken can be retrieved from the 'value' variable.
+
  to x. Any level fluctuation is calculated at the start of battle, but
 +
   after the starting level type has been determined.
  
   Deal MP DMG
+
   <stat Rate: +x% per level>
   - This is how much TP is generated from the user dealing MP damage. The
+
   <stat Rate: -x% per level>
   amount of damage taken can be retrieved from the 'value' variable.
+
  <stat Rate: +x.y per level>
 +
  <stat Rate: -x.y per level>
 +
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
 +
  'luk', 'exp', or 'gold'. This will set this enemy to have an increase or
 +
  decrease of x% rate per level. If you use the x.y formula, it will have a
 +
   rate increase of +x.y or -x.y per level.
  
   Heal MP DMG
+
   <stat Flat: +x per level>
   - This is how much TP is generated from the user healing MP damage. The
+
   <stat Flat: -x per level>
   amount of damage taken can be retrieved from the 'value' variable.
+
  <stat Flat: +x.y per level>
 +
  <stat Flat: -x.y per level>
 +
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
 +
  'luk', 'exp', or 'gold'. This will set this enemy to have an increase or
 +
  decrease of flat x value per level. If you use the x.y formula, it will
 +
   have a flat increase of +x.y or -x.y per level.
  
   Ally MP DMG
+
   <Resist Level Change>
   - This is how much TP is generated from an ally taking MP damage. The
+
   This will cause the enemy to be immune to any form of level changing
   amount of damage taken can be retrieved from the 'value' variable.
+
  through skills and items. However, the enemy is not immune to any level
 +
   changing through script calls.
  
   Deal State
+
   <Skill x Require Level: y>
   - This is how much TP is generated from the user issuing a state on a foe.
+
   <Skill name Require Level: y>
   If the user and target are on the same team, ignore this.
+
  If this enemy is to use skill x (or named skill), it must be at least
 +
  level y to be able to use it. If the enemy is under level y, the skill
 +
   will be sealed and cannot be used.
  
   Gain State
+
   <Ignore Level Bonus>
   - This is how much TP is generated from the user gaining a state from a
+
   This will cause the enemy to ignore all the stat changes added by levels
   foe. If the user and origin are on the same team, ignore this.
+
   and use its base stats as its current level stats. Any changes to its
 +
  current level will not alter the enemy's stats.
  
  Kill Ally
+
Skill and Item Notetags:
  - This is how much TP is generated if an allied member dies. It does not
 
  matter who the killer is.
 
  
   Kill Enemy
+
   <Reset Enemy Level>
   - This is how much TP is generated if an enemy member dies. It does not
+
   This will reset the target enemy's level back to what it was at the start
   matter who the killer is.
+
   of battle.
  
   Win Battle
+
   <Change Enemy Level: +x>
   - This is how much TP is generated from the player winning a battle.
+
   <Change Enemy Level: -x>
 +
  If this action is used against an enemy, it will change the enemy's level
 +
  by +x or -x. If an action contains both a reset and level change, the
 +
  reset will occur first before the level change.
  
  Flee Battle
+
============================================================================
  - This is how much TP is generated from the player escaping a battle.
+
Lunatic Mode - Custom Starting Level
 +
============================================================================
  
  Lose Battle
+
For those with JavaScript experience, you can have enemies have conditional
  - This is how much TP is generated from the player losing a battle.
+
starting levels. Place these Lunatic Mode notetags into the enemy notebox:
  
  Crisis HP
+
Enemy Notetags:
  - This is how much TP is generated during the Regen TP timing if the user
 
  is in a critical HP state.
 
  
   Crisis MP
+
   <Custom Starting Level>
   - This is how much TP is generated during the Regen TP timing if the user
+
  level = $gameActors.actor(1).level + 5;
   is in a critical MP state.
+
  </Custom Starting Level>
 +
   The 'level' variable will become the enemy's starting level. This level is
 +
  still affected by the enemy's minimum and maximum starting level barriers.
 +
  After the starting levels are decided, it will still be affected by the
 +
   random level fluctuation.
  
  Only Member
+
============================================================================
  - This is how much TP is generated during the Regen TP timing if the user
+
Lunatic Mode - Custom Parameter Formulas
  is the only alive member left.
+
============================================================================
  
   Evasion
+
For those with JavaScript experience, you can have different formulas for
   - This is how much TP is generated whenever the user manages to evade an
+
the ways parameters are calculated in regards to the enemy's level. Use the
   action performed by another battler.
+
notetags below:
 +
 
 +
Enemy Notetags:
 +
 
 +
   <Custom Parameter stat Formula>
 +
  base * (1 + (level - 1) * rate) + (flat * (level - 1))
 +
  </Custom Parameter stat Formula>
 +
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
 +
   'luk', 'exp', or 'gold'. Whatever is calculated for the formula on the
 +
   last line will become the parameter value for the stat.
  
 
============================================================================
 
============================================================================
Notetags
+
Lunatic Mode - Custom Change Enemy Level
 
============================================================================
 
============================================================================
  
You can use the following notetags to adjust the various settings for TP.
+
For those with JavaScript experience and would like to have more dynamic
 +
ways of altering enemy levels instead of flat values, you can use these
 +
notetags to do so:
  
Actor and Enemy Notetags:
+
Skill and Item Notetags:
  
   <TP Mode: x>
+
   <Custom Change Enemy Level>
   This will set the actor's default TP mode to x. If this notetag isn't used
+
  level += user.atk;
   then the actor will default to the mode within the plugin's parameters.
+
  level -= target.agi;
 +
  </Custom Change Enemy Level>
 +
   The 'level' variable will be the enemy's current level. Any changes made
 +
   to the 'level' variable will be what the enemy's level will become after
 +
  this effect finishes taking place. If the skill has a reset level effect,
 +
  it is applied first. If the skill has a flat level changing effect, that
 +
  effect is applied next. After those two effects are applied, this custom
 +
  enemy level change will take place.
 +
 
 +
============================================================================
 +
Lunatic Mode - New JavaScript Functions
 +
============================================================================
  
  <Unlock TP Mode: x>
+
Here are some new JavaScript functions that have been added by this plugin.
  <Unlock TP Mode: x, x, x>
 
  <Unlock TP Mode: x to y>
 
  This unlocks what TP modes the actor can use by default. This tag will add
 
  upon the default unlocks already preset in the plugin's parameters.
 
  
Skill and Item Notetags:
+
enemy.level
 +
- This will return the enemy's current level.
  
  <Unlock TP Mode: x>
+
enemy.originalLevel()
  <Unlock TP Mode: x, x, x>
+
- This will return the enemy's original level from the start of battle.
  <Unlock TP Mode: x to y>
 
  This will cause the target to unlock TP mode x (to y). This will make the
 
  TP mode available in the TP menu.
 
  
Skill Notetags:
+
enemy.changeLevel(x)
 +
- This will change the enemy's level to x.
  
  <Learn Unlock TP Mode: x>
+
enemy.gainLevel(x)
  <Learn Unlock TP Mode: x, x, x>
+
- This will cause the enemy to gain x levels.
  <Learn Unlock TP Mode: x to y>
 
  When this skill is learned, unlock TP mode x (to y) in the process of also
 
  learning it. This will make the TP mode available in the TP menu.
 
  
============================================================================
+
enemy.loseLevel(x)
Plugin Commands
+
- This will cause the enemy to lose x levels.
============================================================================
 
  
You can use the following Plugin Commands to alter Enhanced TP.
+
enemy.resetLevel()
 +
- Changes the enemy's level back to what it was at the start of battle.
  
Plugin Command:
+
$gameParty.lowestLevelAllMembers()
 +
- This will return the lowest level of all party members.
  
  ShowTpMode
+
$gameParty.lowestLevelBattleMembers()
  HideTpMode
+
- This will return the lowest level of all battle members.
  This will show/hide the TP Mode from the Skill Menu.
 
  
  EnableTpMode
+
$gameParty.averageLevelAllMembers()
  DisableTpMode
+
- This will return the average level of all party members.
  This will enable/disable the TP Mode in the Skill Menu.
 
  
  ChangeTpMode Actor 1 to 5
+
$gameParty.averageLevelBattleMembers()
  This will change the TP mode of Actor 1 to TP Mode 5.
+
- This will return the average level of all battle members.
  
  ChangeTpMode Party 2 to 6
+
$gameParty.highestLevelAllMembers()
  This will change the TP mode of Party Member 2 to TP Mode 6.
+
- This will return the highest level of all party members.
  
  UnlockTpMode Actor 3 Mode 7
+
$gameParty.highestLevelBattleMembers()
  This will make Actor 3 unlock TP Mode 7.
+
- This will return the highest level of all battle members.
  
  UnlockTpMode Party 4 Mode 8
+
$gameTroop.changeLevel(x)
  This will make Party Member 4 unlock TP Mode 8.
+
- Changes the levels of all enemies to x.
  
  RemoveTpMode Actor 1 Mode 9
+
$gameTroop.gainLevel(x)
  This will make Actor 1 remove TP Mode 9.
+
- Raises the levels of all enemies by x.
  
  RemoveTpMode Party 2 Mode 10
+
$gameTroop.loseLevel(x)
  This will make Party Member 2 remove TP Mode 10.
+
- Lowers the levels of all enemies by x.
  
  UnlockAllTpModes Actor 1
+
$gameTroop.resetLevel()
  This will make Actor 1 unlock all TP modes.
+
- Resets the levels of all enemies to their original levels at battle start.
  
  UnlockAllTpModes Party 2
+
$gameTroop.lowestLevel()
  This will make Party member 2 unlock all TP modes.
+
- This will return the lowest level of the enemy party.
  
  RemoveAllTpModes Actor 1
+
$gameTroop.averageLevel()
  This will make Actor 1 remove all TP modes.
+
- This will return the lowest level of the enemy party.
  
  RemoveAllTpModes Party 2
+
$gameTroop.highestLevel()
  This will make Party member 2 remove all TP modes.
+
- This will return the lowest level of the enemy party.
  
 
============================================================================
 
============================================================================
Lunatic Mode - New JavaScript Functions
+
Plugin Commands
 
============================================================================
 
============================================================================
  
For those experienced with JavaScript, you can use these new functions to
+
If you wish to change enemy levels through plugin commands, you can use the
call upon and change various aspects related to TP Modes.
+
following plugin commands to alter them. These plugin commands are only used
 +
inside battle.
  
   battler.tpMode()
+
Plugin Command:
   This will return the current TP mode the battler is using.
+
 
 +
  EnemyLevelChange 2 to 50
 +
   - This will reset the enemy in position 2's level to 50.
 +
 
 +
   EnemyLevelChangeAll 50
 +
  - This will change the levels of all enemies to 50.
  
   battler.tpModeId()
+
   EnemyGainLevel 3 by 20
   This will return the current TP mode's ID the battler is using.
+
   - This will cause the enemy in positon 3 to gain 20 levels.
  
   battler.setTpMode(x)
+
   EnemyGainLevelAll 20
   This will set the battler's TP mode to x.
+
   - This will cause all enemies to gain 20 levels.
  
   battler.unlockTpMode(x)
+
   EnemyLoseLevel 4 by 10
   This will unlock TP Mode x for the battler.
+
   - This will cause the enemy in positon 4 to lose 10 levels.
  
   battler.removeTpMode(x)
+
   EnemyLoseLevelAll 10
   This will remove TP Mode x for the battler unless the battler is currently
+
   - This will cause all enemies to lose 10 levels.
  using TP Mode x.
 
  
   battler.unlockAllTpModes()
+
   EnemyLevelReset 5
   This will unlock all TP Modes for the battler.
+
   - This will reset the enemy in position 5's level to the level it had at
 +
  the start of battle.
  
   battler.removeAllTpModes()
+
   EnemyLevelResetAll
   This will remove all TP Modes for the battler except for the TP Mode that
+
   - This will reset all enemy levels to their original levels.
  the battler is currently using.
 
  
 
============================================================================
 
============================================================================
Line 255: Line 293:
  
 
Version 1.08:
 
Version 1.08:
- Updated for RPG Maker MV version 1.6.1.
+
- Updated for RPG Maker MV version 1.5.0.
  
 
Version 1.07:
 
Version 1.07:
- Updated for RPG Maker MV version 1.5.0.
+
- Enemy Transform event now adjusts for stat changes when transforming into
 +
a different enemy.
  
 
Version 1.06:
 
Version 1.06:
Line 264: Line 303:
  
 
Version 1.05:
 
Version 1.05:
- Added 'Dead TP Gain' plugin parameter. Enabling this will allow dead
+
- Updated the custom level formula to have the formulas 'b', 'r', and 'f' to
actors to gain TP from TP modes while in battle. Disabling this will prevent
+
be able to use the formulas from FlyingDream's calculator.
dead actors from doing so.
 
  
 
Version 1.04:
 
Version 1.04:
- Calculations for TP Gauge increasing for HP and MP values are now
+
- Updated for RPG Maker MV version 1.1.0.
calculated based on the actual HP and MP damage taken as per the results
 
rather than based off of the raw incoming value (in the event that raw value
 
gets modified as per the effects of other plugins).
 
  
 
Version 1.03:
 
Version 1.03:
- Fixed the plugin commands that pertain to party members to prevent them
+
- Fixed a bug with average level calculation types for enemies.
from crashing the game.
 
  
Version 1.02a:
+
Version 1.02:
- Updated for RPG Maker MV version 1.1.0.
+
- Fixed a bug regarding a line of code that wasn't added properly.
- Fixed a documentation issue. <TP Mode: x> can work with enemies.
 
  
Version 1.01a:
+
Version 1.01:
- Fixed a bug with some notetags not working properly.
+
- Added <Ignore Level Bonus> notetag. This causes enemies to maintain their
- Fixed a bug with 'EnableTpMode' plugin command not working properly.
+
current level but ignore any bonus stats applied by the level difference. If
 +
the enemy's level is altered, its stats remain static and unchanging.
  
 
Version 1.00:
 
Version 1.00:
 
- Finished Plugin!
 
- Finished Plugin!
 
</nowiki>
 
</nowiki>

Revision as of 20:36, 20 June 2019

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

Extension Plugins

The following plugins are Extension Plugins that require this plugin as its Parent Plugin.

Place the following plugins below this plugin located in the Plugin Manager if you plan on using them.

Yanfly Engine Plugins

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


Help File

============================================================================
Introduction
============================================================================

This plugin allows enemies to function off of a leveling system. An enemy's
level will be increased relative to the player under specific rulings and
will increase its stats based on its level.

============================================================================
Default Level Types
============================================================================

When an enemy is made in battle, it will create its initial level off of a
set of rules. These are the various rules you can change the 'Default Type'
plugin parameter to reflect.

Type:

- Type 0 - Lowest level of all actors that have joined the player party.
- Type 1 - Lowest level of all actors that are in the battling party.
- Type 2 - Average level of all actors that have joined the player party.
- Type 3 - Average level of all actors that are in the battling party.
- Type 4 - Highest level of all actors that have joined the player party.
- Type 5 - Highest level of all actors that are in the battling party.

After the level type has been determined for the enemy, random level
fluctuations are then added.

============================================================================
Notetags
============================================================================

You can use these notetags to adjust how enemy levels are handled
individually per enemy.

Enemy Notetags:

  <Show Level>
  <Hide Level>
  This will cause the enemy to show or hide its level upon target selection.

  <Minimum Level: x>
  <Maximum Level: x>
  This sets the enemy's minimum and maximum levels respectively to x. This
  will cause the enemy, upon the start of battle, to adjust levels within
  this particular range. Any skills that alter enemy levels are able to
  bypass these limits unless if it were to bypass the maximum cap.

  <Static Level: x>
  This sets the enemy's starting level to exactly x. This will cause the
  enemy, upon the start of battle, to adjust levels within this particular
  range. Any skills that alter enemy levels are able to bypass these limits
  unless if it were to bypass the maximum cap.

  <Starting Level Type: x>
  This sets the enemy's starting level type to x from 0 to 5. Refer to the
  'Default Level Types' party of the Help File.

  <Positive Level Fluctuation: x>
  <Negative Level Fluctuation: x>
  This sets the positive/negative level fluctuation for the enemy. Any level
  fluctuation is calculated at the start of battle, but after the starting
  level type has been determined.

  <Level Fluctuation: x>
  This sets both the positive and negative level fluctuation for the enemy
  to x. Any level fluctuation is calculated at the start of battle, but
  after the starting level type has been determined.

  <stat Rate: +x% per level>
  <stat Rate: -x% per level>
  <stat Rate: +x.y per level>
  <stat Rate: -x.y per level>
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
  'luk', 'exp', or 'gold'. This will set this enemy to have an increase or
  decrease of x% rate per level. If you use the x.y formula, it will have a
  rate increase of +x.y or -x.y per level.

  <stat Flat: +x per level>
  <stat Flat: -x per level>
  <stat Flat: +x.y per level>
  <stat Flat: -x.y per level>
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
  'luk', 'exp', or 'gold'. This will set this enemy to have an increase or
  decrease of flat x value per level. If you use the x.y formula, it will
  have a flat increase of +x.y or -x.y per level.

  <Resist Level Change>
  This will cause the enemy to be immune to any form of level changing
  through skills and items. However, the enemy is not immune to any level
  changing through script calls.

  <Skill x Require Level: y>
  <Skill name Require Level: y>
  If this enemy is to use skill x (or named skill), it must be at least
  level y to be able to use it. If the enemy is under level y, the skill
  will be sealed and cannot be used.

  <Ignore Level Bonus>
  This will cause the enemy to ignore all the stat changes added by levels
  and use its base stats as its current level stats. Any changes to its
  current level will not alter the enemy's stats.

Skill and Item Notetags:

  <Reset Enemy Level>
  This will reset the target enemy's level back to what it was at the start
  of battle.

  <Change Enemy Level: +x>
  <Change Enemy Level: -x>
  If this action is used against an enemy, it will change the enemy's level
  by +x or -x. If an action contains both a reset and level change, the
  reset will occur first before the level change.

============================================================================
Lunatic Mode - Custom Starting Level
============================================================================

For those with JavaScript experience, you can have enemies have conditional
starting levels. Place these Lunatic Mode notetags into the enemy notebox:

Enemy Notetags:

  <Custom Starting Level>
   level = $gameActors.actor(1).level + 5;
  </Custom Starting Level>
  The 'level' variable will become the enemy's starting level. This level is
  still affected by the enemy's minimum and maximum starting level barriers.
  After the starting levels are decided, it will still be affected by the
  random level fluctuation.

============================================================================
Lunatic Mode - Custom Parameter Formulas
============================================================================

For those with JavaScript experience, you can have different formulas for
the ways parameters are calculated in regards to the enemy's level. Use the
notetags below:

Enemy Notetags:

  <Custom Parameter stat Formula>
   base * (1 + (level - 1) * rate) + (flat * (level - 1))
  </Custom Parameter stat Formula>
  Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
  'luk', 'exp', or 'gold'. Whatever is calculated for the formula on the
  last line will become the parameter value for the stat.

============================================================================
Lunatic Mode - Custom Change Enemy Level
============================================================================

For those with JavaScript experience and would like to have more dynamic
ways of altering enemy levels instead of flat values, you can use these
notetags to do so:

Skill and Item Notetags:

  <Custom Change Enemy Level>
   level += user.atk;
   level -= target.agi;
  </Custom Change Enemy Level>
  The 'level' variable will be the enemy's current level. Any changes made
  to the 'level' variable will be what the enemy's level will become after
  this effect finishes taking place. If the skill has a reset level effect,
  it is applied first. If the skill has a flat level changing effect, that
  effect is applied next. After those two effects are applied, this custom
  enemy level change will take place.

============================================================================
Lunatic Mode - New JavaScript Functions
============================================================================

Here are some new JavaScript functions that have been added by this plugin.

enemy.level
- This will return the enemy's current level.

enemy.originalLevel()
- This will return the enemy's original level from the start of battle.

enemy.changeLevel(x)
- This will change the enemy's level to x.

enemy.gainLevel(x)
- This will cause the enemy to gain x levels.

enemy.loseLevel(x)
- This will cause the enemy to lose x levels.

enemy.resetLevel()
- Changes the enemy's level back to what it was at the start of battle.

$gameParty.lowestLevelAllMembers()
- This will return the lowest level of all party members.

$gameParty.lowestLevelBattleMembers()
- This will return the lowest level of all battle members.

$gameParty.averageLevelAllMembers()
- This will return the average level of all party members.

$gameParty.averageLevelBattleMembers()
- This will return the average level of all battle members.

$gameParty.highestLevelAllMembers()
- This will return the highest level of all party members.

$gameParty.highestLevelBattleMembers()
- This will return the highest level of all battle members.

$gameTroop.changeLevel(x)
- Changes the levels of all enemies to x.

$gameTroop.gainLevel(x)
- Raises the levels of all enemies by x.

$gameTroop.loseLevel(x)
- Lowers the levels of all enemies by x.

$gameTroop.resetLevel()
- Resets the levels of all enemies to their original levels at battle start.

$gameTroop.lowestLevel()
- This will return the lowest level of the enemy party.

$gameTroop.averageLevel()
- This will return the lowest level of the enemy party.

$gameTroop.highestLevel()
- This will return the lowest level of the enemy party.

============================================================================
Plugin Commands
============================================================================

If you wish to change enemy levels through plugin commands, you can use the
following plugin commands to alter them. These plugin commands are only used
inside battle.

Plugin Command:

  EnemyLevelChange 2 to 50
  - This will reset the enemy in position 2's level to 50.

  EnemyLevelChangeAll 50
  - This will change the levels of all enemies to 50.

  EnemyGainLevel 3 by 20
  - This will cause the enemy in positon 3 to gain 20 levels.

  EnemyGainLevelAll 20
  - This will cause all enemies to gain 20 levels.

  EnemyLoseLevel 4 by 10
  - This will cause the enemy in positon 4 to lose 10 levels.

  EnemyLoseLevelAll 10
  - This will cause all enemies to lose 10 levels.

  EnemyLevelReset 5
  - This will reset the enemy in position 5's level to the level it had at
  the start of battle.

  EnemyLevelResetAll
  - This will reset all enemy levels to their original levels.

============================================================================
Changelog
============================================================================

Version 1.09:
- 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.08:
- Updated for RPG Maker MV version 1.5.0.

Version 1.07:
- Enemy Transform event now adjusts for stat changes when transforming into
a different enemy.

Version 1.06:
- Lunatic Mode fail safes added.

Version 1.05:
- Updated the custom level formula to have the formulas 'b', 'r', and 'f' to
be able to use the formulas from FlyingDream's calculator.

Version 1.04:
- Updated for RPG Maker MV version 1.1.0.

Version 1.03:
- Fixed a bug with average level calculation types for enemies.

Version 1.02:
- Fixed a bug regarding a line of code that wasn't added properly.

Version 1.01:
- Added <Ignore Level Bonus> notetag. This causes enemies to maintain their
current level but ignore any bonus stats applied by the level difference. If
the enemy's level is altered, its stats remain static and unchanging.

Version 1.00:
- Finished Plugin!