Crossfire Server, Branch 1.12
R12190
|
00001 /* 00002 * static char *rcsid_config_h = 00003 * "$Id: config.h 11578 2009-02-23 22:02:27Z lalo $"; 00004 */ 00005 00006 /* 00007 CrossFire, A Multiplayer game for X-windows 00008 00009 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 00010 Copyright (C) 1992 Frank Tore Johansen 00011 00012 This program is free software; you can redistribute it and/or modify 00013 it under the terms of the GNU General Public License as published by 00014 the Free Software Foundation; either version 2 of the License, or 00015 (at your option) any later version. 00016 00017 This program is distributed in the hope that it will be useful, 00018 but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 GNU General Public License for more details. 00021 00022 You should have received a copy of the GNU General Public License 00023 along with this program; if not, write to the Free Software 00024 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00025 00026 The authors can be reached via e-mail at crossfire-devel@real-time.com 00027 */ 00028 00029 #ifndef CONFIG_H 00030 #define CONFIG_H 00031 00052 /* There are 4 main sections to this file- 00053 * Section 1 is feature selection (enabling/disabling certain features) 00054 * 00055 * Section 2 is compiler/machine dependant section (stuff that just 00056 * makes the program compile and run properly, but don't change the 00057 * behavior) 00058 * 00059 * Section 3 is location of certain files and other defaults. Things in 00060 * this section generally do not need to be changed, and generally do 00061 * not alter the play as perceived by players. However, you may 00062 * have your own values you want to set here. 00063 * 00064 * Section 4 deals with save file related options. 00065 */ 00066 00067 /******************************************************************* 00068 * SECTION 1 - FEATURES 00069 * 00070 * You don't have to change anything here to get a working program, but 00071 * you may want to on personal preferance. Items are arranged 00072 * alphabetically. 00073 * 00074 * Short list of features, and what to search for: 00075 * CS_LOGSTATS - log various new client/server data. 00076 * DEBUG - more verbose message logging? 00077 * MAP_CLIENT_X, MAP_CLIENT_Y - determines max size client map will receive 00078 * MAX_TIME - how long an internal tick is in microseconds 00079 * MANY_CORES - generate core dumps on gross errors instead of continuing? 00080 * PARTY_KILL_LOG - stores party kill information 00081 * WATCHDOG - allows use of an external watchdog program 00082 * 00083 ***********************************************************************/ 00084 00085 /* Use balanced stat loss code? 00086 * This code is a little more merciful with repeated stat loss at lower 00087 * levels. Basically, the more stats you have lost, the less likely that 00088 * you will lose more. Additionally, lower level characters are shown 00089 * a lot more mercy (there are caps on how much of a stat you can lose too). 00090 * On the nasty side, if you are higher level, you can lose mutiple stats 00091 * _at_once_ and are shown less mercy when you die. But when you're higher 00092 * level, it is much easier to buy back your stats with potions. 00093 * Turn this on if you want death-based stat loss to be more merciful 00094 * at low levels and more cruel at high levels. 00095 * Only works when stats are depleted rather than lost. This option has 00096 * no effect if you are using genuine stat loss. 00097 * 00098 * The BALSL_.. values control this behaviour. 00099 * BALSL_NUMBER_LOSSES_RATIO determines the number of stats to lose. 00100 * the character level is divided by that value, and that is how many 00101 * stats are lost. 00102 * 00103 * BALSL_MAX_LOSS_RATIO puts the upper limit on depletion of a stat - 00104 * basically, level/max_loss_ratio is the most a stat can be depleted. 00105 * 00106 * BALSL_LOSS_CHANCE_RATIO controls how likely it is a stat is depleted. 00107 * The chance not to lose a stat is 00108 * depleteness^2 / (depletedness^2+ level/ratio). 00109 * ie, if the stats current depleted value is 2 and the character is level 00110 * 15, the chance not to lose the stat is 4/(4+3) or 4/7. The higher the 00111 * level, the more likely it is a stat can get really depleted, but 00112 * this gets more offset as the stat gets more depleted. 00113 * 00114 */ 00115 /* GD */ 00116 00117 #define BALSL_LOSS_CHANCE_RATIO 4 00118 #define BALSL_NUMBER_LOSSES_RATIO 6 00119 #define BALSL_MAX_LOSS_RATIO 2 00120 00121 /* Don't edit these values. They are configured in lib/settings. These are 00122 Simply the defaults. */ 00123 00124 #define BALANCED_STAT_LOSS FALSE 00125 #define PERMANENT_EXPERIENCE_RATIO 25 00126 #define DEATH_PENALTY_RATIO 20 00127 #define DEATH_PENALTY_LEVEL 3 00128 #define SET_TITLE TRUE 00129 #define SIMPLE_EXP TRUE 00130 #define SPELLPOINT_LEVEL_DEPEND TRUE 00131 #define SPELL_ENCUMBRANCE TRUE 00132 #define SPELL_FAILURE_EFFECTS FALSE 00133 #define REAL_WIZ TRUE 00134 #define RECYCLE_TMP_MAPS FALSE 00135 #define RESURRECTION FALSE 00136 #define SEARCH_ITEMS TRUE 00137 #define NOT_PERMADETH TRUE 00138 #define EXPLORE_MODE FALSE 00139 #define STAT_LOSS_ON_DEATH FALSE 00140 #define PK_LUCK_PENALTY 1 00141 #define CASTING_TIME FALSE 00142 #define SET_FRIENDLY_FIRE 5 00143 #define ARMOR_MAX_ENCHANT 5 00144 #define ARMOR_WEIGHT_REDUCTION 10 00145 #define ARMOR_WEIGHT_LINEAR TRUE 00146 #define ARMOR_SPEED_IMPROVEMENT 10 00147 #define ARMOR_SPEED_LINEAR TRUE 00148 00149 /* you can edit the ones below */ 00150 00159 #ifndef WIN32 /* ***win32 we set the following stuff in the IDE */ 00160 #define CS_LOGSTATS 00161 #endif 00162 #ifdef CS_LOGSTATS 00163 #define CS_LOGTIME 600 00164 #endif 00165 00171 #ifndef WIN32 /* ***win32 we set the following stuff in the IDE */ 00172 #ifndef DEBUG 00173 #define DEBUG 00174 #endif 00175 #endif 00176 00186 #define MANY_CORES 00187 00212 #define MAP_CLIENT_X 25 00213 #define MAP_CLIENT_Y 25 00214 00221 #define MAX_TIME 120000 00222 00228 #define NO_POLYMORPH 00229 00236 /* 00237 #define PARTY_KILL_LOG 20 00238 */ 00239 00261 /* GD */ 00262 00263 #define PERM_EXP_GAIN_RATIO 0.10f 00264 #define PERM_EXP_MAX_LOSS_RATIO 0.50f 00265 00273 #ifndef WIN32 /* ***win32 disable watchdog as win32 default */ 00274 #define WATCHDOG 00275 #endif 00276 00277 00285 /* 00286 #define NEW_MATERIAL_CODE 00287 */ 00288 00289 /*********************************************************************** 00290 * SECTION 2 - Machine/Compiler specific stuff. 00291 * 00292 * Short list of items: 00293 * COMPRESS_SUFFIX - selection of compression programs 00294 * O_NDELAY - If you don't have O_NDELAY, uncomment it. 00295 * 00296 ***********************************************************************/ 00297 00310 #ifndef COMPRESS_SUFFIX 00311 /* #define COMPRESS_SUFFIX ".Z" */ 00312 #endif 00313 00323 /* 00324 #define O_NDELAY O_NONBLOCK 00325 */ 00326 00327 00328 /*********************************************************************** 00329 * Section 3 00330 * 00331 * General file and other defaults that don't need to be changed, and 00332 * do not change gameplay as percieved by players much. Some options 00333 * may affect memory consumption however. 00334 * 00335 * Values: 00336 * 00337 * BANFILE - ban certain users/hosts. 00338 * CSPORT - port to use for new client/server 00339 * DMFILE - file with dm/wizard access lists 00340 * LOGFILE - where to log if using -daemon option 00341 * MAP_ - various map timeout and swapping parameters 00342 * MAX_OBJECTS - how many objects to keep in memory. 00343 * MAX_OBJECTS_LWM - only swap maps out if below that value 00344 * MOTD - message of the day - printed each time someone joins the game 00345 * PERM_FILE - limit play times 00346 * SHUTDOWN - used when shutting down the server 00347 * SOCKETBUFSIZE - size of buffer used internally by the server for storing 00348 * backlogged messages. 00349 * TMPDIR - directory to use for temp files 00350 * UNIQUE_DIR - directory to put unique item files into 00351 * USE_CALLOC for some memory requests 00352 *********************************************************************** 00353 */ 00354 00359 #ifndef BANFILE 00360 #define BANFILE "ban_file" 00361 #endif 00362 00367 #define CSPORT 13327 /* old port + 1 */ 00368 00373 #ifndef DMFILE 00374 #define DMFILE "dm_file" 00375 #endif 00376 00381 #ifndef LOGFILE 00382 #ifdef WIN32 /* change define path */ 00383 #define LOGFILE "var\\crossfire.log" 00384 #else 00385 #define LOGFILE "/var/log/crossfire/logfile" 00386 #endif 00387 #endif 00388 00412 #define MAP_MAXTIMEOUT 1000 00413 00414 #define MAP_MINTIMEOUT 500 00415 00430 #define MAP_MAXRESET 7200 00431 00432 #define MAP_DEFAULTRESET 7200 00433 00447 #define MAX_OBJECTS 100000 00448 00471 /*#define MAX_OBJECTS_LWM MAX_OBJECTS/2*/ 00472 00489 /*#define MEMORY_DEBUG 1*/ 00490 00497 #define MOTD "motd" 00498 00503 #define PERM_FILE "forbid" 00504 00511 #ifndef SHUTDOWN_FILE 00512 #define SHUTDOWN_FILE "shutdown" 00513 #endif 00514 00525 #define SOCKETBUFSIZE 256*1024 00526 00537 /*#define TMPDIR "/home/hugin/a/crossfire/crossfire/tmp"*/ 00538 #ifdef WIN32 /* change define path tmp */ 00539 #define TMPDIR "tmp" 00540 #else 00541 #define TMPDIR "/tmp" 00542 #endif 00543 00549 #define UNIQUE_DIR "unique-items" 00550 00563 #define USE_CALLOC 00564 00570 #ifdef WIN32 /* change define path city */ 00571 # define EMERGENCY_MAPPATH "\\world\\world_105_115" 00572 #else 00573 # define EMERGENCY_MAPPATH "/world/world_105_115" 00574 #endif 00575 # define EMERGENCY_X 5 00576 # define EMERGENCY_Y 37 00577 00582 #define MAPDIR "maps" 00583 #define TEMPLATE_DIR "template-maps" 00584 #define ARCHETYPES "archetypes" 00585 #define REGIONS "regions.reg" 00586 #define HIGHSCORE "highscore" 00587 #define TREASURES "treasures" 00588 #define BANISHFILE "banish_file" 00589 00590 #define MAX_ERRORS 25 00591 #define STARTMAX 500 00592 #define OBJ_EXPAND 100 00594 #define HIGHSCORE_LENGTH 1000 00596 #define ARCHTABLE 8192 00597 #define MAXSTRING 20 00598 00599 #define COMMAND_HASH_SIZE 107 00601 /*********************************************************************** 00602 * Section 4 - save player options. 00603 * 00604 * There are a lot of things that deal with the save files, and what 00605 * gets saved with them, so I put them in there own section. 00606 * 00607 ***********************************************************************/ 00608 00619 #ifndef PLAYERDIR 00620 #define PLAYERDIR "players" 00621 #endif 00622 00634 #define SAVE_MODE 0660 00635 #define SAVE_DIR_MODE 0770 00636 00637 /* NOTE ON SAVE_INTERVAL and AUTOSAVE: Only one of these two really 00638 * needs to be selected. You can set both, and things will work fine, 00639 * however, it just means that a lot more saving will be done, which 00640 * can slow things down some. 00641 */ 00642 00653 /*#define SAVE_INTERVAL 300*/ 00654 00665 #define AUTOSAVE 5000 00666 00673 #define NO_EMERGENCY_SAVE 00674 00681 /*#define BACKUP_SAVE_AT_HOME*/ 00682 00700 #define RESET_LOCATION_TIME 3600 00701 00702 #endif /* CONFIG_H */