Thread Tools Display Modes
03-18-10, 03:47 PM   #1
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
Class Colors In Emotes

Hi all.

I was wondering if anyone knows of an addon / would be bored enough to whip up some code (assuming it's not too time-consuming) to apply class colors all throughout a line of text, such as emotes or raid messages.

I posted about it here and came up empty, other than being told that it is possible.

Any help would be much appreciated.

Thanks!
  Reply With Quote
03-18-10, 08:10 PM   #2
Terranell
Premium Member
Premium Member
Join Date: Apr 2006
Posts: 52
I'm pretty sure Prat colours all names in chat, regardless of where in the message they are.

Should be an option called 'color names everywhere', a comment on the curse comment section leads me to believe you have to turn on high cpu options first though.

Last edited by Terranell : 03-18-10 at 08:23 PM.
  Reply With Quote
03-18-10, 08:20 PM   #3
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
Yup, I've done that, only the first instance of any player's name is class-colored even with that enabled.
  Reply With Quote
03-18-10, 08:46 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Decabah View Post
Yup, I've done that, only the first instance of any player's name is class-colored even with that enabled.
That's because only the first instance of a player name in an emote is actually a player name link. In order to color other names, you'd have to maintain an internal list of player names and classes — something that most addons no longer do because (a) Blizzard colors linked names in most message types, and (b) if you need to color linked names in other message types, it's easier just to use the API Blizzard added in patch 3.2 to query the client for the color using information in the link — and then check every single word in every emote against that list.

It would be possible, certainly, but I don't know of any addons that do it. You'd either need to submit a feature request for the chat addon you use, or write your own addon to do it.
  Reply With Quote
03-18-10, 08:50 PM   #5
Terranell
Premium Member
Premium Member
Join Date: Apr 2006
Posts: 52
I've just tried it out for myself quickly and it's working for me when I type my partner's name in chat and emotes.

Guessing on the way it works, it'll only be able to colour names of people you've 'seen' either mouseover'd or shift clicked in chat. I could be wrong however, but I think getting that information without that would involve trying to guess what constitutes a name in someone's line of text and then doing /who's to find out their class.

The first colouring is presumably from Blizzard alone, nothing to do with prat so that'll be why the first instance of a name is coloured and not the second I'd guess.

Last edited by Terranell : 03-18-10 at 08:54 PM. Reason: Phanx answered much better!
  Reply With Quote
03-18-10, 11:35 PM   #6
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
I've been noticing that this happens with friends, people in my group and people I raid with practically every day. I've placed a request for the ability to be added to Prat, but whether or not it happens is another thing entirely.

I'm hoping someone, somewhere is bored enough to pick this up and run with it to the degree that it'd be possible, if the author of Prat doesn't. I couldn't even begin to write my own addon.
  Reply With Quote
03-18-10, 11:53 PM   #7
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
It probably works on a /who system as well as that then knows what class they are. But with the limitations within /who it probably wasn't worth incorporating beyond those people you actually meet.

You can test the theory out by /who and setting some search patterns up to list people that would invariably chat and then see if that works for more than 1 chat message.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
03-19-10, 12:51 AM   #8
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 70
Mehhhhh, I was bored, and made a little utility using the second method I mentioned in this post. You can find it here: http://www.wowinterface.com/downloads/info16223

Hmm, I can't find the code I used once upon a time - but I had originally added this feature to my own chat. When Blizzard started class coloring names, I removed it, though. Was hoping I could find it and paste it here for you.

For it to work, I had mine set up to only class color players I had seen in a /who query (shift click on a name to start coloring it). These would just get stored in a saved var, and pruned based on last seen times. The issue I had with it, though was how large the addon footprint got over time. While nothing crippling, it was rather shocking how much name/class/last timestamp data can build up over time.

It would be easier, however, if you maybe only wanted to color a few people's names. You could hard-code those names into an AddMessage bypass filter, running displayed messages through it to color the message. I believe Prat, Chatter, and other chat addons have this feature, in a basic form - simply highlighting keywords with a single color (been a while since I used any of those, so don't quote me on that).
__________________
We'd be together, but only diamonds last forever...
  Reply With Quote
03-19-10, 12:58 AM   #9
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
Thank you! Will give it a whirl.

Emotes I can live without if necessary, since that would be a HUGE list of names (every new name I come across), but it especially bugs me in raid announces from DBM where all of the names blend into an orange blur.
  Reply With Quote
03-19-10, 01:15 AM   #10
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
It's working like a dream so far in emotes, with the names of my guild added to the file. Thanks so much!

(Would love this to be a standard, automatic feature of the default UI / an addon like Prat, but I won't look a gift horse in the mouth.)
  Reply With Quote
03-19-10, 02:03 AM   #11
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 70
=3 It would be nice if Blizzard had implemented it, but I'm sure (if it came up and was dismissed) it was due to the overhead issue. Could you imagine filtering a chat message through every character's name on the server and/or battlegroup to color the names? Eep!

While "have seen name/class" coloring is possible, like I mentioned, the data stored gets... large quickly. Might be a bit smaller/more reasonable to auto-load all friends and guildies only, I suppose.

Glad the little addon could help you out. While I know it's not ideal due to the hassle of manually entering keywords/names and colors... It does do the trick.
__________________
We'd be together, but only diamonds last forever...
  Reply With Quote
03-19-10, 02:10 AM   #12
Moxie
A Cobalt Mageweaver
 
Moxie's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 206
Considering I didn't think I'd ever find a way to do it, I've no problem adding each name by hand. Thanks so much again!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Class Colors In Emotes


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