ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/config.h
Revision: 1.43
Committed: Thu May 17 14:14:55 2007 UTC (17 years ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: rel-2_1
Changes since 1.42: +1 -9 lines
Log Message:
remove superfluous/broken settings and related code

- COZY_SERVER:
  enabled most msall adjustments, changed digestion formula to the original one,
  party member treament w.r.t. pets enforced.
- PROHIBIT_PLAYERKILL: default
- real_wiz: removed and enforced
- create_home_portals: removed and enforced
- casting_time: removed and forced to be off (was crashing anyways)
- was_wiz flag removed and treated as off usually unless it was used
  in place of flag_wiz.
- do not save or restore wiz, wizcast and wizpass flags.

File Contents

# Content
1 /*
2 * CrossFire, A Multiplayer game
3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (C) 1992 Frank Tore Johansen
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 * The authors can be reached via e-mail at crossfire@schmorp.de
23 */
24
25 /* This file contains various #defines that select various options.
26 * Some may not be desirable, and some just may not work.
27 *
28 * There are some options that are not selectable in this file which
29 * may not always be undesirable. An example would be certain
30 * treasures that you may not want to have available. To remove the
31 * activation code would make these items worthless - instead remove
32 * these from the treasure file. Some things to look for are:
33 *
34 * prepare_weapon, improve_*: Allow characters to enchant their own
35 * weapons
36 * ench_armour: Allow characters to enchant their armor.
37 *
38 * In theory, most of the values here should just be defaults, and
39 * everything here should just be selectable by different run time
40 * flags However, for some things, that would just be too messy.
41 */
42
43 /* There are 4 main sections to this file-
44 * Section 1 is feature selection (enabling/disabling certain features)
45 *
46 * Section 2 is compiler/machine dependant section (stuff that just
47 * makes the program compile and run properly, but don't change the
48 * behavior)
49 *
50 * Section 3 is location of certain files and other defaults. Things in
51 * this section generally do not need to be changed, and generally do
52 * not alter the play as perceived by players. However, you may
53 * have your own values you want to set here.
54 *
55 * Section 4 deals with save file related options.
56 */
57
58 /*******************************************************************
59 * SECTION 1 - FEATURES
60 *
61 * You don't have to change anything here to get a working program, but
62 * you may want to on personal preferance. Items are arranged
63 * alphabetically.
64 *
65 * Short list of features, and what to search for:
66 * CS_LOGSTATS - log various new client/server data.
67 * DEBUG - more verbose message logging?
68 * MAP_CLIENT_X, MAP_CLIENT_Y - determines max size client map will receive
69 * MAX_TIME - how long an internal tick is in microseconds
70 * MANY_CORES - generate core dumps on gross errors instead of continuing?
71 * PARTY_KILL_LOG - stores party kill information
72 *
73 ***********************************************************************/
74
75 /* Use a very easy, non-challenging server?
76 * Defining the COZY_SERVER will make the server much less challenging:
77 * no stats loss on death, much less experience loss.
78 */
79 #define COZY_SERVER 1
80
81 /* Use balanced stat loss code?
82 * This code is a little more merciful with repeated stat loss at lower
83 * levels. Basically, the more stats you have lost, the less likely that
84 * you will lose more. Additionally, lower level characters are shown
85 * a lot more mercy (there are caps on how much of a stat you can lose too).
86 * On the nasty side, if you are higher level, you can lose mutiple stats
87 * _at_once_ and are shown less mercy when you die. But when you're higher
88 * level, it is much easier to buy back your stats with potions.
89 * Turn this on if you want death-based stat loss to be more merciful
90 * at low levels and more cruel at high levels.
91 * Only works when stats are depleted rather than lost. This option has
92 * no effect if you are using genuine stat loss.
93 *
94 * The BALSL_.. values control this behaviour.
95 * BALSL_NUMBER_LOSSES_RATIO determines the number of stats to lose.
96 * the character level is divided by that value, and that is how many
97 * stats are lost.
98 *
99 * BALSL_MAX_LOSS_RATIO puts the upper limit on depletion of a stat -
100 * basically, level/max_loss_ratio is the most a stat can be depleted.
101 *
102 * BALSL_LOSS_CHANCE_RATIO controls how likely it is a stat is depleted.
103 * The chance not to lose a stat is
104 * depleteness^2 / (depletedness^2+ level/ratio).
105 * ie, if the stats current depleted value is 2 and the character is level
106 * 15, the chance not to lose the stat is 4/(4+3) or 4/7. The higher the
107 * level, the more likely it is a stat can get really depleted, but
108 * this gets more offset as the stat gets more depleted.
109 *
110 */
111 /* GD */
112
113 #define BALSL_LOSS_CHANCE_RATIO 100
114 #define BALSL_NUMBER_LOSSES_RATIO 100
115 #define BALSL_MAX_LOSS_RATIO 100
116
117
118 /* Don't edit these values. They are configured in lib/settings. These are
119 Simply the defaults. */
120
121 #define BALANCED_STAT_LOSS FALSE
122 #define PERMANENT_EXPERIENCE_RATIO 25
123 #define DEATH_PENALTY_RATIO 20
124 #define DEATH_PENALTY_LEVEL 3
125 #define SET_TITLE TRUE
126 #define SIMPLE_EXP TRUE
127 #define SPELLPOINT_LEVEL_DEPEND TRUE
128 #define SPELL_ENCUMBRANCE TRUE
129 #define SPELL_FAILURE_EFFECTS FALSE
130 #define RESURRECTION FALSE
131 #define SEARCH_ITEMS TRUE
132 #define NOT_PERMADETH TRUE
133 #define EXPLORE_MODE FALSE
134 #define STAT_LOSS_ON_DEATH FALSE
135 #define PK_LUCK_PENALTY 1
136 #define SET_FRIENDLY_FIRE 5
137 #define ARMOR_MAX_ENCHANT 5
138 #define ARMOR_WEIGHT_REDUCTION 10
139 #define ARMOR_WEIGHT_LINEAR TRUE
140 #define ARMOR_SPEED_IMPROVEMENT 10
141 #define ARMOR_SPEED_LINEAR TRUE
142 #define CREATE_HOME_PORTALS FALSE
143
144 /* you can edit the ones below */
145
146
147 /* CS_LOGSTATS will cause the server to log various usage stats
148 * (number of connections, amount of data sent, amount of data received,
149 * and so on.) This can be very useful if you are trying to measure
150 * server/bandwidth usage. It will periodially dump out information
151 * which contains usage stats for the last X amount of time.
152 * CS_LOGTIME is how often it will print out stats.
153 */
154 #define CS_LOGSTATS
155 #define CS_LOGTIME 600
156
157 /* DEBUG generates copious amounts of output. I tend to change the CC options
158 * in the crosssite.def file if I want this. By default, you probably
159 * dont want this defined.
160 */
161 #ifndef DEBUG
162 # define DEBUG
163 #endif
164 /*
165 * This option creates more core files. In some areas, there are certain
166 * checks done to try and make the program more stable (ie, check
167 * parameter for null, return if it is). These checks are being done
168 * for things that should not happen (ie, being supplied a null parameter).
169 * What MANY_CORES does, is if one of these checks is true, it will
170 * dump core at that time, allowing for fairly easy tracking down of the
171 * problem. Better to fix problems than create thousands of checks.
172 */
173
174 #define MANY_CORES
175
176 /*
177 * This determines the maximum map size the client can request (and
178 * thus what the server will send to the client.
179 * Client can still request a smaller map size (for bandwidth reasons
180 * or display size of whatever else).
181 * The larger this number, the more cpu time and memory the server will
182 * need to spend to figure this out in addition to bandwidth needs.
183 * The server cpu time should be pretty trivial.
184 * There may be reasons to keep it smaller for the 'classic' crossfire
185 * experience which was 11x11. Big maps will likely make the same at
186 * least somewhat easier, but client will need to worry about lag
187 * more.
188 * I put support in for non square map updates in the define, but
189 * there very well might be things that break horribly if this is
190 * used. I figure it is easier to fix that if needed than go back
191 * at the future and have to redo a lot of stuff to support rectangular
192 * maps at that point.
193 *
194 * MSW 2001-05-28
195 */
196
197 #define MAP_CLIENT_X 31
198 #define MAP_CLIENT_Y 31
199
200 /*
201 * If you feel the game is too fast or too slow, change MAX_TIME.
202 * You can experiment with the 'speed <new_max_time> command first.
203 * The length of a tick is MAX_TIME microseconds. During a tick,
204 * players, monsters, or items with speed 1 can do one thing.
205 */
206
207 #define MAX_TIME 120000
208
209 /* Polymorph as it currently stands is unbalancing, so by default
210 * we have it disabled. It can be enabled and it works, but
211 * it can be abused in various ways.
212 */
213 #define NO_POLYMORPH
214
215
216 /* This determine how many entries are stored in the kill log. You
217 * can see this information with the 'party kills' command. More entries
218 * mean slower performance and more memory.
219 */
220 #define PARTY_KILL_LOG 40
221
222 /*
223 * The PERM_EXP values adjust the behaviour of permenent experience. - if
224 * the setting permanent_experience_percentage is zero, these values have
225 * no meaning. The value in the settings file is the percentage of the
226 * experience that is permenent, the rest could be lost on death. When dying,
227 * the greatest amount of non-permenent exp it is possible to lose at one time
228 * is PERM_EXP_MAX_LOSS_RATIO - this is calculated as
229 * total exp - perm exp * loss ratio. The gain ratio is how much of experienced
230 * experience goes to the permanent value. This does not detract from total
231 * exp gain (ie, if you gained 100 exp, 100 would go to the skill total and
232 * 10 to the permanent value).
233 *
234 * A few thoughts on these default value (by MSW)
235 * gain ratio is pretty much meaningless until exp has been lost, as until
236 * that poin, the value in the settings file will be used.
237 * It is also impossible for the exp to actually be reduced to the permanent
238 * exp ratio - since the loss ratio is .5, it will just get closer and
239 * closer. However, after about half a dozen hits, pretty much all the
240 * exp that can be lost has been lost, and after that, only minor loss
241 * will occur.
242 */
243 /* GD */
244
245 #define PERM_EXP_GAIN_RATIO 0.10f
246 #define PERM_EXP_MAX_LOSS_RATIO 0.50f
247
248 /* Enable the new material code - it needs some work. You can
249 * enable this, and things will work, just you'll see a whole
250 * bunch more materials show up, and thus a whole bunch more materials
251 * in your inventory, and the sorting for them isn't really good.
252 */
253
254 /*
255 #define NEW_MATERIAL_CODE
256 */
257
258
259 /***********************************************************************
260 * Section 3
261 *
262 * General file and other defaults that don't need to be changed, and
263 * do not change gameplay as percieved by players much. Some options
264 * may affect memory consumption however.
265 *
266 * Values:
267 *
268 * CSPORT - port to use for new client/server
269 * DMFILE - file with dm/wizard access lists
270 * LOGFILE - where to log if using -daemon option
271 * MAP_ - various map timeout and swapping parameters
272 * MAX_OBJECTS - how many objects to keep in memory.
273 * MAX_OBJECTS_LWM - only swap maps out if below that value
274 * MOTD - message of the day - printed each time someone joins the game
275 * PERM_FILE - limit play times
276 * SHUTDOWN - used when shutting down the server
277 * SOCKETBUFSIZE - size of buffer used internally by the server for storing
278 * backlogged messages.
279 * TMPDIR - directory to use for temp files
280 * UNIQUE_DIR - directory to put unique item files into
281 ***********************************************************************
282 */
283
284 /* CSPORT is the port used for the new client/server code. Change
285 * if desired. Only of relevance if ERIC_SERVER is set above
286 */
287 #define CSPORT 13327 /* old port + 1 */
288
289 /*
290 * DMFILE
291 * A file containing valid names that can be dm, one on each line. See
292 * example dm_file for syntax help.
293 */
294 #ifndef DMFILE
295 #define DMFILE "dm_file"
296 #endif
297
298 /* LOGFILE specifies which file to log to when playing with the
299 * -daemon option.
300 */
301 #ifndef LOGFILE
302 #define LOGFILE "/var/log/crossfire/logfile"
303 #endif
304
305 /*
306 * If you want to have a Message Of The Day file, define MOTD to be
307 * the file with the message. If the file doesn't exist or if it
308 * is empty, no message will be displayed.
309 * (It resides in the CONFDIR directory)
310 */
311 #define MOTD "motd"
312
313 /*
314 * You can restrict playing in certain times by creating a PERMIT_FILE
315 * in CONFDIR. See the sample for usage notes.
316 */
317 #define PERM_FILE "forbid"
318
319 /*
320 * If you want to take the game down while installing new versions, or
321 * for other reasons, put a message into the SHUTDOWN_FILE file.
322 * Remember to delete it when you open the game again.
323 * (It resides in the CONFDIR directory)
324 */
325 #ifndef SHUTDOWN_FILE
326 #define SHUTDOWN_FILE "shutdown"
327 #endif
328
329 /*
330 * SOCKETBUFSIZE is the size of the buffer used internally by the server for
331 * storing backlogged messages for the client. This is not operating system
332 * buffers or the like. This amount is used per connection (client).
333 * This buffer is in addition to OS buffers, so it may not need to be very
334 * large. When the OS buffer and this buffer is exhausted, the server
335 * will drop the client connection for falling too far behind. So if
336 * you have very slow client connections, a larger value may be
337 * warranted.
338 */
339 #define SOCKETBUFSIZE 256*1024
340
341 /*
342 * Your tmp-directory should be large enough to hold the uncompressed
343 * map-files for all who are playing. Local to 'lib' directory.
344 */
345 #define TMPDIR "tmp"
346
347 /* Directory to use for unique items. This is placed into the 'lib'
348 * directory. Changing this will cause any old unique items file
349 * not to be used.
350 */
351 #define UNIQUE_DIR "unique-items"
352
353 /*
354 * These defines tells where, relative to LIBDIR, the maps, the map-index,
355 * archetypes highscore and treaures files and directories can be found.
356 */
357
358 #define MAPDIR "maps"
359 #define TEMPLATE_DIR "template-maps"
360 #define ARCHETYPES "archetypes"
361 #define REGIONS "regions"
362 #define HIGHSCORE "highscore"
363 #define TREASURES "treasures"
364
365 #define HIGHSCORE_LENGTH 1000 /* How many entries there are room for */
366
367 #define MAXSTRING 20
368
369 #define COMMAND_HASH_SIZE 107 /* If you change this, delete all characters :) */
370
371
372
373 /***********************************************************************
374 * Section 4 - save player options.
375 *
376 * There are a lot of things that deal with the save files, and what
377 * gets saved with them, so I put them in there own section.
378 *
379 ***********************************************************************/
380
381 /*
382 * If you want the players to be able to save their characters between
383 * games, define SAVE_PLAYER and set PLAYERDIR to the directories
384 * where the player-files will be put.
385 * Remember to create the directory (make install will do that though).
386 *
387 * If you intend to run a central server, and not allow the players to
388 * start their own crossfire, you won't need to define this.
389 *
390 */
391
392 #ifndef PLAYERDIR
393 # define PLAYERDIR "players"
394 #endif
395
396 /*
397 * If you have defined SAVE_PLAYER, you might want to change this, too.
398 * This is the access rights for the players savefiles.
399 * Given that crossfire runs in a client/server model, there should
400 * be no issue setting these to be quite restrictive (600 and 700).
401 * Before client/server, multiple people might run the executable,
402 * thus requiring that the server be setuid/setgid, and more generous
403 * permisisons needed.
404 * SAVE_MODE is permissions for the files, SAVE_DIR_MODE is permission
405 * for nay directories created.
406 */
407 /* IMPORTANT: there is a race during saving, where the umask is being applied */
408 #define SAVE_MODE 0660
409 #define SAVE_DIR_MODE 0770
410
411 /*
412 * The message to send to clients when the server calls cleanup (on crash, shutdown, restart and so on).
413 */
414 #define CLEANUP_MESSAGE "The server will likely restart within the minute. Our apologies."
415