                           Concept : Command Syntax

 Empire is played by executing commands.  Commands  cause  your  ships  to  be
moved,  enemy  land  to  be seized, goods to be sold, etc.  The current player
interface to the game is by way of command execution, and what  follows  is  a
description  of  the  syntax  of the interface -- the language that you use to
tell the game what you want to do.

Each command consists of a verb (move, attack, launch, etc) followed  by  zero
or  more  arguments.   This  means that some commands require arguments, while
others do not.

You can determine what arguments (if any) are required by performing  an  info
request on the particular command; e.g.,
   [mc ##] Command : info move
which will retrieve a short description of the indicated  command.   Arguments
surrounded by <> indicate required arguments, while arguments surrounded by []
are optional.

Empire commands are entered at the prompt
   [mc ##] Command :

                           Concept : Command Syntax

This prompt has two parts; when you have money and a capitol, you will see the
letters  "mc" displayed in the first part of your prompt.  You will always see
the number of BTUs displayed second.

All Empire commands have a similar structure; they start with the verb, and  a
subset of the required arguments.  Any required arguments that are not entered
on the command line will be solicited by the command.  If  you  do  not  enter
optional  arguments  on the command line, they will not be prompted for.  This
will generally change the behavior of the command.

Each command operates on one general unit type; for example, the census report
lists  a  bunch  of sectors, the navigate command moves a bunch of ships, etc.
Typically, one of the arguments will be used to specify the list of objects on
which the command will operate.

When a command asks you to input a <UNIT-TYPE>, it is asking you to enter  the
name of one of the many data types available in Empire.  The current set of of
unit types include sector, news, loan, ship, plane, treaty, nuke, trade,  nie,
nation,  missile, and spacecraft.  (info is available on each of these indivi-
dually) Empire often asks you to enter a <UNIT-TYPE>; entering  any  unit-type

                           Concept : Command Syntax

is syntactically valid,  but  sometimes  doesn't  make  semantic  sense.   For
instance,  the  "build"  command  wants  to know what type of unit you want to
build, and asks you to enter the unit-type.  Entering a "nation"  here  is  an
example  of something that is syntactically valid, but semantically incorrect,
because there is no definition for building a nation.

When a command asks you to input <SECTS>, it is asking you to specify a  range
of sectors.  Sectors can be specified in one of four ways.

The first way is by explicitly specifying a rectangle of land  over  which  to
look.  You specify a rectangle by saying xlow:xhigh, ylow:yhigh, e.g.,
   [mc ##] Command : map -20:20,-10:10
This will pass a rectangle 40 sectors wide by 20 sectors high centered  around
sector 0,0 to the map command.

The second way is via realm number.  This is a shorthand method for performing
the same task as above, but with a pre-defined area of land.
   [mc ##] Command : map #5
The command will take the sector range that is stored in realm number five and
feed  it  to  the  map command.  You can edit your realms by using the "realm"

                           Concept : Command Syntax

command.

The third way is by explicitly specifying a circle of land over which to look.
You specify a circle by saying @x,y:radius, e.g.,
   [mc ##] Command : map @0,0:10
This will pass a circle 10 sectors in radius centered around 0,0  to  the  map
command.

The last way is by using the "*" character, which will pass  every  sector  in
the world to the named command.
   [mc ##] Command : map *
This will print you a very big map, although you only  see  sectors  that  you
own.

When a command asks you to supply <UNITS> as an argument, it is asking you  to
give  it a number of a particular type of unit.  The <UNITS> argument can be a
range of sectors (see <SECTS> above) which will pass all units of the specific
type  that  happen to be located within the area of land to the specified com-
mand.
   [mc ##] Command : ship -10:10,-5:5

                           Concept : Command Syntax

will perform a ship report on all of your ships within a  20x10  rectangle  of
0,0.  Note that the unit-type must have an x,y location; news items, for exam-
ple, can't be specified by using a range of sectors.

You may also specify <UNITS> using  the  grouping  character;  valid  grouping
characters  include  all  digits  and all alphabetic characters.  Units may be
added into these groups using the "group" command.   Some  units  may  not  be
grouped; typically, only the movable units can be placed into groups.

All <UNITS> can be specified by using an explicit slash-separated list of unit
identifiers  (uids)  as  in  1/2/7/12/20,  or by using the "*" character which
specifies all units.
   [mc ##] Command : ship *
will generate a report on all the ships that you own.

If the verb describes the unit-type (navigate implies a  unit-type  of  ships,
for  example),  the command will be looking for specifically that type of unit
specification.  For example, the navigate command implies ships, so instead of
having the form
   [mc ##] Command : navigate <UNIT-TYPE> <UNITS> <PATH>

                           Concept : Command Syntax

you have a command of the form
   [mc ##] Command : navigate <SHIPS> <PATH>.
However, the syntax for specifying a unit-list remains the same whether or not
the  <UNITS> are restricted to simply one particular unit-type as in the navi-
gate command, or can be of varying types as in the build command.

Some commands require just one <UNIT>, in which case you may only specify  the
unit  id  --  a  single number.  A similar restriction holds true for commands
that require just a single sector; you may only specify the sector  using  the
format X,Y.

All commands that want you to input either a range of land sectors or  a  list
of  units will also allow you to restrict the particular units based on a more
complex and arbitrary selection  mechanism.   This  mechanism  can  always  be
invoked  on every command that asks for either <UNITS> or <SECTS> by using the
'?' symbol followed immediately by a series of restrictive statements  of  the
form ident<op>ident.

An ident can be either a field of the particular unit-type you have specified,
a  commodity  name, or a numeric value.  The <op> must be one of >, <, =, or #

                           Concept : Command Syntax

meaning greater-than, less-than, equals, and not-equals respectively.  Suppose
for instance you want to restrict your navigate command to all ships that have
mobility greater than ten, and that have an efficiency greater than 90%.
   [mc ##] Command : navigate 2,2 ?mobil>10&eff>90 jjjh
That would move all ships that were in 2,2 whose mobility was > 10 and  eff  >
90  three sectors to the right, i.e., to 8,2.  Note that only "and" operations
are currently possible with Empire conditional  expressions,  and  that  there
must be no spaces within a list of conditional expressions.

Many things in Empire can be moved.  When movement takes place,  it  generally
occurs along a path through which the item is moved.  Generally, commands that
cause things to be moved require the user to enter the <PATH> along which  the
movement will take place.  This path is specified by a series of Empire direc-
tion characters, each of which describe a one-sector movement in a  particular
direction.   These  direction  characters are conveniently situated around the
'h' key, and represent the six possible directions on a hexmap that  something
can be moved. They are 'g', 'y', 'u', 'j', 'n', 'b', and 'h' to stop.

An Empire <PATH> is made up of a string of  these  direction  characters  ter-
minated  by the stop character 'h'.  It is possible to enter a partial path to

                           Concept : Command Syntax

most of the movement commands.  This occurs when you enter a path that has  no
stop  character  to complete the movement.  Until such a character is entered,
the command will continue to prompt for input adding to the string until  such
a character is entered.

Apart from units, sectors, and paths, the only other major  construct  in  the
game  are  the commodities, also known as <ITEMS>.  When dealing with commodi-
ties, commands will ask you to enter an <ITEM>, which means  one  of  "civili-
ans", "military", "food", etc.

See also : realm, command

