Thank you in advance.
Thank you in advance.
This forum is a read-only archive of the Gammon Software forum (2000–2026). No new posts can be made. Search the archive.
Posted by Malakai on Fri 29 Mar 2002 09:26 AM — 3 posts, 16,003 views.
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).
|
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.
|
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