Text wrapping with "libra" skill for MV

Hey all, I'm having an issue with a portion of my game.

I've made a "Libra" skill and there are enemies that resist all elements and I don't know how to make the resisted elements all on the one page. I'm using yanfly message core. Here is a picture of what I mean and what I have in the note tag the enemy.

Cheers in advanced.

<Before Eval>


if (target.isEnemy()) {


var id = target._enemyId;


$gameSystem.addHpGaugeEnemy(id);





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


text += '\\px[80]\\c[4]HP:\\c[0] ' + target.hp;


text += '/' + target.mhp;


text += '\\px[350]\\c[4]MP:\\c[0] ' + target.mp;


text += '/' + target.mmp;


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


text += '\n';


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


text += '\\px[350]\\c[4]MAT:\\c[0] ' + target.mat;


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


text += '\n';


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


text += '\\px[350]\\c[4]MDF:\\c[0] ' + target.mdf;


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


$gameMessage.add(text);





var weakness = '';


var resist = '';


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 < 1) {


resist += name + ' ';


}


}


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


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


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


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


text = weakness + resist;


$gameMessage.add(text);


}


</Before Eval>
maybe you need \n on the end of the text or \\n for a new line, but you can check
the helpfile or try it out. if both are not working, I can dig a bit unless someone beat me first 🙂
Where would the \n or \\n be put ?

I've moved this thread to Plugin Support. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/text-wrapping-with-libra-skill-for-mv.120472/