Crossfire Server, Branches 1.12  R18729
config.h
Go to the documentation of this file.
1 /*
2  * static char *rcsid_config_h =
3  * "$Id: config.h 11578 2009-02-23 22:02:27Z lalo $";
4  */
5 
6 /*
7  CrossFire, A Multiplayer game for X-windows
8 
9  Copyright (C) 2002 Mark Wedel & Crossfire Development Team
10  Copyright (C) 1992 Frank Tore Johansen
11 
12  This program is free software; you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2 of the License, or
15  (at your option) any later version.
16 
17  This program is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 
26  The authors can be reached via e-mail at crossfire-devel@real-time.com
27 */
28 
29 #ifndef CONFIG_H
30 #define CONFIG_H
31 
52 /* There are 4 main sections to this file-
53  * Section 1 is feature selection (enabling/disabling certain features)
54  *
55  * Section 2 is compiler/machine dependant section (stuff that just
56  * makes the program compile and run properly, but don't change the
57  * behavior)
58  *
59  * Section 3 is location of certain files and other defaults. Things in
60  * this section generally do not need to be changed, and generally do
61  * not alter the play as perceived by players. However, you may
62  * have your own values you want to set here.
63  *
64  * Section 4 deals with save file related options.
65  */
66 
67 /*******************************************************************
68  * SECTION 1 - FEATURES
69  *
70  * You don't have to change anything here to get a working program, but
71  * you may want to on personal preferance. Items are arranged
72  * alphabetically.
73  *
74  * Short list of features, and what to search for:
75  * CS_LOGSTATS - log various new client/server data.
76  * DEBUG - more verbose message logging?
77  * MAP_CLIENT_X, MAP_CLIENT_Y - determines max size client map will receive
78  * MAX_TIME - how long an internal tick is in microseconds
79  * MANY_CORES - generate core dumps on gross errors instead of continuing?
80  * PARTY_KILL_LOG - stores party kill information
81  * WATCHDOG - allows use of an external watchdog program
82  *
83  ***********************************************************************/
84 
85 /* Use balanced stat loss code?
86  * This code is a little more merciful with repeated stat loss at lower
87  * levels. Basically, the more stats you have lost, the less likely that
88  * you will lose more. Additionally, lower level characters are shown
89  * a lot more mercy (there are caps on how much of a stat you can lose too).
90  * On the nasty side, if you are higher level, you can lose mutiple stats
91  * _at_once_ and are shown less mercy when you die. But when you're higher
92  * level, it is much easier to buy back your stats with potions.
93  * Turn this on if you want death-based stat loss to be more merciful
94  * at low levels and more cruel at high levels.
95  * Only works when stats are depleted rather than lost. This option has
96  * no effect if you are using genuine stat loss.
97  *
98  * The BALSL_.. values control this behaviour.
99  * BALSL_NUMBER_LOSSES_RATIO determines the number of stats to lose.
100  * the character level is divided by that value, and that is how many
101  * stats are lost.
102  *
103  * BALSL_MAX_LOSS_RATIO puts the upper limit on depletion of a stat -
104  * basically, level/max_loss_ratio is the most a stat can be depleted.
105  *
106  * BALSL_LOSS_CHANCE_RATIO controls how likely it is a stat is depleted.
107  * The chance not to lose a stat is
108  * depleteness^2 / (depletedness^2+ level/ratio).
109  * ie, if the stats current depleted value is 2 and the character is level
110  * 15, the chance not to lose the stat is 4/(4+3) or 4/7. The higher the
111  * level, the more likely it is a stat can get really depleted, but
112  * this gets more offset as the stat gets more depleted.
113  *
114  */
115 /* GD */
116 
117 #define BALSL_LOSS_CHANCE_RATIO 4
118 #define BALSL_NUMBER_LOSSES_RATIO 6
119 #define BALSL_MAX_LOSS_RATIO 2
120 
121 /* Don't edit these values. They are configured in lib/settings. These are
122  Simply the defaults. */
123 
124 #define BALANCED_STAT_LOSS FALSE
125 #define PERMANENT_EXPERIENCE_RATIO 25
126 #define DEATH_PENALTY_RATIO 20
127 #define DEATH_PENALTY_LEVEL 3
128 #define SET_TITLE TRUE
129 #define SIMPLE_EXP TRUE
130 #define SPELLPOINT_LEVEL_DEPEND TRUE
131 #define SPELL_ENCUMBRANCE TRUE
132 #define SPELL_FAILURE_EFFECTS FALSE
133 #define REAL_WIZ TRUE
134 #define RECYCLE_TMP_MAPS FALSE
135 #define RESURRECTION FALSE
136 #define SEARCH_ITEMS TRUE
137 #define NOT_PERMADETH TRUE
138 #define EXPLORE_MODE FALSE
139 #define STAT_LOSS_ON_DEATH FALSE
140 #define PK_LUCK_PENALTY 1
141 #define CASTING_TIME FALSE
142 #define SET_FRIENDLY_FIRE 5
143 #define ARMOR_MAX_ENCHANT 5
144 #define ARMOR_WEIGHT_REDUCTION 10
145 #define ARMOR_WEIGHT_LINEAR TRUE
146 #define ARMOR_SPEED_IMPROVEMENT 10
147 #define ARMOR_SPEED_LINEAR TRUE
148 
149 /* you can edit the ones below */
150 
159 #ifndef WIN32 /* ***win32 we set the following stuff in the IDE */
160 #define CS_LOGSTATS
161 #endif
162 #ifdef CS_LOGSTATS
163 #define CS_LOGTIME 600
164 #endif
165 
171 #ifndef WIN32 /* ***win32 we set the following stuff in the IDE */
172 #ifndef DEBUG
173 #define DEBUG
174 #endif
175 #endif
176 
186 #define MANY_CORES
187 
212 #define MAP_CLIENT_X 25
213 #define MAP_CLIENT_Y 25
214 
221 #define MAX_TIME 120000
222 
228 #define NO_POLYMORPH
229 
236 /*
237 #define PARTY_KILL_LOG 20
238 */
239 
261 /* GD */
262 
263 #define PERM_EXP_GAIN_RATIO 0.10f
264 #define PERM_EXP_MAX_LOSS_RATIO 0.50f
265 
273 #ifndef WIN32 /* ***win32 disable watchdog as win32 default */
274 #define WATCHDOG
275 #endif
276 
277 
285 /*
286 #define NEW_MATERIAL_CODE
287 */
288 
289 /***********************************************************************
290  * SECTION 2 - Machine/Compiler specific stuff.
291  *
292  * Short list of items:
293  * COMPRESS_SUFFIX - selection of compression programs
294  * O_NDELAY - If you don't have O_NDELAY, uncomment it.
295  *
296  ***********************************************************************/
297 
310 #ifndef COMPRESS_SUFFIX
311 /* #define COMPRESS_SUFFIX ".Z" */
312 #endif
313 
323 /*
324 #define O_NDELAY O_NONBLOCK
325 */
326 
327 
328 /***********************************************************************
329  * Section 3
330  *
331  * General file and other defaults that don't need to be changed, and
332  * do not change gameplay as percieved by players much. Some options
333  * may affect memory consumption however.
334  *
335  * Values:
336  *
337  * BANFILE - ban certain users/hosts.
338  * CSPORT - port to use for new client/server
339  * DMFILE - file with dm/wizard access lists
340  * LOGFILE - where to log if using -daemon option
341  * MAP_ - various map timeout and swapping parameters
342  * MAX_OBJECTS - how many objects to keep in memory.
343  * MAX_OBJECTS_LWM - only swap maps out if below that value
344  * MOTD - message of the day - printed each time someone joins the game
345  * PERM_FILE - limit play times
346  * SHUTDOWN - used when shutting down the server
347  * SOCKETBUFSIZE - size of buffer used internally by the server for storing
348  * backlogged messages.
349  * TMPDIR - directory to use for temp files
350  * UNIQUE_DIR - directory to put unique item files into
351  * USE_CALLOC for some memory requests
352  ***********************************************************************
353  */
354 
359 #ifndef BANFILE
360 #define BANFILE "ban_file"
361 #endif
362 
367 #define CSPORT 13327 /* old port + 1 */
368 
373 #ifndef DMFILE
374 #define DMFILE "dm_file"
375 #endif
376 
381 #ifndef LOGFILE
382 #ifdef WIN32 /* change define path */
383 #define LOGFILE "var\\crossfire.log"
384 #else
385 #define LOGFILE "/var/log/crossfire/logfile"
386 #endif
387 #endif
388 
412 #define MAP_MAXTIMEOUT 1000
413 
414 #define MAP_MINTIMEOUT 500
415 
430 #define MAP_MAXRESET 7200
431 
432 #define MAP_DEFAULTRESET 7200
433 
447 #define MAX_OBJECTS 100000
448 
471 /*#define MAX_OBJECTS_LWM MAX_OBJECTS/2*/
472 
489 /*#define MEMORY_DEBUG 1*/
490 
497 #define MOTD "motd"
498 
503 #define PERM_FILE "forbid"
504 
511 #ifndef SHUTDOWN_FILE
512 #define SHUTDOWN_FILE "shutdown"
513 #endif
514 
525 #define SOCKETBUFSIZE 256*1024
526 
537 /*#define TMPDIR "/home/hugin/a/crossfire/crossfire/tmp"*/
538 #ifdef WIN32 /* change define path tmp */
539 #define TMPDIR "tmp"
540 #else
541 #define TMPDIR "/tmp"
542 #endif
543 
549 #define UNIQUE_DIR "unique-items"
550 
563 #define USE_CALLOC
564 
570 #ifdef WIN32 /* change define path city */
571 # define EMERGENCY_MAPPATH "\\world\\world_105_115"
572 #else
573 # define EMERGENCY_MAPPATH "/world/world_105_115"
574 #endif
575 # define EMERGENCY_X 5
576 # define EMERGENCY_Y 37
577 
582 #define MAPDIR "maps"
583 #define TEMPLATE_DIR "template-maps"
584 #define ARCHETYPES "archetypes"
585 #define REGIONS "regions.reg"
586 #define HIGHSCORE "highscore"
587 #define TREASURES "treasures"
588 #define BANISHFILE "banish_file"
589 
590 #define MAX_ERRORS 25
591 #define STARTMAX 500
592 #define OBJ_EXPAND 100
594 #define HIGHSCORE_LENGTH 1000
596 #define ARCHTABLE 8192
597 #define MAXSTRING 20
598 
599 #define COMMAND_HASH_SIZE 107
601 /***********************************************************************
602  * Section 4 - save player options.
603  *
604  * There are a lot of things that deal with the save files, and what
605  * gets saved with them, so I put them in there own section.
606  *
607  ***********************************************************************/
608 
619 #ifndef PLAYERDIR
620 #define PLAYERDIR "players"
621 #endif
622 
634 #define SAVE_MODE 0660
635 #define SAVE_DIR_MODE 0770
636 
637 /* NOTE ON SAVE_INTERVAL and AUTOSAVE: Only one of these two really
638  * needs to be selected. You can set both, and things will work fine,
639  * however, it just means that a lot more saving will be done, which
640  * can slow things down some.
641  */
642 
653 /*#define SAVE_INTERVAL 300*/
654 
665 #define AUTOSAVE 5000
666 
673 #define NO_EMERGENCY_SAVE
674 
681 /*#define BACKUP_SAVE_AT_HOME*/
682 
700 #define RESET_LOCATION_TIME 3600
701 
702 #endif /* CONFIG_H */