DreamLand is a text multiplayer game (MUD) in the DikuMUD / ROM / Anatolia family, running since the 1990s. This repository is the server: a C++17 core library, about 50 plugins, and the Fenia scripting interpreter. Game data lives in dreamland_world, public Fenia scripts in dreamland_fenia_public, the web client in mudjs. You can play at https://dreamland.rocks/play or by telnet to dreamland.rocks:9000.
The README below is a quick start. The wiki has the rest:
- Fenia: the scripting language that runs most of the game, with its triggers and the generated API reference
- Local-Setup: environments, runtime layout, ports, logging in, what to rebuild after a change
- Local-Testing: how to check your change
- Troubleshooting: if the server does not start
- Contribute: how to send a change
- Agent-Index: wiki map for tools and AI agents
Ubuntu 18.04 or 20.04 (real machine, VM, WSL 2 or a container) and gcc 9 or newer. The build uses gcc-only flags, so other compilers will not work. macOS is not supported, use Docker or a Linux VM.
This repository has Dockerfile.localbuild (Ubuntu 20.04 build container), Dockerfile.localrun (runtime container) and Dockerfile.gitpod with .gitpod.yml for Gitpod.
sudo apt-get update sudo apt-get install -y git g++ gcc make automake libtool bison flex gdb telnet db-util bzip2 perl sudo apt-get install -y libcrypto++-dev libjsoncpp-dev libdb5.3 libdb5.3-dev libdb5.3++ libdb5.3++-dev zlib1g zlib1g-dev libssl-dev libfl-dev sudo apt-get install -y locales && sudo locale-gen uk_UA && sudo update-locale
The uk_UA locale is used for Cyrillic sorting. Without it the server starts but sorts Russian text wrongly.
Ubuntu 18.04 ships gcc 7, which is too old (no <filesystem>). Do this after the packages above, so that the g++ and gcc packages do not replace the alternatives links. To get gcc 9:
sudo apt-get install -y software-properties-common sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install -y gcc-9 g++-9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
Check with g++ --version before you run configure. If it still shows 7, run export CC=gcc-9 CXX=g++-9 first.
Sources, build directory and runtime directory are three separate folders. Replace /path/to/runtime with your install location. The build directory ../objs is also written as /path/to/objs below.
git clone https://github.com/dreamland-mud/dreamland_code.git cd dreamland_code make -f Makefile.git mkdir ../objs && cd ../objs ../dreamland_code/configure --prefix=/path/to/runtime make -j 4 && make install
make -f Makefile.git generates the configure script. Run it again only when configure.ac, a Makefile.am, a Makefile.inc or an .m4 file changes. configure also creates the runtime tree under the prefix: bin, lib, libexec, etc/dreamland.xml, the var folders, the Fenia database and two default administrator characters. It does not overwrite files that already exist. The first full build takes a while.
cd /path/to/runtime
git clone https://github.com/dreamland-mud/dreamland_world.git share/DL
git clone https://github.com/dreamland-mud/dreamland_fenia_public.git share/DL/fenia/publicdreamland_world holds the game configuration and a small set of sample zones in areas.local. The stock etc/dreamland.xml loads only those zones. See Repositories for how the pieces fit.
cd /path/to/runtime ./bin/dreamland etc/dreamland.xml &
With the stock etc/dreamland.xml there is no logPattern setting, so the log goes to standard output. To write log files instead, stop the server (see below) and add this line to etc/dreamland.xml. The server writes its in-memory copy of that file back every game tick and on shutdown, so an edit made while it runs is lost. Changes apply at the next start.
<logPattern>var/log/%Y%m%d-%H%M%S.log</logPattern>
Stop the server with SIGINT or SIGTERM (Ctrl-C in the foreground, or kill %1 for the background job started above). The server rewrites etc/dreamland.xml while it runs, so expect that file to change in your tree. Always stop the server before you edit it.
| Port | Use |
|---|---|
| 9000 | Telnet with the normal login and character creation dialog |
| 9001 | Telnet backdoor, login on one line |
| 9127 | Telnet backdoor, local connections only |
| 1234 | WebSocket, the protocol mudjs speaks. The stock mudjs build connects only to dreamland.rocks, so use telnet locally (see Client-Web-Development) |
The backdoor ports expect one line with a codepage number from 1 to 7 first, then name and password. Number 7 is UTF-8:
7 Kadm KadmKadm
Two characters exist after the first install, both level 107 with password KadmKadm. Kadm uses Russian commands and output. Cadmus uses English. Use them for local development only and never on a server other people can reach.
telnet localhost 9000
If the server runs in a VM or container, use its address instead of localhost.
Fenia scripts from dreamland_fenia_public load with cs load public/<path> from inside the game: the stock feniaScriptDir is share/DL/fenia. An etc/dreamland.xml made from an older template may still say share/DL/fenia.local. Stop the server, change it, and start it again. See Fenia-Scripts.
A change in one plugin:
cd /path/to/objs/plug-ins/yourplugin make -j 4 && make install
Then, inside the game:
plugin reload changed
A change to .cpp files in src/ only needs a rebuild of src and a server restart:
cd /path/to/objs/src make -j 4 && make install
A change to a header in src/, or to a header shared by plugins, needs a full build and a restart:
cd /path/to/objs make -j 4 && make install
Do not use plugin reload after a core header change. Restart the server instead. Details are on Local-Setup.
Fork the repository, make your change on a branch, and open a pull request against master. See Contribute for the workflow and code style. Questions go to the Discord.
GPLv3. See LICENSE.