This directory contains three empire tools: civmover,
distributor, and accountant.

Civmover scrapes civs and uws from overpopulated sectors
with extra mobility, and moves them over the roads to 
underpopulated sectors with at least some food in them.
Parameters are set by #define statements in civmover.c.
Parameters may also be set by command-line arguments to
civmover, as documented in the header to civmover.c.
Commands are stored in an output file 'civmover.out'.

Distributor sets dist paths. 'distributor' alone sets paths
only for sectors with no preexisting distribution path;
'distributor -a' sets paths for all sectors. Distributor
finds the path to the nearest (in terms of mobility)
warehouse. A warehouse may be temporarily designated for
distributor's use, and changed back (to a road, for instance)
after distributor has been run (i.e., distributor checks
the sdes as well as des fields from empire's 'dump' output).
Commands are output to the file 'dist.out'.

Accountant summarizes the production report in a table.
Useful for keeping production/consumption balanced in
a large country. It works without having to leave the
empire process; do 'prod #0 | accountant'.

Both civmover and distributor get their data from empire's
'dump' command. They look for an input file called 'dump';
when in empire, type 'dump #0 > dump'. Then, ctrl-Z to
background the empire process, and do 'distributor -a' (for
instance). Foreground to get back to empire, and do
'exec dist.out' (for instance). It would be worthwhile
to read dist.out and civmover.out before executing them,
just in case they make no sense.

BUGS:

	- These were written at a time when I had no understanding
	  at all of variables' scope, or how to break a program
	  into multiple .c files efficiently. I still have only a
	  rudimentary understanding, so I haven't attempted to
	  go back and fix much. Please correct errors & style,
	  and send me your criticisms!

	- Occasionally, civmover and distributor will segmentation
	  fault upon trying to read their input data file 'dump'.
	  Generally, this has been because an extra line 'You have
	  a new telegram waiting...' has been appended to the
	  file by the empire client. I just edit 'dump' and strip
	  off this extra line (leaving the 'xxx sectors' line as
	  the last one).


Comments, criticisms, etc., to Sean Eddy (eddy@boulder.colorado.edu).

