Incorporate stagger bar into health bar #218


  • Enhancment
Open
Assigned to parnic
  • _ForgeUser19196147 created this issue Jul 30, 2016

    The idea/suggestion is to enable functionality allowing Stagger to be displayed on top of the PlayerHealth frame, but using the player's current health as a starting point.  Say you're at 60% health and have an amount of damage equal to half of your remaining health Staggered, half of your remaining health bar would turn, for example's sake, red, to indicate this

    For instance, let's assume a scenario where I have 100k hp, and I'm currently sitting at 80k (80%) hp.  What I'm trying to achieve, is to have the amount of health below my current amount change colour based on the amount of staggered damage, so if 40k damage is in stagger, from the bottom of my bar (0%) up to 40% is green to indicate healthy, from 40% up to 80% (my current amount) is a different colour such as red to indicate this health is going to be staggered.  Thus I can see that as the bar turns green at 40%, that is where I will end up after staggered damage wears off, assuming no heals or other actions are made.

    In short, as my health bars decrease downwards as health is depleted, the stagger bar would extend downwards starting at my current HP, whatever % that may be.  If the entire HP bar goes red and I take no action or receive no heals, I will die.  Unfortunately the existing Stagger module cannot do this due to current limitations that do now allow bars to begin at arbitrary points based on values such as current HP.

    I emailed Chris about this and he suggested I open a ticket.  Here is his original reply to my email:

    "I like the idea, and this is certainly possible, just not without some reworking of how bars are positioned. Currently bar positions are determined by simple percentages coming from, depending on reverse/expand settings on the bar, the top/center/bottom of the bar. There's currently no simple utility available to have a bar start at an arbitrary position and end at an arbitrary position. Incoming heals cheat a bit by drawing the heal bar behind the actual health bar from the "bottom" of the bar up to the current health + incoming heal amount. The Stagger proposal wouldn't be able to do such a thing.

    As I said, it's possible, just not super simple. Most of the difficulty is in making sure it works with all other available settings on the bar (inverse, reverse, expand grow directions). If I were working on this today, I'd probably expand IceBarElement:SetBarCoord to support specifying the start position in addition to the end position (currently called "scale"), duplicate all the PlayerHealth.healFrame code to make a staggerFrame (ensuring that the stagger bar draws on top instead of behind the main bar), and connect the dots from there. Other things to consider are ensuring the Stagger stuff doesn't run when it doesn't have to (when you're not a Monk in the right spec), enabling/disabling dynamically based on spec changes, having a toggle option to disable entirely, and ensuring that the stagger value is updated at the appropriate time (there's no Stagger Change event from the game client, so you'd likely need to either check the value every bar update or hook something like the Combat Log Unfiltered event similar to how the dedicated Stagger module works)."

    It is worth mentioning that if you are able to get a functionality like this working, it's not just limited to Stagger.  Another practical example might be Guardian Druid, where you could extend a section of health bar above the current health value (again of a different colour or transparency) to indicate how much health Frenzied Regen would recover if used at that moment in time?

  • _ForgeUser19196147 added the tags New Enhancment Jul 30, 2016
  • Parnic removed a tag New Jul 5, 2023

To post a comment, please login or register a new account.