Sectioned Gauges - Variable Section Amount

Hello Everyone,

Yanfly made a great plugin: sectioned gauges. It allows you to section up the health bar so you can read it easier. You can choose the amount of sections a gauge is cut into or input text.

However, I wanted the sections to be dependent on the maximum amount of health that player has. (total health/ desired size of section)

For example, each section could be 10 health. If a character has 50 health then there would be 5 sections. 55 health would give 5 and a half sections.

This is very much how LoL or Overwatch does their HP gauges. More sections denotes a larger health pool.

How could this be achieved? An edit to the current Yanfly plugin?

Changing the text within the plugin's parameters to some javascript?

I am not familiar with what the code would look like. I imagine something like: this.player_health/10 😅

Thanks in advance!
I have been making progress with this. I feel I am getting closer but not quite there yet.

My closest attempt I feel is calling this variable but it is not correct.

Here is a picture of Yanfly's Sectioned Gauges Plugin and my attempt to call the current actors total health.


Sections.jpeg
Hey! I wrote an extension plugin for YEP_SectionedGauges that does exactly this. You can find it here.
That did the trick! Exactly what I was looking for. Hat's off to you sir.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/sectioned-gauges-variable-section-amount.81619/