Kalgoorlie Retro Docs

Documentation for the Kalgoorlie Retro BBS, its games and servers

User Tools

Site Tools


lordsrv:igms

DOS In-Game Modules

LORD 4.06's add-ons, In-Game Modules (IGMs), are DOS programs listed in the game's Other Places. Windows can't run DOS programs itself, so LORD Server (from 1.1) runs them in DOSBox-X, which is installed with it in the dosbox folder. Players pick an IGM from Other Places (O in the town square) as in LORD 4.06; it runs, and they come back to LORD with whatever the IGM gave or took: gold, gems, experience, a fairy and so on.

Tested: The Dragon Vault, Barak's House and The Pawn Shop 3.40.

How it works

For each IGM visit, lord.exe:

  1. 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 a DOOR.SYS in the node folder;
  2. starts DOSBox-X with no window, with:
    • C:\LORD = the game folder (LORD's folder, as the IGM sees it),
    • D: = the node folder (DOOR.SYS, for IGMs that want one),
    • COM1 connected to the player,
    • LORD Server's own FOSSIL driver (dosbox\LSFOSSIL.COM) loaded for COM1,

and runs the IGM's command from 3RDPARTY.DAT (in C:\LORD, with * replaced by the node number);

  1. when the IGM ends, reads back what it changed (only the fields it changed, so other players' moves meanwhile aren't lost), its mail and daily 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. DOSBox-X runs in a Windows job object, so it can't be left running if lord.exe ends.

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 made with a directory junction (nodes\A1\DOSC\LORD pointing to games\A), made for the visit and removed after it. If Windows won't make the junction, the game folder is C:\ as in version 1.1.

Installing an IGM

  1. Unzip the IGM into a folder of its own in the game folder, e.g. C:\LORDSRV\games\A\VAULT (Windows Explorer > Extract All is fine). Many sysops use IGMS\<name>.
  2. In the console type dos A. A DOSBox-X window opens at a DOS prompt in game A's folder, which is C:\LORD\ there.
  3. Run the IGM's set-up program there, e.g. CD VAULT then VAULTCFG. When it asks:
    • the LORD folder (or path) is C:\LORD\;
    • the comm port is COM1, with a FOSSIL driver;
    • the node directory (drop file) is D:\.

Many IGMs offer to add themselves to Other Places (3RDPARTY.DAT); let them. Type EXIT to close the window.

  1. If the IGM didn't add itself: config A > O (Other Places) > add it, with the command its documentation gives, e.g. C:\LORD\VAULT\VAULT.EXE * C:\LORD\ or CALL VAULT\VAULT.BAT *, and the name players see.
  2. Try it: log in, go to the town square, press O, and pick it.

3RDPARTY.DAT

LORD 4.06's format: pairs of lines, the command and then the menu name with LORD colour codes. Lines starting with ; are comments. The command runs in C:\LORD; * is the node number.

;-=-=-=-= LORD'S INTERNAL 3RD PARTY SOFTWARE OPTION =-=-=-
C:\LORD\IGMS\VAULT\VAULT.EXE * C:\LORD\ 1
`0The `@Dragon `0Vault
C:\LORD\IGMS\PAWN\PAWNSHOP.EXE /N* /GC:\LORD\
`@THE PAWN SHOP `0v3.40

An entry @LADY <event> <file> runs a LADY script event instead of a DOS program (see LADY scripts).

MAINT.BAT

If the game folder has a MAINT.BAT, it 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 own upkeep (The Pawn Shop: PSETUP /M). Its output isn't shown to the player, and it adds a few seconds to that first login.

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 is DOSBox-X (dosbox\dosbox-x.exe beside lord.exe), %c the DOSBOX.CONF written for each run (in the node folder), %n the node. Without -silent, a DOSBox-X window shows the IGM as it runs: useful when testing one on the server's own 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) The game folder as DOS sees it. Blank: C:\LORD\. C:\ mounts the game folder itself as C:, as version 1.1 did.
PreCommands (blank) DOS commands run before every IGM, separated by ; (for example SHARE, or another FOSSIL driver).

Ports, FOSSIL and NODE<n>.DAT

DOSBox-X's COM1 is the player's connection. DOSBox-X has no FOSSIL driver, and many IGMs (Barak's House among them) need one, so LORD Server brings its own: LSFOSSIL.COM in the dosbox folder (its source, lsfossil.asm, is beside it), loaded for COM1 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. IGMs that can also drive the UART themselves (The Dragon Vault) use the FOSSIL when it is there.

NODE<n>.DAT is only written when there isn't one. If you copy NODE files from an old LORD 4.06, make sure they say COMPORT 1 and FOSSIL.

With DOSBoxFossil=0 no driver is loaded, NODE<n>.DAT has no FOSSIL line and INFO.<node> says INTERNAL: for an IGM that must drive the UART itself.

Keys are sent to DOSBox-X one at a time, a few milliseconds apart, because DOSBox-X's serial port can lose a burst of typed-ahead keys.

Examples

The Dragon Vault

Unzip into games\A\IGMS\VAULT. At the dos A prompt: CD IGMS\VAULT, VAULTCFG; LORD is in C:\LORD\. Other Places command: C:\LORD\IGMS\VAULT\VAULT.EXE * C:\LORD\ 1.

Barak's House

Needs a FOSSIL driver (it exits silently with only the UART), so keep DOSBoxFossil=1. Its configuration file names LORD's folder: C:\LORD\.

The Pawn Shop 3.40

Works from version 1.2. Unzip it into games\A\IGMS\PAWN (or any folder), run PSETUP from the dos A prompt and give it:

  • the LORD directory: C:\LORD\
  • the Pawn Shop directory: C:\LORD\IGMS\PAWN\

and add it to Other Places with the command C:\LORD\IGMS\PAWN\PAWNSHOP.EXE /N* /GC:\LORD\. Its daily upkeep (PSETUP /M) goes in the game folder's MAINT.BAT; check that it is there only once. Under version 1.1 it stopped as it started: its door kit can't work with LORD at the root of a drive.

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).

Limits

  • Each player in an IGM runs their own DOSBox-X (about 30-50 MB of memory; about 90 MB seen on Windows Server 2022). Idle CPU in an IGM is close to nothing.
  • RIP graphics aren't supported (nor in LORD FP itself).
  • IGMs that need LORD 4.06's own LORD.EXE (rather than its files) won't work.
  • IGM data in the game folder is shared by all nodes, as in LORD 4.06; IGMs written for multi-node BBSes are fine.
  • Give each game its own copy of an IGM: IGMs keep their own configuration naming LORD's folder.

When an IGM doesn't work

  • The game folder's error.log notes failed runs (exit status) and a missing DOSBox-X.
  • Watch it run: take -silent out of DOSBoxCommand (config A > 1) and try it from a console on the server's desktop; the IGM shows in a DOSBox-X window.
  • Check its set-up: LORD folder C:\LORD\, COM1 with FOSSIL, drop file in D:\.
  • DOSBox-X settings can be changed per game by adding -set to DOSBoxCommand, e.g. -set “cpu core=full” or -set “cpu cycles=max”.
  • The DOSBOX.CONF lord.exe wrote is left in the node folder (nodes\A1 …), so you can see exactly what was run.
  • An IGM that says someone is already in it was left with its “in use” file after a crash (The Pawn Shop: LOCKFILE.DAT). Delete the file when nobody is in it.
lordsrv/igms.txt · Last modified: by 127.0.0.1