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 ➜ Dawn of Time ➜ Configuration ➜ who format

who format

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


Posted by Malakai   (5 posts)  Bio
Date Fri 29 Mar 2002 09:26 AM (UTC)
Message
In the gameset.txt file and gameedit there is a setting for default_who_format. Is there any others that are available besides "dawn" or do I just need to code it in manually?

Thank you in advance.
Top

Posted by Kalahn   United Kingdom  (138 posts)  Bio
Date Reply #1 on Fri 29 Mar 2002 11:15 AM (UTC)
Message

Who formats are actually implemented as something that can be unique for every player... the thing is though (in dawn's the default configuration) players don't have access to the command used to change their  who format to something different than the default (whoformat).


[NESW in v16206 mremvill.are - 02:53:32 - 8:03am>wiz whof
whoformat         [ 92]   
Type 'wiz <level>' to filter by level, 'wiz <partofword>' to filter on words.
[NESW in v16206 mremvill.are - 02:53:39 - 8:04am>

Basically when anyone uses the who command, the mud checks if their whoformatter is set to the default.  If so their wholist is formatted using the default format set in gameedit.  This mudwide default can be easily changed in gameedit, from the sounds of your email, you may have been manually editing gameset.txt instead of using gameedit (chuckle).  While there are a few things in gameset.txt which can't changed in gameedit most can.  The ones that require manual editing of gameset.txt are the more obscure/advanced configuration settings which new imps shouldn't be playing within unless they understand what they are doing.

The mudwide default whoformat can be set using the setwhoformat command in gameedit.


[NESW in v16206 mremvill.are - 02:39:55 - 5:50am>gameedit
syntax: gameedit confirm
This command takes you into the game settings editor.
[NESW in v16206 mremvill.are - 02:39:56 - 5:50am>gameedit confirm
Entering game settings editor.
[NESW in GameEdit done commands vshowflags>setwhofo
syntax: setwhoformat <format>
Where the default format is one of the following:
   default
   dawn
   storm
   just_names
Your who format is currently set to default.
[NESW in GameEdit done commands vshowflags>setwhofo storm
Default Who format changed from default to storm.
[NESW in GameEdit done commands vshowflags>setwhofo just
Default Who format changed from storm to just_names.
[NESW in GameEdit done commands vshowflags>setwhofo dawn
Default Who format changed from just_names to dawn.
[NESW in GameEdit done commands vshowflags>sethofo default
Default Who format changed from dawn to default.
[NESW in GameEdit done commands vshowflags>

The code for creating your own who format is in whofmt.cpp, the most trival shown:

/**************************************************************************/
// example whoformat function - about as simple as it gets
char *whoformat_just_names( char_data *ch, char_data *wch, bool two_column)
{
    return wch->name;
}
/**************************************************************************/

Within who.cpp (at the top) you need to add your custom who formatter to the who_formatter table.

/**************************************************************************/
// prototypes for the whoformat functions in whofmt.cpp
char *whoformat_dawn( char_data *ch, char_data *wch, bool two_column);
char *whoformat_storm( char_data *ch, char_data *wch, bool two_column);
char *whoformat_just_names( char_data *ch, char_data *wch, bool two_column);

/**************************************************************************/
struct  who_format_type who_formatter [] =
{
    // name,    function ran,       use two columns when heaps of players on
    { "default",    NULL,           false       }, // spacer 
    { "dawn",   whoformat_dawn,     true        }, 
    { "storm",  whoformat_storm,    false       }, 
    { "just_names", whoformat_just_names,   false }, 
    { "", NULL, false}
};
/**************************************************************************/

Hope this makes things clear,

- Kal


Kalahn
Developer of the Dawn of Time codebase
http://www.dawnoftime.org/
Top

Posted by Malakai   (5 posts)  Bio
Date Reply #2 on Sat 30 Mar 2002 05:42 PM (UTC)
Message
crystal :) thanks for the help! Awesome codebase btw, can't stress that enough. You've clearly put a lot of time and effort into it and it's really user friendly. So hats off to you my friend!
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.


15,272 views.

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.