--- deliantra/server/include/config.h 2006/02/03 07:12:48 1.1.1.1 +++ deliantra/server/include/config.h 2006/12/30 10:16:10 1.30 @@ -1,9 +1,4 @@ /* - * static char *rcsid_config_h = - * "$Id$"; - */ - -/* CrossFire, A Multiplayer game for X-windows Copyright (C) 2002 Mark Wedel & Crossfire Development Team @@ -23,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - The authors can be reached via e-mail at crossfire-devel@real-time.com + The authors can be reached via e-mail at crossfire@schmorp.de */ /* This file contains various #defines that select various options. @@ -73,10 +68,21 @@ * MAX_TIME - how long an internal tick is in microseconds * MANY_CORES - generate core dumps on gross errors instead of continuing? * PARTY_KILL_LOG - stores party kill information - * WATCHDOG - allows use of an external watchdog program * ***********************************************************************/ +/* Use a very easy, non-challenging server? + * Defining the COZY_SERVER will make the server much less challenging: + * no stats loss on death, much less experience loss, and party members + * are treated by pet monsters as the owner itself when moving "through" them. + */ +#define COZY_SERVER 1 + +/* + * Make it impossible to pk outside the arena. + */ +#define PROHIBIT_PLAYERKILL 1 + /* Use balanced stat loss code? * This code is a little more merciful with repeated stat loss at lower * levels. Basically, the more stats you have lost, the less likely that @@ -109,23 +115,24 @@ */ /* GD */ -#define BALSL_LOSS_CHANCE_RATIO 4 -#define BALSL_NUMBER_LOSSES_RATIO 6 -#define BALSL_MAX_LOSS_RATIO 2 +#define BALSL_LOSS_CHANCE_RATIO 100 +#define BALSL_NUMBER_LOSSES_RATIO 100 +#define BALSL_MAX_LOSS_RATIO 100 /* Don't edit these values. They are configured in lib/settings. These are Simply the defaults. */ #define BALANCED_STAT_LOSS FALSE -#define USE_PERMANENT_EXPERIENCE FALSE +#define PERMANENT_EXPERIENCE_RATIO 25 +#define DEATH_PENALTY_RATIO 20 +#define DEATH_PENALTY_LEVEL 3 #define SET_TITLE TRUE #define SIMPLE_EXP TRUE #define SPELLPOINT_LEVEL_DEPEND TRUE #define SPELL_ENCUMBRANCE TRUE #define SPELL_FAILURE_EFFECTS FALSE #define REAL_WIZ TRUE -#define RECYCLE_TMP_MAPS FALSE #define RESURRECTION FALSE #define SEARCH_ITEMS TRUE #define NOT_PERMADETH TRUE @@ -139,6 +146,7 @@ #define ARMOR_WEIGHT_LINEAR TRUE #define ARMOR_SPEED_IMPROVEMENT 10 #define ARMOR_SPEED_LINEAR TRUE +#define CREATE_HOME_PORTALS FALSE /* you can edit the ones below */ @@ -150,22 +158,16 @@ * which contains usage stats for the last X amount of time. * CS_LOGTIME is how often it will print out stats. */ -#ifndef WIN32 /* ***win32 we set the following stuff in the IDE */ #define CS_LOGSTATS -#endif -#ifdef CS_LOGSTATS #define CS_LOGTIME 600 -#endif /* DEBUG generates copious amounts of output. I tend to change the CC options * in the crosssite.def file if I want this. By default, you probably * dont want this defined. */ -#ifndef WIN32 /* ***win32 we set the following stuff in the IDE */ #ifndef DEBUG #define DEBUG #endif -#endif /* * This option creates more core files. In some areas, there are certain * checks done to try and make the program more stable (ie, check @@ -199,8 +201,8 @@ * MSW 2001-05-28 */ -#define MAP_CLIENT_X 25 -#define MAP_CLIENT_Y 25 +#define MAP_CLIENT_X 31 +#define MAP_CLIENT_Y 31 /* * If you feel the game is too fast or too slow, change MAX_TIME. @@ -223,33 +225,23 @@ * mean slower performance and more memory. IF this is not defined, then * this feature is disabled. */ -/* #define PARTY_KILL_LOG 20 -*/ -/* Use permanent experience code? - * This code allows players to build up a small amount of 'permanent - * experience' which reduces the effect of large experience drains, such as - * death. This makes multiple frequent deaths less devastating, and also - * ensures that any character will make some gradual progress even if they - * die all of the time. - * A nice option if your keep dying due to massive client/server lags despite - * playing well... or you like to swim well outside of your depth. :) - * - * The PERM_EXP values adjust the behaviour of this option - if - * USE_PERMAMENT_EXPERIENCE if off, these values have no meaning. If it - * is on, the minimum ratio is the minimum amount of permanent exp relative - * to the total exp in the skill (ie, at a default of .25, if you had 100 - * experience, at least 25 of it would be permanent). The gain ratio - * is how much of experienced experience goes to the permanent value. - * This does not detract from total exp gain (ie, if you gained 100 exp, - * 100 would go to the skill total and 10 to the permanent value). - * the loss ratio is the maximum amount of experience that can be lost - * in any one hit - this is calculated as total exp - perm exp * loss ratio. +/* + * The PERM_EXP values adjust the behaviour of permenent experience. - if + * the setting permanent_experience_percentage is zero, these values have + * no meaning. The value in the settings file is the percentage of the + * experience that is permenent, the rest could be lost on death. When dying, + * the greatest amount of non-permenent exp it is possible to lose at one time + * is PERM_EXP_MAX_LOSS_RATIO - this is calculated as + * total exp - perm exp * loss ratio. The gain ratio is how much of experienced + * experience goes to the permanent value. This does not detract from total + * exp gain (ie, if you gained 100 exp, 100 would go to the skill total and + * 10 to the permanent value). * * A few thoughts on these default value (by MSW) * gain ratio is pretty much meaningless until exp has been lost, as until - * that poin, the minimum ratio will be used. + * that poin, the value in the settings file will be used. * It is also impossible for the exp to actually be reduced to the permanent * exp ratio - since the loss ratio is .5, it will just get closer and * closer. However, after about half a dozen hits, pretty much all the @@ -258,22 +250,9 @@ */ /* GD */ -#define PERM_EXP_MINIMUM_RATIO 0.25f #define PERM_EXP_GAIN_RATIO 0.10f #define PERM_EXP_MAX_LOSS_RATIO 0.50f -/* - * WATCHDOG lets sends datagrams to port 13325 on localhost - * in (more-or-less) regular intervals, so an external watchdog - * program can kill the server if it hangs (for whatever reason). - * It shouldn't hurt anyone if this is defined but you don't - * have an watchdog program. - */ -#ifndef WIN32 /* ***win32 disable watchdog as win32 default */ -#define WATCHDOG -#endif - - /* Enable the new material code - it needs some work. You can * enable this, and things will work, just you'll see a whole * bunch more materials show up, and thus a whole bunch more materials @@ -345,7 +324,6 @@ * backlogged messages. * TMPDIR - directory to use for temp files * UNIQUE_DIR - directory to put unique item files into - * USE_CALLOC for some memory requests *********************************************************************** */ @@ -381,12 +359,8 @@ */ #ifndef LOGFILE -#ifdef WIN32 /* change define path */ -#define LOGFILE "var\\crossfire.log" -#else #define LOGFILE "/var/log/crossfire/logfile" #endif -#endif /* * MAP_MAXTIMEOUT tells the maximum of ticks until a map is swapped out @@ -411,16 +385,16 @@ */ /* How many ticks till maps are swapped out */ -#define MAP_MAXTIMEOUT 1000 +#define MAP_MAXTIMEOUT 300 /* At least that many ticks before swapout */ -#define MAP_MINTIMEOUT 500 +#define MAP_MINTIMEOUT 300 /* * MAP_MAXRESET is the maximum time a map can have before being reset. It * will override the time value set in the map, if that time is longer than * MAP_MAXRESET. This value is in seconds. If you are low on space on the * TMPDIR device, set this value to somethign small. The default - * value in the map object is MAP_DEFAULTRESET (given in seconds.) + * value in the map object is given in seconds.->defaultreset * I personally like 1 hour myself, for solo play. It is long enough that * maps won't be resetting as a solve a quest, but short enough that some * maps (like shops and inns) will be reset during the time I play. @@ -431,7 +405,7 @@ /* Maximum time to reset. */ #define MAP_MAXRESET 7200 /* Default time to reset. */ -#define MAP_DEFAULTRESET 7200 +#define MAP_DEFAULTRESET 3600 /* * MAX_OBJECTS is no hard limit. If this limit is exceeded, crossfire @@ -447,7 +421,7 @@ * 25000 is about 8.5 MB */ -#define MAX_OBJECTS 100000 +#define MAX_OBJECTS 400000 /* * Max objects low water mark (lwm). If defined, the map swapping strategy @@ -530,7 +504,7 @@ * warranted. */ -#define SOCKETBUFSIZE 128*1024 +#define SOCKETBUFSIZE 256*1024 /* * Your tmp-directory should be large enough to hold the uncompressed @@ -544,11 +518,7 @@ */ /*#define TMPDIR "/home/hugin/a/crossfire/crossfire/tmp"*/ -#ifdef WIN32 /* change define path tmp */ -#define TMPDIR "tmp" -#else #define TMPDIR "/tmp" -#endif /* Directory to use for unique items. This is placed into the 'lib' @@ -558,39 +528,6 @@ #define UNIQUE_DIR "unique-items" /* - * If undefined, malloc is always used. - * It looks like this can be oboleted. However, it can be useful to - * track down some bugs, as it will make sure that the entire data structure - * is set to 0, at the expense of speed. - * Rupert Goldie has run Purify against the code, and if this is disabled, - * apparantly there are a lot of uninitialized memory reads - I haven't - * seen any problem (maybe the memory reads are copies, and the destination - * doesn't actually use the garbage values either?), but the impact on speed - * of using this probably isn't great, and should make things more stable. - * Msw 8-9-97 - */ -#define USE_CALLOC - - -/* - * These define the players starting map and location on that map, and where - * emergency saves are defined. This should be left as is unless you make - * major changes to the map. - */ - -#ifdef WIN32 /* change define path city */ - -# define EMERGENCY_MAPPATH "\\city\\city" -# define EMERGENCY_X 15 -# define EMERGENCY_Y 19 -#else -# define EMERGENCY_MAPPATH "/city/city" -# define EMERGENCY_X 15 -# define EMERGENCY_Y 19 -#endif - - -/* * These defines tells where, relative to LIBDIR, the maps, the map-index, * archetypes highscore and treaures files and directories can be found. */ @@ -603,13 +540,9 @@ #define TREASURES "treasures" #define BANISHFILE "banish_file" -#define MAX_ERRORS 25 /* Bail out if more are received during tick */ -#define STARTMAX 500 /* How big array of objects to start with */ -#define OBJ_EXPAND 100 /* How big steps to use when expanding array */ - #define HIGHSCORE_LENGTH 1000 /* How many entries there are room for */ -#define ARCHTABLE 5003 /* Used when hashing archetypes */ +#define ARCHTABLE 16384 /* Arch hashtable size */ #define MAXSTRING 20 #define COMMAND_HASH_SIZE 107 /* If you change this, delete all characters :) */ @@ -650,6 +583,7 @@ * SAVE_MODE is permissions for the files, SAVE_DIR_MODE is permission * for nay directories created. */ +/* IMPORTANT: there is a race during saving, where the umask is being applied */ #define SAVE_MODE 0660 #define SAVE_DIR_MODE 0770 @@ -669,7 +603,7 @@ * This option should now work (Crossfire 0.90.5) */ -/*#define SAVE_INTERVAL 300*/ +//#define SAVE_INTERVAL 60 /* * AUTOSAVE saves the player every AUTOSAVE ticks. A value of @@ -682,26 +616,10 @@ * saves pretty well spread out (in a fairly random fashion.) */ -#define AUTOSAVE 5000 - -/* Often, emergency save fails because the memory corruption that caused - * the crash has trashed the characters too. Define NO_EMERGENCY_SAVE - * to disable emergency saves. This actually does - * prevent emergency saves now (Version 0.90.5). - */ - -#define NO_EMERGENCY_SAVE - -/* By selecting the following, whenever a player does a backup save (with - * the 'save command), the player will be saved at home (EMERGENCY_MAP_* - * information that is specified later). IF this is not set, the player - * will be saved at his present location. - */ - -/*#define BACKUP_SAVE_AT_HOME*/ +#define AUTOSAVE 1000 /* RESET_LOCATION_TIME is the number of seconds that must elapse before - * we fill return the player to his savebed location. If this is zero, + * we will return the player to his savebed location. If this is zero, * this feature is disabled (player will resume where ever he was * when he last logged off). If this is set to less than two hours, * it will prevent players from camping out in treasure rooms.