MV Enemy HP% shown in name (Not HP Bar)

I checked the master plugin list for MV and the closest I could find was a plugin whose older version could display the exact HP amount in the name, but not the percentage (Doesn't seem to have any parameters so I can't exactly customize that one unless I go into the code itself and I'm not exactly good at that yet). The reason I need this is cause, with how my UI is set up, bigger enemies have their HP bars display behind the UI, which is kinda annoying. This means I'm probably gonna have to scrap the HP bars (Also might have to scrap Olivia's Weakness Display, tho that isn't what I'm asking about here. Lol). Unless there's some super obscure plugin with this feature that I just overlooked, I am kinda shocked this doesn't exist already.
Here's a mockup of what I had in mind.
Spoiler
HP Display Mockup.png
Any help at all is really appreciated.

EDIT: May as well add that the reason I need this is that I plan on having mechanics that depend on the enemy being below certain HP percentages, so relaying that information to the player is important. That's why I originally had the sectioned HP bars before I realized that one fatal flaw with them.
if you know how to edit, the HP should be divided by 100.

like enemy.hp / 100 and add the % to it. otherwise, good coders are
able to do that.

I have seen it before, but probably through srd hudmaker, but it's a cleaner
in some ways.
like enemy.hp / 100 and add the % to it. otherwise, good coders are
able to do that.
this doesnt give you their HP%. (ie: 200hp /100 = 2)
current HP / max HP (ie 100 / 200 = 0.5 (50%))
UPDATE: I've come to the realization that the person who did that plugin I mentioned seems to have gotten rid of the old version (I question why they even mention it in the plugin's description in that case). So... I guess I'm not gonna be able to do script edit of it (Even with the help with the HP% formula). Would probably have to be a new script altogether. :/
I tried seeing if I could do whatever Yanfly's Enemy Levels plugin did to add stuff to the enemy name display, but I am not exactly literate in Javascript (Or code in general. Something I need to work on), so that wasn't much help. .-.
To add (HP ___%) after all enemy names like in your mockup, I think you could just save this code as a .js file and import as a plugin:
JavaScript:
(function(alias) {
  Game_Enemy.prototype.name = function() {
    var hp = Math.floor(this.hpRate() * 100);
    return alias.apply(this, arguments) + ' (HP ' + hp + '%)';
  };
})(Game_Enemy.prototype.name);
This should apply to all locations where the enemy name appears. Remember to save your project to apply Plugin Manager changes before testing~
To add (HP ___%) after all enemy names like in your mockup, I think you could just save this code as a .js file and import as a plugin:
JavaScript:
(function(alias) {
  Game_Enemy.prototype.name = function() {
    var hp = Math.floor(this.hpRate() * 100);
    return alias.apply(this, arguments) + ' (HP ' + hp + '%)';
  };
})(Game_Enemy.prototype.name);
This should apply to all locations where the enemy name appears. Remember to save your project to apply Plugin Manager changes before testing~
This works perfectly! Thank you! 😀
Spoiler
1630956708274.png
I assume you'd want to be credited, right? Do I just use your username here or something else? Figured it would be a good idea to ask. Lol.
(Also, probably gonna get rid of the HP bars now (Maybe the weakness display as well for an alternative, uncertain)).
Great! 😂

You can credit me as Caethyril if you like, but you don't have to.
Great! 😂

You can credit me as Caethyril if you like, but you don't have to.
Gotcha. I'll do that! ^-^
Thanks again.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/enemy-hp-shown-in-name-not-hp-bar.140206/