.REBEL KINGDOM 26 - SYSOP GUIDE
.
.This page is also SYSOP.HLP in the game directory.

INSTALLING
The executable and REBEL26.CFG are all that is required. Every screen and
help file is built into the program; a *.ANS or *.HLP file with the same
name beside the executable overrides the built-in copy if you want to
customize one. Run the door FROM the game directory (it is also the save
directory unless you pass -G<dir>) and give the BBS write access there.
The first launch creates WORLD.A/WORLD.B automatically.

LAUNCHING FROM THE BBS (RMDoor conventions)
  REBEL26 -D<full path to drop file>      e.g. REBEL26 -DC:\BBS\NODE1\DOOR32.SYS
  REBEL26 -L                              local test session at the console
Mystic (Windows/Linux): DOOR32.SYS with socket inheritance is the normal
choice. Example Mystic command lines:
  Windows:  C:\BBS\DOORS\REBEL26\REBEL26.EXE -DC:\BBS\TEMP%3\DOOR32.SYS
  Linux:    /bbs/doors/rebel26/REBEL26 -D/bbs/temp%3/door32.sys
Use the same working directory for every node. Do not give each node its
own copy of the game directory; they must share one WORLD.A/B.
.
.HOW THE COMPUTER RULERS (NPCs) TAKE THEIR TURNS

NPCs never run on their own; something has to call the program. Two things
do: every normal door launch, and a maintenance run:
  REBEL26 -m        the scheduled run: rollover to a new day if needed,
                    then play the NPC turns whose random time has come
  REBEL26 -npc      FORCE: every NPC with turns left plays its whole day
                    right now, starting the day if nobody has begun it
  REBEL26 -npc 4    force player slot 4 only (must be an NPC)
  REBEL26 -status   print the stored state without changing anything
Use -m in your scheduler; use -npc by hand when you want to see the
computer rulers move (testing, or a quiet board where nobody has played).
Run -m from the game directory (or add -G<dir>). It needs no terminal and
prints a short status report, so it is safe in cron or Task Scheduler.

The daily rule: the first HUMAN to press [B]egin with turns left activates
the NPCs for that calendar day. Each NPC is then given one random "log-on"
time between START_HOUR and END_HOUR. The first -m run (or door launch)
after that time makes the NPC sit down and play ALL of its turns for the
day in one sitting, just as a caller would, so its news lines appear
together. At the next day change any NPC that never got its sitting plays
before the world rolls over. On a day with no human play the NPCs sit
still, exactly as a quiet BBS would have looked in 1995.
.
.SCHEDULING THE MAINTENANCE RUN

Once an hour is plenty; more often only makes NPC play times finer.
Linux cron (crontab -e):
  5 * * * *   cd /bbs/doors/rebel26 && ./REBEL26 -m >> rebel26.log 2>&1
Windows Task Scheduler (schtasks from an administrator prompt):
  schtasks /create /tn "Rebel26" /sc hourly /mo 1 ^
     /tr "cmd /c cd /d C:\BBS\DOORS\REBEL26 && REBEL26.EXE -m >> rebel26.log"
Mystic event: create a Command event, hourly, Command line as above with
the game directory as the working directory.
Nothing bad happens if a maintenance run and a player overlap: the world
is locked per transaction and the loser simply retries.
.
.CONFIGURATION (REBEL26.CFG)

Everything can be changed from the sysop menu ([S] on the opening menu,
shown only to the SYSOP name) and is written back to REBEL26.CFG.
  TURNS        turns per day, 1-20 (original: 5)
  NPCS         number of computer rulers, 0-24
  DIFFICULTY   default NPC level 1 easy / 2 normal / 3 hard
  START_HOUR   first hour NPCs may play (0-23)
  END_HOUR     last hour (1-24), must be after START_HOUR
  NPC_ATTACKS  1 = NPCs may attack humans, 0 = NPCs only fight each other
  SYSOP        the exact real name from your drop file; blank disables [S]
  NPCn_NAME / NPCn_LEVEL   per-ruler name (5-25 chars, unique) and level
The file is read on every launch, so edits take effect immediately.
Lowering NPCS pauses the extra rulers and keeps their kingdoms.
.
.SAVES, LOCKS AND BACKUPS

WORLD.A and WORLD.B alternate; the newest valid checksummed copy is used
and a damaged one falls back to the other. Back up both files together
(plus REBEL26.CFG) with all nodes and the maintenance task stopped.
The sysop reset and player edits copy the world to BACKUP.A/B first.
WORLD.LCK is held only during a save; P001.LCK etc. mark a player who is
currently on line. After a crash or a killed node, stop everything and
delete only those lock directories, then restart.
Old schema 1 saves from the first builds are migrated automatically.
.
.OTHER THINGS WORTH KNOWING

- Turns not used before midnight are lost, as in the original.
- Quitting from the main menu with [Q] forfeits the rest of the day.
- A dropped carrier resumes the same day at the same phase.
- News keeps 120 lines, mail 96 messages, winners 12 entries.
- Victory resets the game completely, as the original did: every kingdom
  is wiped, humans register again on their next visit, NPCs are recreated.
  Knight News and the winner list survive. Stale accounts do not.
- Terminals need CP437 and ANSI colour (SyncTERM, NetRunner, Mystic's
  own telnet). Players named in the drop file are matched by real name.
- To move the game, copy the whole directory; nothing is stored elsewhere.
- Problems: run REBEL26 -status from the game directory and check the
  maintenance log first. REBEL26 -? lists all switches.
