- Joined
- Mar 25, 2019
- Messages
- 26
- Reaction score
- 4
- First Language
- English
- Primarily Uses
- RMMV
Hello, I wonder if anyone can help me with upgrading Yanflys Libra. At present I have this;
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?
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>
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?

