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...")
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{MvPlugin
 
{{MvPlugin
|preview=<youtube>https://www.youtube.com/watch?v=32CpPp7w5-k</youtube>
+
|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="0"></iframe></html>
+
|link2 = <html><iframe src="https://itch.io/embed/508203" height="167" width="552" frameborder="0"></iframe></html>
|link2=[http://yanfly.moe/plugins/en/YEP_EnemyLevels.js Mirror]
+
|link3 = <html><iframe src="https://itch.io/embed/398158" height="167" width="552" frameborder="0"></iframe></html>
  
 
}}
 
}}
Line 10: Line 10:
 
* [[Difficulty Slider (YEP)|Difficulty Slider]]
 
* [[Difficulty Slider (YEP)|Difficulty Slider]]
 
* [[Enemy Base Parameters (YEP)|Enemy Base Parameters]]
 
* [[Enemy Base Parameters (YEP)|Enemy Base Parameters]]
 +
* [[Map Enemy Levels (YEP)|Map Enemy Levels]]
  
 
{{Yanfly Engine Plugins}}
 
{{Yanfly Engine Plugins}}
  
== Help File ==
+
== Introduction ==
  
 
  <nowiki>
 
  <nowiki>
============================================================================
+
This plugin allows enemies to function off of a leveling system. An enemy's
Introduction
+
level will be increased relative to the player under specific rulings and
============================================================================
+
will increase its stats based on its level.
 +
</nowiki>
 +
 
 +
== Default Level Types ==
 +
 
 +
<nowiki>
 +
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.
  
The TP system in RPG Maker MV is rather limiting. A lot of the TP system is
+
Type:
hardcoded in giving RPG Maker MV users very little control over how much TP
 
gain a battler can receive from particular actions and situations. This
 
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.
 
  
============================================================================
+
- Type 0 - Lowest level of all actors that have joined the player party.
Instructions - TP Mode Parameters
+
- 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.
  
TP Modes are given to your actors for them to decide how they want to gain
+
After the level type has been determined for the enemy, random level
TP over the course of battle. You can decide the rulings for each TP Mode.
+
fluctuations are then added.
 +
</nowiki>
  
Here is an overview of what each TP Mode Parameter does:
+
{{Notetags MV}}
  
  Name
+
<nowiki>
  - This is the name of the TP Mode. This is what appears in the TP Mode
+
You can use these notetags to adjust how enemy levels are handled
  selection menu in the Skill Menu (if you have it enabled).
+
individually per enemy.
  
  Icon
+
Enemy Notetags:
  - This is the icon used for the TP Mode in the TP Mode selection menu in
 
  the Skill Menu (if you have it enabled).
 
  
   Help Line 1
+
   <Show Level>
   Help Line 2
+
   <Hide Level>
   - This is the help description used for the TP Mode in the TP Mode
+
   This will cause the enemy to show or hide its level upon target selection.
  selection menu in the Skill Menu (if you have it enabled).
 
  
   Preserve
+
   <Minimum Level: x>
   - If set to true, then the user carries any earned TP from on battle to
+
   <Maximum Level: x>
   the next battle. If set to false, the at the start and each of each battle
+
  This sets the enemy's minimum and maximum levels respectively to x. This
   the user's TP value is cleared.
+
   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.
  
   Initial TP
+
   <Static Level: x>
   - This is the formula to determine how much TP is gained at the start of
+
   This sets the enemy's starting level to exactly x. This will cause the
  battle. Previously, this was reserved for non-preserved TP values. Now, it
+
  enemy, upon the start of battle, to adjust levels within this particular
   can be used regardless.
+
  range. Any skills that alter enemy levels are able to bypass these limits
 +
   unless if it were to bypass the maximum cap.
  
   Regen TP
+
   <Starting Level Type: x>
   - This is how much TP is regenerated during the regeneration phase for the
+
   This sets the enemy's starting level type to x from 0 to 5. Refer to the
   user. Typically, the regeneration phase occurs at the end of each turn.
+
   'Default Level Types' party of the Help File.
  
   Take HP DMG
+
   <Positive Level Fluctuation: x>
   - This is how much TP is generated from the user 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.
  
   Deal HP DMG
+
   <Level Fluctuation: x>
   - This is how much TP is generated from the user dealing HP 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.
  
   Heal HP DMG
+
   <stat Rate: +x% per level>
   - This is how much TP is generated from the user healing HP 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.
  
   Ally HP DMG
+
   <stat Flat: +x per level>
   - This is how much TP is generated from an ally taking HP 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.
  
   Take MP DMG
+
   <Resist Level Change>
   - This is how much TP is generated from the user 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 MP DMG
+
   <Skill x Require Level: y>
   - This is how much TP is generated from the user dealing MP damage. The
+
   <Skill name Require Level: y>
   amount of damage taken can be retrieved from the 'value' variable.
+
  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.
  
   Heal MP DMG
+
   <Ignore Level Bonus>
   - This is how much TP is generated from the user healing MP damage. The
+
   This will cause the enemy to ignore all the stat changes added by levels
   amount of damage taken can be retrieved from the 'value' variable.
+
  and use its base stats as its current level stats. Any changes to its
 +
   current level will not alter the enemy's stats.
  
  Ally MP DMG
+
Skill and Item Notetags:
  - This is how much TP is generated from an ally taking MP damage. The
 
  amount of damage taken can be retrieved from the 'value' variable.
 
  
   Deal State
+
   <Reset Enemy Level>
   - This is how much TP is generated from the user issuing a state on a foe.
+
   This will reset the target enemy's level back to what it was at the start
   If the user and target are on the same team, ignore this.
+
   of battle.
  
   Gain State
+
   <Change Enemy Level: +x>
   - This is how much TP is generated from the user gaining a state from a
+
   <Change Enemy Level: -x>
   foe. If the user and origin are on the same team, ignore this.
+
  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.
 +
</nowiki>
  
  Kill Ally
+
{{Lunatic Mode MV}}
  - This is how much TP is generated if an allied member dies. It does not
 
  matter who the killer is.
 
  
  Kill Enemy
+
=== Custom Starting Level ===
  - This is how much TP is generated if an enemy member dies. It does not
 
  matter who the killer is.
 
  
  Win Battle
+
<nowiki>
  - This is how much TP is generated from the player winning a battle.
+
For those with JavaScript experience, you can have enemies have conditional
 +
starting levels. Place these Lunatic Mode notetags into the enemy notebox:
  
  Flee Battle
+
Enemy Notetags:
  - This is how much TP is generated from the player escaping a battle.
 
  
   Lose Battle
+
   <Custom Starting Level>
   - This is how much TP is generated from the player losing a battle.
+
  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.
 +
</nowiki>
  
  Crisis HP
+
=== Custom Parameter Formulas ===
  - This is how much TP is generated during the Regen TP timing if the user
 
  is in a critical HP state.
 
  
  Crisis MP
+
<nowiki>
  - This is how much TP is generated during the Regen TP timing if the user
+
For those with JavaScript experience, you can have different formulas for
  is in a critical MP state.
+
the ways parameters are calculated in regards to the enemy's level. Use the
 +
notetags below:
  
  Only Member
+
Enemy Notetags:
  - This is how much TP is generated during the Regen TP timing if the user
 
  is the only alive member left.
 
  
   Evasion
+
   <Custom Parameter stat Formula>
   - This is how much TP is generated whenever the user manages to evade an
+
  base * (1 + (level - 1) * rate) + (flat * (level - 1))
   action performed by another battler.
+
  </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.
 +
</nowiki>
  
============================================================================
+
=== Custom Change Enemy Level ===
Notetags
 
============================================================================
 
  
You can use the following notetags to adjust the various settings for TP.
+
<nowiki>
 +
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.
 +
</nowiki>
  
  <Unlock TP Mode: x>
+
{{Script Calls MV}}
  <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:
+
<nowiki>
 +
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.
  
  <Unlock TP Mode: x>
+
enemy.changeLevel(x)
  <Unlock TP Mode: x, x, x>
+
- This will change the enemy's level to x.
  <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.gainLevel(x)
 +
- This will cause the enemy to gain x levels.
  
  <Learn Unlock TP Mode: x>
+
enemy.loseLevel(x)
  <Learn Unlock TP Mode: x, x, x>
+
- This will cause the enemy to lose 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.resetLevel()
Plugin Commands
+
- Changes the enemy's level back to what it was at the start of battle.
============================================================================
 
  
You can use the following Plugin Commands to alter Enhanced TP.
+
$gameParty.lowestLevelAllMembers()
 +
- This will return the lowest level of all party members.
  
Plugin Command:
+
$gameParty.lowestLevelBattleMembers()
 +
- This will return the lowest level of all battle members.
  
  ShowTpMode
+
$gameParty.averageLevelAllMembers()
  HideTpMode
+
- This will return the average level of all party members.
  This will show/hide the TP Mode from the Skill Menu.
 
  
  EnableTpMode
+
$gameParty.averageLevelBattleMembers()
  DisableTpMode
+
- This will return the average level of all battle members.
  This will enable/disable the TP Mode in the Skill Menu.
 
  
  ChangeTpMode Actor 1 to 5
+
$gameParty.highestLevelAllMembers()
  This will change the TP mode of Actor 1 to TP Mode 5.
+
- This will return the highest level of all party members.
  
  ChangeTpMode Party 2 to 6
+
$gameParty.highestLevelBattleMembers()
  This will change the TP mode of Party Member 2 to TP Mode 6.
+
- This will return the highest level of all battle members.
  
  UnlockTpMode Actor 3 Mode 7
+
$gameTroop.changeLevel(x)
  This will make Actor 3 unlock TP Mode 7.
+
- Changes the levels of all enemies to x.
  
  UnlockTpMode Party 4 Mode 8
+
$gameTroop.gainLevel(x)
  This will make Party Member 4 unlock TP Mode 8.
+
- Raises the levels of all enemies by x.
  
  RemoveTpMode Actor 1 Mode 9
+
$gameTroop.loseLevel(x)
  This will make Actor 1 remove TP Mode 9.
+
- Lowers the levels of all enemies by x.
  
  RemoveTpMode Party 2 Mode 10
+
$gameTroop.resetLevel()
  This will make Party Member 2 remove TP Mode 10.
+
- Resets the levels of all enemies to their original levels at battle start.
  
  UnlockAllTpModes Actor 1
+
$gameTroop.lowestLevel()
  This will make Actor 1 unlock all TP modes.
+
- This will return the lowest level of the enemy party.
  
  UnlockAllTpModes Party 2
+
$gameTroop.averageLevel()
  This will make Party member 2 unlock all TP modes.
+
- This will return the lowest level of the enemy party.
  
  RemoveAllTpModes Actor 1
+
$gameTroop.highestLevel()
  This will make Actor 1 remove all TP modes.
+
- This will return the lowest level of the enemy party.
 +
</nowiki>
  
  RemoveAllTpModes Party 2
+
{{Plugin Commands MV}}
  This will make Party member 2 remove all TP modes.
 
  
============================================================================
+
<nowiki>
Lunatic Mode - New JavaScript Functions
+
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.
  
For those experienced with JavaScript, you can use these new functions to
+
Plugin Command:
call upon and change various aspects related to TP Modes.
 
  
   battler.tpMode()
+
   EnemyLevelChange 2 to 50
   This will return the current TP mode the battler is using.
+
   - This will reset the enemy in position 2's level to 50.
  
   battler.tpModeId()
+
   EnemyLevelChangeAll 50
   This will return the current TP mode's ID the battler is using.
+
   - This will change the levels of all enemies to 50.
  
   battler.setTpMode(x)
+
   EnemyGainLevel 3 by 20
   This will set the battler's TP mode to x.
+
   - This will cause the enemy in positon 3 to gain 20 levels.
  
   battler.unlockTpMode(x)
+
   EnemyGainLevelAll 20
   This will unlock TP Mode x for the battler.
+
   - This will cause all enemies to gain 20 levels.
  
   battler.removeTpMode(x)
+
   EnemyLoseLevel 4 by 10
   This will remove TP Mode x for the battler unless the battler is currently
+
   - This will cause the enemy in positon 4 to lose 10 levels.
  using TP Mode x.
 
  
   battler.unlockAllTpModes()
+
   EnemyLoseLevelAll 10
   This will unlock all TP Modes for the battler.
+
   - This will cause all enemies to lose 10 levels.
  
   battler.removeAllTpModes()
+
   EnemyLevelReset 5
   This will remove all TP Modes for the battler except for the TP Mode that
+
   - This will reset the enemy in position 5's level to the level it had at
   the battler is currently using.
+
   the start of battle.
  
============================================================================
+
  EnemyLevelResetAll
Changelog
+
  - This will reset all enemy levels to their original levels.
============================================================================
+
</nowiki>
  
 +
== Changelog ==
 +
 +
<nowiki>
 
Version 1.09:
 
Version 1.09:
 
- Bypass the isDevToolsOpen() error when bad code is inserted into a script
 
- Bypass the isDevToolsOpen() error when bad code is inserted into a script
Line 255: Line 292:
  
 
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 302:
  
 
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>
 +
 +
<!-- This is a comment, remove the arrows surrounding this for the categories you want to show -->
 +
<!-- [[Category: RPG Maker MV Core Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Battle Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Item Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Skill Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Equip Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Status Menu Plugins]] -->
 +
[[Category: RPG Maker MV Gameplay Plugins]]
 +
<!-- [[Category: RPG Maker MV Movement Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Quest Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Options Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Eventing Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Utility Plugins]] -->
 +
[[Category: RPG Maker MV Mechanical Plugins]]
 +
<!-- [[Category: RPG Maker MV Visual Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Menu Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Message Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Quality of Life Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Plugin Tips & Tricks]] -->
 +
<!-- [[Category: Action Sequences (MV)]] -->
 +
<!-- [[Category: Comment Tags (MV)]] -->
 +
<!-- [[Category: Main Menu Manager Integration (MV)]] -->
 +
<!-- [[Category: Notetags (MV)]] -->
 +
<!-- [[Category: Options Core Integration (MV)]] -->
 +
<!-- [[Category: Plugin Commands (MV)]] -->
 +
<!-- [[Category: Script Calls (MV)]] -->
 +
<!-- [[Category: Text Codes (MV)]] -->

Latest revision as of 10:54, 13 June 2020

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.


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

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.

---

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

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.

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.

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.

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.

Script Calls

ScriptCallsMV.png

Script Calls are event commands that are used to run JavaScript code during an event to call upon unique functions, usually added by the related plugin.

Here is a list of Script Call(s) that you may use:

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

PluginCommandsMV.png

Plugin Commands are event commands that are used to call upon functions added by a plugin that aren't inherently a part of RPG Maker MV.

Here is a list of Plugin Command(s) that you may use:

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!