1 Star 0 Fork 30

bingzo/yhmud

forked from mudren/yhmud 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
config.ini 14.96 KB
一键复制 编辑 原始数据 按行查看 历史
哎哟喂 提交于 2021-08-04 12:26 . 更新运行时配置文件
###############################################################################
# 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 : 炎黃群俠傳
# 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 8000
; external_port_3_tls : cert=cert.crt key=cert.key
; external_port_4 : binary 4000
; external_port_5 : ascii 4001
# 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/single/master
# the file where all global simulated efuns are defined.
simulated efun file : /adm/single/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 : 指令错误,如需帮助可输入:help cmds
# default message when error() occurs (optional)
default error message : 你发现事情不大对了,但是又说不上来。
##############################################################
# ==== 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.
# 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 maximum stack size of the stack machine. This stack will also
# contain all local variables and arguments.
; evaluator stack size : 65536
# 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 : 64
# 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 : 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
# 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
# Define the size of the compiler stack. This defines how complex
# expressions the compiler can parse. (unused currently)
; compiler stack size : 600
# 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
# 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
# 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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bingzoo/yhmud.git
git@gitee.com:bingzoo/yhmud.git
bingzoo
yhmud
yhmud
master

搜索帮助