Color codes can change a user name and default message color

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
BackAssward
Peon
Peon
Posts: 26
Joined: 26 Sep 2009, 02:07

Color codes can change a user name and default message color

Post by BackAssward »

Not sure if this is the proper forum...

If you make a character name such as ##3name, then the character's name will be blue. Also, all of the character's default messages will be in blue by default.

This seems to be an unexpected by product of the message color code. If it were by design, only the name would be in color and the message default color would be the usual one.

Also, having ##3name as a name, means you have to add the ##3 part to the name for whispers, magic, etc. NPC's seem to be ableto talk to you, but your global display name is ##3name

(or what ever number you chose for your color, 3 was an example).

This looks like an unintended consequence of the chat color mechanism, no check for names to avoid using it. It also translates from the name to the general chat color.

To reproduce: create a character with ##3name log in and chat, enable the option to see your own name, observe your name and chat messages.

P.s. Thanks a lot to Doulos for his patience and time helping me test, he was invaluable. Clearly a good GM and willing to give his time (to someone he doesn't even know).
Last edited by BackAssward on 16 Nov 2009, 08:58, edited 1 time in total.
User avatar
Almighty Raisin
Peon
Peon
Posts: 35
Joined: 27 Oct 2009, 21:21
Location: Mudos
Contact:

Re: Color codes can change a user name and default message color

Post by Almighty Raisin »

This is probably because the clients reads ANY text as coloured if it has those numbers before it. Even the colours in the news when you log in are made using those colour codes.

~A.R.
"Now I'm dead meat."
BackAssward
Peon
Peon
Posts: 26
Joined: 26 Sep 2009, 02:07

Re: Color codes can change a user name and default message color

Post by BackAssward »

Almighty Raisin wrote:This is probably because the clients reads ANY text as coloured if it has those numbers before it. Even the colours in the news when you log in are made using those colour codes.

~A.R.
Exactly... "This looks like an unintended consequence of the (edit) text color mechanism, no check for names to avoid using it. It also translates from the name to the general chat color." I should have used "text mechanism" not "chat"... my bad (not my first rodeo, but I used the wrong term there).

I expect it is some general code to handle text and colors, with unintended side effects. Such as chat color being inherited by the name color when set to default (no check, inherit the color from the name, same as is used by the /me command). Makes it simpler with less checks and resets. It is probably why /me text takes the same color as the name, by design. Just that making a color name probably wasn't expected when making the design.

Edit: just tested /me ##3does stuff does change the "does stuff" to blue as expected.

Edit2: also confirmed if I have a name like ##3testest and do /me something the action is also in blue, so my name color supersedes the /me color.

So the name text color must come after the action "/me" color in the code. For it to override the action color. Seems a bigger problem then, if the action color can be negated by the name color.
User avatar
Almighty Raisin
Peon
Peon
Posts: 35
Joined: 27 Oct 2009, 21:21
Location: Mudos
Contact:

Re: Color codes can change a user name and default message color

Post by Almighty Raisin »

Yep. What's wrong with this? People put those numbers there so they CAN have coloured names...

~A.R.
"Now I'm dead meat."
BackAssward
Peon
Peon
Posts: 26
Joined: 26 Sep 2009, 02:07

Re: Color codes can change a user name and default message color

Post by BackAssward »

Almighty Raisin wrote:Yep. What's wrong with this? People put those numbers there so they CAN have coloured names...

~A.R.
The point is that it's not by design. That is what someone in QA does, point pout things that might not have been expected but seen?

Do you not get that? This is not a judgment of is it is right or wrong... this is pointing out the things found. Things obviously not meant by design.

If the devs are ok with it, cool, but what the Duck is wrong with telling them how it is, the things they didn't expect? Reports from the field and testing.

Crap man, you make people not want to report the unintended consequences of coding decisions or the consequences. With that attitude. I was making no judgment only evaluation of what I say an analysis of why.

Have you ever worked in the software industry?

Ok, I will take the notice, and not try to report anything odd I see, and look for the root cause... and just say "Duck it", you'd rather people didn't try to find issues and report them.

Cheers.

B.
User avatar
Almighty Raisin
Peon
Peon
Posts: 35
Joined: 27 Oct 2009, 21:21
Location: Mudos
Contact:

Re: Color codes can change a user name and default message color

Post by Almighty Raisin »

Thanks for pointing it out, I'm certain the Developers Above already knew about it though. And don't swear at me like that because I get annoyed when n00bs yell at me. Very annoyed.

~A.R.
"Now I'm dead meat."
BackAssward
Peon
Peon
Posts: 26
Joined: 26 Sep 2009, 02:07

Re: Color codes can change a user name and default message color

Post by BackAssward »

Almighty Raisin wrote:Thanks for pointing it out, I'm certain the Developers Above already knew about it though. And don't swear at me like that because I get annoyed when n00bs yell at me. Very annoyed.

~A.R.
Adults use swears to express annoyance. It is a proper use of language.

If you don't get that, then I can't help you.

You made uneducated statements, not knowing how software development works.

I went out of my way to do QA work so they might get how the implementation has unexpected side effects. You don't get that, and act as you do. No I am sure they didn't know the results of the current code in the respect I represented. The fact that you assume they did, shows why I was annoyed.

As I said, you clearly have never worked in the software industry, but you seem to think you know something of it. Your assumptions made me frustrated and I use adult words like 'Duck' and 'Chocolate Cupcake'. As an adult I feel very justified using them.

Edit: Swears are how adults express negative emotions, so that we don't hit each other. You might need to grow up.

BTW, what is a negative word? If I say Fuk and you say frik, how are they different? You mean the same thing. Who decides what is a swear? Your intention is the same as mine...some arbitrary word is stupid, you say other words that mean the same thing. You'd have to be retarded not to see they are the same... fuk, frak, frik, fook, etc. All the same... just someone told you one was bad.

If you had any critical thinking, you could see that.
Almighty Raisin wrote:Thanks for pointing it out, I'm certain the Developers Above already knew about it though. And don't swear at me like that because I get annoyed when n00bs yell at me. Very annoyed.

~A.R.
You think I am a noob just because I don't spend hours posting here? You really are young, or simple. Your immediate annoyance kinda doesn't help your point, if you ignore the content of the post.
Last edited by BackAssward on 16 Nov 2009, 17:22, edited 3 times in total.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Color codes can change a user name and default message color

Post by Crush »

Thank you for reporting this abuse potential. I am sure we will have this fixed soon. I opened a mantis issue for this:
http://bugs.manasource.org/view.php?id=33
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Almighty Raisin
Peon
Peon
Posts: 35
Joined: 27 Oct 2009, 21:21
Location: Mudos
Contact:

Re: Color codes can change a user name and default message color

Post by Almighty Raisin »

I am very young. Please don't swear at kids.

And Crush... abuse potential? This is the best feature in the game. I have seen chars with rainbow-coloured names! I wouldn't even play TMW if it wasn't for the nicely coloured text!

~A.R.
"Now I'm dead meat."
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Color codes can change a user name and default message color

Post by Crush »

The problem with this is that you need the original name, including the ##X, when you want to whisper to a char or perform admin commands on a char.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Ceros
Warrior
Warrior
Posts: 262
Joined: 17 Aug 2009, 16:03

Re: Color codes can change a user name and default message color

Post by Ceros »

Crush wrote:The problem with this is that you need the original name, including the ##X, when you want to whisper to a char or perform admin commands on a char.
The features in 4144's patch (namely, right click whisper, online list (which is clickable to whisper), right click heal) and the normal 'right click add name to chat' make this issue relaticely obsolete/irrelevant.
Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Color codes can change a user name and default message color

Post by Crush »

For you, but not for a server administrator or game master.

Also note that we use colored names to differ game masters from normal players. An obscure trick to make your char name colored could be used to impersonate game masters.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Kage
Manasource
Manasource
Posts: 929
Joined: 02 May 2009, 18:12

Re: Color codes can change a user name and default message color

Post by Kage »

the quickist and dirtist way to fix this is to block user names with "##" in their name
<Kage_Jittai> ... are you saying I am elite :D
<thorbjorn> Yes. :P
Post Reply