MV Meta data in the help window when targeting an enemy (Yanfly_Battlenginecore)

Hey there!

I'd just like to add, in the selection window of the Yanfly_Battlenginecore of Rpg Maker MV to be able to draw meta-data on the second line. I can easily make it appear in several ways, but not with the "currently targeted Enemy ID" from the database, rather than a specific index, or directly the number.

Example, if I write $dataEnemies[2].meta.race, it will ALWAYS return the same "race (beast)" for all targets an enemies. If I go with troop index, same thing. Can I have a way to code that so that it always show the meta data of the currently targeted enemy in battle?

Pretty please? Thank for you any help!!

Currently part / plugin script I'm talking about:

Window_Help.prototype.drawBattler = function(battler) {
var text = battler.name();
var race = $dataEnemies[enemyId].meta.race
var wx = 0;
var wy = 0;
this.drawText(text, wx, wy, this.contents.width, 'center');
this.drawText(race, wx, wy + this.lineHeight() * 1, this.contents.width, 'center');
};
Example, if I write $dataEnemies[2].meta.race, it will ALWAYS return the same "race (beast)" for all targets an enemies.
Right, because that's what you're telling it to show.

If I go with troop index, same thing.
You should have shown what you were trying for that code, because that should work correctly.

It's also worth noting that, as far as I see from a cursory look, this window is used when targeting both enemies and actors, so you want to make sure you include a check for that.

That being said, you'd just do
Code:
var race = battler.isEnemy() ? battler.enemy().meta.race : "";
AMAZING!!
No matter what I tried; That line you gave worked instantly!! Thank you so much!!

Original thread: https://forums.rpgmakerweb.com/threads/meta-data-in-the-help-window-when-targeting-an-enemy-yanfly_battlenginecore.173348/