Advertisement
Guest User

Untitled

a guest
Sep 11th, 2013
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.24 KB | None | 0 0
  1. 6:52:47 PM Clamsoda Is anyone savvy with Tidy Plates?
  2. 6:53:36 PM Clamsoda My function for coloring friendly nameplates by class color isn't working for units on coalesced realms, and I haven't got a clue why. Tidy Plates is such a labyrinth of code.
  3. 6:54:23 PM Clamsoda I noticed that names show up as Name (*) on the nameplate, and I gsubbed the (*) out in TidyPlatesCore to try to get it to reference correctly, but it didn't get me anywher.
  4. 6:55:17 PM Neffi How do you figure out their class?
  5. 6:55:51 PM Clamsoda TidyPlates caches that information.
  6. 6:56:05 PM Clamsoda I checked the TidyPlatesWidget saved variables file, and it is saving names correctly.
  7. 6:56:19 PM Clamsoda There is an issue with how that is being referenced by the core and I have no idea where it is.
  8. 6:56:31 PM Neffi It checks the unit name?
  9. 6:56:38 PM Clamsoda I should say: Saving name/class pairs correctly.
  10. 6:56:45 PM Neffi That's gonna be a damn mess to work, if it even class.
  11. 6:57:17 PM Clamsoda For non-party, non-guild units, it is obtained via: class = select(2, UnitClass("mouseover"))
  12. 6:57:18 PM Neffi If you enable class color in nameplates, the information is available to the nameplate directly without TidyPlates having to do much.
  13. 6:57:35 PM Clamsoda Only for enemy players.
  14. 6:57:54 PM Neffi Since I don't believe it's possible to figure out the realm of nameplate-unit, you're gonna have some trouble
  15. 6:58:21 PM Neffi Also I never used TidyPlates precisely because it's a tangle of code, so my help is limited. I just know what I know from writing my own nameplates.
  16. 7:01:07 PM Clamsoda Well, from what I can tell (and remember, this is for non-guild, non-grouped players): It saves the Name and Class via the respective functions by mouseover.
  17. 7:01:30 PM Clamsoda Nameplates do provide a name, and it uses that to reference the cached Name-Class pair to provide the correct color.
  18. 7:01:38 PM Clamsoda This has worked up until 5.4.
  19. 7:02:01 PM Clamsoda My code is only not working for units from coalesced realms (It used to work for CRZ players)
  20. 7:02:11 PM Neffi Ah
  21. 7:02:28 PM Clamsoda I noticed the name token has (*) affixed to it now, which I assumed was messing up the cache reference.
  22. 7:02:29 PM Neffi So the problem is the cache now needs to save the name is Name-Realm form and the nameplate inspection cannot figure out the Realm part
  23. 7:02:44 PM Clamsoda That, or Gsub out the realm name.
  24. 7:02:50 PM Clamsoda But yes.
  25. 7:02:56 PM Neffi Then you WILL have collision
  26. 7:03:00 PM Clamsoda Correct.
  27. 7:03:02 PM Neffi Same name, multiple realms
  28. 7:03:06 PM Clamsoda Yes.
  29. 7:03:09 PM Neffi That's no good
  30. 7:03:12 PM Clamsoda Agreed.
  31. 7:03:14 PM Neffi Bad data is worse than no data IMO
  32. 7:03:18 PM Clamsoda Agreed.
  33. 7:03:23 PM Clamsoda But here is my next issue:
  34. 7:03:41 PM Clamsoda The unit name that the nameplate provides doesnt provide a realm, just "(*)" to indicate aniother realm.
  35. 7:03:59 PM Clamsoda I gsubbed that out when Tidy Plates makes it reference to make it a plain name, and it still isnt upating.
  36. 7:04:04 PM Neffi How did it figure out CRZ people?
  37. 7:04:12 PM Clamsoda I don't think the nameplate cared.
  38. 7:04:26 PM Neffi So it was potentially already fetching bad data?
  39. 7:04:30 PM Clamsoda Tidy Plates is gaining the name through the name region of the plate.
  40. 7:04:56 PM Clamsoda Perhaps; it is so hard to tell with such convoluted code.
  41. 7:05:01 PM Clamsoda AFK for a moment.
  42. 7:05:17 PM Neffi Me as well
  43. 7:06:48 PM Neffi Insert some print statements along that execution line to figure out why certain names aren't making sense
  44. 7:06:54 PM Neffi There's not much more I can help you with.
  45. 7:07:14 PM Neffi Other than that with the system you're decribing, bad data is going to happen, and I would avoid it altogether
  46. 7:09:35 PM Neffi http://imgur.com/gallery/nFkRtcb
  47. 7:15:19 PM pompy has quit: Ping timeout: 248 seconds.
  48. 7:21:40 PM sintAcks is now known as Sintacks.
  49. 7:25:33 PM bleeter TC-Work: sue me for missing some quote marks :P
  50. 7:26:24 PM TC-Work bleeter: Oh, a quote....
  51. 7:26:29 PM TC-Work ~lart bleeter
  52. 7:26:29 PM purl lowers bleeter's priority
  53. 7:27:38 PM Clamsoda Hey Neffi, I'm back. Gonna give that a go; I wasn't expecting anyone to know the ins and outs of TidyPlate's code, just looking for advice. Thanks a lot pal.
  54. 7:27:39 PM g0urra has quit: Quit: leaving.
  55. 7:27:40 PM Clamsoda <3
  56. 7:28:19 PM pompy joined the channel.
  57. 7:30:33 PM Semlar-Laptop has quit: Ping timeout: 260 seconds.
  58. 7:34:28 PM [1]Archarodim joined the channel.
  59. 7:35:40 PM Archarodim has quit: Ping timeout: 264 seconds.
  60. 7:35:40 PM [1]Archarodim is now known as Archarodim.
  61. 7:36:07 PM Neffi Never a problem Dr Clam, PhD
  62. 7:40:14 PM Clamsoda Hey Neffi.
  63. 7:40:16 PM Clamsoda I got it =X
  64. 7:40:23 PM Clamsoda I wasn't gsubbing out the leading space.
  65. 7:40:40 PM Clamsoda It goes Name SPACE (*) so the name reference was looking for Name SPACE
  66. 7:40:49 PM Clamsoda local name = gsub(unit, " %(%*%)", "")
  67. 7:40:51 PM Clamsoda Did the trick ^o^
  68. 7:43:19 PM Clamsoda Now, not sure how it will react to conflicting names. >.<
  69. 7:43:35 PM Xandr has quit: Quit: Xandr.
  70. 7:50:12 PM Alram is now known as alram.
  71. 7:50:49 PM alram is now known as Alram.
  72. 7:57:03 PM alestane has quit: Quit: alestane.
  73. 8:03:23 PM Wobin has quit: Remote host closed the connection.
  74. 8:03:50 PM Wobin joined the channel.
  75. 8:07:46 PM Neffi I would've done unit:gsub('%(%*%)'):trim()
  76. 8:08:00 PM Neffi Err, add in the `,""`
  77. 8:08:14 PM Neffi Just on the off chance that extra spaces ever end up in there
  78. 8:08:53 PM Neffi But the system is inherently succeptible to collisions, so I wouldn't stay hopeful about it
  79. 8:09:16 PM Neffi Maybe their best bet is to pull more data off the nameplates in hopes of more points of data to reference when matching things up, but that his issues all its own
  80. 8:09:29 PM Neffi Plus, it still has a decent likelihood of collision
  81. 8:09:58 PM Neffi I mean, two people level 90 can definitely have the same name for instance, so the extra data point of level becomes meaningless (especially since level can change over time)
  82. 8:11:12 PM Neffi I would probably do enemy class matching explicitly by scraping the nameplate coloring system the default UI provides, and then track it on friendly units in a more restrictive way
  83. 8:11:29 PM Alram is now known as alram.
  84. 8:12:14 PM Neffi Want the extra data? Mouse over the nameplate itself. Its OnEnter captures data from the mouseover unit, and then stores a reference to the unitGUID in the nameplate itself for further information -- deleting that reference in both OnShow and OnHide, so when the unit changes the nameplate data needs to be recollected
  85. 8:12:59 PM Neffi It may suck, but like I said no data can be better than bad data, and I'd rather an explicit way to force good data to appear than depend on bad data -- or not know which is bad and which is good
  86. 8:13:13 PM Neffi So some nameplates wont show any useful shit until you mouse over them, but that's ok
  87. 8:15:04 PM Neffi The upside to this system is, even though you don't always know the data, when you do know it you have the GUID too. So things like displaying auras and info from CLEU becomes not only easier, but more accurate
  88. 8:15:10 PM VIad has quit: Read error: Connection reset by peer.
  89. 8:16:45 PM Clamsoda Woah, just tabbed into IRC and you posted a wall =O!!
  90. 8:16:48 PM Clamsoda Let me read over this.
  91. 8:17:56 PM Neffi lol
  92. 8:18:08 PM Neffi Was gonna ping you, but figured you'd see it when you had the time
  93. 8:18:14 PM Clamsoda Well, it doesn't handle enemy name plates at all, it lets Blizzard do that.
  94. 8:18:25 PM Clamsoda Coloring that is*.
  95. 8:18:40 PM Neffi All this talk and helping a couple people out with code is making me wanna play WoW again
  96. 8:18:41 PM Neffi =(
  97. 8:19:06 PM TC-Work So go play wow
  98. 8:19:19 PM Clamsoda I have to assume that Danltiger has taken a lot of that into consideration, but I do know the name reference has no realm token, so the possibility for collision does exist.
  99. 8:19:59 PM Neffi I literally can't afford the $15 a month, TC
  100. 8:20:24 PM Neffi And even still, last time I subbed I didn't play the full month. All my friends quit. Playing alone is boring.
  101. 8:20:41 PM TC-Work Well, I find I prefer questing alone.
  102. 8:21:06 PM Clamsoda Admittedly though, I am not 100% on how Tidy Plates handles everything. I do know that it caches Name = ["CLASS"] tokens into the Saved Variables, so I have to assume that is the depth of uniqueness.
  103. 8:21:18 PM Neffi I don't know if I wanna spend what would be the little food money I have on a game I might not play
  104. 8:22:00 PM Neffi If the saved variables is doing that kind of caching and you don't see realm data, you can generally assume it's not collecting realm data
  105. 8:22:15 PM jleclanche anyone wants a free HIB9 with no steam keys?
  106. 8:22:23 PM Neffi Mostly because I don't believe it's possible to do so until the nameplate is moused over. The plate itself doesn't provde any realm indication.
  107. 8:23:27 PM Neffi Actually if the nameplate doesn't have a "(*)" on it, you can guarantee no collision by making sure what class data you DO collect is from units on your own realm
  108. 8:23:48 PM Neffi But for any plate with "(*)" on it, you'd have to still display no data until it's moused over
  109. 8:23:49 PM jleclanche kd3, Arrowmaster?
  110. 8:23:58 PM Neffi Maybe patch TidyPlates to take that into account
  111. 8:24:51 PM Neffi Also Sir Clam III, have you taken any of this up with the author of TP?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement