Repository navigation
Expand file tree
/
Copy pathconfig.example.ini
More file actions
370 lines (296 loc) · 14.6 KB
/
Copy pathconfig.example.ini
File metadata and controls
370 lines (296 loc) · 14.6 KB
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
###############################################################################
# Customizable runtime config file for FluffOS #
###############################################################################
# Defaults based on FluffOS source from 2026.
# LPC paths are relative to the mudlib root. The mudlib directory is an OS path;
# "." uses the driver's startup directory. The log directory is also relative
# to the startup directory, with leading slashes ignored.
# A # starts a comment anywhere on a line; blank lines are ignored.
# Omitted integer options use the driver's compiled-in defaults.
###############################################################################
# name of this mud
name : mudcore
# 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
# Legacy alias for external_port_1; do not enable alongside external_port_1.
# port number : 3160
# the external ports we support(telnet/binary/ascii/MUD/websocket)
external_port_1 : telnet 3166
# external_port_1_tls : cert=cert.crt key=cert.key
external_port_2 : websocket 8080
# external_port_2_tls : cert=cert.crt key=cert.key
# external_port_3 : binary 4003
# external_port_4 : ascii 4004
# external_port_5 : MUD 4005
# absolute pathname of mudlib
mudlib directory : .
# pathname of websocket http dir
websocket http dir : www
# Optional external commands: configure approved executable paths in the MUDLIB.
# No curl or other external executable is required by the framework itself.
# Uncomment the appropriate example and adjust the path for your installation.
# Keep command IDs consistent with the MUDLIB calls.
# Linux example:
# external_cmd_1 : /usr/bin/curl
# Windows example:
# external_cmd_2 : C:\ProgramData\chocolatey\bin\curl.exe
###############################################################################
# You shouldn't change anything below this point unless you know what #
# you're changing.... =) #
###############################################################################
# debug.log and stats; leading '/' is ignored (relative to startup directory).
log directory : /log
# the directories which are searched by #include <...>
# for multiple dirs, separate each path with a ':'
include directories : /include:/mudcore/include
# the file which defines the master object
master file : /system/kernel/master
# the file where all global simulated efuns are defined.
simulated efun file : /system/kernel/simul_efun
# 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 : [35m指令错误,请输入 help 查看游戏帮助。[0m
# default message when error() occurs (optional)
default error message : [31m你发现事情不大对了,但是又说不上来。[0m
##############################################################
# ==== Runtime Config Table ==== #
##############################################################
# 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.
# time to clean up : 600
# How many seconds until an object is reset again.
# time to reset : 900
# Legacy compatibility value; the current driver does not swap object programs.
# time to swap : 300
# Compatibility value; the VM evaluator stack uses CFG_EVALUATOR_STACK_SIZE
# from the driver build. Changing this entry does not resize that stack.
# evaluator stack size : 65536
# Max inherit chain size
# inherit chain size : 30
# Maximum evaluation budget per LPC execution, in microseconds.
# Execution is halted when the budget is exceeded.
# maximum evaluation cost : 30000000
# Compatibility value; the VM call-depth limit uses CFG_MAX_CALL_DEPTH
# from the driver build rather than this runtime entry.
# maximum call depth : 150
# This is the maximum array size allowed for one single array.
maximum array size : 30000 # default: 15000
# This is the maximum allowed size of a variable of type 'buffer'.
# maximum buffer size : 1048576
# Max size for a mapping
# maximum mapping size : 150000
# maximum length of a string variable
# maximum string length : 1048576
# 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 : 262144
# Max size of a file allowed to be read by 'read_file()'.
# maximum read file size : 262144
# Shared-string hash table size. Minimum 7001; rounded up to a power of 2
# and capped at 2^30 by the driver.
# hash table size : 65536
# Legacy compatibility value; the current object table grows automatically.
# object table size : 4096
# There is a hash table for living objects, used by find_living().
# Minimum 256; rounded up to a power of 2. The current value 2048 is valid.
living hash table size : 2048 # default: 256
# Set the granularity of game-time (shortest time interval visible ingame)
# gametick msec : 1000
# Set heartbeat interval in milliseconds (ms).
# heartbeat interval msec : 1000
# Promise/async limits (current driver defaults).
# Maximum concurrently suspended async frames; 0 disables this limit.
# max suspended async functions : 10000
# Promise delivery budget per event-loop turn, in microseconds.
# 0 selects the built-in 1 ms budget; it does not disable scheduling limits.
# async drain eval budget : 0
# Maximum queued promise deliveries and pending async_yield() operations.
# 0 disables the limit.
# max pending promise deliveries : 100000
# 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
# 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
# suppress warnings about unused arguments; only warn about unused local
# variables. Makes older code (where argument names were required) compile
# more quietly.
# suppress 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) nest level : 1000
# TRACE: set this to 1 to collect context information during LPC traces.
# trace lpc execution context : 0
# TRACE: set this to 1 to collect LPC instruction information during LPC traces.
# trace lpc instructions : 0
# Log each file name as it is preloaded during driver startup.
# display preload progress : 1
# telnet extensions support
# enable mxp : 0
enable gmcp : 1 # default: 0
# enable zmp : 0
# enable mssp : 1
# enable msp : 1
# enable msdp : 0
###############################################################################
# Optional access controls #
###############################################################################
# package_ffi: colon-separated shared-library paths allowed by ffi_load().
# Empty (default) adds no path restriction; master::valid_ffi() still decides
# whether each FFI operation is permitted.
# ffi allowed libraries :
# package_contrib: colon-separated names readable by LPC get_os_env().
# Empty (default) grants no read access beyond the writable list below.
# allowed os environment variables :
# package_contrib: names writable by LPC set_os_env(), also implicitly readable.
# Empty (default) denies writes. These lists restrict LPC efun access only.
# writable os environment variables :