EnemyStats plugin

EDIT:

the updated link for the plugin is here: https://github.com/kentaromiura/RPGMV-Plugins/blob/master/dist/js/plugins/kentaromiura_Battle_EnemyStats.js

 

Original Post:

While testing MV I notice there was nowhere the information of how many HP enemies haves left, I decided adding it, would be perfect to understand how MV works;

Bear in mind this is my first plugin, and I'm not completely satisfy with this, there's a lot to be done... but it works 🙂 :

https://gist.github.com/kentaromiura/183d46f8f3355a158a5f

I have a few questions

1) does exist a way to set the z-index of the text so it always appear below the damage one?

2) I didn't check all the source code but I cannot find any event system, so I had to monkey patch a lot in order to make this works, does any event emitter exists?

3) I guess there are proper getters for getting _privates and if you want to suggest me other improvements I'm open to any suggestions.
Update, I've released the plugin here:

https://github.com/kentaromiura/RPGMV-Plugins/blob/master/dist/js/plugins/kentaromiura_Battle_EnemyStats.js

It shows the hp with an optional health bar and a little animation

[IMG]http://i.imgur.com/Tcunz4y.jpg[/IMG]
Your hp bar script is completely different from mine.
I used the drawGuage function because I don't have sprites and wanted them different colors
Your hp bar script is completely different from mine.

I used the drawGuage function because I don't have sprites and wanted them different colors
Different colours is a great idea, I might add it to my todo list 🙂

Btw I've to check your plugin as I'm not satisfy with the way I'm doing this, requestAnimationFrame is quite heavy on the cpu,

I see you've relying on the engine calling update, I might trying that as well
Updated again:

- implemented 3 customizable color threshold

- implemented customizable color for each threshold (2 colors each as it's a gradient)

- implemented Scan like functionality, the game will now remember which enemy you've already scanned (the action name is customizable)

- implemented Save and Load functionality, so that the previous thing will work across saves.

I think I'll keep the plugin as it is for a while now 🙂

[IMG]http://i.imgur.com/LIXNDAA.jpg[/IMG]

Original thread: https://forums.rpgmakerweb.com/threads/enemystats-plugin.48854/