# Running LORD II: New World on ATDT

LORD II: New World (Seth Robinson, RTSOFT; version 1.02) is a real-time
multinode game: callers walk a map, see each other move, and meet in
town. It runs on ATDT as a DOS door. This page covers the ATDT package
for it and the few things the game needs from a board.

Needs ATDT 1.7.9 or later. Earlier versions dropped the CP437 picture
bytes below 0x20 on the door's way to the caller's screen, and LORD II
draws with them: the player is 0x02 (a smiley) and the forest is 0x06.
Callers saw a map with no player and no trees, its rows pulled left.

## Install

1. Upload the package's `lord2/` folder into `dosdoors/` off wherever
   ATDT is installed, so it sits at `dosdoors/lord2/` (on the demo board,
   `/atdt/dosdoors/lord2/`).
2. Console, Settings, Access: DOS doors on. Then Console, DOS Doors,
   press Scan. LORD II registers.
3. Console, Menus: add an item with the DOSDOOR action and argument
   `lord2`.

That is all. The first caller creates the world's player files and runs
the game's first daily maintenance, about thirty seconds, without a
single question.

## What the package holds

The LORD II 1.02 full install exactly as it was released, plus three
things ATDT needs, none of which change the game:

- `files/ATDTNODE.DAT`, the node settings every board node plays with:

      **Seth Able's Node Data System, ATDT BBS template for every board node
      BBSNAME ATDT BBS
      BBSTYPE DOORSYS
      COMPORT 1
      FOSSIL
      LOCKBAUD 0
      STATUS ON
      STATFORE 3
      STATBACK 7
      ;COLOR1
      ;NODIRECT
      ;UNUSED
      BBSDROP D:\
      ;UNUSED
      ;UNUSED
      ;UNUSED

- `files/ATDTL2.BAT`, the start batch (the manifest runs
  `CALL ATDTL2.BAT %NODE%`). It copies ATDTNODE.DAT to NODEn.DAT for the
  caller's node, makes sure the MAIL folder exists, and calls the
  game's own LORD2.BAT, which starts `L2.EXE n /DREW` and handles the
  add-on (IGM) loop.
- an empty `files/MAIL/` folder.

And `dosdoor.json`:

    {
        "api": 1,
        "slug": "lord2",
        "title": "LORD II: New World",
        "command": "CALL ATDTL2.BAT %NODE%",
        "dropfile": "DOOR.SYS",
        "static": ["L2.EXE", "*.REF", "MAP.DAT", "ITEMS.DAT"],
        "session": ["MAIL/TEST.TST"],
        "max_nodes": 4,
        "minutes": 60
    }

## Why each piece is there

- **One node file per node.** LORD II reads `NODEn.DAT` for the node
  number it is started with and refuses to start without it; the refusal
  is printed on the door machine's own screen, so the caller only sees
  the door close. ATDT starts every door with the caller's board node,
  which can be any number up to the board's node limit. The start batch
  writes the node file from the template on every entry, so change
  settings in `ATDTNODE.DAT`: a hand-edited NODEn.DAT is overwritten the
  next time that node plays. Node 0, the console's local seat, keeps the
  game's own NODE0.DAT and plays locally as the SysOp.
- **The MAIL folder.** Every time it starts, the game writes a probe
  file into `MAIL` before anything else. On a board drive the game
  cannot make that folder itself: without it, the caller is dropped
  back at the menu with no game (measured). The package ships the folder
  and the start batch makes it again with `MD MAIL`, so an upload that
  loses empty folders still works. The probe file itself,
  `MAIL\TEST.TST`, is on the manifest's session list: each caller's
  probe stays in their own browser, so two callers starting at the same
  moment cannot trip over each other's.
- **`/DREW`.** LORD II's door switch. Without it the program prints its
  usage text and exits. LORD2.BAT adds it; start the game through the
  batch, not L2.EXE directly.
- **Static files.** `L2.EXE`, the `.REF` scripts, `MAP.DAT` (4 MB) and
  `ITEMS.DAT` never change while the game runs; only the world editor in
  L2CFG writes the map. A caller's browser downloads them once, about
  five megabytes on the first entry, and keeps them. If you install an
  add-on or edit the map, callers pick up the changed files on their
  next entry. Everything else (the players, `WORLD.DAT`, `UPDATE.TMP`,
  the mail) is shared live between nodes.

## Playing

- Arrow keys walk the map; the numpad digits 8, 4, 2 and 6 do too. `?`
  lists the keys, `Q` quits back to the board.
- A caller's LORD II character is keyed to their board handle.
- The game hangs up on a caller who presses nothing for about three
  minutes ("you have obviously fallen asleep").
- Up to four callers play at once (`max_nodes`). They see each other
  move within a couple of seconds.

## The day

The game keeps its own calendar. The first caller of a new day runs the
daily maintenance inside the door: about thirty seconds, no prompts.
There is nothing to schedule and the manifest carries no maintenance
command.

## Changing the game

The door plays from its live folder on the server,
`data/doorstore/dos/lord2/`, which is drive D: on the door's machine.
The package's `files/` folder is only the seed: it is copied into the
live folder once, on the first call, and again only by Reset game
state. So:

- Change settings (`ATDTNODE.DAT`, `RULES.REF`, `BADWORDS.DAT`) in the
  live folder, with your host's file manager or FTP. Copy the same
  change into `files/` too if it should survive a Reset. The DOS Doors
  page marks a file whose two copies differ.
- Put an add-on's files (the `.IGM` and what comes with it) in the live
  folder, then run `IGM.EXE name.IGM` on the DOS page.

## Registration

The package is the unregistered release: the game makes its own
unregistered `GAME.DAT` on the first call. Unregistered, callers can
walk 70 of the world's screens (the others turn them back home) and
items 58 to 99 are marked registered-only. A registration is entered
with `L2CFG.EXE`, which writes it into the live `GAME.DAT`; keep a copy
in `files/`, because Reset game state removes it.

## SysOp tools on the console's DOS page

Start a Maintain session on the door's DOS page and run, at the prompt:

- `ALLOFF.EXE` clears players stuck as online or busy (after a crash)
  and deletes UPDATE.TMP. Run it when nobody is playing.
- `IGM.EXE name.IGM` installs, or removes, an in-game add-on.
- `LORD2` plays locally as the SysOp on node 0, on the machine's own
  screen.

All three were run on the same FreeDOS machine ATDT's doors use.

ALLOFF.EXE, IGM.EXE and COMPILE.EXE (not L2.EXE itself) carry the old
Turbo Pascal timing code that stops some programs at start with
"Runtime error 200" on very fast machines. They ran cleanly on ATDT's
machine here; a much faster computer could still trip it. If one
does: ALLOFF's job can be done by hand (`DEL UPDATE.TMP` at the
prompt; a player stuck as busy clears by itself after an hour). For
IGM.EXE, slowing the machine down is the classic remedy, and the
door's machine runs slower with its JIT off: add `"jit": "off"` to
dosdoor.json, Scan, run the tool, then take the line out and Scan
again. That could not be tried here, since the error never appeared.
The package leaves the programs exactly as released.

Reset game state on the DOS Doors page empties the live folder and
copies `files/` back in. That is more than L2CFG's own Reset Game: it
also removes `GAME.DAT` (the registration and the game's options),
every add-on installed with IGM.EXE, and any change made only in the
live folder.

## Credits

LORD II: New World is by Seth A. Robinson, RTSOFT, later maintained by
Michael Preslar; see the release's own README.DOC and SYSOP.DOC.
