编译好的MudOS 必须配合配置文件才能启动MudLIB。打开MudOS 源代码目录下的config.example,做以下修改。

# name of this mud

name : *** (修改为你的Mud的名字)

# port number to accept users on

port number : 5555 (Mud连接的端口号)

address server ip : localhost

address server port : 8888 (修改为你准备添加的服务器端口号)

# absolute pathname of mudlib

mudlib directory : ../mud (此目录为你存放你MudLIB的目录)

# absolute pathname of driver/config dir

binary directory : ../bin (此目录为你存放你MudOS的目录)

根据你的MudLIB,以下几项也需要做相应的修改。

# the file which defines the master object

master file : /single/master

# the file where all global simulated efuns are defined.

simulated efun file : /single/simul_efun

# file to swap out objects; not used if time to swap is 0

swap file : /single/swapfile

# alternate debug.log file name (assumed to be in specified 'log directory')

debug log file : debug.log

# This is an include file which is automatically #include'd in all objects

global include file : "/include/globals.h"

其他的基本上可以不修改。修改好后直接打入:./driver config.example就可以启动Mud。

容易出的错误:

●将MudLIB的目录填错。

推荐:由于在Mud 维护中不时都要reboot系统。每次reboot后MudOS不会自动重起。所以我们可以编制一个Shell 来使MudOS执行。

以下是一个Shell 的例子:

cat startmud

while true

do

ulimit -n 256

rm -fr ../mud/binaries

mkdir ../mud/binaries

./addr_server 8800&

./driver config.djx

sleep 5

done

这时就可以打入:./startmud&来启动MudOS了。0b1331709591d260c1c78e86d0c51c18.png

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐