Overview
LORD Server hosts Legend of the Red Dragon on a Windows computer, in the manner of TWGS for TradeWars. Players connect directly by telnet, and BBSes link to it with an rlogin door. One server hosts several separate games (A, B, C …), each with its own players. Each player's game is a copy of LORD FP, built for 64-bit Windows.
Version 1.3 fixes the player editor: turning Dead off for a killed player also gives them back their hit points. Version 1.2 runs The Pawn Shop: IGMs now see the game as C:\LORD\, as on a DOS BBS (see upgrading from 1.1 if you set up IGMs under 1.1). Version 1.1 added DOS In-Game Modules (IGMs) through DOSBox-X, the console's dos and service commands, and Start menu items for the Windows service; the parts of this guide that need it are marked 1.1. Upgrading keeps your games, accounts and settings.
It needs 64-bit Windows: Windows 10 or 11, or Windows Server 2016 or newer.
Installing
There are three downloads with the same programs; use one.
The installer
Run LORDSRV-<version>-setup.exe as an administrator. It installs to C:\LORDSRV; another folder is fine, but not under Program Files, because the server keeps its settings, accounts and games in its own folder.
| Part | What it does |
|---|---|
| Server and game | Always installed. |
| Start menu shortcuts | LORD Server (console), Stop LORD Server, Server folder, Getting started, README, Uninstall; and 1.1 Install as a Windows service, Remove the Windows service. |
| Firewall rule | Lets callers reach lordsrv.exe through Windows Firewall, on whatever ports it listens on. |
| Windows service | Runs the server as the service "LORD Server", started with Windows (see Running). |
When it finishes it shows Getting started, the short guide.
The MSI
For msiexec or Group Policy. It installs to C:\LORDSRV with the Start menu items and the firewall rule. Options, remembered when you upgrade:
msiexec /i LORDSRV-<version>-x64.msi INSTALLDIR=D:\LORDSRV SERVICE=1 FIREWALL=0
The MSI's screens don't offer the service: without SERVICE=1 it installs without one. Make it a service afterwards as described under Running the server.
The zip
- Unzip into a folder of its own, for example
C:\LORDSRV. - Run
lordsrv.exe. It writeslordsrv.ini, makes game A and listens for telnet on 23 and rlogin on 513. - Let it through Windows Firewall (as administrator):
netsh advfirewall firewall add rule name="LORD Server" dir=in action=allow program="C:\LORDSRV\lordsrv.exe" - For a Windows service:
lordsrv -install(as administrator).
Upgrading and removing
Run the new installer or MSI over the old one. It stops a running server first (the games save their players), updates the programs, and starts the service again. Settings, accounts and games are kept; a console window left open doesn't stop it.
To remove it: Settings > Apps > LORD Server > Uninstall. The service, firewall rule and Start menu items go. The installer asks whether to delete the games, accounts and settings as well; the MSI always keeps them.
Running the server
In a window
Start menu > LORD Server > LORD Server (console). The server runs while that window is open; quit stops it.
As a Windows service
A service runs with no one logged on and starts with Windows. Choose it in the installer or install the MSI with SERVICE=1. To make an installed server a service afterwards: 1.1 Start menu > LORD Server > Install as a Windows service (or service install in the console), which asks Windows for administrator rights; or, in any version, run these in a Command Prompt opened as administrator in the server folder:
lordsrv -install install the service "LORD Server" and start it
lordsrv -uninstall stop it and remove it
lordsrv -start start it (net start LORDServer)
lordsrv -stop stop it (net stop LORDServer)
It runs as LocalSystem, and Windows restarts it a minute after a failure. If the server is running in a console window, stop it first (lordsrv -stop); 1.1 does that for you.
The console of a service
Open LORD Server (console) as usual. When the server is already running, the console attaches to it and the title bar says [attached]. quit then closes only the console; shutdown stops the server. If the server restarts (an upgrade, saved settings), the console waits and attaches again by itself.
The console reaches the server through the admin port (AdminPort, 2399, this computer only) with a key the server writes to lordsrv.key.
Stopping
quit or shutdown in the console, lordsrv -stop (Start menu > Stop LORD Server), net stop LORDServer, or a file called lordsrv.stop in the server folder. Each disconnects the players first, and their games save them.
The console
The top line shows the server's name, ports, time up and how many are connected. Below it are the connections (who, telnet or rlogin, from where, which game and node, what they are doing) and the log, all updated every second. Commands go on the bottom line; Up and Down recall earlier ones, PgUp and PgDn scroll the log.
LORD Server 1.0 - Kalgoorlie LORD telnet 23 rlogin 5130 up 2:14:09 2/32 on [service]
# User Via Address Node State Since
1 Carol telnet 10.0.0.71 A1 playing 13:38
2 Heisenberg rlogin 10.0.0.46 A2 playing 13:41
Log (PgUp/PgDn to scroll)
13:41:02 [2] Heisenberg entered game A node 2
> _
| Command | What it does |
|---|---|
who | Who is connected (# is the connection number). |
kick <#|all> | Disconnect someone; their game saves them first. |
games, users | The games; the accounts (T telnet, R rlogin, S sysop, D disabled). |
sysop / unsysop <name> | Make an account a sysop, or not. |
disable / enable <name> | Stop an account logging in, or allow it again. |
passwd <name> <pw> | Set a password (an rlogin account becomes a telnet one). |
adduser <name> <pw>, deluser <name> | Make or delete an account (its LORD characters stay). |
config <game> | Set up a game: LORD's set-up program in a new window (Games). |
dos <game> 1.1 | A DOS prompt in the game folder, for installing IGMs (DOS IGMs). |
reset <game> | Start a game again (Games). |
settings | The server's settings on a form (Server settings). |
service [install|remove] 1.1 | Whether the server is a Windows service; install or remove it (Windows asks for administrator rights). |
restart | Restart the server, reading lordsrv.ini again. |
shutdown | Stop the server. |
quit | Leave the console (in the server's own window this stops the server). |
config and dos open their windows on the desktop where the console is, also when it is attached to a service.
Server settings
Type settings in the console. Up and Down choose a setting, Enter changes it (Yes/No settings switch), S saves, Esc leaves. Games are listed underneath: Enter on a game changes or removes it, and Add a game makes a new one. After saving, the console offers to restart the server, which it needs to use them; players online are disconnected first and their games save them.
The settings live in lordsrv.ini in the server folder; editing that with Notepad and typing restart works too.
| Setting | Default | What it does |
|---|---|---|
Name | LORD Server | Shown on the log-in screen and menus. |
TelnetPort, TelnetEnabled | 23, on | Where players connect by telnet. |
RLoginPort, RLoginEnabled | 513, on | Where BBS doors connect. On a TWGS server 513 is usually taken: use another. |
Bind | all | Listen on one address only. |
MaxConnections | 32 | How many can be connected at once. |
IdleMinutes | 10 | Disconnect anyone idle this long (0 = never). |
AllowNewUsers | on | Telnet callers make their own accounts. |
RLoginAllow | anyone | BBS addresses allowed to rlogin. Set it: see Linking a BBS. |
Deny | none | Addresses refused, or prefixes ending in a dot (10.0.0.). |
Sysops | none | Account names that are sysops. |
AdminPort | 2399 | The console's port, this computer only (0 = off). |
If you change the ports, let them through your firewall (the installer's rule allows lordsrv.exe on any port) and change your BBS doors to match.
Games
Each game is a [Game X] section in lordsrv.ini and a folder of its own (games\A …): name, folder, players at once, minutes per visit, and open or closed. A new game's folder is filled with LORD's files when the server starts; removing a game leaves its folder and players in place.
Setting up a game
config A opens LORD's set-up program for game A in a new window. Sysops can also reach it over a connection with ! on the game menu, and it runs on the server as lordcfg -p C:\LORDSRV\games\A.
| Key | Menu |
|---|---|
| 1 | Game options (lord.ini): forest fights a day, player fights, days before inactive players are deleted, bank transfers, clean mode, the IGM settings, and more. |
| 2 | Tournament settings. |
| 3 | Player editor: any player's stats, or a new day for them. Turning Dead off for a killed player also sets their hit points back to full 1.3. |
| 4 | Weapons, armour, masters, monsters and the Red Dragon. |
| 5 | Game status. |
| O | Other Places: the DOS IGMs (DOS IGMs). |
| E | LADY events: extra forest, Inn and bank events. |
| R | Reset the game. |
| 6, 7 | Today's and yesterday's daily news. |
Changes are used by the next player who enters; no restart is needed.
Starting a game again
reset A asks first, closes game A to newcomers, disconnects anyone in it (their games save and close), then deletes every player, all mail, the daily news and the game state. lord.ini and the item and monster tables are kept.
Players and accounts
- Telnet players make an account (name and password) the first time.
AllowNewUsersoff stops that;adduserstill works. Players change their password from the game menu (P). - BBS players (rlogin) get an account named after their BBS user name the first time, with no password. An rlogin account can't log in by telnet, and an rlogin can't use a telnet account's name.
- Inside each game players make their LORD character as usual; an account can have a character in every game.
- Sysops get ! on the game menu (set up a game over the connection) and the top security level in the games.
Linking a BBS
Add an rlogin door on the BBS pointing at the server's rlogin port. The BBS user's name becomes their account on the server with no password asked for, so set RLoginAllow to your BBS's address and no one else can rlogin in as one of your players.
Synchronet
SCFG > External Programs > Online Programs: a new program with this command line and no drop file.
?rlogin server-address:rlogin-port -t xtrn=A -P
xtrn=A takes players straight into game A and back to the BBS when they quit; leave -t xtrn=A out to show the game menu. Synchronet sends the user's alias as the name. Several BBSes can share one server: list them all in RLoginAllow.
Other BBSes
Mystic, EleBBS and others: their rlogin door or menu command, with the user's name or alias as the client user name and xtrn=A as the terminal type.
DOS IGMs new in 1.1
LORD 4.06's add-ons (In-Game Modules) are DOS programs listed in a game's Other Places. Windows can't run DOS programs, so LORD Server 1.1 runs them in DOSBox-X, which it installs in its dosbox folder. Players pick an IGM from Other Places (O in the town square) as in LORD 4.06, and come back with whatever it gave or took.
How it works
- The game writes LORD 4.06's files in the game folder from its own data:
PLAYER.DAT,INFO.<node>,OUT.<account>,NODE<node>.DAT,TIME.DAT,LASTHERO.DAT,MARRAGE.DAT,LOGNOW.TXT, and aDOOR.SYSin the node folder. - It starts DOSBox-X with no window: C:\LORD is the game folder, D: the node folder, and COM1 is connected to the player, with LORD Server's own FOSSIL driver loaded for it. The IGM's command from
3RDPARTY.DATruns inC:\LORD, with*replaced by the node number. - When the IGM ends, the game reads back what it changed (only the fields it changed), its mail and news lines, and the fairy. If the player hangs up, the IGM sees the carrier drop and gets 15 seconds to save and leave; then its DOSBox-X is stopped.
1.2 C:\LORD is how LORD sits on a DOS BBS, and some IGMs need it: The Pawn Shop can't use a LORD folder at the root of a drive. It is a directory junction (nodes\A1\DOSC\LORD → games\A) made for each visit and removed after it. If Windows won't make the junction, the game folder is C:\ as in 1.1.
Installing an IGM
- Unzip the IGM into a folder of its own in the game folder, e.g.
C:\LORDSRV\games\A\IGMS\VAULT. - In the console type
dos A: a DOSBox-X window opens at a DOS prompt in game A's folder, which isC:\LORD\there. - Run the IGM's set-up program, e.g.
CD IGMS\VAULTthenVAULTCFG. Tell it: LORD is inC:\LORD\, the port is COM1 with a FOSSIL driver, the drop file directory isD:\. Let it add itself to Other Places.EXITcloses the window. - If it didn't add itself:
config A> O, and add the command its documentation gives (e.g.C:\LORD\IGMS\VAULT\VAULT.EXE * C:\LORD\ 1) with the name players see. - Try it: log in, town square, O, pick it.
3RDPARTY.DAT is LORD 4.06's format: pairs of lines, the command and then the menu name; lines starting with ; are comments.
MAINT.BAT
A MAINT.BAT in the game folder runs once a day after the daily maintenance, when the first player of the day enters, as in LORD 4.06. IGMs use it for their upkeep (The Pawn Shop: PSETUP /M).
IGM settings
In config A > 1, or [IGM] in the game's lord.ini:
| Setting | Default | What it does |
|---|---|---|
DOSBoxCommand | "%x" -conf "%c" -silent -fastlaunch | How DOSBox-X is run: %x DOSBox-X, %c the DOSBOX.CONF written for each run (node folder), %n the node. Without -silent the IGM shows in a window: handy for testing on the server's desktop. |
DOSBoxCycles | fixed 10000 | DOSBox-X's speed, a fast 386. max is faster but each player in an IGM then uses a whole CPU core. |
DOSBoxFossil | 1 | Load LORD Server's FOSSIL driver for COM1 before each IGM; 0 leaves COM1 to the IGM's own UART code. |
DOSGameDir | blank (C:\LORD\) | The game folder as DOS sees it. C:\ mounts the game folder itself as C:, as 1.1 did. |
PreCommands | none | DOS commands before every IGM, separated by ;. |
Ports and FOSSIL
DOSBox-X's COM1 is the player's connection. DOSBox-X has no FOSSIL driver and many IGMs need one (Barak's House among them), so LORD Server brings its own, LSFOSSIL.COM in the dosbox folder (its source is beside it), and loads it before every IGM. NODE<n>.DAT is written to match (COMPORT 1, FOSSIL, drop file in D:\) and INFO.<node> says FOSSIL, as on a BBS with a FOSSIL driver. It only writes a NODE<n>.DAT when there isn't one, so NODE files copied from an old LORD 4.06 must say COMPORT 1 and FOSSIL.
DOSBox-X settings can be changed per game by adding -set to DOSBoxCommand, e.g. -set "cpu core=full".
The Pawn Shop 3.40 1.2
Unzip it into games\A\IGMS\PAWN, run PSETUP from the dos A prompt and give it the LORD directory C:\LORD\ and the Pawn Shop directory C:\LORD\IGMS\PAWN\. Add it to Other Places with
C:\LORD\IGMS\PAWN\PAWNSHOP.EXE /N* /GC:\LORD\
and put its daily upkeep in the game folder's MAINT.BAT:
@ECHO OFF CD \LORD\IGMS\PAWN PSETUP.EXE /M CD \LORD
Upgrading from 1.1
Version 1.1 mounted the game folder as C:\, so IGMs set up under it were told LORD is in C:\. Either set them up again for C:\LORD\ (and change C:\ to C:\LORD\ in their Other Places commands), or keep 1.1's layout for that game with DOSGameDir=C:\ in [IGM] in its lord.ini (The Pawn Shop won't run then).
Tested: The Dragon Vault (deposits, withdrawals, two players at once, hanging up inside it), Barak's House, and 1.2 The Pawn Shop 3.40 (its menus, stats, quitting back to LORD, hanging up inside it).
Limits. Each player in an IGM runs their own DOSBox-X (about 30–50 MB). RIP graphics aren't supported. IGMs that need LORD 4.06's own LORD.EXE rather than its files won't work.
When an IGM doesn't work
- The game folder's
error.lognotes failed runs and a missing DOSBox-X. - Watch it: take
-silentout ofDOSBoxCommandand try it from a console on the server's desktop. - Check its set-up: LORD folder
C:\, COM1 with FOSSIL, drop file inD:\. - The
DOSBOX.CONFeach run used is left in the node folder (nodes\A1…).
Files and backups
| File or folder | What it is |
|---|---|
lordsrv.exe | The server and its console. |
lord.exe, lordcfg.exe | The game (one copy per player) and its set-up program. |
dosbox\ 1.1 | DOSBox-X, for IGMs and the DOS prompt. |
template\ | The files a new game folder starts with. |
lordsrv.ini, users.dat, lordsrv.log | Settings, accounts, the log. |
games\A\ … | Each game: lord.ini, players, news, mail, error.log, its IGMs. |
nodes\A1 … | Each node's drop files (and DOSBOX.CONF for IGMs). |
text\ | Your own screens: welcome.ans/.asc before log-in, goodbye.ans/.asc on leaving. |
Back up the whole server folder; games\, users.dat and lordsrv.ini are what matter. Stopping the server first gives the cleanest copy.
Troubleshooting
| Problem | What to check |
|---|---|
| Nobody can connect | The console's top line shows the ports it listens on; "unable to listen" in the log means another program has the port (on a TWGS server, 513 is often taken). Windows Firewall needs the rule the installer adds, and routers or other firewalls need the ports. |
| Only some machines can connect | A firewall rule limited to certain addresses; widen it. |
| BBS players refused | RLoginAllow must include the BBS's address as the server sees it (the log says "rlogin from <address> refused"). A telnet account's name can't come in by rlogin. |
| The console can't attach | The server runs in another folder, or AdminPort is 0 or taken. |
| "All of that game's nodes are busy" | Raise the game's players at once (MaxNodes). |
| A game shows an error | The game folder's error.log. |
| An IGM doesn't work 1.1 | See DOS IGMs. |
Contact
Questions and bug reports: slaterm@theiguru.au, or a message for the sysop on the Kalgoorlie Retro BBS.
Licences and credits
- Legend of the Red Dragon by Seth Robinson; LORD 4.06 © Robinson Technologies / Metropolis Gameport.
- LORD FP, the game, is a Free Pascal port of lord.js, Deuce's version of LORD for Synchronet BBS.
- DOSBox-X 1.1 is free software under the GNU General Public License, version 2 or later, by Jonathan Campbell and the DOSBox-X team, based on DOSBox by the DOSBox Team. LORD Server includes the official release unchanged; its source is at github.com/joncampbell123/dosbox-x.
- TWGS, the TradeWars 2002 game server by John Pritchett, whose way of hosting games this follows.