So I am liking PitBull very much so far. Still seem to be some major bugs (see other post) but I have high hopes!
Anyway here is a neat health text (script?tags? - what do you call them?) that I came up with.
I'm using this for many target frames (target, target's target, focus, focus target, etc.)
The last thing I ever want to have to parse in the heat of battle is something that looks like:
1911/2450 | 78%
That just clutters the bar, and makes the relevant info take longer to read.
So I wanted something that was smart and changed the visible info depending on the situation.
I find this works well to keep the display uncluttered, and displaying only the very esential data depending on the situation, and depending if a friend or foe is targeted.
For friends, out of combat, I like to see what everyone's max hp are. But once they start to lose hp, the max is usless. Now I need to know how much they are missing for healing purposes - arguably, some classes might rather current hp. But whatever.
For enemies, current hp is the only thing that matters.
If a friend is targeted, it checks the percentage of health.
If it is >94% it simply displays the max hp.
Once hp drops to 94% it switches to a missing health display.
If hp drops below 33% then the missing hp are displayed in red.
If exact hp are not known, then a simple percentage is listed.
For enemy units it is similar, except that current hp are always displayed if known, otherwise a percentage.
If any target is dead, it shows the dead info.
I have a similar display for raid, and party frames. The difference is that they display nothing if hp are >94%. Even less clutter, for smaller frames and also makes hurt units stand out better. If you see numbers, someone is hurt. Red numbers, very hurt.
As pary/raid members are usualy friendly, I removed the enemy options.
This solution seems to be pretty nice with one exception (which will hopefully vanish after your arguments). If you take the situation when someone is hurt, you are displaying only the number of HP which is missing. However, it might be (according to me) very stressful for a healer since if the prot tank misses 5k HP it is guite a huge differenced from a mage who is missing 5k HP.
On the other hand, in high damage fights it does not have to be necessarily a problem to have the tank at 30 % of his HP since he might have 4-6 on him left; 30% on cloth wearer is sometimes critical at that amount.
What do you think? I also would like to have as less clutter as possible but I have to know everything I need to know as well :-(
Truly, if there was a way to chart the RATE of hp loss and convert that into "seconds left to live" that would be a better indicator of when to make the text red.
Don't think there is a way to do that with the functions given though. Might be able to put something together if there were math functions, but I didn't see any in the DogTag spec.
As far as hp loss compared to class...
I use class colored health bars, and have kind of trained myself to know that light blue health bars drop faster than tan ones.
I've also made the background color to the health bars to be black, for maximum contrast. So I can easily see low bars.
But you raise an interesting point.
I think it could be modified a couple of different ways:
To be red if: less than 34% AND less than x hp (not sure what a good value is here, 3K maybe?)
... PercentHP:IsLess(34)?CurHP:IsLess(3000)?SmartMissingHP:Red!SmartMissingHP!SmartMissingHP ...
To have separate % thresholds for each class
Might be able to use something like:
Class:IsEqual(Mage)?PercentHP:IsLess(41)?SmartMissingHP:Red!SmartMissingHP! ... etc.
Though that could end up to be a very long argument. Might have to worry about buffer size.
To be honest, this could be a better usage of the red text anyway, as it inherently conveys more useful info. Hmmm, I'm gonna do some testing.
Ok, it seems redundant to do <34% AND <3k hp
Rather, just replacing PercentHP:IsLess(34)? with CurHP:IsLess(3000)? seems to do the trick well enough.
I also found that giving each class a different % threshold works as well (including different druid forms) For those that are interested here is the modified script for that:
(Displays maxHP if >94%, else missingHP that turns red at different thresholds. Enemy targets always display curHP or percentage)
These are set to be red as follows:
Warrior, Paladin at 20%
Shaman at 30%
Mage, Priest at 40%
Druid (Bear) at 20%
Druid (any other) at 35%
Everyone else (Rogue, Hunter, Warlock) at 35%
But change to whatever you want, obviously.
Not real sure how much utility this has over using CurHP as a key for red, but it IS level independent.
Now, I didn't have time to fully test these, so use at your own risk.
I'm thinking there is still another (low clutter) way to do this.
Instead of just changing the missingHP to red at varying amounts, you could display the remaing HP in red, at a predetermined point, and collapse the missing HP using VeryShort.
So you still see missingHP but it is unlikely to be confused with missingHP because of the color and reduced in visibility of missingHP.
Just tried it... hmmm...
SmartMissingHP:VeryShort - doesn't format to VeryShort
MissingHP:VeryShort - does, but without the minus sign, and could stand to be spread out more
MissingHP:VeryShort:Negate - gives an error.
If I can figure out how to insert text strings in a conditionals, this might yet work. I'll have to research later though.
Ok, I worked with the most recent implementations a bit.
From a personal standpoint, I'm not sure if I truly like it, but I can see how others might.
Though, I have made some adjustments for the raid frames.
I prefer missing health to not appear until <90% health.
I'm also considering making the collapsed missing health in gray, to fade it a bit.
And I have found that on the status display (Dead, Ghost, etc.) that the time in parenthesis overfills the frame.
Does anyone know how to display status without the time?
In the meantime, I am using Trunc(5)
Meh, I keep finding messiness/redundancy in the code. It probably had something to do with making the originals at 5am. Here are some updated versions.
They do the same thing (with a darker grey) but the code is cleaner.