2007-04-08 10:36:36 +00:00
|
|
|
/**************************************************************************
|
|
|
|
|
* File: config.c Part of tbaMUD *
|
|
|
|
|
* Usage: Configuration of various aspects of tbaMUD operation. *
|
2006-12-19 22:56:18 +00:00
|
|
|
* *
|
2007-04-08 10:36:36 +00:00
|
|
|
* All rights reserved. See license for complete information. *
|
2006-12-19 22:56:18 +00:00
|
|
|
* *
|
|
|
|
|
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
|
|
|
|
|
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
2007-04-08 10:36:36 +00:00
|
|
|
**************************************************************************/
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
#define __CONFIG_C__
|
|
|
|
|
|
|
|
|
|
#include "conf.h"
|
|
|
|
|
#include "sysdep.h"
|
|
|
|
|
#include "structs.h"
|
|
|
|
|
#include "interpreter.h" /* alias_data definition for structs.h */
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Update: The following constants and variables are now the default values
|
2006-12-19 22:56:18 +00:00
|
|
|
* for backwards compatibility with the new cedit game configurator. If you
|
|
|
|
|
* would not like to use the cedit command, you can change the values in
|
2007-03-18 16:10:10 +00:00
|
|
|
* this file instead. - Mythran */
|
|
|
|
|
|
|
|
|
|
/* Below are several constants which you can change to alter certain aspects
|
2007-04-08 10:36:36 +00:00
|
|
|
* of the way tbaMUD acts. Since this is a .c file, all you have to do
|
2006-12-19 22:56:18 +00:00
|
|
|
* to change one of the constants (assuming you keep your object files around)
|
|
|
|
|
* is change the constant in this file and type 'make'. Make will recompile
|
2007-03-18 16:10:10 +00:00
|
|
|
* this file and relink; you don't have to wait for the whole thing to recompile
|
|
|
|
|
* as you do if you change a header file. I realize that it would be slightly
|
|
|
|
|
* more efficient to have lots of #defines strewn about, so that, for example,
|
|
|
|
|
* the autowiz code isn't compiled at all if you don't want to use autowiz.
|
|
|
|
|
* However, the actual code for the various options is quite small, as is the
|
|
|
|
|
* computational time in checking the option you've selected at run-time, so
|
|
|
|
|
* I've decided the convenience of having all your options in this one file
|
|
|
|
|
* outweighs the efficency of doing it the other way. */
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
/* GAME PLAY OPTIONS */
|
|
|
|
|
#if !defined(NO)
|
|
|
|
|
#define NO 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if !defined(YES)
|
|
|
|
|
#define YES 1
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if !defined(FALSE)
|
|
|
|
|
#define FALSE 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if !defined(TRUE)
|
|
|
|
|
#define TRUE (!FALSE)
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* pk_allowed sets the tone of the entire game. If pk_allowed is set to NO,
|
|
|
|
|
* then players will not be allowed to kill, summon, charm, or sleep other
|
|
|
|
|
* players, as well as a variety of other "asshole player" protections. However,
|
|
|
|
|
* if you decide you want to have an all-out knock-down drag-out PK Mud, just
|
|
|
|
|
* set pk_allowed to YES - and anything goes. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int pk_allowed = NO;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Is playerthieving allowed? */
|
2006-12-19 22:56:18 +00:00
|
|
|
int pt_allowed = NO;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Minimum level a player must be to shout/holler/gossip/auction. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int level_can_shout = 1;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Number of movement points it costs to holler. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int holler_move_cost = 20;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* How many people can get into a tunnel? The default is two, but there is
|
|
|
|
|
* also an alternate message in the case of one person being allowed. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int tunnel_size = 2;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Exp change limits. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int max_exp_gain = 100000; /* max gainable per kill */
|
|
|
|
|
int max_exp_loss = 500000; /* max losable per death */
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Number of tics (usually 75 seconds) before PC/NPC corpses decompose. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int max_npc_corpse_time = 5;
|
|
|
|
|
int max_pc_corpse_time = 10;
|
|
|
|
|
|
|
|
|
|
/* How many ticks before a player is sent to the void or idle-rented. */
|
|
|
|
|
int idle_void = 8;
|
|
|
|
|
int idle_rent_time = 48;
|
|
|
|
|
|
|
|
|
|
/* This level and up is immune to idling, LVL_IMPL+1 will disable it. */
|
|
|
|
|
int idle_max_level = LVL_GOD;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Should items in death traps automatically be junked? */
|
2006-12-19 22:56:18 +00:00
|
|
|
int dts_are_dumps = YES;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Whether you want items that immortals load to appear on the ground or not.
|
2006-12-19 22:56:18 +00:00
|
|
|
* It is most likely best to set this to 'YES' so that something else doesn't
|
|
|
|
|
* grab the item before the immortal does, but that also means people will be
|
2007-03-18 16:10:10 +00:00
|
|
|
* able to carry around things like boards. That's not necessarily a bad thing,
|
|
|
|
|
* but this will be left at a default of 'NO' for historic reasons. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int load_into_inventory = YES;
|
|
|
|
|
|
|
|
|
|
/* "okay" etc. */
|
|
|
|
|
const char *OK = "Okay.\r\n";
|
|
|
|
|
const char *NOPERSON = "No-one by that name here.\r\n";
|
|
|
|
|
const char *NOEFFECT = "Nothing seems to happen.\r\n";
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* You can define or not define TRACK_THOUGH_DOORS, depending on whether or not
|
|
|
|
|
* you want track to find paths which lead through closed or hidden doors. A
|
|
|
|
|
* setting of 'NO' means to not go through the doors while 'YES' will pass
|
|
|
|
|
* through doors to find the target. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int track_through_doors = YES;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* If you do not want mortals to level up to immortal once they have enough
|
|
|
|
|
* experience, then set this to YES. Subtracting this from LVL_IMMORT gives
|
|
|
|
|
* the top level that people can advance to in gain_exp() in limits.c */
|
|
|
|
|
int no_mort_to_immort = YES;
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
/* RENT/CRASHSAVE OPTIONS */
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Should the MUD allow you to 'rent' for free? (i.e. if you just quit, your
|
|
|
|
|
* objects are saved at no cost). */
|
2006-12-19 22:56:18 +00:00
|
|
|
int free_rent = YES;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Maximum number of items players are allowed to rent. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int max_obj_save = 30;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Receptionist's surcharge on top of item costs. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int min_rent_cost = 100;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Should the game automatically save people? (i.e., save player data every 4
|
|
|
|
|
* kills (on average), and Crash-save as defined below. If auto_save is YES,
|
|
|
|
|
* then the 'save' command will be disabled to prevent item duplication via
|
|
|
|
|
* game crashes. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int auto_save = YES;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* if auto_save (above) is yes, how often (in minutes) should the MUD Crash-save
|
|
|
|
|
* people's objects? Also, this number indicates how often the MUD will Crash-
|
|
|
|
|
* save players' houses. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int autosave_time = 5;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Lifetime of crashfiles and forced-rent (idlesave) files in days. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int crash_file_timeout = 10;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Lifetime of normal rent files in days. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int rent_file_timeout = 30;
|
|
|
|
|
|
|
|
|
|
/* Do you want to automatically wipe players who've been gone too long? */
|
|
|
|
|
int auto_pwipe = NO;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Autowipe deletion criteria. This struct holds information used to determine
|
|
|
|
|
* which players to wipe when the mud boots. The levels must be in ascending
|
|
|
|
|
* order, with a descending level marking the end of the array. A level -1
|
|
|
|
|
* entry in the beginning is the case for players with the PLR_DELETED flag.
|
|
|
|
|
* The values below match the stock purgeplay.c criteria.
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
Detailed explanation by array element:
|
|
|
|
|
* Element 0, level -1, days 0: Players with PLR_DELETED flag are always wiped
|
2007-03-18 16:10:10 +00:00
|
|
|
* Element 1, level 0, days 0: Players at level 0 have created a character,
|
|
|
|
|
but have never actually entered the game, so always wipe them.
|
|
|
|
|
* Element 2, level 1, days 4: Players at level 1 are wiped if they haven't
|
|
|
|
|
logged on in the past 4 days.
|
|
|
|
|
* Element 3, level 4, days 7: Players level 2 through 4 are wiped if they
|
|
|
|
|
haven't logged on in the past 7 days.
|
2006-12-19 22:56:18 +00:00
|
|
|
* Element 4, level 10, days 30: Players level 5-10 get 30 days.
|
2007-03-18 16:10:10 +00:00
|
|
|
* Element 5, level LVL_IMMORT - 1, days 60: All other mortals get 60 days.
|
2006-12-19 22:56:18 +00:00
|
|
|
* Element 6, level LVL_IMPL, days 90: Immortals get 90 days.
|
2007-03-18 16:10:10 +00:00
|
|
|
* Element 7: Because -2 is less than LVL_IMPL, this is assumed to be the end
|
|
|
|
|
of the criteria. The days entry is not used in this case. */
|
2006-12-19 22:56:18 +00:00
|
|
|
struct pclean_criteria_data pclean_criteria[] = {
|
|
|
|
|
/* LEVEL DAYS */
|
|
|
|
|
{ 0 ,0 }, /* level 0 */
|
|
|
|
|
{ 1 ,4 },
|
|
|
|
|
{ 4 ,7 },
|
|
|
|
|
{ 10 ,30 },
|
|
|
|
|
{ LVL_IMMORT - 1 ,60 }, /* highest mortal */
|
|
|
|
|
{ LVL_IMPL ,90 }, /* all immortals */
|
|
|
|
|
{ -1 ,0 } /* no more level checks */
|
|
|
|
|
};
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Do you want players who self-delete to be wiped immediately with no backup? */
|
2006-12-19 22:56:18 +00:00
|
|
|
int selfdelete_fastwipe = YES;
|
|
|
|
|
|
|
|
|
|
/* ROOM NUMBERS */
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Virtual number of room that mortals should enter at. */
|
2006-12-19 22:56:18 +00:00
|
|
|
room_vnum mortal_start_room = 3001;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Virtual number of room that immorts should enter at by default. */
|
2006-12-19 22:56:18 +00:00
|
|
|
room_vnum immort_start_room = 1204;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Virtual number of room that frozen players should enter at. */
|
2006-12-19 22:56:18 +00:00
|
|
|
room_vnum frozen_start_room = 1202;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Virtual numbers of donation rooms. note: you must change code in do_drop of
|
|
|
|
|
* act.item.c if you change the number of non-NOWHERE donation rooms. */
|
2006-12-19 22:56:18 +00:00
|
|
|
room_vnum donation_room_1 = 3063;
|
2007-01-22 01:58:47 +00:00
|
|
|
room_vnum donation_room_2 = 5510;
|
|
|
|
|
room_vnum donation_room_3 = 235;
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
/* GAME OPERATION OPTIONS */
|
2007-03-18 16:10:10 +00:00
|
|
|
/* This is the default port on which the game should run if no port is given on
|
|
|
|
|
* the command-line. NOTE WELL: If you're using the 'autorun' script, the port
|
|
|
|
|
* number there will override this setting. Change the PORT= line in autorun
|
|
|
|
|
* instead of (or in addition to) changing this. */
|
2006-12-19 22:56:18 +00:00
|
|
|
ush_int DFLT_PORT = 4000;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* IP address to which the MUD should bind. This is only useful if you're
|
|
|
|
|
* running Circle on a host that host more than one IP interface, and you only
|
|
|
|
|
* want to bind to *one* of them instead of all of them. Setting this to NULL
|
|
|
|
|
* (the default) causes Circle to bind to all interfaces on the host.
|
|
|
|
|
* Otherwise, specify a numeric IP address in dotted quad format, and Circle
|
|
|
|
|
* will only bind to that IP address. (Of course, that IP address must be one
|
|
|
|
|
* of your host's interfaces, or it won't work.) */
|
2006-12-19 22:56:18 +00:00
|
|
|
const char *DFLT_IP = NULL; /* bind to all interfaces */
|
|
|
|
|
/* const char *DFLT_IP = "192.168.1.1"; -- bind only to one interface */
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Default directory to use as data directory. */
|
2006-12-19 22:56:18 +00:00
|
|
|
const char *DFLT_DIR = "lib";
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* What file to log messages to (ex: "log/syslog"). Setting this to NULL means
|
|
|
|
|
* you want to log to stderr, which was the default in earlier versions of
|
|
|
|
|
* Circle. If you specify a file, you don't get messages to the screen. (Hint:
|
|
|
|
|
* Try 'tail -f' if you have a UNIX machine.) */
|
2006-12-19 22:56:18 +00:00
|
|
|
const char *LOGNAME = NULL;
|
|
|
|
|
/* const char *LOGNAME = "log/syslog"; -- useful for Windows users */
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Maximum number of players allowed before game starts to turn people away. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int max_playing = 300;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Maximum size of bug, typo and idea files in bytes (to prevent bombing). */
|
2006-12-19 22:56:18 +00:00
|
|
|
int max_filesize = 50000;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Maximum number of password attempts before disconnection. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int max_bad_pws = 3;
|
|
|
|
|
|
2007-04-08 10:36:36 +00:00
|
|
|
/* Rationale for enabling this, as explained by Naved:
|
2006-12-19 22:56:18 +00:00
|
|
|
* Usually, when you select ban a site, it is because one or two people are
|
|
|
|
|
* causing troubles while there are still many people from that site who you
|
|
|
|
|
* want to still log on. Right now if I want to add a new select ban, I need
|
|
|
|
|
* to first add the ban, then SITEOK all the players from that site except for
|
|
|
|
|
* the one or two who I don't want logging on. Wouldn't it be more convenient
|
|
|
|
|
* to just have to remove the SITEOK flags from those people I want to ban
|
2007-03-18 16:10:10 +00:00
|
|
|
* rather than what is currently done? */
|
2006-12-19 22:56:18 +00:00
|
|
|
int siteok_everyone = TRUE;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Some nameservers are very slow and cause the game to lag terribly every time
|
|
|
|
|
* someone logs in. The lag is caused by the gethostbyaddr() function which is
|
|
|
|
|
* responsible for resolving numeric IP addresses to alphabetic names.
|
2006-12-19 22:56:18 +00:00
|
|
|
* Sometimes, nameservers can be so slow that the incredible lag caused by
|
|
|
|
|
* gethostbyaddr() isn't worth the luxury of having names instead of numbers
|
2007-03-18 16:10:10 +00:00
|
|
|
* for players' sitenames. If your nameserver is fast, set the variable below
|
|
|
|
|
* to NO. If your nameserver is slow, of it you would simply prefer to have
|
|
|
|
|
* numbers instead of names for some other reason, set the variable to YES.
|
|
|
|
|
* You can experiment with the setting of nameserver_is_slow on-line using the
|
|
|
|
|
* SLOWNS command from within the MUD. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int nameserver_is_slow = NO;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Will changes save automaticaly in OLC? */
|
2006-12-27 21:16:28 +00:00
|
|
|
int auto_save_olc = YES;
|
2006-12-19 22:56:18 +00:00
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* if you wish to enable Aedit, set this to YES. This will make the mud look
|
|
|
|
|
* for a file called socials.new, which is in a different format than the
|
|
|
|
|
* stock socials file. */
|
2006-12-27 21:16:28 +00:00
|
|
|
int use_new_socials = YES;
|
2006-12-19 22:56:18 +00:00
|
|
|
|
|
|
|
|
const char *MENU =
|
|
|
|
|
"\r\n"
|
2007-01-22 01:58:47 +00:00
|
|
|
"Welcome to tbaMUD!\r\n"
|
|
|
|
|
"0) Exit from tbaMUD.\r\n"
|
2006-12-19 22:56:18 +00:00
|
|
|
"1) Enter the game.\r\n"
|
|
|
|
|
"2) Enter description.\r\n"
|
|
|
|
|
"3) Read the background story.\r\n"
|
|
|
|
|
"4) Change password.\r\n"
|
|
|
|
|
"5) Delete this character.\r\n"
|
|
|
|
|
"\r\n"
|
|
|
|
|
" Make your choice: ";
|
|
|
|
|
|
|
|
|
|
const char *WELC_MESSG =
|
|
|
|
|
"\r\n"
|
2007-01-22 01:58:47 +00:00
|
|
|
"Welcome to tbaMUD! May your visit here be... Enlightening"
|
2006-12-19 22:56:18 +00:00
|
|
|
"\r\n\r\n";
|
|
|
|
|
|
|
|
|
|
const char *START_MESSG =
|
2007-01-22 01:58:47 +00:00
|
|
|
"Welcome. This is your new tbaMUD character! You can now earn gold,\r\n"
|
2006-12-19 22:56:18 +00:00
|
|
|
"gain experience, find weapons and equipment, and much more -- while\r\n"
|
|
|
|
|
"meeting people from around the world!\r\n";
|
|
|
|
|
|
|
|
|
|
/* AUTOWIZ OPTIONS */
|
2007-03-18 16:10:10 +00:00
|
|
|
/* Should the game automatically create a new wizlist/immlist every time someone
|
|
|
|
|
* immorts, or is promoted to a higher (or lower) god level? NOTE: this only
|
|
|
|
|
* works under UNIX systems. */
|
2006-12-19 22:56:18 +00:00
|
|
|
int use_autowiz = YES;
|
|
|
|
|
|
2007-03-18 16:10:10 +00:00
|
|
|
/* If yes, what is the lowest level which should be on the wizlist? (All immort
|
|
|
|
|
* levels below the level you specify will go on the immlist instead.) */
|
2006-12-19 22:56:18 +00:00
|
|
|
int min_wizlist_lev = LVL_GOD;
|