Ember Reach 0.5 - a space strategy door game for BBSes
=======================================================

Players run noble houses across a cluster of star systems joined by
travel lanes that open and close over time. They settle worlds, build
fleets, research, trade on the Exchange, make treaties and fight the
Hollow, a hostile faction that raids from its nests. Every player gives
orders during the day; the whole game moves forward one day at once in
the nightly maintenance.

A game runs 60 days by default (or open-ended), for up to 12 houses.
Computer-run houses can be added so a small BBS still has rivals.


The programs
------------

  reach      the door
  ermaint    maintenance: "ermaint daily" is the nightly run
  reachcfg   the sysop's setup program: settings for new games, the house
             (player) editor, computer houses, notices to players, the news,
             the Hall of Fame, and starting a new game

On Windows and DOS the programs end in .EXE. All three programs work on
the same game folder, and the game files are the same on every system,
so a game folder can be moved between Linux, Windows and DOS.

The downloads: REACHL (Linux), REACHW (Windows), REACHD (DOS), REACHS
(the source) and REACHB (emberbot.lua, a bot for SyncTERM-Lua that plays
a day for you - see EMBERBOT.TXT inside).


Installing
----------

1. Make a folder for the game and put the programs in it.

2. Start the first game. Either run reachcfg in the game folder and pick
   "start a new game", or run:

       ermaint new

   This writes REACH.CFG (the settings for new games, plain text with a
   note on each setting) if it isn't there, and REACH.DAT (the game).

3. Add the door to your BBS (see "The door" below).

4. Add a timed event that runs the nightly maintenance once a day, in
   the game folder:

       ermaint daily

   (on Synchronet for Linux, run reachmaint.sh instead: it also keeps a
   dated log and every finished game, and can post the news to a message
   area)

   It plays the day's turn, starts a new game when there is none or when
   the last one has ended (if AutoRestart = Yes in REACH.CFG), and writes
   NEWS.TXT, the Hall of Fame (FAME.TXT) and MAINT.LOG.

Players can stay in the door while maintenance runs: the door tells them
to come back in a few minutes.


The door
--------

    reach -d <drop file, or the folder it is in> [-n node] [-g game folder]
    reach -l [-u name] [-g game folder]       (local play, for the sysop)

The game folder defaults to the folder the program is in. The door reads
DOOR32.SYS, DOOR.SYS, DORINFOx.DEF, CHAIN.TXT, CALLINFO.BBS and
SFDOORS.DAT.

Synchronet, Linux (reach.sh and reachmaint.sh are in the Linux zip; set
the game folder in them, /sbbs/xtrn/reach by default):
    Command line   reach.sh %n %#          drop file DOOR.SYS
    Native         yes                     I/O through stdio

Synchronet, Windows:
    Command line   reach.exe -d %n -n %#   drop file DOOR32.SYS
    Native         yes                     I/O: socket (DOOR32)

Mystic, Windows:
    Command line   reach.exe -d %P -n %N   (menu command D3, DOOR32.SYS)

DOS BBSes: the DOS door talks to the caller through a FOSSIL driver, or
straight to the serial port when none is loaded:
    REACH.EXE -d C:\BBS\NODE1 -n 1


Files in the game folder
------------------------

  REACH.CFG     settings for new games (reachcfg edits it)
  REACH.DAT     the game.  REACH.NEW and REACH.OLD are short-lived copies
                made while saving; if REACH.DAT is ever missing, the
                programs put it back from them
  REACH.BK0-6   a copy of the game before each night's turn (7 days)
  EVENTS.DAT    what happened, for each house (7 days kept)
  MSGS.DAT      messages between players
  NEWS.TXT      the last night's news and standings
  FAME.TXT      the Hall of Fame
  MAINT.LOG     one line for everything maintenance did
  ERRORS.LOG    doors that stopped with an error
  OLDGAME.DAT, OLDEVENT.DAT, OLDMSGS.DAT   the previous game
  REACH.LCK     a folder that exists while a program is changing the game
  MAINT.RUN     exists while maintenance runs

A lock or MAINT.RUN left behind by a crash is cleared by itself: a door's
lock after 20 seconds, maintenance and reachcfg after 30 minutes.


Players who stop playing
------------------------

After AutopilotAfter days away (7 by default) a player's house goes on
autopilot: the computer gives its orders each night. If the player comes
back, the house is theirs again. After DissolveAfter days (21) the house
leaves the game and its worlds become independent.


Computer houses
---------------

ComputerHouses in REACH.CFG names the computer houses that join each new
game (Varro and Ostrel by default; reachcfg option 3 adds one to a game
already running). Two settings make them easier on new players:

  PeaceDays    for this many days after a player joins (10 by default),
               the computer houses don't attack that player's worlds.
               They still defend their own systems. The player is told when
               the peace ends. 0 = no peace.
  Difficulty   Easy, Normal (the default) or Hard. Easy computers wait
               longer before they attack and only go in with much bigger
               odds; Hard ones attack sooner and take more risks. At every
               level they play by the same rules as players and get no
               extra resources.

Computer houses play under the same fog of war as players: they only
attack what their worlds and fleets saw at the last turn, and only
settle where they know (or last saw) an unclaimed world.

Both can be changed for the game already running with reachcfg option 9.


Licence
-------

Ember Reach is Copyright (C) 2026 Michael Slater.

It is free software: you may copy, change and share it under the terms of
the GNU General Public License, version 2 or (at your option) any later
version (the file COPYING). It comes with
NO WARRANTY. If you share the programs, the source must be available too;
it is in REACHS05.ZIP.

The door's console code (doorkit.pas) follows the design of dorkit.js, the
door library of Synchronet BBS by Stephen Hurd (Deuce); its line editor is
translated from dorkit.js, which is also under the GNU GPL.
