Tips & Tricks – Trance (Final Fantasy 9) – RPG Maker MV

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

In Final Fantasy 9, when characters reach max limit capacity, they enter a state of Trance. In this state, they gain extra stats, more/different abilities, and their limit gauge starts dropping. Once the limit gauge hits 0, trance wears off. Here’s how we’ll recreate it in RPG Maker MV using TP instead!

Here’s the copy/paste version of the code: 

Place the following code into the trance state’s notebox. Change the values in red to fit your game.

<Custom Passive Condition>
// Check if the party is in battle.
if ($gameParty.inBattle()) {
  // Default the user's trance state to false.
  user._trance = user._trance || false;
  // Sets the condition for the user to be either in the trance state or if the user's TP matches the user's MaxTP.
  condition = user._trance || user.tp === user.maxTp();
} else {
  // Otherwise, the condition is false.
  condition = false;
}
// If the condition passes...
if (condition) {
  // And if the user isn't in the trance state...
  if (!user._trance) {
    // Then play an animation as the user enters trance.
    user.startAnimation(120);
  }
  // Set the user's trance state to true.
  user._trance = true;
}
</Custom Passive Condition>

<Custom Regenerate Effect>
// Set the TP drain amount.
var tp = 10;
// Reduce the user's TP.
user.gainTp(-tp);
// If the user's TP is 0...
if (user.tp === 0) {
  // ...then turn off trance.
  user._trance = false;
}
<Custom Regenerate Effect>

Happy trancing!

Please wait while you are redirected...or Click Here if you do not want to wait.