f2641d4d986d596f259f18555d292d73293db9d8
[mudpy.git] / doc / source / configuration.rst
1 ===============
2  configuration
3 ===============
4
5 .. Copyright (c) 2004-2018 Jeremy Stanley <fungi@yuggoth.org>.
6    Permission to use, copy, modify, and distribute this software is
7    granted under terms provided in the LICENSE file distributed with
8    this software.
9
10 .mudpy.filing
11 -------------
12
13 .mudpy.filing.groups
14 ~~~~~~~~~~~~~~~~~~~~
15
16 dict, optional
17
18 Each item in the dict identifies options for the default backing
19 file of the group named in its key. The value is itself a dict with
20 its keys and values corresponding to those options (for now, only
21 ``flags`` is implemented, with a value of ``private`` indicating it
22 should be readable only by the system user under which the mudpy
23 process is running).
24
25 Example::
26
27   .mudpy.filing.groups:
28       account:
29           flags:
30               - private
31
32 .mudpy.filing.prefix
33 ~~~~~~~~~~~~~~~~~~~~
34
35 string, optional
36
37 This is the root path beneath which all relative file references,
38 including directories comprising the search path, are assumed to be
39 found. The default value of ``.`` indicates the current working
40 directory at the time the service was initially started.
41
42 Example::
43
44   .mudpy.filing.prefix: .
45
46 .mudpy.filing.search
47 ~~~~~~~~~~~~~~~~~~~~
48
49 list, required
50
51 Directories to search for expected data files. If not a fully
52 canonical path, this is assumed to be relative to the ``prefix``.
53
54 Example::
55
56   .mudpy.filing.search:
57       - ""
58       - etc
59       - share
60       - data
61
62 .mudpy.filing.stash
63 ~~~~~~~~~~~~~~~~~~~
64
65 string, required
66
67 This is the default directory where new data files will be written
68 if their full paths are not specified and they aren't already found
69 in the ``search`` list. If not a fully canonical path, this is
70 assumed to be relative to the ``prefix``.
71
72 Example::
73
74   .mudpy.filing.stash: data
75
76 .mudpy.linguistic
77 -----------------
78
79 .mudpy.linguistic.actions
80 ~~~~~~~~~~~~~~~~~~~~~~~~~
81
82 dict, optional
83
84 This is used to tailor the appearance of output generated by the
85 ``say`` command and its relatives, so as to add some readability and
86 flavor. It matches a visible action to punctuation (ask, exclaim, et
87 cetera).
88
89 Example::
90
91   .mudpy.linguistic.actions:
92       ?: ask
93       ",": begin
94       -: begin
95       :: begin
96       ;: begin
97       "!": exclaim
98       ...: muse
99       .: say
100
101 .mudpy.linguistic.default_punctuation
102 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103
104 string, optional
105
106 Unpunctuated statements made by actors should be assumed to
107 terminate with this value.
108
109 Example::
110
111   .mudpy.linguistic.default_punctuation: .
112
113 .mudpy.linguistic.typos
114 ~~~~~~~~~~~~~~~~~~~~~~~
115
116 dict, optional
117
118 Replacements for common typographical and capitalization errors.
119
120 Example::
121
122   .mudpy.linguistic.typos:
123       i: I
124       i'd: I'd
125       i'll: I'll
126       i'm: I'm
127       teh: the
128       theyre: they're
129       youre: you're
130
131 .mudpy.limit
132 ------------
133
134 .mudpy.limit.admins
135 ~~~~~~~~~~~~~~~~~~~
136
137 list, optional
138
139 The first users to create accounts with names in this list will
140 automatically be given full administrative privileges.
141
142 Example::
143
144   .mudpy.limit.admins:
145       - admin
146
147 .mudpy.limit.avatars
148 ~~~~~~~~~~~~~~~~~~~~
149
150 int, required
151
152 This is the maximum number of avatars allowed for each account.
153
154 Example::
155
156   .mudpy.limit.avatars: 7
157
158 .mudpy.limit.backups
159 ~~~~~~~~~~~~~~~~~~~~
160
161 int, optional
162
163 This is the number of backups to keep and rotate when overwriting
164 data files. If unspecified or set to 0, no backup copies will be
165 made.
166
167 Example::
168
169   .mudpy.limit.backups: 10
170
171 .mudpy.limit.password_tries
172 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
173
174 int, required
175
176 This is the maximum number of password failures allowed during the
177 login process. Once exceeded, the user will be disconnected.
178
179 Example::
180
181   .mudpy.limit.password_tries: 3
182
183 .mudpy.log
184 ----------
185
186 .mudpy.log.file
187 ~~~~~~~~~~~~~~~
188
189 string, optional
190
191 If set, log messages will be recorded to this file.
192
193 Example::
194
195   .mudpy.log.file: var/mudpy.log
196
197 .mudpy.log.lines
198 ~~~~~~~~~~~~~~~~
199
200 int, optional
201
202 Number of log entries to keep in memory (the oldest are
203 discarded)... If unset or 0, none will be written to mudpy's
204 internal memory.
205
206 Example::
207
208   .mudpy.log.lines: 1000
209
210 .mudpy.log.stdout
211 ~~~~~~~~~~~~~~~~~
212
213 bool, optional
214
215 If set to ``yes``, messages will be logged to the standard output of
216 the mudpy process. If unspecified, the default is ``no``.
217
218 Example::
219
220   .mudpy.log.stdout: true
221
222 .mudpy.log.syslog
223 ~~~~~~~~~~~~~~~~~
224
225 string, optional
226
227 If set, mudpy will send messages to the system log, and under the
228 name specified by this value (Unix derivatives only).
229
230 Example::
231
232   .mudpy.log.syslog: mudpy
233
234 .mudpy.movement
235 ---------------
236
237 .mudpy.movement.*.enter_term
238 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239
240 string, multiple
241
242 Word or words describing the direction from where you are seen to
243 enter the next room when moving.
244
245 Example::
246
247   .mudpy.movement.down.enter_term: above
248   .mudpy.movement.east.enter_term: the west
249   .mudpy.movement.north.enter_term: the south
250   .mudpy.movement.south.enter_term: the north
251   .mudpy.movement.up.enter_term: below
252   .mudpy.movement.west.enter_term: the east
253
254 .mudpy.movement.*.exit_term
255 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
256
257 string, multiple
258
259 Word or words describing the direction where you are seen to exit
260 the current room when moving.
261
262 Example::
263
264   .mudpy.movement.down.exit_term: downward
265   .mudpy.movement.east.exit_term: to the east
266   .mudpy.movement.north.exit_term: to the north
267   .mudpy.movement.south.exit_term: to the south
268   .mudpy.movement.up.exit_term: upward
269   .mudpy.movement.west.exit_term: to the west
270
271 .mudpy.movement.*.vector
272 ~~~~~~~~~~~~~~~~~~~~~~~~
273
274 triplet, multiple
275
276 Vector of signed integer units for use in vector addition to derive
277 the destination coordinates from the current coordinates when moving
278 through a gridlink exit. The example coordinate system used is left
279 handed (east, north and up are positive, west, south and down are
280 negative) and three-dimensional with a tuple component order of
281 (longitude, latitude, altitude).
282
283 Example::
284
285   .mudpy.movement.down.vector: [0, 0, -1]
286   .mudpy.movement.east.vector: [1, 0, 0]
287   .mudpy.movement.north.vector: [0, 1, 0]
288   .mudpy.movement.south.vector: [0, -1, 0]
289   .mudpy.movement.up.vector: [0, 0, 1]
290   .mudpy.movement.west.vector: [-1, 0, 0]
291
292 .mudpy.network
293 --------------
294
295 .mudpy.network.host
296 ~~~~~~~~~~~~~~~~~~~
297
298 string, optional
299
300 The IP address on which to listen. If unspecified, the default is
301 all available addresses.
302
303 Example::
304
305   .mudpy.network.host: ::1
306
307 .mudpy.network.port
308 ~~~~~~~~~~~~~~~~~~~
309
310 int, required
311
312 The TCP port on which to listen.
313
314 Example::
315
316   .mudpy.network.port: 4000
317
318 .mudpy.process
319 --------------
320
321 .mudpy.process.daemon
322 ~~~~~~~~~~~~~~~~~~~~~
323
324 bool, optional
325
326 If set to ``yes``, mudpy will immediately fork and detach a child to
327 become a daemon process, then close all open file descriptors and
328 terminate the parent process (Unix derivatives only). The default
329 value is ``no``.
330
331 Example::
332
333   .mudpy.process.daemon: true
334
335 .mudpy.process.pidfile
336 ~~~~~~~~~~~~~~~~~~~~~~
337
338 string, optional
339
340 If set, this filename will contain the daemon's process ID (Unix
341 derivatives only).
342
343 Example::
344
345   .mudpy.process.pidfile: var/mudpy.pid
346
347 .mudpy.timing
348 -------------
349
350 .mudpy.timing.idle.disconnect.*
351 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
352
353 int, multiple
354
355 This value indicates the number of increments allowed to pass
356 without input on a socket connection before it is terminated. This
357 avoids accumulation of dead sockets which could otherwise max out
358 allowed file descriptors. The differentiators are either ``default``
359 or a state name used to override the default value for that specific
360 state (``active``, ``entering_account_name``, et cetera).
361
362 Example::
363
364   .mudpy.timing.idle.disconnect.active: 6048000
365   .mudpy.timing.idle.disconnect.default: 6000
366   .mudpy.timing.idle.disconnect.entering_account_name: 600
367
368 .mudpy.timing.idle.warn.*
369 ~~~~~~~~~~~~~~~~~~~~~~~~~
370
371 int, multiple
372
373 This value indicates the number of increments allowed to pass
374 without input on a socket connection before it is warned that
375 termination is imminent. The differentiators are either
376 ``default`` or a state name used to override the default value
377 for that specific state. It is recommended that this be less than
378 the corresponding ``.mudpy.timing.idle.disconnect.*`` value.
379
380 Example::
381
382   .mudpy.timing.idle.warn.active: 5040000
383   .mudpy.timing.idle.warn.default: 5000
384   .mudpy.timing.idle.warn.entering_account_name: 500
385
386 .mudpy.timing.increment
387 ~~~~~~~~~~~~~~~~~~~~~~~
388
389 float, required
390
391 This value indicates the number of real system clock seconds (or
392 more commonly, fraction thereof) each pass through the main loop is
393 intended to take. This roughly sets the frequency with which queued
394 socket I/O operations are performed, pending events are triggered,
395 and directly impacts the speed at which virtual time passes within
396 the simulation.
397
398 Example::
399
400   .mudpy.timing.increment: 0.1
401
402 .mudpy.timing.save
403 ~~~~~~~~~~~~~~~~~~
404
405 int, required
406
407 Number of increments between updates of changed persistent data
408 storage.
409
410 Example::
411
412   .mudpy.timing.save: 600
413
414 .mudpy.timing.status
415 ~~~~~~~~~~~~~~~~~~~~
416
417 int, optional
418
419 Number of increments to wait between logging mudpy status messages.
420 If unspecified or set to 0, no mudpy status messages will be
421 written.
422
423 Example::
424
425   .mudpy.timing.status: 6000