Quantcast Nameplate hacking and unit IDs - Page 3 - WoWInterface
 
Thread Tools Display Modes
05-23-16, 11:31 AM   #41
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
That is not new. Was the same problem for boss1-4 aswell.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
05-23-16, 11:45 AM   #42
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by zork View Post
Resike that has to work. Otherwise you found a bug.

*edit* Tried it. Works both ways.
It's broken as hell, sometimes it's working sometimes it's not.
If you change the "Large NamePlates" or "Show All Nameplates" settings its 100% gonna be broken.

Seems like if you change thoose settings then the game rearranges the unitIDs, and NamePlate22 might get "nameplate1" unit attribute.

Last edited by Resike : 05-23-16 at 12:15 PM.
 
05-23-16, 11:56 AM   #43
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Originally Posted by Resike View Post
It's broken as hell, sometimes it's wokring sometimes it's not.
If you change the "Large NamePlates" or "Show All Nameplates" settings its 100% gonna be broken.
Its not broken, its intented and has to be dynamic!

To always get the correct unitID for the specific plate you need to check its variable .namePlateUnitToken which reflects the unitID

You might have to update certain things manually whenever a nameplate is shown via "NAME_PLATE_UNIT_ADDED"

Edit: Raidframes work the exact same way, if you rearrange your raid group & switch your main tank from group 3 into group 1 the unitID for this tank also changes...
__________________

Last edited by syncrow : 05-23-16 at 12:04 PM.
 
05-23-16, 11:59 AM   #44
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by syncrow View Post
Its not broken, its intented and has to be dynamic!

To always get the correct unitID for the specific plate you need to check its variable .namePlateUnitToken which reflects the unitID

You might have to update certained things manually whenever a nameplate is shown via "NAME_PLATE_UNIT_ADDED"
It doesn't matter:

Lua Code:
  1. NamePlate#.namePlateUnitToken
  2. NamePlate#UnitFrame.unit
  3. NamePlate#UnitFrame:GetAttribute("unit")

returns the same value all the time.

Lua Code:
  1. NamePlate#UnitFrame.BuffFrame.unit
  2. NamePlate#UnitFrame.DebuffFrame.unit

Sometimes returns the proper unit like: "target", "focus", but it's mostly the same as above.

Last edited by Resike : 05-23-16 at 12:09 PM.
 
05-23-16, 12:10 PM   #45
Predicate
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 18
That behavior is exactly correct. NamePlate1 is always associated with the unit "nameplate1". However, "nameplate1" can be associated with different units at different times, because nameplates are dynamically assigned. That is, UnitIsUnit("nameplate1", "target") can change from true to false even if you don't switch targets -- simply because the nameplates got rearranged. Currently, all nameplates get refreshed whenever any CVar changes (hence the behavior you're seeing with changing the nameplate settings).
 
05-23-16, 12:19 PM   #46
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by Predicate View Post
That behavior is exactly correct. NamePlate1 is always associated with the unit "nameplate1". However, "nameplate1" can be associated with different units at different times, because nameplates are dynamically assigned. That is, UnitIsUnit("nameplate1", "target") can change from true to false even if you don't switch targets -- simply because the nameplates got rearranged. Currently, all nameplates get refreshed whenever any CVar changes (hence the behavior you're seeing with changing the nameplate settings).
This is pretty dumb, because then you can never know when is your unitID is gonna get rearranged to something else. You can't hook every cvar change, and there is no event to listen.

Edit: It seems like cvar updates trigger the NAME_PLATE_UNIT_ADDED, NAME_PLATE_UNIT_REMOVED events so it's gucci if you update based on those.

Last edited by Resike : 05-23-16 at 12:27 PM.
 
05-23-16, 12:54 PM   #47
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
thats what i suggested on the last page!

some style options for units will also have to be independently updated with a more aggressive hook — the castbar has to be reconfigured more or less every time it is shown if you want to change its size etc. i think.

Last edited by ObbleYeah : 05-23-16 at 01:00 PM.
 
05-23-16, 01:50 PM   #48
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by syncrow View Post
Edit: Raidframes work the exact same way, if you rearrange your raid group & switch your main tank from group 3 into group 1 the unitID for this tank also changes...
Yes, but in partyframes UnitButton1 will always retun the "party1" unit attribute and even if you create a secure header with 1 single group and 30 unit columns UnitButton25 will always have the "party25" attribute, and so on. Here however seems like UnitFrameX can have any random "nameplateY" attribute and randomly rearrange them time to time. Which is confusing and possible root of bugs.

Last edited by Resike : 05-23-16 at 01:55 PM.
 
05-23-16, 04:22 PM   #49
sirann
A Flamescale Wyrmkin
Join Date: Mar 2007
Posts: 142
Originally Posted by Resike View Post
Yes, but in partyframes UnitButton1 will always retun the "party1" unit attribute and even if you create a secure header with 1 single group and 30 unit columns UnitButton25 will always have the "party25" attribute, and so on. Here however seems like UnitFrameX can have any random "nameplateY" attribute and randomly rearrange them time to time. Which is confusing and possible root of bugs.
It's entirely possible I don't fully understand the problem, but could this be to prevent creation of accurate nameplate grids that allow for ridiculous micromanagement of debuffs? Instead of having to hunt and click moving nameplates, you could set a secureheader similar to what we do with party/raid frames, and never really have to look at the mobs, just your grid of clickable nameplates with debuffs and timers over their heads. By having them dynamically switch, it prevents this behavior, while still maintaining the accurate debuff tracking.
 
05-23-16, 04:42 PM   #50
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by sirann View Post
It's entirely possible I don't fully understand the problem, but could this be to prevent creation of accurate nameplate grids that allow for ridiculous micromanagement of debuffs? Instead of having to hunt and click moving nameplates, you could set a secureheader similar to what we do with party/raid frames, and never really have to look at the mobs, just your grid of clickable nameplates with debuffs and timers over their heads. By having them dynamically switch, it prevents this behavior, while still maintaining the accurate debuff tracking.
I don't know. I'm not sure what limitations this nameplate attribues have. You might be able to only track debuff/buffs on a plate that you have already targeted at least once. It would be intresting to create an unitframe and set a nameplate attribute for it, and check how does that works then.
 
05-23-16, 05:09 PM   #51
lieandswell
A Cyclonian
 
lieandswell's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 45
Originally Posted by Resike View Post
You might be able to only track debuff/buffs on a plate that you have already targeted at least once.
I can confirm this isn't so. The default nameplate UI will show a few kinds of debuffs from other players. Just go look at the Orgrimmar training dummies on beta.
__________________
1/5 15:55:46.001 UNIT_DIED, 0x0000000000000000, nil, 0x80000000, 0xF130001942161FB7, "Gamon", 0xa28
 
05-23-16, 08:55 PM   #52
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 884
Originally Posted by lieandswell View Post
The default nameplate UI will show a few kinds of debuffs from other players.
Why can't they just show your own castable (de)buffs just like in the CompactRaidFrames, instead of only a select few kind of debuffs?

Sorry I'm just ranting and not contributing
 
05-23-16, 09:59 PM   #53
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Originally Posted by Ketho View Post
Why can't they just show your own castable (de)buffs just like in the CompactRaidFrames, instead of only a select few kind of debuffs?
Lua Code:
  1. function NamePlateDriverMixin:OnUnitAuraUpdate(unit)
  2.     ...
  3.     filter = "HARMFUL|INCLUDE_NAME_PLATE_ONLY"
  4.     ...
  5. end

That's the snag. For All player based debuffs we need
Lua Code:
  1. filter = "HARMFUL|PLAYER"
__________________

Last edited by syncrow : 05-23-16 at 10:01 PM.
 
06-05-16, 05:38 AM   #54
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Options

Code:
DefaultCompactNamePlateFriendlyFrameOptions 
DefaultCompactNamePlateEnemyFrameOptions 
DefaultCompactNamePlateFrameSetUpOptions 
DefaultCompactNamePlatePlayerFrameOptions 
DefaultCompactNamePlatePlayerFrameSetUpOptions
https://github.com/tomrus88/Blizzard...rame.lua#L1615

Lua Code:
  1. local groups = {
  2.   "Friendly",
  3.   "Enemy",
  4. }
  5.  
  6. for i, group  in next, groups do
  7.   for key, value in next, _G["DefaultCompactNamePlate"..group.."FrameOptions"] do
  8.     print(group, key,value)
  9.   end
  10. end



NamePlate table & NamePlate.UnitFrame table

Lua Code:
  1. local function OnNamePlateCreated(args1, frame)
  2.   print("==================")
  3.   print("OnNamePlateCreated", frame)
  4.   for key, value in next, frame do
  5.     print(key,value)
  6.   end
  7.   print("------------------")
  8.   print("printint nameplate.UnitFrame keys:")
  9.   for key, value in next, frame.UnitFrame do
  10.     print(key,value)
  11.   end
  12. end
  13.  
  14. rLib:RegisterCallback("NAME_PLATE_CREATED", OnNamePlateCreated)



NamePlateDriverFrame

Lua Code:
  1. print("==================")
  2. print("NamePlateDriverFrame")
  3. for key, value in next, NamePlateDriverFrame do
  4.   print(key,value)
  5. end



NamePlateUnitFrameTemplate

https://github.com/tomrus88/Blizzard...NamePlates.xml

Code:
<Button name="NamePlateUnitFrameTemplate" parentKey="UnitFrame" setAllPoints="true" useParentLevel="true" virtual="true">

  <KeyValue key="disableMouse" value="true" type="boolean"/>

    <Frames>
      <StatusBar parentKey="healthBar" frameLevel="90">
          <Frame parentKey="border" inherits="NamePlateFullBorderTemplate" />
            <Texture parentKey="background">
              <Color r=".2" g=".2" b=".2" a=".85"/>
        <BarTexture parentKey="barTexture" file="Interface/TargetingFrame/UI-TargetingFrame-BarFill" />
      
      <StatusBar parentKey="castBar" frameLevel="100" hidden="true">
          <KeyValue key="iconWhenNoninterruptible" value="true" type="boolean"/>
            <Texture parentKey="background">
              <Color r=".2" g=".2" b=".2" a=".85"/>
            <FontString parentKey="Text" inherits="SystemFont_Shadow_Small">
            <Texture parentKey="BorderShield" atlas="nameplates-InterruptShield" hidden="true" forceAlpha="true">
            <Texture parentKey="Icon" hidden="true" forceAlpha="true">
            <Texture parentKey="Spark" file="Interface\CastingBar\UI-CastingBar-Spark" alphaMode="ADD">
            <Texture parentKey="Flash" file="Interface\TargetingFrame\UI-TargetingFrame-BarFill" alphaMode="ADD" />
        <Scripts>
          <OnLoad>
            CastingBarFrame_OnLoad(self, nil, false, true);
          <OnEvent function="CastingBarFrame_OnEvent" />
          <OnUpdate function="CastingBarFrame_OnUpdate" />
          <OnShow function="CastingBarFrame_OnShow" />
        <BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
        <BarColor r="1.0" g="0.7" b="0.0"/>

      <Frame parentKey="BuffFrame" inherits="HorizontalLayoutFrame" mixin="NameplateBuffContainerMixin">
          <KeyValue key="spacing" value="4" type="number"/>
          <KeyValue key="fixedHeight" value="14" type="number"/>
        <Scripts>
          <OnLoad method="OnLoad"/>
          <OnEvent method="OnEvent"/>

      <Frame parentKey="RaidTargetFrame">
            <Texture parentKey="RaidTargetIcon" file="Interface\TargetingFrame\UI-RaidTargetingIcons" hidden="true">

    <Layers>
        <Texture parentKey="myHealPrediction"/>
        <Texture parentKey="otherHealPrediction"/>
        <Texture parentKey="totalAbsorb"/>
        <Texture parentKey="totalAbsorbOverlay"/>
        <FontString parentKey="name" inherits="SystemFont_NamePlate" wordwrap="false" justifyH="CENTER">
        <FontString parentKey="statusText" inherits="GameFontDisable" />
        <Texture parentKey="myHealAbsorb"/>
        <Texture parentKey="myHealAbsorbLeftShadow" file="Interface\RaidFrame\Absorb-Edge"/>
        <Texture parentKey="myHealAbsorbRightShadow" file="Interface\RaidFrame\Absorb-Edge">
        <Texture parentKey="overAbsorbGlow"/>
        <Texture parentKey="overHealAbsorbGlow"/>
        <Texture parentKey="selectionHighlight" file="Interface/TargetingFrame/UI-TargetingFrame-BarFill" alpha=".25" forceAlpha="true" alphaMode="ADD">
        <Texture parentKey="aggroHighlight" file="Interface/TargetingFrame/UI-TargetingFrame-BarFill" alpha="0" alphaMode="ADD">
          <Color r="1" g="1" b="0"/>
    
    <Animations>
      <AnimationGroup parentKey="LoseAggroAnim" setToFinalAlpha="true">
        <Alpha childKey="aggroHighlight" duration=".25" fromAlpha="1" toAlpha="0" order="1"/>
        <Alpha childKey="aggroHighlight" duration=".25" fromAlpha="1" toAlpha="0" order="2"/>
    <Scripts>
      <OnLoad function="CompactUnitFrame_OnLoad"/>
https://github.com/tomrus88/Blizzard...Frame.lua#L598
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 06-10-16 at 12:47 AM.
 
06-10-16, 12:46 AM   #55
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Finished editing the nameplates. Blizzard made it really easily to adjust the style.

Castbars:


Aggro border (not the default one):


https://github.com/zorker/rothui/blo...Plate/core.lua
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
06-20-16, 12:56 PM   #56
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Nameplates have a new option for the ClassificationFrame as far as I can tell.

template: https://github.com/tomrus88/Blizzard...lates.xml#L375
update function: https://github.com/tomrus88/Blizzard...rame.lua#L1615
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
07-25-16, 04:52 PM   #57
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 884
Originally Posted by syncrow View Post
For All player based debuffs we need
Lua Code:
  1. filter = "HARMFUL|PLAYER"

I tried to show all (harmful) spells from the player, but didn't work
  • When I tried Hemorrhage, nameplateShowPersonal always seemed to be false
    Is it maybe because it's a talent?
https://gfycat.com/DeterminedDarkCarpenterant

Lua Code:
  1. hooksecurefunc(NamePlateDriverFrame, "OnUnitAuraUpdate", function(self, unit)
  2.     local filter;
  3.     if UnitIsUnit("player", unit) then
  4.         filter = "HELPFUL|INCLUDE_NAME_PLATE_ONLY";
  5.     else
  6.         local reaction = UnitReaction("player", unit);
  7.         if reaction and reaction <= 4 then
  8.             -- Reaction 4 is neutral and less than 4 becomes increasingly more hostile
  9.             filter = "HARMFUL|PLAYER";
  10.         else
  11.             filter = "NONE";
  12.         end
  13.     end
  14.  
  15.     local nameplate = C_NamePlate.GetNamePlateForUnit(unit);
  16.     if (nameplate) then
  17.         nameplate.UnitFrame.BuffFrame:UpdateBuffs(nameplate.namePlateUnitToken, filter);
  18.     end
  19.  
  20.     -- debug
  21.     local name, rank, texture, count, debuffType, duration, expirationTime, caster, _, nameplateShowPersonal, spellId, _, _, _, nameplateShowAll = UnitAura(nameplate.namePlateUnitToken, 1, filter)
  22.     if nameplateShowPersonal ~= nil then -- still want boolean false
  23.         print(nameplate.namePlateUnitToken, filter, name, caster, nameplateShowAll, nameplateShowPersonal, (nameplateShowPersonal and (caster == "player" or caster == "pet" or caster == "vehicle")))
  24.     end
  25. end)
NamePlateDriverMixin:OnUnitAuraUpdate
NameplateBuffContainerMixin:UpdateBuffs

Last edited by Ketho : 07-25-16 at 07:24 PM.
 
07-28-16, 01:05 AM   #58
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Anyone found a solution to modify the shield icon with non-interruptable casts?

frame.castBar.BorderShield is the refference to the bar, but that icon is unnamed?
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘
 
07-28-16, 01:13 AM   #59
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
You can use :GetRegion or GetChildren to access child objects. But are you sure that borderShield is not of type texture?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 07-28-16 at 01:17 AM.
 
07-28-16, 01:21 AM   #60
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Originally Posted by zork View Post
You can use :GetRegion or GetChildren to access child objects. But are you sure that borderShield is not of type texture?
Yes, my bad. It indeed seems to be the shield texture.
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Nameplate hacking and unit IDs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off