Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ Need Some help with Ansi\RIP Colors

Need Some help with Ansi\RIP Colors

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #15 on Sun 01 Feb 2004 09:12 PM (UTC)
Message
I know what you mean, but it is nice to give a good impression to new players.

Admittedly you tend to forget about it, as you never log on as a new player yourself.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Toy   (206 posts)  Bio
Date Reply #16 on Mon 02 Feb 2004 07:37 AM (UTC)
Message
OK, one last thing. I was attempting to get color into the ANS file so I tried this based on what you said:

^[[1;31m^[[FEAR^[[1;32m^[[

This was an attempt to go from red to green, but instead that's what it showed upon log in, not the colors, just fear with all the jargon around it. What am I doing wrong here?

-Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #17 on Mon 02 Feb 2004 08:26 AM (UTC)
Message
The ^[ character you see there is really "escape" (namely hex 1B from memory). It is a bit hard to key into a text editor. You can use vi to get it in (CTRL+V and then Esc) or an editor like UltraEdit, and use Hex mode to enter the 1B.

If you literally type ^[ then you will just see that on the screen.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Toy   (206 posts)  Bio
Date Reply #18 on Mon 02 Feb 2004 09:31 AM (UTC)
Message
OK, I'm slowly getting this, I think. I got UltraEdit, loaded the ANS file and altered the HEX in the right spots, now it shows this:

\e[1;31mFEAR\e1;32m

ok, the color for red is "\e[1;31m" and the color for green is "\e[1;32m". the little boxes represent the 1B I changed in the HEX. Now when you log in in shows this:

e[1;31mFEARe1;32m

I don't get it..

-Toy, formerly Alexander

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #19 on Mon 02 Feb 2004 09:22 PM (UTC)

Amended on Mon 02 Feb 2004 09:25 PM (UTC) by Nick Gammon

Message
Quote:

e[1;31mFEARe1;32m


For a start, you have left off a square bracket, it should be:

e[1;31mFEARe[1;32m

However also the "e"s should be Esc, since you are seeing "e" it hasn't been entered properly, for some reason. I tried doing that exact thing using vi (type Ctrl+V Esc to enter an escape) and it worked, the word FEAR came out in red.

You can check it out in UltraEdit "hex" mode. If you have Cygwin, try hexdump, like this:

 hexdump -C ../system/mudtitle.ans
00000000  1b 5b 32 4a 0d 0a 0d 0a  0d 0a 0d 0a 20 20 20 20  |.[2J........    |
00000010  20 20 20 20 20 20 20 20  20 20 44 52 41 57 20 59  |          DRAW Y|
00000020  4f 55 52 20 1b 5b 31 3b  33 36 6d 41 4e 53 49 1b  |OUR .[1;36mANSI.|
00000030  5b 6d 20 54 49 54 4c 45  20 53 43 52 45 45 4e 20  |[m TITLE SCREEN |
00000040  49 4e 20 48 45 52 45 2e  2e 2e 2e 2e 2e 2e 2e 2e  |IN HERE.........|
00000050  2e 2e 2e 2e 2e 2e 2e 2e  2e 2e 0d 0a 0d 0a 0d 0a  |................|
00000060  0d 0a 0d 0a 1b 5b 31 3b  33 31 6d 46 45 41 52 1b  |.....[1;31mFEAR.|
00000070  5b 31 3b 33 32 6d 0d 0a  0d 0a 0d 0a 0d 0a 0d 0a  |[1;32m..........|
00000080  0d 0a 0d 0a 0d 0a 0d 0a  0d 0a 0d 0a 20 20 20 20  |............    |
00000090  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000000a0  20 20 20 20 20 20 20 20  20 20 20 20 5b 50 72 65  |            [Pre|
000000b0  73 73 20 45 6e 74 65 72  5d 20 0d 0a              |ss Enter] ..|
000000bc


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Toy   (206 posts)  Bio
Date Reply #20 on Tue 03 Feb 2004 05:47 AM (UTC)
Message
Cool. Got it working now. Thanks again Nick.

-Toy

It's always good to know how far you are willing to go to be the best...

Karl Mancine
aka
Toy the Dark Puppet
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


75,284 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.