Crossfire Server, Trunk
R21670
config.h
Go to the documentation of this file.
1
#ifndef CONFIG_H
2
#define CONFIG_H
3
24
/* There are 4 main sections to this file-
25
* Section 1 is feature selection (enabling/disabling certain features)
26
*
27
* Section 2 is compiler/machine dependant section (stuff that just
28
* makes the program compile and run properly, but don't change the
29
* behavior)
30
*
31
* Section 3 is location of certain files and other defaults. Things in
32
* this section generally do not need to be changed, and generally do
33
* not alter the play as perceived by players. However, you may
34
* have your own values you want to set here.
35
*
36
* Section 4 deals with save file related options.
37
*/
38
39
/*******************************************************************
40
* SECTION 1 - FEATURES
41
*
42
* You don't have to change anything here to get a working program, but
43
* you may want to on personal preferance. Items are arranged
44
* alphabetically.
45
*
46
* Short list of features, and what to search for:
47
* CS_LOGSTATS - log various new client/server data.
48
* DEBUG - more verbose message logging?
49
* MAP_CLIENT_X, MAP_CLIENT_Y - determines max size client map will receive
50
* MAX_TIME - how long an internal tick is in microseconds
51
* MANY_CORES - generate core dumps on gross errors instead of continuing?
52
* PARTY_KILL_LOG - stores party kill information
53
* WATCHDOG - allows use of an external watchdog program
54
*
55
***********************************************************************/
56
57
/* These are basically experimental values right now - perhaps should
58
* be turned into settings values at load time, but want to make
59
* sure we go down this road before doing that.
60
*
61
* MIN_PLAYER_SPEED: If a player is fully loaded with junk, this is
62
* how slow the character will move.
63
*
64
* MAX_PLAYER_SPEED: If the player is unloaded, this is how fast the
65
* player will move. Note that armor will still affect this (a
66
* character otherwise unloaded but wearing plate will be slower)
67
*
68
* FREE_PLAYER_LOAD_PERCENT: This value is how much of the players
69
* load is 'free' before it starts slowing them down - just because
70
* I pick up a book doesn't make me slower.
71
*
72
* Example: Player has a max carrying capacity of 1000 kg. If he is
73
* carrying 1000 KG, he moves at MIN_PLAYER_SPEED (0.25 by default).
74
* The free load is 0.50 (50%), which means he can carry 500 kg before
75
* he starts to slow down. So if his load is anywhere between 0 and 500 kg
76
* and character is otherwise not wearing armor or other things that slow
77
* him down, he moves at 0.75
78
* Once he goes above 500 kg, his speed is now a linear difference of
79
* MIN and MAX. With the nice round numbers chosen, it amounts to
80
* each 1 kg of look slows character down 0.001 (500 * 0.001 = 0.5,
81
* 0.75 - 0.5 = 0.25)
82
*
83
* The values can be adjusted in various ways - a free load percent
84
* of 1.0 means how much you carry does not affect movement speed.
85
* One could also adjust these values for slower of faster movement.
86
*
87
* 0.75 was chosen as default for fast movement as this gives room
88
* for magic (and other effects) to speed up the player, but speed
89
* still remain below 1.
90
*
91
* 0.25 was chosen as low end as that is still fairly slow (about
92
* 2 spaces/second), but not so slow to be really painful -
93
* typically it is low level characters that have this issue
94
* more, so I think this will improve playing quality.
95
*/
96
#define MIN_PLAYER_SPEED 0.25
97
#define MAX_PLAYER_SPEED 0.75
98
#define FREE_PLAYER_LOAD_PERCENT 0.50
99
100
/*
101
* BASE_WEAPON_SPEED is sort of like the speed - what the characters
102
* weapon_speed is before we start factoring in bonuses & penalties.
103
* Want fast melee? Increase this. Slow melee? decrease this.
104
* Note that weapon_speed decreases this, so generally you want
105
* to start higher, as there isn't a lot of things that
106
* will increase this
107
*/
108
#define BASE_WEAPON_SPEED 1.0
109
110
/* Use balanced stat loss code?
111
* This code is a little more merciful with repeated stat loss at lower
112
* levels. Basically, the more stats you have lost, the less likely that
113
* you will lose more. Additionally, lower level characters are shown
114
* a lot more mercy (there are caps on how much of a stat you can lose too).
115
* On the nasty side, if you are higher level, you can lose mutiple stats
116
* _at_once_ and are shown less mercy when you die. But when you're higher
117
* level, it is much easier to buy back your stats with potions.
118
* Turn this on if you want death-based stat loss to be more merciful
119
* at low levels and more cruel at high levels.
120
* Only works when stats are depleted rather than lost. This option has
121
* no effect if you are using genuine stat loss.
122
*
123
* The BALSL_.. values control this behaviour.
124
* BALSL_NUMBER_LOSSES_RATIO determines the number of stats to lose.
125
* the character level is divided by that value, and that is how many
126
* stats are lost.
127
*
128
* BALSL_MAX_LOSS_RATIO puts the upper limit on depletion of a stat -
129
* basically, level/max_loss_ratio is the most a stat can be depleted.
130
*
131
* BALSL_LOSS_CHANCE_RATIO controls how likely it is a stat is depleted.
132
* The chance not to lose a stat is
133
* depleteness^2 / (depletedness^2+ level/ratio).
134
* ie, if the stats current depleted value is 2 and the character is level
135
* 15, the chance not to lose the stat is 4/(4+3) or 4/7. The higher the
136
* level, the more likely it is a stat can get really depleted, but
137
* this gets more offset as the stat gets more depleted.
138
*
139
*/
140
/* GD */
141
142
#define BALSL_LOSS_CHANCE_RATIO 4
143
#define BALSL_NUMBER_LOSSES_RATIO 6
144
#define BALSL_MAX_LOSS_RATIO 2
145
146
/* Don't edit these values. They are configured in lib/settings. These are
147
Simply the defaults. */
148
149
#define BALANCED_STAT_LOSS FALSE
150
#define PERMANENT_EXPERIENCE_RATIO 50
151
#define DEATH_PENALTY_RATIO 20
152
#define DEATH_PENALTY_LEVEL 3
153
#define SET_TITLE TRUE
154
#define SIMPLE_EXP TRUE
155
#define SPELLPOINT_LEVEL_DEPEND TRUE
156
#define SPELL_ENCUMBRANCE TRUE
157
#define SPELL_FAILURE_EFFECTS FALSE
158
#define REAL_WIZ TRUE
159
#define RECYCLE_TMP_MAPS FALSE
160
#define ALWAYS_SHOW_HP FALSE
161
#define RESURRECTION FALSE
162
#define SEARCH_ITEMS TRUE
163
#define NOT_PERMADETH TRUE
164
#define STAT_LOSS_ON_DEATH FALSE
165
#define PK_LUCK_PENALTY 1
166
#define CASTING_TIME FALSE
167
#define SET_FRIENDLY_FIRE 5
168
#define ARMOR_MAX_ENCHANT 5
169
#define ARMOR_WEIGHT_REDUCTION 10
170
#define ARMOR_WEIGHT_LINEAR TRUE
171
#define ARMOR_SPEED_IMPROVEMENT 10
172
#define ARMOR_SPEED_LINEAR TRUE
173
174
/* you can edit the ones below */
175
184
#ifndef WIN32
/* ***win32 we set the following stuff in the IDE */
185
#define CS_LOGSTATS
186
#endif
187
#ifdef CS_LOGSTATS
188
#define CS_LOGTIME 600
189
#endif
190
196
#ifndef WIN32
/* ***win32 we set the following stuff in the IDE */
197
#ifndef DEBUG
198
#define DEBUG
199
#endif
200
#endif
201
211
#define MANY_CORES
212
237
#define MAP_CLIENT_X 25
238
#define MAP_CLIENT_Y 25
239
246
#define MAX_TIME 120000
247
253
#define NO_POLYMORPH
254
261
/*
262
#define PARTY_KILL_LOG 20
263
*/
264
286
/* GD */
287
288
#define PERM_EXP_GAIN_RATIO 0.50f
289
#define PERM_EXP_MAX_LOSS_RATIO 0.50f
290
298
#ifndef WIN32
/* ***win32 disable watchdog as win32 default */
299
#define WATCHDOG
300
#endif
301
302
303
/***********************************************************************
304
* SECTION 2 - Machine/Compiler specific stuff.
305
*
306
* Short list of items:
307
* O_NDELAY - If you don't have O_NDELAY, uncomment it.
308
*
309
***********************************************************************/
310
320
/*
321
#define O_NDELAY O_NONBLOCK
322
*/
323
324
325
/***********************************************************************
326
* Section 3
327
*
328
* General file and other defaults that don't need to be changed, and
329
* do not change gameplay as percieved by players much. Some options
330
* may affect memory consumption however.
331
*
332
* Values:
333
*
334
* BANFILE - ban certain users/hosts.
335
* CSPORT - port to use for new client/server
336
* DMFILE - file with dm/wizard access lists
337
* LOGFILE - where to log if using -daemon option
338
* MAP_ - various map timeout and swapping parameters
339
* MOTD - message of the day - printed each time someone joins the game
340
* PERM_FILE - limit play times
341
* SHUTDOWN - used when shutting down the server
342
* SOCKETBUFSIZE - size of the output socket buffer
343
* TMPDIR - directory to use for temp files
344
* UNIQUE_DIR - directory to put unique item files into
345
* USE_CALLOC for some memory requests
346
***********************************************************************
347
*/
348
353
#ifndef BANFILE
354
#define BANFILE "ban_file"
355
#endif
356
361
#define CSPORT 13327
/* old port + 1 */
362
367
#ifndef DMFILE
368
#define DMFILE "dm_file"
369
#endif
370
375
#ifndef LOGFILE
376
#ifdef WIN32
/* change define path */
377
#define LOGFILE "var\\crossfire.log"
378
#else
379
#define LOGFILE "/var/log/crossfire/logfile"
380
#endif
381
#endif
382
406
#define MAP_MAXTIMEOUT 1000
407
408
#define MAP_MINTIMEOUT 500
409
424
#define MAP_MAXRESET 7200
425
426
#define MAP_DEFAULTRESET 7200
427
439
/*#define MEMORY_DEBUG*/
440
447
#define MOTD "motd"
448
453
#define PERM_FILE "forbid"
454
461
#ifndef SHUTDOWN_FILE
462
#define SHUTDOWN_FILE "shutdown"
463
#endif
464
471
#define SOCKETBUFSIZE 256*1024
472
483
/*#define TMPDIR "/home/hugin/a/crossfire/crossfire/tmp"*/
484
#ifdef WIN32
/* change define path tmp */
485
#define TMPDIR "tmp"
486
#else
487
#define TMPDIR "/tmp"
488
#endif
489
495
#define UNIQUE_DIR "unique-items"
496
502
#ifdef WIN32
/* change define path city */
503
# define EMERGENCY_MAPPATH "\\world\\world_105_115"
504
#else
505
# define EMERGENCY_MAPPATH "/world/world_105_115"
506
#endif
507
# define EMERGENCY_X 5
508
# define EMERGENCY_Y 37
509
514
#define MAPDIR "maps"
515
#define TEMPLATE_DIR "template-maps"
516
#define ARCHETYPES "archetypes"
517
#define REGIONS "regions.reg"
518
#define HIGHSCORE "highscore"
519
#define TREASURES "treasures"
520
#define BANISHFILE "banish_file"
521
522
#define MAX_ERRORS 25
523
#define STARTMAX 500
524
#define OBJ_EXPAND 100
526
#define HIGHSCORE_LENGTH 1000
528
#define ARCHTABLE 8192
529
#define MAXSTRING 20
530
531
#define COMMAND_HASH_SIZE 107
533
/***********************************************************************
534
* Section 4 - save player options.
535
*
536
* There are a lot of things that deal with the save files, and what
537
* gets saved with them, so I put them in there own section.
538
*
539
***********************************************************************/
540
551
#ifndef PLAYERDIR
552
#define PLAYERDIR "players"
553
#endif
554
566
#define SAVE_MODE 0660
567
#define SAVE_DIR_MODE 0770
568
569
/* NOTE ON SAVE_INTERVAL and AUTOSAVE: Only one of these two really
570
* needs to be selected. You can set both, and things will work fine,
571
* however, it just means that a lot more saving will be done, which
572
* can slow things down some.
573
*/
574
585
/*#define SAVE_INTERVAL 300*/
586
597
#define AUTOSAVE 5000
598
605
#define NO_EMERGENCY_SAVE
606
613
/*#define BACKUP_SAVE_AT_HOME*/
614
632
#define RESET_LOCATION_TIME 3600
633
639
#define BEAT_INTERVAL 3
640
641
#endif
/* CONFIG_H */
crossfire-code
server
trunk
include
config.h
Generated by
1.8.13