-
Notifications
You must be signed in to change notification settings - Fork 7
/
config.ini
381 lines (307 loc) · 14.6 KB
/
config.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
###############################################################################
# Customizable runtime config file for FluffOS #
###############################################################################
# NOTE: All paths specified here are relative to the mudlib directory except #
# for mudlib directory, and binary directory. #
# Lines beginning with a # or a newline are ignored. #
###############################################################################
# name of this mud
name : 风云IV
# for machines with multiple IP addresses, this specifies which one to use. this
# replaces the SERVER_IP compile-time define.
# mud ip : 0.0.0.0
# port number to accept users on
# port number : 3160
# the external ports we support
external_port_1 : telnet 5555
external_port_2 : telnet 6666
external_port_3 : websocket 8888
# external_port_4 : binary 8888
# absolute pathname of mudlib
mudlib directory : ./
# absolute pathname of driver/config dir
# binary directory : .
websocket http dir : www
###############################################################################
# You shouldn't change anything below this point unless you know what #
# you're changing.... =) #
###############################################################################
# debug.log and author/domain stats are stored here
log directory : /log
# the directories which are searched by #include <...>
# for multiple dirs, separate each path with a ':'
include directories : /include
# the file which defines the master object
master file : /adm/obj/master
# the file where all global simulated efuns are defined.
simulated efun file : /adm/obj/simul_efun
# file to swap out objects; not used if time to swap is 0
# swap file : /swapfile
# alternate debug.log file name (assumed to be in specified 'log directory')
debug log file : debug.log
# The global include file is included automatically.
global include file : <globals.h>
# default no-matching-action message
# default fail message : 指令不存在,请使用help查看指令帮助文档……
# default message when error() occurs (optional)
default error message : [1;33m你发现事情不大对了,但是又说不上来。[2;37;0m
# if an object is left alone for a certain time, then the
# function clean_up will be called. This function can do anything,
# like destructing the object. If the function isn't defined by the
# object, then nothing will happen.
# This time should be substantially longer than the swapping time.
# time to clean up : 600
# How many seconds until an object is reset again.
# This value should be somewhere reasonable in between 'time to clean up' and
# 'time to swap'.
# time to reset : 900
# How long time until an unused object is swapped out.
# Machine with too many players and too little memory: 900 (15 minutes)
# Machine with few players and lot of memory: 10000
# Machine with infinite memory: 0 (never swap).
# time to swap : 300
# Define the size of the compiler stack. This defines how complex
# expressions the compiler can parse. (unused currently)
# compiler stack size : 600
# Define the maximum stack size of the stack machine. This stack will also
# contain all local variables and arguments.
# evaluator stack size : 6000
# Max inherit chain size
# inherit chain size : 30
# Maximum amount of "eval cost" per thread - execution is halted when
# it is exceeded.
# maximum evaluation cost : 30000000
# Max number of local variables in a function.
# maximum local variables : 50
# Set the maximum call depth for functions.
# maximum call depth : 150
# This is the maximum array size allowed for one single array.
maximum array size : 30000
# This is the maximum allowed size of a variable of type 'buffer'.
# maximum buffer size : 400000
# Max size for a mapping
# maximum mapping size : 150000
# maximum length of a string variable
# maximum string length : 200000
# Maximum number of bits in a bit field. They are stored in printable
# strings, 6 bits per byte.
# maximum bits in a bitfield : 12000
# max number of bytes you allow to be read and written with read_bytes
# and write_bytes
# maximum byte transfer : 200000
# Max size of a file allowed to be read by 'read_file()'.
# maximum read file size : 200000
# Define the size of the shared string hash table. This number should
# a prime, probably between 1000 and 30000; if you set it to about 1/5
# of the number of distinct strings you have, you will get a hit ratio
# (number of comparisons to find a string) very close to 1, as found strings
# are automatically moved to the head of a hash chain. You will never
# need more, and you will still get good results with a smaller table.
# hash table size : 65536
# Object hash table size.
# Define this like you did with the strings; probably set to about 1/4 of
# the number of objects in a game, as the distribution of accesses to
# objects is somewhat more uniform than that of strings.
# object table size : 4096
# There is a hash table for living objects, used by find_living().
# This must be one of 4, 16, 64, 256, 1024, 4096
living hash table size : 2048
# Set the granularity of game-time (shortest time interval visible ingame)
# gametick msec : 1000
# Set heartbeat interval in milliseconds (ms).
# heartbeat interval msec : 1000
# explode():
#
# The old behavior (#undef both of the below) strips any number of delimiters
# at the start of the string, and one at the end. So explode("..x.y..z..",
# ".") gives ({ "x", "y", "", "z", "" })
#
# sane explode string strips off at most one leading delimiter, and still
# strips off one at the end, so the example above gives
# ({ "", "x", "y", "", "z", "" }).
#
# reversible explode string overrides SANE_EXPLODE_STRING, and makes it so
# that implode(explode(x, y), y) is always x; i.e. no delimiters are ever
# stripped. So the example above gives
# ({ "", "", "x", "y", "", "z", "", "" }).
# sane explode string : 1
# reversible explode string : 0
# SANE_SORTING: Use system provided fastest sorting routine for various
# sorting, including sort_array EFUN.
#
# This replace the old internal version qsort which only sorts to one
# direction repetitively. so following LPC code:
#
# sort_array(({4,3,2,1}), (: -($1<$2) :));
#
# can still return ({1,2,3,4}), even though it only returns -1 and 0.
#
# It is recommended to fix your LPC code to not rely on this behavior.
#
# Your LPC code should return 1, 0, -1 for situation where first argument
# is less than, equal to, or greater than the second argument. This will
# will work with both implementation.
#
# Old code should work fine with this added, easy to inspect by searching
# for sort_array.
# sane sorting : 1
# WARN_TAB: Some versions of the editor built in indent function use tabs for
# indenting. This options turns on a warning message for files indented with
# tabs instead of spaces.
# warn tab : 0
# WOMBLES: Don't allow spaces between start/end of array/mapping/functional token
# chars so ({1,2,3}) still works, but ( { 1 , 2 , 3 } ) doesn't and
# ({ 1 , 2 , 3 }) does.
# wombles : 0
# Enable type checking for call_other() (-> operator on objects)
# call other type check : 0
# Make it warning instead of errors
# call other warn : 0
# If you set this, the driver doesn't do any handling of runtime errors,
# other than to turn the heartbeats of objects off. Information about the
# error is passed in a mapping to the error_handler() function in the master
# object. Whatever is returned is put in the debug.log.
#
# A good mudlib error handler is one of the best tools for tracking down
# errors. Unfortunately, you need to have one. Check the testsuite or other
# libs for an example.
# mudlib error handler : 1
# NO_RESETS: Completely disable the periodic calling of reset()
# no resets : 0
# LAZY_RESETS: If this option is set, an object will only have reset() called in it when
# it is touched via call_other() or move_object() (assuming enough time has
# passed since the last reset). If it is unset, then reset() will be called
# as always (which guaranteed that reset would always be called at least
# once). The advantage of lazy resets is that reset doesn't get called in an
# object that is touched once and never again (which can save memory since
# some objects won't get reloaded that otherwise would).
# lazy resets : 0
# RANDOMIZED_RESETS: if this is defined, the reset() will be called in
# randomized time interval. The interval vary from TIME_TO_RESET/2 to TIME_TO_RESET-1 .
# if this is undefined, the reset() will be called among all objects at the
# same time, with the interval as TIME_TO_RESET
# randomized resets : 1
# NO_ANSI: Set if you wish to disallow users from typing in commands that contain ANSI
# escape sequences. Setting NO_ANSI causes all escapes (ASCII 27) to be
# replaced with a space ' ' before the string is passed to the action
# routines added with add_action.
# no ansi : 1
# STRIP_BEFORE_PROCESS_INPUT allows the location where the stripping is
# done to be controlled. If it is defined, then process_input() doesn't
# see ANSI characters either; if it is undefined ESC chars can be processed
# by process_input(), but are stripped before add_actions are called.
# Note that if NO_ADD_ACTION is defined, then #define NO_ANSI without
# #define STRIP_BEFORE_PROCESS_INPUT is the same as #undef NO_ANSI.
#
# If you anticipate problems with users intentionally typing in ANSI codes to
# make your terminal flash, etc set this.
# strip before process input : 1
# THIS_PLAYER_IN_CALL_OUT: Set this if you wish this_player() to be usable from within call_out()
# callbacks.
# this player in call_out : 1
# TRACE: Set this to enable the trace() and traceprefix() efuns. (keeping this
# unset will cause the driver to run faster).
# trace : 1
# TRACE_CODE: Set this to enable code tracing (the driver will print out the previous
# lines of code to an error) eval_instruction() runs about twice as fast when
# this is not set (for the most common eoperators).
# trace code : 0
# INTERACTIVE_CATCH_TELL: Set this if you want catch_tell called on interactives
# as well as NPCs. If this is set, the user object will need a catch_tell(msg)
# method that calls receive(msg);
# interactive catch tell : 0
# RECEIVE_SNOOP: Set this if you want snoop text to be sent to the receive_snoop() function
# in the snooper object (instead of being sent directly via add_message()).
# This is useful if you want to build a smart client that does something
# different with snoop messages.
# receive snoop : 1
# SNOOP_SHADOWED: Set this if you want snoop to report what is sent to the player even
# in the event that the player's catch_tell() is shadowed and the player may not be
# seeing what is being sent. Messages of this sort will be prefixed with $$.
# snoop shadowed : 0
# REVERSE_DEFER:
# If not defined executes defer functions in LIFO mode.
# If defined executes defer functions in FIFO mode.
# reverse defer : 0
# HAS_CONSOLE: If defined, the driver can take the argument -C
# which will give the driver an interactive console (you can type
# commands at the terminal.) Backgrounding the driver will turn off
# the console, but sending signal SIGTTIN (kill -21) to the driver can
# turn it back on. Typing 'help' will display commands available.
# The intent is to allow the inspection of things that are difficult
# to inspect from inside the mud.
# has console : 1
# NONINTERACTIVE_STDERR_WRITE: if defined, all writes/tells/etc to
# noninteractive objects will be written to stderr prefixed with a ']'
# (old behavior).
# Compat status: Easy to support, and also on the "It's a bug! No, it's
# a feature!" religious war list.
# noninteractive stderr write : 0
# Set this if you want FluffOS to call crash() in master.c and then shutdown
# when signals are received that would normally crash the driver.
# trap crashes : 1
# OLD_TYPE_BEHAVIOR: reintroduces a bug in type-checking that effectively
# renders compile time type checking useless. For backwards compatibility.
# Compat status: dealing with all the resulting compile errors can be
# a huge pain even if they are correct, and the impact on the code is
# small.
# old type behavior : 0
# OLD_RANGE_BEHAVIOR: define this if you want negative indexes in string
# or buffer range values (not lvalue, i.e. x[-2..-1]; for e.g. not
# x[-2..-1] = foo, the latter is always illegal) to mean counting from the
# end
# Compat status: Not horribly difficult to replace reliance on this, but not
# trivial, and cannot be simulated.
# old range behavior : 0
# define to get a warning for code that might use the old range behavior
# when you're not actually using the old range behavior
# warn old range behavior : 1
# supress warnings about unused arguments; only warn about unused local
# variables. Makes older code (where argument names were required) compile
# more quietly.
# supress argument warnings : 1
# add_action: Make enable_commands() always re-call init(). same as
# calling enable_commands(1).
# enable_commands call init : 1
# sprintf: Make format like "%10s" ignore ANSI escape code length, as they
# are not visible in the client.
# sprintf add_justified ignore ANSI colors : 1
# call_out(0) loop prevention:
# This is the number of call_out(.., 0) call can be scheduled on the same
# gametick.
# call_out(0) next level : 1000
# telnet extensions support
# enable mxp : 0
# enable gmcp : 0
# enable zmp : 0
# enable mssp : 1
###############################################################################
# The following aren't currently used or implemented (yet) #
###############################################################################
# maximum number of users in the game (unused currently)
# maximum users : 256
# the address server is an external program that lets the mud translate
# internet names to numbers (and vice versa). select an unused port.
# address server ip : localhost
# address server port : 3990
# Directory to save binaries in. (if BINARIES is defined)
# save binaries directory : /binaries
# Reserve an extra memory area from malloc(), to free when we run out
# of memory; so begins Armageddon.
# If this value is 0, no area will be reserved.
# reserved size : 10000
# Defines the number of bits to use in the call_other cache (in interpret.c).
#
# Memory overhead is (1 << APPLY_CACHE_BITS)*16.
# [assuming 32 bit pointers and 16 bit shorts]
#
# ACB: entries: overhead:
# 6 64 1k
# 8 256 4k
# 10 1,024 16k
# 12 4,096 64k
# 14 16,384 256k
# 16 65,536 1M
# 20 1,048,576 16M
# 22 4,194,304 64M
# apply cache bits : 22