            Amiga Empire by Chris Gray - Using EmpCre


EmpCre is the program which creates new worlds for use with Empire. It
gives some flexibility in the general characteristics of the world
generated, but it does not allow for the modification of the many
parameters that are used during Empire play. Those parameters can be
modified by a deity using Empire itself.

When EmpCre is run, it checks to see if it's standard input is interactive
or not. If it is not, it is assumed to be a script file containing correct
values, one per line, for the parameters it requires. Invalid or illegal
values will illicit an error message and EmpCre will abort. If it is
running interactively, EmpCre prompts for each required value and will loop,
requesting new values, until a valid one is entered. The prompt for the
values will contain a brief description, the maximum and minimum values,
and the default value, which will be used if you just hit RETURN.

The algorithm used by EmpCre to create the terrain is a variant of my
terrain generator, which appeared on Fish Disk #61. As a result, the size
of the world must be a power of two and the world must be square. The
various 'Range' values are set to produce interesting worlds, but they can
be modified in the source if desired. Once the terrain has been created,
the next step is to add gold and iron deposits to the world. This is done
by using yet another variant of the same algorithm, this time tuned to
produce very small clusters of deposits, with half of the allocated
deposits spread randomly, just for good measure. The parameters associated
with these activities are:

    Power of two size of world - this must be one of 4, 5, 6, 7 or 8 to
        specify a world size of 16 x 16, 32 x 32, 64 x 64, 128 x 128 or 256
        x 256. A. 16 x 16 world is generally big enough for two players,
        and is a quick way for two beginners to get into the game. A 32 x
        32 world is the most likely to be appropriate. It can be used for 3
        to 6 players (you are unlikely to be able to place 7 sanctuaries on
        a 32 x 32 world, but if you change some of the later parameters, it
        may be possible). A 64 x 64 world is good for at least 15 players
        and possibly for up to 17 or more, depending on how persistent you
        are in running EmpCre. 128 x 128 and 256 x 256 worlds are big
        enough for the maximum number of player countries, which is 44. The
        default world size is 32 x 32 (a value of 5 for this parameter).

    Percent mountain - this is the percent of the sectors in the world that
        should be mountain sectors. Allowed values are from 0 to 75, with a
        default of 5 percent. Smaller values can result in dull worlds,
        larger values could prevent successful sanctuary placement, unless
        you have a small number of countries in a large world.

    Percent wilderness - this is the percent of the sectors in the world
        that should be wilderness sectors. All sectors that aren't mountain
        or wilderness will be water. Using a larger value here would result
        in a smaller proportion of water, perhaps allowing more sanctuaries
        to be placed in a smaller world. A smaller value in a small world
        could be used to make the game more naval. Allowed values are from
        5 to 99 - [percent mountain] with a default of 38 percent.

    Percent x 10 good iron - this tells EmpCre what proportion of rich iron
        deposits you want. It is scaled by 10 to provide more accuracy.
        Values range from 0 to 100 with a default of 5. Note that the amount
        of iron ore available in the world has a significant affect on the
        play of the game. An iron-poor world will have little production,
        poor technology and few ships. Wars can be fought over a few good
        iron mines. Over-abundant iron deposits can result in explosive
        growth (provided the funds are available), hundreds of ships and a
        very high technology level. This parameter interacts closely with
        the levels chosen for iron ore deposits.

    Percent x 10 good gold - this parameter is completely analagous to the
        previous one, except that it controls the proportion of gold ore
        deposits instead of iron ore deposits. In a gold poor world, banks
        will be critical targets, and growth can be curtailed. In a gold
        rich world, money soon becomes irrelevant (which may be precisely
        what you want).

After the terrain is created, EmpCre attempts to place the required number
of sanctuaries. There are several heuristics used in trying to come up with
a good sanctuary placement. The overall goal is to avoid situations in
which one country is at a disadvantage due to starting up later than some
neighbor, or simply due to which sanctuary he/she gets. Also, since the
person who runs EmpCre may want to play in the game, it should not be
necessary for anyone to check over the world for reasonableness. The
parameters requested are:

    Maximum number of countries (including deity) - this is the number of
        countries that are allowed in the game. Country #0 is always
        reserved as a deity. All countries except the first will be given
        sanctuaries placed on the world according to the heuristics
        described here. The default value presented will depend on the size
        of the world being built.

    Minimum sanctuary spacing - this is the minimum distance that must
        separate any pair of sanctuaries if the placement is to be valid.
        It is allowed to be from 3 to 100, but the default of 10 is
        probably close to optimal.

    Minimum wilderness adjacent to sanctuary - this value specifies how
        many wildernesses must be directly adjacent (orthogonally or
        diagonally) to either of the two sanctuaries before the placement
        will be accepted. The intent here is that sanctuaries that are
        stuck out on a peninsula are at somewhat of a disadvantage. The
        range is from 0 to 10 with a default of 4. A value of 10 would
        force all sanctuaries to be inland and not beside any mountains,
        but might take a number of EmpCre runs to satisfy.

    Minimum unclaimed reachable sectors - as part of the world generation
        process, EmpCre "allocates" wildernesses to each of the sanctuaries
        that it is trying to place. There must be at least this many
        available to each sanctuary in order for the placement to be
        accepted. The range is from the chosen value for the previous
        parameter up to 200, with a default of 40.

    Maximum distance for those sectors - this is the maximum range that the
        above count of wildernesses can be from the sanctuaries. Allowing
        too large a value can result in sanctuaries whose accessible
        sectors are a long way away, often connected only by a thin, very
        vulnerable strip. Specifying too small a value can result in an
        impossible placement (i.e. if a circle that size doesn't have
        enough sectors to satisfy the previous requirement), or can result
        in placements that are uninteresting (everybody is in the middle of
        large open regions). Allowed values are from 4 to 100, with a
        default value of 15.

    Maximum spread of rich iron counts - when EmpCre is counting the number
        of unclaimed wildernesses "associated" with each sanctuary, it also
        counts the number of rich iron and gold deposits in those sets.
        This parameter controls the maximum difference in those counts that
        is allowed between different sanctuaries. Again, this is an attempt
        at "fairness". If you allow this count to be large, you can produce
        a world in which some countries MUST attack their neighbors in
        order to find adequate resources. This is not recommended for
        beginning players. Values can range from 0 to 1000 (infinity) with
        a default of 4.

    Maximum spread of rich gold counts - this is entirely analagous to the
        previous parameter, but controls the range of gold deposit counts
        instead of iron deposit counts.

Once the physical arrangement of the world is determined, EmpCre must chose
gold and mineral deposits for each of the wilderness sectors. Each sector
can be either rich or poor in terms of iron ore deposits and either rich or
poor in terms of gold ore deposits. Each classification uses a two-part
calculation to determine the deposit. First, a random value in a
parameterized range is generated, and then a fixed value is added to it. If
the random range is 1, then all deposits will be the same, as determined by
the fixed value. If the fixed value is 0, then the deposits will be
completely random within the random range specified. Some middle ground is
probably more reasonable. The values required are:

    Base level for good iron - this is the fixed part for iron ore deposits
        in sectors which are intended to be rich in iron. It can be from 0
        to 127 and defaults to 32.

    Maximum random addition for good iron - this is the range of the random
        value which is added to the above base value. It can be from 1 to
        128 and defaults to 96. Note that it is possible to have deposits
        over 127, even though that is "nonstandard".

    Base level for normal iron - this is the fixed part for iron ore
        deposits which are not intended to be rich in iron. It can be from
        0 to 127 and defaults to 0.

    Maximum random addition for normal iron - this is the range of the
        random value which is added to the above base value. It can be from
        1 to 128 and defaults to 96. With all default values, good iron
        will range from 32 to 127 and normal iron will range from 0 to 95.
        If you want to have a more significant difference between good
        deposits and normal deposits, it is advisable to also have a
        smaller value for "Maximum spread for rich iron counts" so as to
        keep the game reasonably fair.

    Base level for good gold
    Maximum random addition for good gold
    Base level for normal gold
    Maximum random addition for normal gold
        these values are for gold deposits as the previous four are for
        iron deposits.

Once the above data is entered, there remain only six values that must be
entered:

    Maximum connect time per day in minutes - this is the maximum time
        that each country will be allowed to play Empire each day. It is
        displayed in the Empire prompt. Accepted values are from 1 upto
        1440 (24 hours) with a default of 60 (one hour). If you only have
        one serial port for external connections, you will want to keep
        this value low, so that all of the players have a chance to use up
        their time. If you are playing a "quick" game, you may want to use
        1440. Each country will be initialized to have this much connect
        time.

    Seconds per ETU - this value effects how fast things happen in Empire.
        The default value of 1800 means that an Empire Time Unit is a half
        hour. A game run at this rate will normally last 2 - 4 months.
        {at least -d.w.} Each player will normally use 10 - 60 minutes a
        day. Using a larger value is of dubious value. Smaller values make
        the game go much faster, but also require more timer per day from
        the players.
        During testing, we have found that a value of 20 seconds makes for
        a very interesting game that can be over in less than 24 hours of
        play. This turns Empire from a few month game to a weekend game.
        To do this, all players need to be connected at once, so unless you
        are playing only two players, you will need additional serial ports
        and modems connected to your Amiga. If you set this value too
        small, the players will not be able to type commands fast enough to
        keep up with demand, and a straight 68000 may not be able to
        compute fast enough to keep things updated.

    Initial amount of money per country - this is the amount of money that
        each country will have in the bank at the start of the game. Making
        this value too small will simply frustrate the players. Making it
        too large will delay the point where money becomes important (if it
        ever does - see the above discussion of gold deposits).

    Winner of the last game - This is the person, alliance, etc. who won
        the previous game.

    Allow public messages - This boolean value determines whether regular
        countries can send public messages. Depending on your disk space,
        you may not want to allow general public messages. The deity can
        still send telegrams to *, but no other countries can.

    Allow changing countries - Setting this to false will not allow people
        to use the "change country" option. You may want to prevent this
        changing as it can tie up the line for quite a while without giving
        other countries a chance to call in.

After the initial terrain and deposit setup has been created, EmpCre will
ask if you want to have the resulting terrain displayed. If you answer yes,
then a map will be shown. On this map, water, wilderness, mountain and
sanctuary sectors are shown as normal. Sectors shown as 'I' have good iron
deposits; sectors shown as 'G' have good gold deposits; and sectors shown
as 'X' have both good iron and good gold deposits.

After a successful world build, EmpCre will ask if you want to write the
world data files. Be careful not to answer incorrectly here. If you answer
yes, then the various Empire data files are destroyed, then recreated with
the new world in them. If you answer no, the just-created world is
discarded and EmpCre exits. If the world files are to be written, EmpCre
will ask for two needed passwords:

    Enter god password - this password is the initial password for the
        Deity - try not to forget it. The script files specify a god
        password of 'godpassword'.

    Enter creation password - this password will be needed once by each
        player in order that they be allowed to create a new country. After
        all countries have started up, you can safely forget it. The script
        files specify a creation password of 'creationpassword'.

When EmpCre is run from a shell, it can be given the parameter '-a', which
tells it not to try to blank the passwords when they are asked for. This is
useful if EmpCre is being run from other than a standard console window,
and the control sequences used for the blanking do not work.

When run from WorkBench, the Tool Type 'PATH=' can be given. This tells
EmpCre where to create the data files. It should be a path name ending in a
':' or a '/'. If the specified directory contains a file called
'empire.files', then the various files can be created in multiple
directories and on multiple drives. See the 'Hosting' document for
more details on this.

NOTE: If you are creating a world in the same directory as a previous
world, you MUST delete the old news and propaganda files yourself. The best
way to do this is to type:
        delete news.#?
        delete prop.#?
If you fail to do this you may get news articles that are nonsensical, or
that cause great confusion.

