Well, I'm not very familiar with Lua and I think those things I want to have implemented in my unit frames won't be realizable without some Lua lines.
I hope you can help me to meet my wishes :P
So here we go:
- show buffs/debuffs of target only on mouseover
- show health text of both player and target only if player is in combat, but also show them on mouseover if not in combat
- the health text of target shall display current total number and max total number, but if target is a boss then display it percental
- if target's level is under 80, then show level text colored by difficulty
- show health text of a group member if the group member is in combat, but also show on mouseover if not in combat
- the last one is a tough one I think. In Discord times I had a little square on the border of target, tot and group frames which was colored by class of the unit. Here's a screen:
And because this makes no sense for NPCs they should only show if the unit is not an NPC.
Would be great if someone knew how I get something like this working with PitBull4.
All of your text-related wishlist items are already possible in PitBull4 using DogTag and/or LuaTexts. As I haven't used PitBull since version 2, I can't help you with with the syntax.
The mouseover auras would require modifying PitBull4 code.
The class-colored square would be easy for someone familiar with the PitBull4 API to add with a plugin/module. If you want to give it a stab, look at some of the existing modules that do simple things.
Hello, I've decided to try and switch my Dogtags to Lua text. Due to a memory leak within the addon for me. but I can't understand it due to my lack of Lua knowledge. Though I have the Dogtags codes I had used still. If anyone could convert them to Lua i would appriciate ot, or point out somewhere where I can I understand it and help make similar.
Not sure if this is the right place to put this in if not please say so.
Thank you.
Here are the tags
Name
[Outline] [DifficultyColor Level] [ClassColor Name]
Leader/PvP
[Outline][(if IsPlayer then
[(if PvP then
Red 'P'
end)] [if IsLeader then
Yellow 'L'
end] [if IsMasterLooter then
Fuchsia 'M'
end]
end)]
Health
[Status or [(if InCombat then
Red
end) (if not InCombat then
White
end) HP] ' ' [Outline HPColor PercentHP:Percent]]
Power
[if IsPlayer then
[if HasMP then
[Outline (if IsMana then
Cyan
elseif IsRage then
Red
elseif IsEnergy then
Yellow
elseif IsRunicPower then
Cyan
end) PercentMP:Percent] ' ' [(if InCombat then
Red
end) (if not InCombat then
White
end) MP]
end]
else
Outline [DifficultyColor Level] ' ' [ClassColor Name]
end]
- show health text of both player and target only if player is in combat, but also show them on mouseover if not in combat
- the health text of target shall display current total number and max total number, but if target is a boss then display it percental
- if target's level is under 80, then show level text colored by difficulty
- show health text of a group member if the group member is in combat, but also show on mouseover if not in combat
Mouseover is already an option for indicators/text.
Make a new event in the LuaText module section for PLAYER_REGEN_ENABLED and PLAYER_REGEN_DISABLED. These are your combat flag events. Ripping apart my threat tag would reveal this.
if UnitAffectingCombat("player")==1 then
return "%s %s",UnitHealth("player"),UnitHealth("target") --see note
end
May also be Health(), I'm a bit foggy on the LuaText shortcuts the team did. For boss health, you would check UnitClassification for boss, then make separate tags for them. For the level 80 one, there is probably already a coloration option for that somewhere, but worse case just compare their level against yours, use |cff%02x%02x%02x%s|r in the return, and make a formula based on what colors you want. Lets say you want it to go from yellow to green, you would use %02xFF00 and the variable for the level discrepancy would be used to scale the first color (red). It's a bit tricky and I have some code I used with hit points to help you out with this. For the last request, see the first.
I'm kind of curious about one thing which is, is there a way to have pitbull hide the player frames until you mouse over them. I'm looking for a way to get more screen realestate during encounters so I can see things a bit better.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Well, I'm not very familiar with Lua and I think those things I want to have implemented in my unit frames won't be realizable without some Lua lines.
I hope you can help me to meet my wishes :P
So here we go:
- show buffs/debuffs of target only on mouseover
- show health text of both player and target only if player is in combat, but also show them on mouseover if not in combat
- the health text of target shall display current total number and max total number, but if target is a boss then display it percental
- if target's level is under 80, then show level text colored by difficulty
- show health text of a group member if the group member is in combat, but also show on mouseover if not in combat
- the last one is a tough one I think. In Discord times I had a little square on the border of target, tot and group frames which was colored by class of the unit. Here's a screen:
And because this makes no sense for NPCs they should only show if the unit is not an NPC.
Would be great if someone knew how I get something like this working with PitBull4.
Merry Christmas people! :)
The mouseover auras would require modifying PitBull4 code.
The class-colored square would be easy for someone familiar with the PitBull4 API to add with a plugin/module. If you want to give it a stab, look at some of the existing modules that do simple things.
Not sure if this is the right place to put this in if not please say so.
Thank you.
Here are the tags
Make a new event in the LuaText module section for PLAYER_REGEN_ENABLED and PLAYER_REGEN_DISABLED. These are your combat flag events. Ripping apart my threat tag would reveal this.
May also be Health(), I'm a bit foggy on the LuaText shortcuts the team did. For boss health, you would check UnitClassification for boss, then make separate tags for them. For the level 80 one, there is probably already a coloration option for that somewhere, but worse case just compare their level against yours, use |cff%02x%02x%02x%s|r in the return, and make a formula based on what colors you want. Lets say you want it to go from yellow to green, you would use %02xFF00 and the variable for the level discrepancy would be used to scale the first color (red). It's a bit tricky and I have some code I used with hit points to help you out with this. For the last request, see the first.