++++++++ Rerunning turns +++++
A quick note on how to rerun turns safely.

When I wrote the blind code modifications, I decided to support
a random seed that changed every turn in a predictable (to the
GM) way, rather than the hardcoded random seem that older V2.x
games suffered from, or the turn reruning headaches that a 
new seed ever time the program was started would cause.

I hit upon this compromise:
  When you created the galaxy, a random seed from the clock will
be used. Encoded in the initial blindrc file, is the random seed
to use when running turn 1. When turn 1 is run, and saved, the
seed for turn 2 is also saved (again, seeded from the system 
clock).

What does this mean? Well, if a bug crops up, or a players
orders get lost, or heaven forbid, you deleted this turn's blindrc
file, you can recreate it from last turns (but not the turn before's)
True, you will change the random seed to use, for the turn that you 
haven't run yet, but heck, it hasn't been run.

Note: Changing player's orders _may_ change a turn, if they
cause a new battle, or add additional ships to an existing one.
Given the same orders though, you will always get the same results.

If desired, the random seed can be set by the GM, using the GM level 
command +


+++++++

+++++++ Galaxy creation notes ++++++
Due to the wrap-around maps, you will be able to fit fewer players 
than in a standard game. 

Galaxy sizes Players Minsep
160x160      17      30     This is about as small as this galaxy could be
200x200      21      30(?)  A reasonable size
300x300      30(?)   30     Big, big,big.
90x90        14      20     Close quarters.

All galaxies above had roughly 450 planets.


Empirical evidence indicates that larger galaxies tend to 
even out the skill level between players, at least with regards
to growth.

Larger (sizewise) galaxies tend to favor higher drive techs,
possibly a longer game, and lower industry levels.

Due to program speed problems (the code isn't overly efficient in a 
lot of ways), more than 35 players and 500 planets in not recommended
(unless you have an unloaded machine to run turns on).

Late game times:
400 planets, 15 players left (6 active), 2.4x code.
Loading orders: ~1 minute
Running turn: ~1 minute
Reports: ~3 minutes
Saving game: ~1 minute

++++++

Blind command prompt options:

There a many options that you may execute from within the Blind executables:

A = Report on All Players
R = Report for One Player
E = Enter Turn             ~
T = Enter turns until EOF
G = Go                      
Q = Quit                   ~
X = Exit without saving    ~

* = List renamed systems
+ = New random seed
B = Current order status
F = Full report on all systems
F = Enter Turn (check orders only)
K = Kurrent players status
M = Map
N = New location for a world
P = Create Player
L = pLanet info
R = player Relationships
S = Diplomatic status
V = Version info              ~
Y = Forewarding list 
Z = RCS Version info          ~

Explanations:
A tilde (~) indicates that this option is available under
the preprocessor version of the code as well.

A - You will be prompted for an extension (convention is 'r') to be added
after the empire's name (i.e. Zethrin's report would be Zethrin.r)

R - You will be prompted for the empire's name, and the name of the
file to write the report to (the default, con, writes to your screen)

E - Goes into order reading mode (it expects exactly 1 set of orders, check
the Rules for details of format)

T - Goes into order reading mode (this is just like the E command, except
it will accept input until and EOF [end of file] is reached. Arbitrary
garbage (such as mail headers) can be between the #end of a set of orders and
the next #galaxy. NOTE: Using forecasts and this T command, will not
work for the blind.dbg program.

G- Actually run a turn

Q - quit and save

X - quit (do NOT save)

B - Will print a list of players that have orders submitted for this
turn.

P - create a new player.  Depending on other options you may be prompted 
for their homeworld location. In any case, you will be asked an empire name.
This option is only available in the New-game executable.

S - diplomatic status, allows you to check to see if A is at war/peace/guard
with B

F - prints out a GM's eye view of all systems

F - For the preprocessor version of the cose, causes forecasts to be
    not generated for the current set of orders.

K - prints out a GM's eye view of the status lines from each report.
A file to write to will be requested. If you allow the techplus option, you'll
be given that information too.

* - lists all renamed (name != #) systems

+ - change the random seed that the game will use for the turn to be run.

L - prints out a complete list of planets, owners, name, size, resources, and
without the "standard list", cap/col/mat stockpiles

M - prints a map, from a GM's eye view, with various potential perspectives
and with different options ***

N - moves a planet to a new location (only available in the New-game executable)
useful for artificial balancing by the GM.

V - prints out compile options (KCMD, SIZEBUG, etc)

Y - prints out a forwarding list for this turn based on Howard's contact
rules (population and group, or two groups of which on is not a probe;
must be alive at end of turn). As of V2.46, this now works!

Z - prints out RCS file information.


*** Map options:

GM map options:
M)ap
S)et co-ords
D)imensions of map
P)layer's viewpoint
U)nique letters
Q)uit

M print map with current settings
S set the x & y co-ordindates
D set the dimension (size) of the map
P set the map to be from the desired player's perspective
U unique letters ('SMARTMAP' option)
Q return to top level menu
++++++

The Blind code will accept command prompt options on the same line
that you run it (note: the last option must be a q or x, otherwise the program
never terminates). For example, to run a turn, one might do:
Blind t g q < orders

Note that it is not possible to generate turn reports this way.

++++++
Data file portability-

  Surprisingly, data files appear to be semi-portable. In particular:

Sun4's (Solaris and SunOS 4) and HP 9000's can share blindrc files. 
SGI (IP22 mips or IP28, whatever that is) can also read Sun4/HP9000 style
blindrc files.

It appears that Risc-6000's and Sun3's can read each others as well. 

80x86 machines running Dos/Lose95 and Linux also can interchange datafiles. 

I would guess that byte-compatible machines (big or little edian) can do 
so as long as int's, long int's and char's are the same size across both 
machines (i.e.  Sun4's and Dec alpha's don't mix due to 64 bit longs on 
alpha's).

  The 2.5x code is planned to be byte-sex independant, by having a
magic cookie at the begining of the file that tells it what to look
for. Check To-do for my crib notes.

  Until such time as a byte-sex independant blindrc file exists, two
utility programs have been created. See "Converting Blindrc files"


++++++
Converting Blindrc files
  
  Blindrc files are stored in the native byte sizing and ordering of
the machine upon which they are created. On machines such as Intel x86's
(i.e. 386's 486's pentiums) the byte ordering is different than on
Sparc chip machines (Sun's Sun4 arch's). If one needs to move their
game to a new machine, this can cause problems....

    WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!!

    This code is experimental. It works for the limited test cases I
    have on hand: going from a sun4 back to a sun4, and from a sun4 to
    a x86 running Linux. Using a different set of flags might result
    in the loss of some data, or the inability to compile the code.

    Expect some minor (0.01) changes in a few floating point data items
    (planet sizes, tech levels, etc).

    WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!!

  In order to translate the blindrc file between machines, where one
can not read it directly, one must first create an ascii version of
the blindrc file. One can then create a new blindrc file on the new
machine.

  In order to create the ascii version of the blindrc file: 

    1) set the flags one would usually use to compile the Blind executable 
       (i.e. V3, KCMD, CARRYOVER, etc.) [Note: NOT the forecaster!]
    2) Undefine VERBOSE [if VERBOSE it defined, your ascii output will
       have some extra stuff in it, which will need to be edited out
       by hand.]
    3) Define PREPROC [if PREPROC is not defined, the symbols
       canseeplanet, nplanets, and pr will be unresolvable, and the
       linking will fail.]
    4) make the target blind2ascii
    5) run the blind2ascii program, directing standard out to a file
       Ex: blind2ascii > asciiblindrc

    NOTE: You have to do this on a machine that can read the blindrc file.

  In order to take the ascii version of the blindrc file, and create
  the new blindrc file:

    1) Follow steps 1-3 above
    2) make the target ascii2blind (i.e. make ascii2blind)
    3) run the ascii2blind program, feeding it the ascii file from
       step 5 above on standard input. Directing standard output to
       the bit bucket is advisable. Directing stderr there is not
       needed. Ex: ascii2blind < asciiblindrc > /dev/null

    NOTE: You need to do this on the machine type that will be reading
    the new blindrc file.

  It is adivsable to verify the quality of the blindrc file by
generating reports from both blindrc files, and comparing the
differences using a program such as `diff'. You can expect to have a
few values change by 0.01. 

  If this change is not acceptable, there are several possibilities:
    1) Use the blindrc editor [Good luck, I don't expect that it
       compiles any longer!.]
    2) Edit the ascii text file at the right place, and bump the value
       up a bit for the affected field.
    3) Use gdb or dbx (or some other debugger), and change the
       affected value that way.

++++++
Error codes returned by the blind.dbg code:
  Error codes are between 121 and 127 (we'd like to have been between 245 and
255, but it appears that SunOS 4.1.1 returns -128 for 255....). The code 
should stop processesing orders when it hits 120...
127 - empty orders given (this may mean that the #galaxy line was malformed).
126 - missing password file (if PASSWORDS enabled)
125 - loadgame () failed (typically either a datafile missing/damaged, or
      datafile format incompatible with program)
124 - out of memory (malloc failed)
123 - savegame died (typically ran out of space or protection problems)
122 - can not open report file
121 - Multiple sets of orders for same player seen.

Note: If additional codes surface, this number may be moved
downwards.
++++++

Inactive players 

  When a player has missed 2 more more turns, this information is
printed as a part of running the turn. The last turn for which orders
were given is noted.

  If a player is a "footnote" (no col or pop), this turn number is
printed as a negative number.

  This can be considered by some as a bug. Changing the relevant code
in turn.c can be done for those that it really bothers.

++++++

Deleting players

When a species is extinct, the Blind code will automatically delete
them. Unfortunately, sometimes a player quits early on, and the
prospects for a fill in are slim either due to the lack of people, or
the position.

The Edit executable (look at the makefile for how to build it) can be
used to delete a player. This code has not been completely tested, but
it should work, provided:
  If no one has ever seen the player, it should work perfectly.
  If they player was not observed this turn (battles, ship to ship
contact, ship to planet), this should still work.
  If a battle happened, you will almost certainly corrupt the blindrc
file.

  Note that a side effect of this command will be the reseeding of the
player's homeworld's size (this is one reason this functionality was
moved to the editor, instead of left in the main executable).


++++++
