Here's one of my sequences for the display of names in my tooltips.
It doesn't use the IsPlayerOrPet tag and therefore properly works with UnitFrame-Addons like Grid.
(When your mouse is over a player @ Grid IsPlayerOrPet sometimes returns 'false', if the player is out of range.)
Player, Friendly: Class Color
Player, Hostile: Hostile Color (PvP), Class Color (noPvP)
What I would add is a conditional to make health color red if I have the necessary rage. I'd take into account that execute costs 10-15 rage (depending on talents) and most other skills cost 10 to 20 rage (10-15 for heroic strike; 20 for cleave). I'd say if you ever have more than 30 rage (heroic strike + execute) it's red; if it's 15-30 it's yellow; if it's 0-15 it's white.
Does it matter what frame you use it on? When I tested it I had it on my player frame and it worked fine. Maybe the bug is with the target frame and that set of tags?
Are you sure it works fine? I'm using it on my player frame too and I get this:
I just tried it again on my Druid (used Hunter last time) and it's showing up red like yours is. No clue why though. I'll try my hunter again but still can't figure out why it worked that first time. Maybe changes to Pitbull/Dogtag since then?
It works with the excepiton of one aspect. I wanted current rage/energy to be displayed in PowerColor ( redish/yellow). Thats why I added PowerColor to the end but it doesnt seem to work. Basically, Tag is ignoring anything I put after Hide. If I dont hide MaxMP then color displays for the energy but not for rage. If i dont hide(0) then it displays rage color. I would like to aviod cluter of useless values and the colors are relevant in my Cowtip setup.
I wanted current rage/energy to be displayed in PowerColor ( redish/yellow). Thats why I added PowerColor to the end but it doesnt seem to work. Basically, Tag is ignoring anything I put after Hide. If I dont hide MaxMP then color displays for the energy but not for rage. If i dont hide(0) then it displays rage color. I would like to aviod cluter of useless values and the colors are relevant in my Cowtip setup.
Any ideas how to work around it?
I would just put [PowerColor] before the tag rather than applying it at the end - that should work around the problem.
You could also add some brackets around the IsRage check so that the PowerColor would be applied regardless. Right now it is parsed as "if not rage, then apply power color."
I'm attempting to make a dogtag statement to give me a rough idea of how effective it will be for me to drop mana tide. Mana tide, for those of you who dont know, gives about 25% max mana back to everyone in my group.
Thus, it will be most effective when everyone in the group is below 75% mana.
I want it to give me a number in terms of 0-100 (effectiveness), which I will then plug in to some sort of bar or whatever for visual feedback.
The way I do this is to subtract my percentMP by 75 (so it will now range from 25 to -75), divide by 25 (so it will now range from 1 to -3), and then remove the negative numbers (made difficult because dogtags doesn't give you a floor/ceiling function).
This gives me a number between 1-0, 1 when I have max mana, 0 when I'm at 75%.
I then repeat this for everyone in my group and sum it all (non-mana users return zero)
Then I divide by the number of people in my group who use mana, which brings me back to a number from 1 to 0.
This is all easier said than done, of course. Really easy in concept, huge pain in the ass with dogtags.
This is the code as I have it thus far (with whitespace thrown in for readability):
The logical stuff would be a billion times easier (and cleaner) if there was an easy way to get 1 and 0 in there. [One] and [Zero] or something. Instead I have to resort to MaxMP#party1:Div([MaxMP#party1]) to return 1 and MaxMP#party1:Sub([MaxMP#party1]) to return 0. Unless I'm missing something fundamental - if so, good god please point it out to me.
But yeah, if I had to ask for some functional tags/modifiers, it would be [One], [Zero], :Min(arg), :Max(arg)
But sphere doesn't have nearly enough space in that particular buffer for it.
Couldn't you add all the players' mana together and then do the subtraction/division stuff on the result? It might not be small enough to fit Sphere's requirements, but it will get you one step closer.
I want to use the [NumTargeting] tag but I don't want it to include myself and I want it to hide when zero so that basically if only I am targetting something I won't see anything for [NumTargeting].
This is what I have right now, which of course always gives me a '1' if I am targetting something. I don't want to just hide all 1's though because if I do that I'll miss when a single member of my party is targetting something (I use this tag on partytargets as well as my own target).
Would I do something with IsUnit(unitID) to make this work how I want?
I will try this when I get home, but let me try to wrap my non-coding brain around it here at work to try and see what it is you are doing there...
IsUnit(target) - checking to see if the unit is my target, does this return a true or false or something?
The '?' means 'and'
NumTargeting is the number targeting
The ':' means 'or'
I guess Sub(1) is like subtract 1?
and another 'or'
And then another number targeting
and then theres the or hidezero
I admit I'm not really sure what is going on there :X