Adding state info to Libra skill

MikaTeapot

Villager
Member
Joined
Mar 25, 2019
Messages
12
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hello, I wonder if anyone can help me with upgrading Yanflys Libra. At present I have this;
JavaScript:
<Before Eval>

if (target.isEnemy()) {

  var id = target._enemyId;

  var evatot = target.eva * 100

  var critot = target.cri * 100

  var hittot = target.hit * 100

  var text = target.name() + '\n';

  text += '\\px[100]\\c[4]M.Hp:\\c[0] ' + target.hp;

  text += '/' + target.mhp;

  text += '\\px[400]\\c[4]M.Mp:\\c[0] ' + target.mp;

  text += '/' + target.mmp;

  text += '\\px[700]\\c[4]TP:\\c[0] ' + target.tp;

  text += '\n';

  text += '\\px[100]\\c[4]Atk:\\c[0] ' + target.atk;

  text += '\\px[400]\\c[4]M.Atk:\\c[0] ' + target.mat;

  text += '\\px[700]\\c[4]Agi:\\c[0] ' + target.agi;

  text += '\n';

  text += '\\px[100]\\c[4]Def:\\c[0] ' + target.def;

  text += '\\px[400]\\c[4]M.Def:\\c[0] ' + target.mdf;

  text += '\\px[700]\\c[4]Luk:\\c[0] ' + target.luk;

  text += '\n';

  text += '\\px[100]\\c[4]Eva:\\c[0] ' + evatot.toFixed(2) + '%';

  text += '\\px[400]\\c[4]Crit:\\c[0] ' + critot.toFixed(2) + '%';

  text += '\\px[700]\\c[4]Hit:\\c[0] ' + hittot.toFixed(2) + '%';

  $gameSystem._messageRows = 5;

  $gameMessage.setBackground(1);

  $gameMessage.setPositionType(1);

  $gameMessage.add(text);



  var weakness = '';

  var resist = '';

  var immune = '';

  var absorb = '';

  var elements = $dataSystem.elements;

  for (var i = 1; i < elements.length; ++i) {

    var name = elements;

    var rate = target.elementRate(i);

    if (rate > 1) {

      weakness += name + ' ';

    } else if (rate < 0) {

      absorb += name + ' ';

    } else if (rate === 0) {

      immune += name + ' ';

    } else if (rate < 1) {

      resist += name + ' ';

    }

  }

  if (weakness === '') weakness = 'None';

  if (resist === '') resist = 'None';

  if (immune === '') immune = 'None';

  if (absorb === '') absorb = 'None';

  weakness = '\\c[4]Weakness:\\c[0] ' + weakness + '\n';

  resist = '\\c[4]Resist:\\c[0] ' + resist + '\n';

  immune = '\\c[4]Immune:\\c[0] ' + immune + '\n';

  absorb = '\\c[4]Absorb:\\c[0] ' + absorb;

  text = weakness + resist + immune + absorb;

  $gameMessage.add(text);

}

</Before Eval>

<After Eval>

  $gameSystem._messageRows = 4;

</After Eval>
I have 2 questions;
1 - I want the messageRows to be 5 for the skill (so it all fits nicely) and back to 4 after (so the rest of my games messages look right) but my method above (setting to 4 in after eval) doesn't work (and if I set it to 5 and leave it, the rest of the game has 5 rows), what should I do?

2. I'd love to extend the elemental resistances section to also include state resistances, and % chances/resistances for elements/ states, how can I go about doing that?
 

MikaTeapot

Villager
Member
Joined
Mar 25, 2019
Messages
12
Reaction score
2
First Language
English
Primarily Uses
RMMV
Is bumping allowed >.>
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Ami
4 days im not using my laptop to waiting someone to reinstall (sigh)
Stream will be live shortly with some Donkey Kong 64! Feel free to drop by!
Working on a test Boss for the new No Travel Game Jam
- Name Plugin by Moghunter -
Free RPG Maker Ready Charging Up Animation

Enjoy -No Credit Needed But Appreciated -
Download it at https://lvgames.itch.io/free-charging-up-pixel-animation-fx-rpg-maker-ready
:/ .... so, thought I’d go to the park to sit in the cool breeze and get out of the house a little. Nope, guess that’s quarantined too. Ok...

Forum statistics

Threads
95,486
Messages
929,521
Members
125,731
Latest member
Decasus
Top