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
➜ SMAUG coding
➜ Ansi Color
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Gradius
(10 posts) Bio
|
Date
| Fri 08 Oct 2004 10:50 PM (UTC) |
Message
| Ok, I'm new at all of this and i need some help.
I have no clue how to use the ansi color for smaug at all..
I just want to be able to change the colors of single characters of room descriptions for makeing maps such as this below
<room title>
----- + = trail (white)
+++#- # = building (white)
--*-- - = non-existant (grey or dark grey)
--+-- * = player location (red)
+++++
<room description>
All of the above is in the room description and was built using area editor 1.33. How do i change the colors of the characters above?
ALSO,
Is the process the same for your mud title screens/intros/etc..?
Any help would be great!
Gradius
Genesis Mud
66.118.225.154:4000 | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #1 on Sat 09 Oct 2004 05:07 AM (UTC) |
Message
| You can use the manual color codes, see help color. Those can be set into code. This is not the best, but it is the easiest way for someone unused to the system. And if your smaug supports ANSI on log in, then you can follow the same method. If not, you need to allow ansi logons. There are various codebases that support it, and various snippets to add this. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Gradius
(10 posts) Bio
|
Date
| Reply #2 on Sat 09 Oct 2004 07:14 AM (UTC) |
Message
| Well, thanks for that information. However, the 'help color' command only lists colors that can be used with the 'echo' command and its variants. I need to be able to use ANSI code in room descriptions and things like that. I need it in non-interactive places like .c files and mud title pages, not immortal global chat commands like 'echo.'
If anyone has any info on how/where i can get help, plz lemme know :) | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #3 on Sat 09 Oct 2004 11:18 AM (UTC) |
Message
| Err, you may not realize it, but you were just given the answer and you dismissed it. :P You can use the color codes in almost every place in the code, since send_to_char is actually a shortcut to send_to_char_color which will translate color codes.
As for login screens, like Greven said you need to support ANSI logins and there are various snippets that do this. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Gradius
(10 posts) Bio
|
Date
| Reply #4 on Sat 09 Oct 2004 05:17 PM (UTC) |
Message
| Well, I suppose im totally new at this...
When i type something like
"say _red This _ora is _pin a _bro test."
It doesnt display 4 different colors... it disaplys exactly what i type there... so _<color> doesnt work. Also, using the colors like _<color> <msg> in a room description does not work. because in the room description is displayes "_<color>" and not the text in that color.
So.. i guess i'm looking for an example.
When i do an redit command for the room description..
redit desc
_red <blah blah blah>
it does not display the color, it displays "_<color> <msg>"
i guess im just looking for a working example that will actually display the color. and the process in which to implemet the colors in the room description.
Thanks,
Gradius | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #5 on Sat 09 Oct 2004 06:15 PM (UTC) |
Message
| Read the Smaug FAQ that comes with it. It explains how to use prompt symbol colors in the code like that. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #6 on Sat 09 Oct 2004 06:32 PM (UTC) |
Message
| If you wanted to send a colored message, you want to use the & symbol, like &b for example.
You can use this ingame as well as embedded in code, likesend_to_char("&GS&Rk&Yi&Pt&Bt&Cl&Ge&Rs&Y T&Pa&Bs&Ct&Ge&R T&Yh&Pe&B R&Ca&Gi&Rn&Yb&Po&Bw", ch);
|
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #7 on Sat 09 Oct 2004 06:39 PM (UTC) |
Message
| If its not done already, you need to define send_to_char as send_to_char_color as it explains in the FAQ. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Gradius
(10 posts) Bio
|
Date
| Reply #8 on Sat 09 Oct 2004 08:11 PM (UTC) |
Message
| Ok... wow..
We have tried everything in the forums and nothing has worked.
In the FAQs we tried the whole redefining send_to_char and nothing has worked. We are using Smaug code 1.4a ona redhat linux 9.0 machine if that makes any difference. when we followed the instructions, redefining the send_to_char and send_to_pager functions we got multiple errors.
When we compiled we got several messages similar to this:
colorize.o(.text+0x727):/home/gradius/dist/src/colorize.c:243: undefined reference to `send_to_char'
colorize.o(.text+0x756):/home/gradius/dist/src/colorize.c:251: undefined reference to `send_to_char'
colorize.o(.text+0x77e):/home/gradius/dist/src/colorize.c:257: undefined reference to `send_to_char'
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/gradius/mud2/src'
make: *** [all] Error 2
This is a SMALL portion of the errors we got. It seems that every refenrce to the send_to_char and send_to_pager functions caused an error.
This happens everytime we compile when we follow the EXACT instructions. We even tried starting with a fresh version of smaug without any of our code. Still did not work... what is the EASIEST way to get color in your room descriptions? that is all i would like to do.
HELP plz :) | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #9 on Sat 09 Oct 2004 11:01 PM (UTC) |
Message
| That's because, if I'm not mistaken, send_to_char is actually an alias for send_to_char_color - so it's quite possible that send_to_char simply doesn't exist as a function.
You should try typing 'make clean' and then 'make', since you edited the header files. That might solve your problems. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Robert Powell
Australia (367 posts) Bio
|
Date
| Reply #10 on Mon 11 Oct 2004 11:43 AM (UTC) |
Message
| A simple and easy fix would be to dump the smaug code you are using and get the smaugFUSS package with samsons color codes in it, then all you need to do to use color in room descriptions is to type &W This Text is White. |
Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated. | 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.
29,808 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top