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
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.
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 :)
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.
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
Read the Smaug FAQ that comes with it. It explains how to use prompt symbol colors in the code like that.
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, like
send_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);
If its not done already, you need to define send_to_char as send_to_char_color as it explains in the FAQ.
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 :)
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.
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.