You'd need to create a hidden tooltip, set it to (invisibly, because it's hidden) display the unit, and scan it to find the owner's name. You could, in theory, do this from inside LuaTexts, but I would not recommend it.
Was afraid of that. sounds like more trouble than it is worth. The tooltip display will work for me. My experience with hidden tooltips is they can start to mess up other tooltip mods/addons even if you are careful so nope.
So I have a question I pretty much am sure I know the answer to but want to ask anyway.
Is there any simple way to obtain a player pet's owner name independent of them being in a group?
I know you can obtain that in a tooltip but can it be done via luatexts?
So let's say we have a hunter named Charlie and he has a pet named Dogg
If you click on Dogg and mouseover to view the tooltip, you can have it read "Dogg Chalie's pet". Now what I am wondering is if there is a way to have the unit frame name text read "Dogg (Charlie's Pet)" outside of a raid or party group instead of just "Dogg"?
Of course this is not really important since you can just mouseover and get the information from the tooltip anyway. Just curious if this is possible
Here is a little script to show your lfr/lfd queue. It only works in lfd and lfr, not pvp or premades as that takes more code and I had no use/desire/am too lazy to check those.
It requires adding the following two events
LFG_QUEUE_STATUS_UPDATE
LFG_UPDATE
It will use so really bad math to change the number in queue from red to yellow to green depending on who is in the queue. It also displays r:, or d: depending on dungeon orraid. Lastly it will tell you your estimated time and time in queue
so something like this will output where t is time in queue and w is average wait time. It defaults to 0 if the queue average wait time is not showing.
r: 3/25 w: 1 min 30 sec | t: 30 min
if (not UnitAffectingCombat('player')) then
for i = 1, 4 do
local hasData, _, tankNeeds, healerNeeds, dpsNeeds, totalTanks, totalHealers, totalDPS, _, _, _, _, _, _, _, myWait, queuedTime = GetLFGQueueStats(i);
if (hasData) then
local timePassed = SecondsToTime(myWait,true);
if myWait <= 60 then timePassed = 0 end
local timeInQueue = SecondsToTime(GetTime() - queuedTime);
local numMissing = (tankNeeds + healerNeeds + dpsNeeds);
local numTotal = (totalTanks + totalHealers + totalDPS);
local numNeeded = (numTotal - numMissing);
if (timePassed == nil) then timePassed = 0 end
if (numNeeded >= (numTotal - totalTanks)) then
colorNum = "|cff00ff00" -- green
elseif (math.random(numNeeded,numTotal) < (numTotal - totalTanks)) and (numNeeded > (totalTanks + totalHealers)) then
colorNum = "|cffffd200" -- yellow
else
colorNum = "|cffdd3a00" -- red
end
if numTotal > 5 then lfType = "r: " elseif numTotal == 5 then lfType = "d: " end
return (lfType .. colorNum .. numNeeded .. "/" .. numTotal .. "|r | t: " .. timeInQueue .. " | w: " .. timePassed);
end
end
end
It's not elegant but it works without fail for me and keeps me from having to check back on the minimap. I also have it to not fire in combat just to be on the safe side.
1x Skinner\SkinMe\DBM-6.2.13 alpha.14606.lua:15: Wrong object type for function
Skinner\SkinMe\DBM-6.2.13 alpha.14606.lua:15: in function <Skinner\SkinMe\DBM.lua:7>
(tail call): ?
[C]: in function `xpcall'
Skinner\UtilFuncs.lua:165: in function <Skinner\UtilFuncs.lua:159>
Skinner\UtilFuncs.lua:280: in function `checkAndRunAddOn'
Skinner\AddonFrames.lua:371: in function `?'
...faceArchy\Libs\AceTimer-3.0\AceTimer-3.0-17.lua:53: in function <...faceArchy\Libs\AceTimer-3.0\AceTimer-3.0.lua:48>
Locals:
nil
Garrisons have different map IDs depending on faction and level. Instead of checking the map ID, you can just use the C_Garrison.IsOnGarrisonMap() function:
Outstanding! That would sure help with horde "stick huts" and such. I made this quick and never really went back to see if there was a better option.
I assume however that this will encompass the entire garrison zone as well as shipyard. That would make it work well for level 1-3 garrisons and horde garrisons (forts?). Or perhaps shipyards are the mythical level 4 garrison that is 1160 I think?
ok putting this back up because I found I had to use something a little different to prevent it form tainting other texts (done by using IsInRaid())
so here is my simplified raid name lua text for displaying the raid group number, name (truncated to 10 characters) and either A,B,D, or O depending if they are afk, dnd, dead, or offline
So the output looks like this: Extralongplayer in group 1 is afk
(1) Extralongp A
Here is the code:
if IsInRaid() then
local raidNum = select(3,GetRaidRosterInfo(UnitInRaid(unit)))
local raidName = string.sub(Name(unit),1,10)
if AFK(unit) then
return '(%d) %s A',raidNum,raidName
elseif DND(unit) then
return '(%d) %s B',raidNum,raidName
elseif Offline(unit) then
return '(%d) %s O',raidNum,raidName
elseif Dead(unit) then
return '(%d) %s D',raidNum,raidName
else
return '(%d) %s',raidNum,raidName
end
end
I also made on for the main tank frames since I 1) do not care if the tank is afk/offline/ etc since it shows in the main raid frames and 2) when a tank enters a vehicle like on Socrethar, it no longer shows a group number and would error out
if IsInRaid() then
if UnitInRaid(unit) then
local raidNum = select(3,GetRaidRosterInfo(UnitInRaid(unit)))
return '(%d) %s',raidNum,Name(unit)
else
return Name(unit)
end
end
Some other text I made are:
Checking the zone a member is in while in a raid ( put on the target/boss frame). Simple gsub to remove the issue with someone in a leader's garrison while you are not viewing it.
if IsInRaid() then
if UnitInRaid(unit) then
local raidZone = select(7, GetRaidRosterInfo(UnitInRaid(unit)))
return '%s',gsub(raidZone,"%$n's","")
end
end
Text to check instance difficulty without checking the minimap (if you have that hidden)
Add the event UPDATE_INSTANCE_INFO
to trigger it. Added check for mapID of your garrison so it doesn't trigger when in your garrison.
local _, _, difficulty, difficultyName, _, _, _, mapID = GetInstanceInfo();
if difficulty > 0 and mapID ~= 1159 then
return difficultyName
end
This one will show your time in queue and wait time for LFD or LFR (Does not work for pvp or pet battles as those are a different API calls)
What it prints out is "r" for raid and "d" for dungeon, players in queue/total queue size, time in queue, and average wait time.
KI exclude seconds for the wait time as anything < 1 minute is not going to matter and it just takes up space.
Example
r: 4/25 | t: 2 min 45 sec | w: 35 min
It will also color the number in queue, red if less than the total number of tanks and healers queued, yellow if between that and total number - tanks, or green if equal or greater than total number minus tanks. so for a 25 man raid, there are 2 tanks and 5 healers so < 7 = red, 7-22 = yellow and >= 23 = green
Anyway here is the tag:
NOTE: You need to specify a time interval and enable for frequent updates when making the tag as events will not properly trigger this so every second if you want (I use every 5 second)
edit: added combat condition because don't want this firing in combat less it errors out or taints or just distracts you ;)
function()
if (not UnitAffectingCombat('player')) then
for i = 1, 4 do
local hasData, _, tankNeeds, healerNeeds, dpsNeeds, totalTanks, totalHealers, totalDPS, instanceType , _, _, _, _, _, _, myWait, queuedTime = GetLFGQueueStats(i);
if (hasData) then
local timePassed = SecondsToTime(myWait,true);
if myWait <= 0 then timePassed = 0 end
local timeInQueue = SecondsToTime(GetTime() - queuedTime);
local numMissing = (tankNeeds + healerNeeds + dpsNeeds);
local numTotal = (totalTanks + totalHealers + totalDPS);
local numNeeded = (numTotal - numMissing);
if (numNeeded >= (numTotal - totalTanks)) then
colorNum = "|cff00ff00" -- green
elseif (math.random(numNeeded,numTotal) < (numTotal - totalTanks)) and (numNeeded > (totalTanks + totalHealers)) then
colorNum = "|cffffd200" -- yellow
else
colorNum = "|cffdd3a00" -- red
end
if instanceType == 1 then lfType = "r: " elseif instanceType == 6 then lfType = "d: " end
return (lfType .. colorNum .. numNeeded .. "/" .. numTotal .. "|r | t: " .. timeInQueue .. " | w: " .. timePassed);
else
end
end
else
end
end
If anyone wants a quick and dirty tag for raid frames to show a phased icon for example to monitor when people phase into the void zone on archimonde.
Currently there is no indicator enabled for raid frame phasing so I hacked together a tag from the phasing indicator function used in groups in suf to show the icon if a unit is phased. Tested it on a phased location in MoP and it works great
function(unit, unitOwner)
if UnitIsConnected(unit) and not UnitInPhase(unit) then
return ("\124TInterface\\TargetingFrame\\UI-PhasingIcon:0\124t")
else
end
end
Is it possible to disable the proc/spell/crit flash on a per bar basis?
I don't need it to flash when certain spells or abilities trigger (not even sure the name for this ability) when their crit strike/proc/spell flash goes off?
Below is an example of what I mean
I would love to disable this ability per bar basis without the need to make a macro for every spell to try and game the ui to not do this.
Expanding on this modification to display alt power information, I had to make some hacks to account for boolean values in the "altPowerType" tag as leaving it how it was originally posted throws a lua error trying to concatenate a boolean value in a string.
Edit: Found an undocumented 6.2 change that had an additional argument thrown in so the previous call was one off. Fixed it
I have also made the "curmaxAltPower" display a percent in the output for funsies.
Here is the modified altPowerType
function(unit, unitOwner)
local altPowerName = select(11, UnitAlternatePowerInfo(unit)) or UNKNOWN
return string.len(altPowerName) > 10 and ShadowUF.Tags.abbrevCache[altPowerName] or altPowerName
end
Here is the updated curmaxAltPower
function(unit, unitOwner)
local maxAltPower = UnitPowerMax(unit,SPELL_POWER_ALTERNATE_POWER)
local altPower = UnitPower(unit,SPELL_POWER_ALTERNATE_POWER)
if( UnitIsDeadOrGhost(unit) ) then
return string.format("0/%s", ShadowUF:FormatLargeNumber(maxAltPower))
elseif( maxAltPower <= 0 ) then
return nil
end
return string.format("%s/%s (%d%%)", ShadowUF:FormatLargeNumber(altPower), ShadowUF:FormatLargeNumber(maxAltPower), math.floor(altPower / maxAltPower * 100 + 0.5))
end
Reporting a buggy behavior. In short, tags registered in text area anchored to Alternate Power bar won't be shown/updated properly.
I was trying to configure SUF text/tags so that current Alternate Power can be shown as number, because checking these numbers not just visually (as bars) but also numerically has some importance in encounters these days (ex: Heroic Amber-shaper in HoF and such). First I made some tags to get and return information of AltPower as follows:
curmaxAltPower
altPowerType
For events which should trigger update of these tags, 'UNIT_POWER', 'UNIT_MAXPOWER' and 'UNIT_DISPLEYPOWER' are registered.
I went Whack-a-Gnoll at the Darkmoon Faire (which gives number of hit gnolls as Alternate Power) and put these tags in default text area anchored to Health Bar for testing. These tags worked properly and return stuff that I need. Name of the bar and numbers were shown and updated like 'Whack-a-Gnoll 1/30' as I played. If I changed game to other games with Alternate Power or reloaded UI, tags reamain working.
Then I made 2 text areas ('Left text'/'Right text') anchored to Alternate Power bars from Text Management tab in General section of configuration. And then registered tags I made to these text areas.
What then happened was, if I registered tags with Whacking started (Alternate Power bar shown), tags start working and correctly updating. However, if I reloaded UI or changed area, tags no longer shown when I started Whack thereafter (bar was shown and worked properly but texts/numbers not shown).
After reloading, if I re-registered tags (uncheck&recheck tags in Text/Tags tab in Unit Configuration) without starting Whack, and then started Whack, again tags weren't shown (bar was again OK. Regardless of tags properly shown/updated or not, Alternate Power bar itself was always working properly).
So what I concluded is, there is some flaw in initialization/loading process of Alternate Power bar or in text-showing functions of SUF bars, which causes text anchored to Alternate Power bar not to be shown after reloading.
If this is actually a bug, I hope it's fixed. Currently I'm just leaving these tags stayed in text area anchored to Health bar and practically it's OK, but for the sake of consistency I want them to be on AltPower bars. If there is other workaround for this issue, please enlighten me. And Thank you for creating and updating this lovely addon!
Quick question... Exp/rep bar is showing text when hovered over at the far left of the bottom outside frame. Is there any control over the positioning of this?
Just want to add the range checking seems awesome now. thanks for getting it working so well.
It is a display issue, but it's not a bug; it's an issue with how you have your display configured:
That does not fix the issue. It splits the pet from the owner which is then extremely counter productive in monitoring damage throughput.
Here is what happens and if you can imagine 15-20+ damage dealers with a portion as pets, you can understand why this would be an issue. I think it should be able to capture and show pet damage in the owner bar details like skada can and like recount used to do.
0
Was afraid of that. sounds like more trouble than it is worth. The tooltip display will work for me. My experience with hidden tooltips is they can start to mess up other tooltip mods/addons even if you are careful so nope.
0
Is there any simple way to obtain a player pet's owner name independent of them being in a group?
I know you can obtain that in a tooltip but can it be done via luatexts?
So let's say we have a hunter named Charlie and he has a pet named Dogg
If you click on Dogg and mouseover to view the tooltip, you can have it read "Dogg Chalie's pet". Now what I am wondering is if there is a way to have the unit frame name text read "Dogg (Charlie's Pet)" outside of a raid or party group instead of just "Dogg"?
Of course this is not really important since you can just mouseover and get the information from the tooltip anyway. Just curious if this is possible
0
It requires adding the following two events
LFG_QUEUE_STATUS_UPDATE
LFG_UPDATE
It will use so really bad math to change the number in queue from red to yellow to green depending on who is in the queue. It also displays r:, or d: depending on dungeon orraid. Lastly it will tell you your estimated time and time in queue
so something like this will output where t is time in queue and w is average wait time. It defaults to 0 if the queue average wait time is not showing.
It's not elegant but it works without fail for me and keeps me from having to check back on the minimap. I also have it to not fire in combat just to be on the safe side.
0
0
Outstanding! That would sure help with horde "stick huts" and such. I made this quick and never really went back to see if there was a better option.
I assume however that this will encompass the entire garrison zone as well as shipyard. That would make it work well for level 1-3 garrisons and horde garrisons (forts?). Or perhaps shipyards are the mythical level 4 garrison that is 1160 I think?
0
so here is my simplified raid name lua text for displaying the raid group number, name (truncated to 10 characters) and either A,B,D, or O depending if they are afk, dnd, dead, or offline
So the output looks like this: Extralongplayer in group 1 is afk
Here is the code:
I also made on for the main tank frames since I 1) do not care if the tank is afk/offline/ etc since it shows in the main raid frames and 2) when a tank enters a vehicle like on Socrethar, it no longer shows a group number and would error out
Some other text I made are:
Checking the zone a member is in while in a raid ( put on the target/boss frame). Simple gsub to remove the issue with someone in a leader's garrison while you are not viewing it.
Text to check instance difficulty without checking the minimap (if you have that hidden)
Add the event UPDATE_INSTANCE_INFO
to trigger it. Added check for mapID of your garrison so it doesn't trigger when in your garrison.
0
This one will show your time in queue and wait time for LFD or LFR (Does not work for pvp or pet battles as those are a different API calls)
What it prints out is "r" for raid and "d" for dungeon, players in queue/total queue size, time in queue, and average wait time.
KI exclude seconds for the wait time as anything < 1 minute is not going to matter and it just takes up space.
Example
It will also color the number in queue, red if less than the total number of tanks and healers queued, yellow if between that and total number - tanks, or green if equal or greater than total number minus tanks. so for a 25 man raid, there are 2 tanks and 5 healers so < 7 = red, 7-22 = yellow and >= 23 = green
Anyway here is the tag:
NOTE: You need to specify a time interval and enable for frequent updates when making the tag as events will not properly trigger this so every second if you want (I use every 5 second)
edit: added combat condition because don't want this firing in combat less it errors out or taints or just distracts you ;)
0
Currently there is no indicator enabled for raid frame phasing so I hacked together a tag from the phasing indicator function used in groups in suf to show the icon if a unit is phased. Tested it on a phased location in MoP and it works great
0
So if say you have a 3d portrait selected but it can't be drawn, it then defaults to a class icon?
Currently it falls back to a floating question mark if it can't draw the 3d portrait.
0
Just remove the following in ShadowedUnitFrames.lua to fix it
0
I don't need it to flash when certain spells or abilities trigger (not even sure the name for this ability) when their crit strike/proc/spell flash goes off?
Below is an example of what I mean
I would love to disable this ability per bar basis without the need to make a macro for every spell to try and game the ui to not do this.
0
Edit: Found an undocumented 6.2 change that had an additional argument thrown in so the previous call was one off. Fixed it
I have also made the "curmaxAltPower" display a percent in the output for funsies.
Here is the modified altPowerType
Here is the updated curmaxAltPower
0
0
Just want to add the range checking seems awesome now. thanks for getting it working so well.
0
That does not fix the issue. It splits the pet from the owner which is then extremely counter productive in monitoring damage throughput.
Here is what happens and if you can imagine 15-20+ damage dealers with a portion as pets, you can understand why this would be an issue. I think it should be able to capture and show pet damage in the owner bar details like skada can and like recount used to do.