Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 6:52:47 PM Clamsoda Is anyone savvy with Tidy Plates?
- 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.
- 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.
- 6:55:17 PM Neffi How do you figure out their class?
- 6:55:51 PM Clamsoda TidyPlates caches that information.
- 6:56:05 PM Clamsoda I checked the TidyPlatesWidget saved variables file, and it is saving names correctly.
- 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.
- 6:56:31 PM Neffi It checks the unit name?
- 6:56:38 PM Clamsoda I should say: Saving name/class pairs correctly.
- 6:56:45 PM Neffi That's gonna be a damn mess to work, if it even class.
- 6:57:17 PM Clamsoda For non-party, non-guild units, it is obtained via: class = select(2, UnitClass("mouseover"))
- 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.
- 6:57:35 PM Clamsoda Only for enemy players.
- 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
- 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.
- 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.
- 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.
- 7:01:38 PM Clamsoda This has worked up until 5.4.
- 7:02:01 PM Clamsoda My code is only not working for units from coalesced realms (It used to work for CRZ players)
- 7:02:11 PM Neffi Ah
- 7:02:28 PM Clamsoda I noticed the name token has (*) affixed to it now, which I assumed was messing up the cache reference.
- 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
- 7:02:44 PM Clamsoda That, or Gsub out the realm name.
- 7:02:50 PM Clamsoda But yes.
- 7:02:56 PM Neffi Then you WILL have collision
- 7:03:00 PM Clamsoda Correct.
- 7:03:02 PM Neffi Same name, multiple realms
- 7:03:06 PM Clamsoda Yes.
- 7:03:09 PM Neffi That's no good
- 7:03:12 PM Clamsoda Agreed.
- 7:03:14 PM Neffi Bad data is worse than no data IMO
- 7:03:18 PM Clamsoda Agreed.
- 7:03:23 PM Clamsoda But here is my next issue:
- 7:03:41 PM Clamsoda The unit name that the nameplate provides doesnt provide a realm, just "(*)" to indicate aniother realm.
- 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.
- 7:04:04 PM Neffi How did it figure out CRZ people?
- 7:04:12 PM Clamsoda I don't think the nameplate cared.
- 7:04:26 PM Neffi So it was potentially already fetching bad data?
- 7:04:30 PM Clamsoda Tidy Plates is gaining the name through the name region of the plate.
- 7:04:56 PM Clamsoda Perhaps; it is so hard to tell with such convoluted code.
- 7:05:01 PM Clamsoda AFK for a moment.
- 7:05:17 PM Neffi Me as well
- 7:06:48 PM Neffi Insert some print statements along that execution line to figure out why certain names aren't making sense
- 7:06:54 PM Neffi There's not much more I can help you with.
- 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
- 7:09:35 PM Neffi http://imgur.com/gallery/nFkRtcb
- 7:15:19 PM pompy has quit: Ping timeout: 248 seconds.
- 7:21:40 PM sintAcks is now known as Sintacks.
- 7:25:33 PM bleeter TC-Work: sue me for missing some quote marks :P
- 7:26:24 PM TC-Work bleeter: Oh, a quote....
- 7:26:29 PM TC-Work ~lart bleeter
- 7:26:29 PM purl lowers bleeter's priority
- 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.
- 7:27:39 PM g0urra has quit: Quit: leaving.
- 7:27:40 PM Clamsoda <3
- 7:28:19 PM pompy joined the channel.
- 7:30:33 PM Semlar-Laptop has quit: Ping timeout: 260 seconds.
- 7:34:28 PM [1]Archarodim joined the channel.
- 7:35:40 PM Archarodim has quit: Ping timeout: 264 seconds.
- 7:35:40 PM [1]Archarodim is now known as Archarodim.
- 7:36:07 PM Neffi Never a problem Dr Clam, PhD
- 7:40:14 PM Clamsoda Hey Neffi.
- 7:40:16 PM Clamsoda I got it =X
- 7:40:23 PM Clamsoda I wasn't gsubbing out the leading space.
- 7:40:40 PM Clamsoda It goes Name SPACE (*) so the name reference was looking for Name SPACE
- 7:40:49 PM Clamsoda local name = gsub(unit, " %(%*%)", "")
- 7:40:51 PM Clamsoda Did the trick ^o^
- 7:43:19 PM Clamsoda Now, not sure how it will react to conflicting names. >.<
- 7:43:35 PM Xandr has quit: Quit: Xandr.
- 7:50:12 PM Alram is now known as alram.
- 7:50:49 PM alram is now known as Alram.
- 7:57:03 PM alestane has quit: Quit: alestane.
- 8:03:23 PM Wobin has quit: Remote host closed the connection.
- 8:03:50 PM Wobin joined the channel.
- 8:07:46 PM Neffi I would've done unit:gsub('%(%*%)'):trim()
- 8:08:00 PM Neffi Err, add in the `,""`
- 8:08:14 PM Neffi Just on the off chance that extra spaces ever end up in there
- 8:08:53 PM Neffi But the system is inherently succeptible to collisions, so I wouldn't stay hopeful about it
- 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
- 8:09:29 PM Neffi Plus, it still has a decent likelihood of collision
- 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)
- 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
- 8:11:29 PM Alram is now known as alram.
- 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
- 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
- 8:13:13 PM Neffi So some nameplates wont show any useful shit until you mouse over them, but that's ok
- 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
- 8:15:10 PM VIad has quit: Read error: Connection reset by peer.
- 8:16:45 PM Clamsoda Woah, just tabbed into IRC and you posted a wall =O!!
- 8:16:48 PM Clamsoda Let me read over this.
- 8:17:56 PM Neffi lol
- 8:18:08 PM Neffi Was gonna ping you, but figured you'd see it when you had the time
- 8:18:14 PM Clamsoda Well, it doesn't handle enemy name plates at all, it lets Blizzard do that.
- 8:18:25 PM Clamsoda Coloring that is*.
- 8:18:40 PM Neffi All this talk and helping a couple people out with code is making me wanna play WoW again
- 8:18:41 PM Neffi =(
- 8:19:06 PM TC-Work So go play wow
- 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.
- 8:19:59 PM Neffi I literally can't afford the $15 a month, TC
- 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.
- 8:20:41 PM TC-Work Well, I find I prefer questing alone.
- 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.
- 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
- 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
- 8:22:15 PM jleclanche anyone wants a free HIB9 with no steam keys?
- 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.
- 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
- 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
- 8:23:49 PM jleclanche kd3, Arrowmaster?
- 8:23:58 PM Neffi Maybe patch TidyPlates to take that into account
- 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