MV Creating a Libra skill

I'm using the Notetag script seen in this video by Yanfly but was wondering how to add icons to the Weakness/resist/immune/absorb elements when they show?


This is what I have so far

<Before Eval>
if (target.isEnemy()) {
var id = target._enemyId;
$gameSystem.addHpGaugeEnemy(id);

var text = target.name() + '\n';
text += '\\px[50]\\c[4]HP:\\c[0] ' + target.hp;
text += '/' + target.mhp;
text += '\\px[300]\\c[4]STR:\\c[0] ' + target.atk;
text += '\\px[550]\\c[4]DEX:\\c[0] ' + target.def;
text += '\\px[800]\\c[4]AGI:\\c[0] ' + target.agi;
text += '\n';
text += '\\px[50]\\c[4]EP:\\c[0] ' + target.mp;
text += '/' + target.mmp;
text += '\\px[300]\\c[4]ETH:\\c[0] ' + target.mat;
text += '\\px[550]\\c[4]SPI:\\c[0] ' + target.mdf;
text += '\\px[800]\\c[4]LCK:\\c[0] ' + target.luk;
$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[3]Weakness:\\c[0] ' + weakness;
resist = '\\px[610]\\c[4]Resist:\\c[0] ' + resist + '\n';
immune = '\\c[2]Immune:\\c[0] ' + immune;
absorb = '\\px[610]\\c[1]Absorb:\\c[0] ' + absorb;
text = weakness + resist + immune + absorb;
$gameMessage.add(text);
}
</Before Eval>
you could try with
var weakness = \\i[index] + '' ;


and the same with the rest if you didn't try it.

if you try it and didn't work, than I dont know.
Oh c'mon. This can be done without Yanfly's tutorial...
Save this as plugin, add to plugin manager and create your libra skill like this:
2021-08-29 17_29_54-Window.png

In enemy tab you can also add to your enemy/enemies following notetag:
<enemy_desc: description of your enemy> to give short description for enemy.

This version is made to utilize Yanfly's message core plugin features, but I assume you have one installed in your project, so it should do the work.

result:
2021-08-29 17_34_21-Window.png


Edit: Labels of parameters are read from database, so what you set in database you see in your game.

If you want more info to be displayed, then let me know.
Oh c'mon. This can be done without Yanfly's tutorial...
Save this as plugin, add to plugin manager and create your libra skill like this:
View attachment 199888
In enemy tab you can also add to your enemy/enemies following notetag:
<enemy_desc: description of your enemy> to give short description for enemy.

This version is made to utilize Yanfly's message core plugin features, but I assume you have one installed in your project, so it should do the work.

result:
View attachment 199889

Edit: Labels of parameters are read from database, so what you set in database you see in your game.

If you want more info to be displayed, then let me know.
Thanks!

however, what I have already works and is already set up. I’m just looking for a solution to add in icons for ‘elements displayed’ as mentioned above.
you could try with
var weakness = \\i[index] + '' ;


and the same with the rest if you didn't try it.

if you try it and didn't work, than I dont know.
Thanks! I’ll try this when I have time and let you know!
If two slashesh dont work then try with \x1bi[iconindex]
I was trying to figure out the same thing.

It is easy adding on the icons to the elements as you can just use text code in front of your elements in the date base. Like this for example: \I[64]Fire (64 being the number of the icon from your icon set)

I am struggling however to add the icons to the weakness, resist and immune as well though...
I was trying to figure out the same thing.

It is easy adding on the icons to the elements as you can just use text code in front of your elements in the date base. Like this for example: \I[64]Fire (64 being the number of the icon from your icon set)

I am struggling however to add the icons to the weakness, resist and immune as well though...
I have the exact same issue. I know we're not supposed to necropost but this doesn't look resolved. The plugin above is a good start but it doesn't address the display of icons in these scripts.

Using the text escape code is nice and all but how are we retrieving the correct icon ID based on the element? Is it assumed the element ids and icon ids are set to be the same? It's unclear. And it seems like the answer is also no, but I don't see how else to achieve this with the above suggestion.

It's also still not clear how YanFly's code produces the screenshot where icons are shown for the given elements. Nothing in his code seems to reference retrieval of that information either.

Again, I don't want to be a nuisance but I've been banging my head against this for a few days now and it's not still not making any sense. Would love some direct insight on this icon issue.
Necro-post notice: @ShinyVacation If OP still needs this thread, they can report it to be reopened.

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-libra-skill.139982/