Difference between revisions of "Category:Lunatic Mode (MV)"

From Yanfly.moe Wiki
Jump to navigation Jump to search
(Message Core)
(Battle Engine Core)
Line 141: Line 141:
 
   The above code will state that if the user has more HP than the target,
 
   The above code will state that if the user has more HP than the target,
 
   the target will be interrupted.
 
   the target will be interrupted.
 +
</nowiki>
 +
 +
=== [[Battle System - CTB (YEP)|Battle System - CTB]] ===
 +
<hr>
 +
 +
; Conditional CTB Speed and Conditional CTB Charge
 +
 +
<nowiki>
 +
For those who have a bit of JavaScript experience and would like to have
 +
more unique ways of performing CTB speed and charge changes, you can use the
 +
following notetags:
 +
 +
Skill and Item Notetags:
 +
  <Target CTB Speed Eval>
 +
  speed = x;
 +
  charge = x;
 +
  </Target CTB Speed Eval>
 +
  You can omit speed and/or charge. Whatever you set 'speed' to will change
 +
  the CTB speed of the target. If the target is charging, 'charge' will
 +
  cause the target's charge to change to that value. To make things more
 +
  simple, 'max' will be the full gauge value.
 +
 +
  Here is an example:
 +
 +
  <Target CTB Speed Eval>
 +
  speed = target.hp / target.mhp * max;
 +
  charge = target.hp / target.mhp * max;
 +
  </Target CTB Speed Eval>
 +
  The above code will set the user's current CTB gauge to position equal to
 +
  the target's HP ratio. If the target has 25% HP, the CTB gauge will go to
 +
  25% full for the target.
 +
 +
  --- --- --- --- ---
 +
 +
  <Target CTB Order Eval>
 +
  order = x;
 +
  </Target CTB Order Eval>
 +
  Set the 'order' variable to how much you want to alter the target's
 +
  current turn order by. If 'order' is positive, the order will need to wait
 +
  that many more turns before its turn comes up. If 'order' is negative, it
 +
  will will that amount of turns less before the order comes up.
 +
 +
  Here is an example:
 +
 +
  <Target CTB Order Eval>
 +
  if (target.hp > 1000) {
 +
    order = 3;
 +
  } else {
 +
    order = -1;
 +
  }
 +
  </Target CTB Order Eval>
 +
  If the target when attacked has over 1000 HP left, the target will have to
 +
  wait 3 more turns before its turn arrives. If the target has 1000 or less,
 +
  the target actually waits 1 less turn.
 +
 +
  --- --- --- --- ---
 +
 +
  <After CTB Eval>
 +
  speed = x;
 +
  </After CTB Eval>
 +
  This is the CTB set after the user has used the skill/item and the custom
 +
  CTB amount you want the user to be at after. 'max' be the value of the
 +
  full gauge value. Whatever you set 'speed', the user's CTB speed value
 +
  will change to that much:
 +
 +
  Here is an example:
 +
 +
  <After CTB Eval>
 +
  speed = user.mp / user.mmp * max;
 +
  </After CTB Eval>
 +
  The above code will set the user's CTB gauge after using the skill/item to
 +
  equal the user's MP ratio. If the user has 25% MP, the CTB gauge will go
 +
  to 25% full for the user.
 
</nowiki>
 
</nowiki>
  

Revision as of 17:14, 26 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.


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

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.

Battle Engine Core

Battle System - ATB


Conditional ATB Speed and Conditional ATB Charge
For those who have a bit of JavaScript experience and would like to have
more unique ways of performing ATB speed and charge changes, you can use the
following notetags:

Skill and Item Notetags:
  <Target ATB Eval>
  speed = x;
  charge = x;
  </Target ATB Eval>
  You can omit speed and/or charge. Whatever you set 'speed' to will change
  the ATB speed of the target. If the target is charging, 'charge' will
  cause the target's charge to change to that value. To make things more
  simple, 'max' will be the full gauge value.

  Here is an example:

  <Target ATB Eval>
  speed = target.hp / target.mhp * max;
  charge = target.hp / target.mhp * max;
  </Target ATB Eval>
  The above code will set the user's current ATB gauge to position equal to
  the target's HP ratio. If the target has 25% HP, the ATB gauge will go to
  25% full for the target.

  --- --- --- --- ---

  <After ATB Eval>
  speed = x;
  </After ATB Eval>
  This is the ATB set after the user has used the skill/item and the custom
  ATB amount you want the user to be at after. 'max' be the value of the
  full gauge value. Whatever you set 'speed', the user's ATB speed value
  will change to that much:

  Here is an example:

  <After ATB Eval>
  speed = user.mp / user.mmp * max;
  </After ATB Eval>
  The above code will set the user's ATB gauge after using the skill/item to
  equal the user's MP ratio. If the user has 25% MP, the ATB gauge will go
  to 25% full for the user.

  --- --- --- --- ---

  <ATB Interrupt Eval>
  interrupt = true;
  </ATB Interrupt Eval>
  This will allow you to set custom conditions for interrupting a target.
  Keep in mind that even though it is a custom condition, it still requires
  the target to be in the charging phase for the interrupt to work. By
  setting 'interrupt = true', the target will be interrupted.

  Here is an example:

  <ATB Interrupt Eval>
  if (user.hp > target.hp) {
     interrupt = true;
  }
  </ATB Interrupt Eval>
  The above code will state that if the user has more HP than the target,
  the target will be interrupted.

Battle System - CTB


Conditional CTB Speed and Conditional CTB Charge
For those who have a bit of JavaScript experience and would like to have
more unique ways of performing CTB speed and charge changes, you can use the
following notetags:

Skill and Item Notetags:
  <Target CTB Speed Eval>
  speed = x;
  charge = x;
  </Target CTB Speed Eval>
  You can omit speed and/or charge. Whatever you set 'speed' to will change
  the CTB speed of the target. If the target is charging, 'charge' will
  cause the target's charge to change to that value. To make things more
  simple, 'max' will be the full gauge value.

  Here is an example:

  <Target CTB Speed Eval>
  speed = target.hp / target.mhp * max;
  charge = target.hp / target.mhp * max;
  </Target CTB Speed Eval>
  The above code will set the user's current CTB gauge to position equal to
  the target's HP ratio. If the target has 25% HP, the CTB gauge will go to
  25% full for the target.

  --- --- --- --- ---

  <Target CTB Order Eval>
  order = x;
  </Target CTB Order Eval>
  Set the 'order' variable to how much you want to alter the target's
  current turn order by. If 'order' is positive, the order will need to wait
  that many more turns before its turn comes up. If 'order' is negative, it
  will will that amount of turns less before the order comes up.

  Here is an example:

  <Target CTB Order Eval>
  if (target.hp > 1000) {
    order = 3;
  } else {
    order = -1;
  }
  </Target CTB Order Eval>
  If the target when attacked has over 1000 HP left, the target will have to
  wait 3 more turns before its turn arrives. If the target has 1000 or less,
  the target actually waits 1 less turn.

  --- --- --- --- ---

  <After CTB Eval>
  speed = x;
  </After CTB Eval>
  This is the CTB set after the user has used the skill/item and the custom
  CTB amount you want the user to be at after. 'max' be the value of the
  full gauge value. Whatever you set 'speed', the user's CTB speed value
  will change to that much:

  Here is an example:

  <After CTB Eval>
  speed = user.mp / user.mmp * max;
  </After CTB Eval>
  The above code will set the user's CTB gauge after using the skill/item to
  equal the user's MP ratio. If the user has 25% MP, the CTB gauge will go
  to 25% full for the user.

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.