Show Enemy HP - updated

Show Enemy HP (MV)

Download 2.0.0​

Version 2.0.0: Now you'll see HP below the enemy sprite, be careful with sprites like bats. It also happens with YEP.30 visual gauges plugin, the hp bar will appear there, it's because the sprite is not well adapted.

img1.png


img2.png

Outdated, version 1.0.0:
Show the enemy HP during a battle on the enemy selector menu, like "Slime HP: 100/100". You can configure if you want to display the enemy list in a single column (default with this plugin) or two colomuns (normal engine). The two columns mode cut strings like "Earthspir. HP: 200/200".



Terms of use: Available for non-commercial and commercial usage.

NOTE: Send PM to get notifications if you have issues, post first then PM me.
I updated the plugin, showing the hp below enemy sprite.
Image links updated:

img1.png


img2.png
Hi Rokimoki. Is it possible to adjust your plugin to display the HP above the enemy sprite? I'd prefer to show the numbers there in a game I'm making, as I have bars below as you mentioned, so this looks a little cluttered with both at present. I assume that it could be changed by altering x/y numbers in the code part, but I don't want to go adjusting your plugin without permission. Perhaps a notetag to select if it's above or below in the enemy tab might be cool for other users? It's a very helpful plugin as it is, but this amendment would really help, I think.
Hi Rokimoki. Is it possible to adjust your plugin to display the HP above the enemy sprite? I'd prefer to show the numbers there in a game I'm making, as I have bars below as you mentioned, so this looks a little cluttered with both at present. I assume that it could be changed by altering x/y numbers in the code part, but I don't want to go adjusting your plugin without permission. Perhaps a notetag to select if it's above or below in the enemy tab might be cool for other users? It's a very helpful plugin as it is, but this amendment would really help, I think.
Hello, I'm a bit busy this week, but feel free to use and edit my code without my permition in your games, just mention me if you want.
If you need help just PM me, I need to study again the code because I don't remember some functions.
Hey!

I noticed that if you change the number in the code part: hpTextSprite.anchor.y = 1;

To something higher, it moves the HP number upwards, which is what I was looking for! 8 or 9 is about right (I'm still playing around with it - maybe 8.5!). If it was possible to somehow apply notetags to specific enemies to control the height for each one, that'd make this way more flexible (enemies being different heights and everything), but it looks like this should suffice for the moment. I don't have the coding skills to work out how to do this myself though, it was just a suggestion. I suppose I could cheat it if required by just making more space above the enemy sprite image so that it fits, that'd probably be a workaround... Will give it a try, but it looks like it'll work at the top in general, which is great!

Of course I'll credit you in the game! Thanks for the cool and useful plugin!

#Edit: After a bit of a further test, it looks like changing that one number affects when the battle screen displays the HP reduction in the battle (before it is when the attack takes place, as it should be, but after it is when the next turn starts), which is kind of weird! I'll keep having a try and see what happens.
Hi, I'm glad you are figuring out how to adapt to your needs.
You may want to work with %, in order to relocate the text like CSS margin-bottom: 15%, you must work with original sprite size and hp text size to calculate the hpTextSprite.anchor.y dinamically.
The site that hosts this plugin is down, anywhere else I can get a hold of it?

Edit: Actually disregard that, I found the Github link, however the HP numbers are showing up reversed for some reason.
@Sacrifyx in their message banner there is github link. you can get it there.
@Sacrifyx in their message banner there is github link. you can get it there.
Yes, I was able to find it, but as I said above, the HP numbers show up mirrored for some reason so I'm not currently using it. I have a feeling the answer to the problem lies in one of my other plugins, but who knows?
Yes, I was able to find it, but as I said above, the HP numbers show up mirrored for some reason so I'm not currently using it. I have a feeling the answer to the problem lies in one of my other plugins, but who knows?

Hi, are you still having issues? look if your plugins are using loadBitmap, startWhiten and startBlink methods from core.

PS: Send PM to get notifications.
Hi, are you still having issues? look if your plugins are using loadBitmap, startWhiten and startBlink methods from core.

PS: Send PM to get notifications.
Where would I find that information? I'm using a variety of plugins, mostly from Yanfly but several others from other authors as well.
Where would I find that information? I'm using a variety of plugins, mostly from Yanfly but several others from other authors as well.
Well, that's inside plugins code. You can use notepad++ and use find in files and search in all of your files inside a folder.
Well, that's inside plugins code. You can use notepad++ and use find in files and search in all of your files inside a folder.
Still have a few more to go through, I've found instances of loadBitmap in 3 different plugins, haven't found the other 2 in any plugins.
Another thing I'm thinking of, the order of plugin execution, who is loaded and executed first, try to execute mine first in plugins order or something. And post a screenshot of your problem.
Another thing I'm thinking of, the order of plugin execution, who is loaded and executed first, try to execute mine first in plugins order or something. And post a screenshot of your problem.

This is with your plugin first in the list. The numbers appearing right on top of the sprites is also a problem, but I think that can be easily corrected.
Capture.PNG



Edit: After going through my plugins, I see this is caused by Yanfly's animated SV battler plugin. I believe there's some kind of mirroring that goes on within the plugin to make the enemy battlers appear correctly onscreen and this is affecting the number display for your plugin. Not sure if this is something you can fix on your end.
This is with your plugin first in the list. The numbers appearing right on top of the sprites is also a problem, but I think that can be easily corrected.
View attachment 289190


Edit: After going through my plugins, I see this is caused by Yanfly's animated SV battler plugin. I believe there's some kind of mirroring that goes on within the plugin to make the enemy battlers appear correctly onscreen and this is affecting the number display for your plugin. Not sure if this is something you can fix on your end.
Interesting, I think I can fix it, but is that plugin for free so I can test my solution?
Interesting, I think I can fix it, but is that plugin for free so I can test my solution?
Looks like it's part of the free starter bundle Yanfly offers:

Did anyone ever figure out a solution to the timing of the displaying of HP?
#Edit: After a bit of a further test, it looks like changing that one number affects when the battle screen displays the HP reduction in the battle (before it is when the attack takes place, as it should be, but after it is when the next turn starts), which is kind of weird! I'll keep having a try and see what happens.

I'm not sold on having their hp displayed but if I do go that route I'd like them to be displaying the right amount to begin with if possible.

I use states to add MHP, atk etc... to scale enemies to party size/dungeon lvl etc..for reuse throughout the game via events on the troops page, which works slick as a whistle as far as I can tell.

The HP display does track correctly with dmg dished out but its always the original MHP initially displayed, not the updated value the eventing adds.

help or a point in a direction to research in would be awesome.
Did anyone ever figure out a solution to the timing of the displaying of HP?


I'm not sold on having their hp displayed but if I do go that route I'd like them to be displaying the right amount to begin with if possible.

I use states to add MHP, atk etc... to scale enemies to party size/dungeon lvl etc..for reuse throughout the game via events on the troops page, which works slick as a whistle as far as I can tell.

The HP display does track correctly with dmg dished out but its always the original MHP initially displayed, not the updated value the eventing adds.

help or a point in a direction to research in would be awesome.

I did not update this because I moved to other engine to build my stuff, anyway, I find this attractive to fix so I will investigate during next week and see. I will investigate previous issues and this, but I will need some replicate example maybe.

Original thread: https://forums.rpgmakerweb.com/threads/show-enemy-hp-updated.82985/