Category:Lunatic Mode (MV)

From Yanfly.moe Wiki
Revision as of 14:10, 26 June 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.


Introduction

Lunatic Mode is a key phrase coined by Yanfly and is often seen used across the RPG Maker community by many users to refer to advanced usage of plugins involving code of some sort. It usually pertains to the usage of notetags, but it can also be applied to other things, such as Plugin Parameters and comment tags, too. It is recommended that users don't dabble with Lunatic Mode features unless they understand that what they're using can cause their game to crash if the code is made incorrectly.

Origin

The origin of Lunatic Mode came from Touhou Project, a Japanese bullet hell shoot 'em up game series. In the games, there are often four modes: Easy, Normal, Hard, and Lunatic. During the RPG Maker VX era, the Yanfly Engine ReDux series had their usage labeled in the four categories:

  • Easy Mode: The scripts would be plug and play by simply adding the script to your list.
  • Normal Mode: The scripts would require interaction with the game project through the usage of notetags.
  • Hard Mode: The scripts would require alteration of the script's module settings.
  • Lunatic Mode: The scripts would require basic coding knowledge to use correctly.

This difficulty scheme was never used again since the VX script libraries, but the term Lunatic Mode has stuck with the community since then.

Base Parameter Control

You can use the following JavaScript functions to alter the base parameter
values of the battlers. In these listed functions, the 'battler' variable
is to be referenced by an actor:

ie. battler = $gameActors.actor(3);
    - or -
    battler = $gameTroop.members()[2];

Function:

  battler.clearParamPlus()
  - This will clear all 'plus' variable modifiers for all base parameters.

  battler.setMaxHp(x)
  battler.setMaxMp(x)
  battler.setAtk(x)
  battler.setDef(x)
  battler.setMat(x)
  battler.setMdf(x)
  battler.setAgi(x)
  battler.setLuk(x)
  - Sets the battler's respective base parameter value to x. This will alter
  the 'plus' variable to fit this setting as best as possible without taking
  into consideration the rates and flats.

  battler.setMaxHpPlus(x)
  battler.setMaxMpPlus(x)
  battler.setAtkPlus(x)
  battler.setDefPlus(x)
  battler.setMatPlus(x)
  battler.setMdfPlus(x)
  battler.setAgiPlus(x)
  battler.setLukPlus(x)
  - Sets the battler's respective base parameter plus value to x.

  battler.addMaxHp(x)
  battler.addMaxMp(x)
  battler.addAtk(x)
  battler.addDef(x)
  battler.addMat(x)
  battler.addMdf(x)
  battler.addAgi(x)
  battler.addLuk(x)
  - Adds x value to battler's respective base parameter plus value.

  battler.minusMaxHp(x)
  battler.minusMaxMp(x)
  battler.minusAtk(x)
  battler.minusDef(x)
  battler.minusMat(x)
  battler.minusMdf(x)
  battler.minusAgi(x)
  battler.minusLuk(x)
  - Subtracts x value to battler's respective base parameter plus value.

  battler.clearCustomParamLimits();
  - Clears any custom parameter limits placed upon the battler through a
  script call. This does not remove the custom parameter limits applied to
  a battler through notetags.

  battler.setCustomMaxHpMax(x)
  battler.setCustomMaxMpMax(x)
  battler.setCustomAtkMax(x)
  battler.setCustomDefMax(x)
  battler.setCustomMatMax(x)
  battler.setCustomMdfMax(x)
  battler.setCustomAgiMax(x)
  battler.setCustomLukMax(x)
  - Sets the maximum parameter limit of the respective base parameter to x.
  This value is calculated against any <stat Max: x> notetags that the
  battler may have. If there are multiple max values, the larges value is
  used as the parameter maximum.

  battler.setCustomMaxHpMin(x)
  battler.setCustomMaxMpMin(x)
  battler.setCustomAtkMin(x)
  battler.setCustomDefMin(x)
  battler.setCustomMatMin(x)
  battler.setCustomMdfMin(x)
  battler.setCustomAgiMin(x)
  battler.setCustomLukMin(x)
  - Sets the minimum parameter limit of the respective base parameter to x.
  This value is calculated against any <stat Min: x> notetags that the
  battler may have. If there are multiple min values, the larges value is
  used as the parameter minimum.

Class Base Parameters


Custom Class Parameters
If your formulas are short and simple, you can use this notetag to cover the
entire formula list for all of the base parameters:

Class Notetag:

  <Custom Class Parameters>
   maxhp = level * 30 + 300;
   maxmp = level * 20 + 150;
   atk = level * 15 + 15;
   def = level * 11 + 16;
   mat = level * 12 + 14;
   mdf = level * 10 + 13;
   agi = level * 14 + 15;
   luk = level * 13 + 12;
   exp = level * 100;
  </Custom Class Parameters>
  The 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi', 'luk', and 'exp'.
  variables each refer to their own individual stats. The 'level' variable
  refers to the actor's current level. The formula can be made any way you
  like as long as it returns a legal number.
  * Note: The 'exp' stat here refers to the amount of exp needed to reach
  the next level.

Detailed Custom Parameter Formulas
For those who wish to put a bit more detail in calculating the formula for
each stat, you can use the following notetag setup:

Class Notetags:

  <Custom Param Formula>
   if (this.name() === 'Harold') {
     value = level * 30 + 300;
   } else {
     value = level * 25 + 250;
   }
  </Custom Param Formula>
  Replace 'Param' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi',
  'luk', or 'exp'. The 'value' variable is the final result that's returned
  to count as the base class parameter. The 'level' variable refers to the
  actor's current level. The formula can be made any way you like as long as
  it returns a legal number.
  * Note: The 'exp' stat here refers to the amount of exp needed to reach
  the next level.

Extra Parameter Formula

You can use the following JavaScript functions to alter the extra parameter
values of actors. In these listed functions, the 'actor' variable is to be
referenced by an actor:

ie. actor = $gameActors.actor(3));

Function:

  actor.clearXParamPlus()
  - Clears all of the actor's extra parameter plus bonuses.

  actor.setHit(x)
  actor.setEva(x)
  actor.setCri(x)
  actor.setCev(x)
  actor.setMev(x)
  actor.setMrf(x)
  actor.setCnt(x)
  actor.setHrg(x)
  actor.setMrg(x)
  actor.setTrg(x)
  - Sets the actor's respective extra parameter value to x. Keep in mind
  that 1 is equal to 100% and 0.1 would be equal to 10%. Negative values
  will apply here, too.

  actor.setHitPlus(x)
  actor.setEvaPlus(x)
  actor.setCriPlus(x)
  actor.setCevPlus(x)
  actor.setMevPlus(x)
  actor.setMrfPlus(x)
  actor.setCntPlus(x)
  actor.setHrgPlus(x)
  actor.setMrgPlus(x)
  actor.setTrgPlus(x)
  - Sets the actor's respective extra parameter plus value to x. Keep in
  mind that 1 is equal to 100% and 0.1 would be equal to 10%. Negative
  values will apply here, too.

  actor.addHit(x)
  actor.addEva(x)
  actor.addCri(x)
  actor.addCev(x)
  actor.addMev(x)
  actor.addMrf(x)
  actor.addCnt(x)
  actor.addHrg(x)
  actor.addMrg(x)
  actor.addTrg(x)
  - Adds x to the actor's respective extra parameter value. Keep in mind
  that 1 is equal to 100% and 0.1 would be equal to 10%. Negative values
  will decrease the extra parameter.

  actor.minusHit(x)
  actor.minusEva(x)
  actor.minusCri(x)
  actor.minusCev(x)
  actor.minusMev(x)
  actor.minusMrf(x)
  actor.minusCnt(x)
  actor.minusHrg(x)
  actor.minusMrg(x)
  actor.minusTrg(x)
  - Subtracts x from the actor's respective extra parameter value. Keep in
  mind that 1 is equal to 100% and 0.1 would be equal to 10%. Negative
  values will add to the extra parameter.

Message Core

Extended Message Pack 2


For those with JavaScript experience and would like to customize the way the
text codes provided by this plugin behave, you can alter the code used for
each of the text codes within the plugin parameters.

Inside the plugin parameters exist the code used when each text code is
being converted by the in-game message functions. Refer to the variables
displayed in the comments at the top of each code to understand which of the
variables are being used and how they're being used.

By default:

  x
  - Refers to the x variable being inserted into the text code. This can be
  a number or string, depending on the text code.

  y
  - Refers to the y variable being inserted into the text code. This can be
  a number of string, depending on the text code.

  text
  - Refers to the text that will be displayed by the message system. This is
  what will appear as the final result for using the said text code.