




























                              EBS User Manual

                                 Section 3

                            EBS Script Language

























                                                  1







3.1  The AREXX (tm) Port  . . . . . . . . . . . . . . . . . . . . . . .    3

3.2  Startup  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3

3.3  The Language Structure . . . . . . . . . . . . . . . . . . . . . .    3

3.4  Variables  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5

3.5  Language Keywords and Commands . . . . . . . . . . . . . . . . . .    6
     EXECUTE  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
     SET  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    9
     GET  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   21

MOVE  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   30
     PROJECT  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   30
     LOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
     UNLOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
     WINDOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
     MENU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
     CLEARMENUS . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
     WBENCHFRONT  . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
     WBENCHBACK . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
     EBSFRONT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
     EBSBACK  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
     NOTIFY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
     REQUEST  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
     LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   34
     MODIFY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   35
     OPTIONON . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   36
     OPTIONOFF  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   36
     DRAW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
     NEW  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   42
     CLEAR  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   42
     DELETE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   43
     COUNT  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   43
     SECTOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   44
     ZONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   44
     UNIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   44
     FORCE  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   45
     COURSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   45
     LOS  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   46
     PIXX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   46
     INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
     RANDOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
     POINTERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47

3.6 Expressions and Operators . . . . . . . . . . . . . . . . . . . . .   47




                                                  2







     EBS includes a script language, and for those who own the AREXX (tm)
package or have AmigaDOS 2.0, an AREXX (tm) interface.  The EBS script
language may be used in a limited way without AREXX (tm), but it has almost
no control structures of its own, thus it is limited to simple menu and
startup options when used without AREXX (tm).  With the AREXX (tm) package,
it becomes a powerful tool for scenario, map and unit design.

3.1  The AREXX (tm) Port

     EBS opens a port names EBS with on the first execution.  Each
subsequent EBS started while the old EBS's are running receives a port name
of EBSX where X is a one up count.  Up to nine EBS tasks may be run
simultaneously, which should satisfy the wildest fanatic, and consume the
memory of the largest system.

     To determine whether you have AREXX (tm) available, EBS attempts to
open rexxsyslib.library.  If this works, it enables the AREXX (tm)
interface.

3.2  Startup

     If there is a file called "startup.ebs" in the REXX: directory, EBS
will execute this script on startup.  In addition to the arguments which may
be passed to EBS on startup, others may be entered on the command line.  All
arguments after the first are passed to this script, and so further
arguments may be used at the user's discretion.  This is a good place to
enter any menus you may wish to configure.

3.3  The Language Structure

     The basic structure of the language consists of a series of keywords
and identifiers.  The result is slightly clumsy to read, but easy to use,
with a wide variety of commands implemented in very similar syntax.  As an
example, the 'set' command:

     'set unit infco1 manning 120'

     'set' is the keyword for setting a value in a module or in the basic
EBS configuration.

     'unit' specifies that the module type to act upon is a military unit.

     'infco1' is the name or label of the specific unit to act upon.

     'manning' is the element of the module which is to be set.

     '120' is the value to which to set that element.

     In addition, the language has a series of variables which may be used
in place of module names and other values.  For example, the name 'infco1'

                                                  3





above could be entered by the user selecting the marker for the needed
module with the mouse and then using the value '[cunit]' (for current unit)
in place of the name.  (Variable names are always enclosed in brackets.)

     Commands also may be embedded within commands.  This is useful to
increase the speed of execution, or as the only means of getting any sort of
control structures if you do not own AREXX (tm).  The bad side is that
commands with embedded commands are extremely difficult to read and become
nightmarish very quickly.

     Within the language, I try to protect the user from destructive errors,
but not from stupid errors.  This leaves the user free to do things which I
did not foresee when designing the language and the routines in the modules. 
The reason for this is that with most routines replaceable by scripts, a
user may wish to use a value for something not intended by the EBS system at
all.  This is possible to do, but note that these values may cause weird
things to happen if you run them through the normal routines.  All values
accepted via the editor are error checked for validity.

     The following symbols are used by the EBS script language for special
purposes:

     @ - Entered at the beginning of a command means that the command is an
EBS internal command, rather than a rexx script to execute.  This is used in
scripts entered in modules or in menu item definitions.  It is not necessary
to use this symbol for commands issued within an AREXX (tm) script, or in
the command gadget, which defaults to internal commands.  This usage is
inverted for the command gadget, where entering an '@' before the command
means that it is an AREXX (tm) script followed by arguments.

     $ - Indicates a command to be executed immediately with the result
substituted, for example, 'get unit infco1 dest [$count unit dest]'. 
Normally, EBS would execute the command at the end of its processing and not
substitute the value.  Such commands function as variables.  Do not use that
method for a command which does not return any value, or for commands
entered in IF-THEN-ELSE constructions.  (IF-THEN-ELSE constructions would
execute both the IF and the ELSE clauses on the first pass, causing all side
effects of both commands.)

     [] - brackets indicate that the material between them is a variable or
a command to be executed within the processing of the main command.

     {} - braces indicate that brackets are needed in a module script or
menu definition.  These are automatically converted to brackets by EBS for
internal use.  Entering arguments to a module script with brackets will
enter the value of the variable at the time of script definition rather than
at the execution time.  As an example, a script entry could read:

     'parry {cunit} {ctarget}'

which would be converted for internal use into:


                                                  4





     'parry [cunit] [ctarget]'

and on execution each of the variables would be converted into the label of
the appropriate unit.  The command executes the script 'parry.ebs' which
must be located in a path 'ebsscript:' which must be assigned to use AREXX
(tm) scripts within EBS without specifying pathnames.


3.4  Variables

     The following system variables are available for use in scripts:

     CUNIT - the label of the current unit.
     CMARKER - the label of the current marker.
     CTARGET - the label of the current target.
     CATTACKER - the label of the current attacker.
     CMOVE - the label of the current movement module.
     CTACTICS - the label of the current tactics module.
     CDEFENSE - the label of the current defense module.
     CWEAPON - the label of the current weapon.
     CIFWEAPON - the label of the current IFWeapon.
     CLOCATION - the full string value of the current location.
     CMAP - the currently displayed map.
     COBJECTIVE - the current objective.
     CATTACK - the current attack of the current unit.
     CFORCE - the current force.  This is set by changing force through the
command window.  In scenario play, it is never changed simply by clicking on
a unit marker.
     CSUPPLY - the current supply, set by clicking on the marker to which it
is attached.
     CSTRATEGY - the current strategy.  This is set to the strategy of the
current force whenever that is changed.
     CPORT - the current port, if there is an external program currently set
up to receive EBS echoed commands.
     CGRID - the current grid of the current map.
     CPLAYER - the name of the current player.

     The following two values are only valid when an attack is in progress. 
They may be used for parry or dodge scripts within defense modules.
     CHIT - the base chance that the current attacker has of hitting the
current target with his current weapon under the immediate circumstances.
     CROLL - the roll which the current attacker actually has made during an
attack,  Energion style hits compare a base chance to hit with a defense
value by subtracting the defense from the chance to hit.  Rolling under the
difference results in a hit.  This gets the exact roll during such an event. 
This value will only be correct when the MODID is equal to 13 (DEFENSE) or
14 (IFDEFENSE).

     The following locations refer to the current location of the defined
remote pointer.  If no such location exists, all values will be "None."
     CX - the 'X' coordinate of the current location.
     CY - the 'Y' coordinate of the current location.

                                                  5





     CZ - the 'Z' coordinate of the current location.
     CPX - the current pixel x coordinate of the current location.
     CPY - the current pixel y coordinate of the current location.
     CINT - the interstice of the current location.
     CPLANE - the plane of the current location

     The following variables provide the first item in the each of the
various module lists:
     FIRSTUNIT
     FIRSTFORCE
     FIRSTMOVE
     FIRSTDEFENSE
     FIRSTWEAPON
     FIRSTIFWEAPON
     FIRSTTACTICS
     FIRSTOBJECTIVE
     FIRSTSUPPLY
     FIRSTPLAYER
     FIRSTSTRATEGY
     FIRSTMAP
     FIRSTPORT
     FIRSTMARKER
     FIRSTITEM
     FIRSTMEASURE
     LASTRESULT - the result of the last command.
     MODID - the module ID of the last module which called a script (usually
used as an argument to the calling script).


3.5  Language Keywords and Commands


EXECUTE

     The execute command causes certain events in EBS either for
configuration purposes or other actions.  It does not normally have return
values.

     LABEL

     Format:  execute label NewMarker

     Makes the marker named by the word after 'label' the current marker for
the currently defined remote pointer.  The value of the remote pointer is
modified by a 'set' command.  All other current values associated with the
marker named will also be set.

     RANGEC

     Format:  execute rangec HeavyMachineGun

     Draws circles showing the available ranges of the weapon named after

                                                  6





'rangec'.  The circles will be centered on the current location for the
current remote pointer.  Those values may be modified using the 'set'
commands or the 'execute mouseclick' commands for the remote pointers.

     GRID

     Format:  execute grid TenDegreeGrid

     Draws the grid named after the keyword 'grid.'  The named grid must be
a valid grid from the list for the current map.

     POINTER
          OFF
          ON

     Format:  execute pointer on  -OR- execute pointer off

     Turns the sprite for the current remote pointer on or off.  Note that
this command cannot be executed if the remote pointer is defined as the
mouse pointer.

     DISTMODE
          CURRDIST
          TOTALDIST
          COMPLOT
          JAMPLOT
          CLEAR

     Format:  execute distmode complot

     Toggles the values of the various distance modes for the current remote
pointer.  It functions for each of the remote pointers in exactly the same
way as the menu options function for the mouse pointer.

     ATTACK

     Format:  execute attack attackername targetname

     Executes an attack using the current attack.  The 'attackername'
attacks 'targetname'.  Returns the same values as defined for an attack
executed via menus.  The current attack must be for a melee or direct fire
weapon.  For indirect fire, use IFATTACK below.

     IFATTACK

     Format:  execute ifattack attackername

     Executes an indirect fire attack centered at the location of the
current remote pointer.  It uses the current attack of 'attackername'.

     SAVE


                                                  7





     Format:  execute save units

     Saves the complete list of the specified module types.  The command
'execute save all' saves a complete '.ebs' file.

          UNITS
          DEFENSES
          WEAPONS
          MOVEMENTS
          IFWEAPONS
          TACTICS
          MARKERS
          OBJECTIVES
          STRATEGIES
          SUPPLIES
          PLAYERS
          TERRAINTABLE
          PLANETERRAINS
          ITEMS
          MEASURES
          ALL
          STATUS
          Status is a special case type of save which saves all data
     necessary to restart a scenario for a point at which it was
     interrupted.  The status is saved in file 't:statfile.ebs' and will be
     restored from the same file.  Make sure you have 't:' assigned to
     something useful;  I usually use 'ram:' but that will not save you if
     the machine crashes in the meantime.  In addition to the script
     command, the user may set an interval for automatic status saves (see
     'SET' below.

     UPDATE

     Format:  exec update

     Recalculates the positions of all markers and refreshes the map.

     CLICK

     Format:  exec click

     Executes all the functions of a mouseclick for the current remote
pointer.  The remote pointer must be on so that there is a definition of its
pixel location.  It sets the location of the pointer as the current location
for that pointer, and if the pointer is over a marker, that marker is set as
the current marker with all its associated modules set as current also.

     SCENARIO

     Format:  exec scenario on  -OR-  exec scenario off

     Turns the scenario mode on or off.  If the scenario mode was off,

                                                  8





turning it off will initiate the player setup procedure which requires
keyboard input.  This command is intended for use when a user is expected at
the console, not for completely independent action.

     TURN

     Format:  exec turn

     Executes a turn of EBS action.  For definitions of this action, see the
menu option of the same name.

     RESTORE

     Format:  exec restore

     Reloads the file resulting from a status save, prepare EBS for
resumption of an interrupted game.


     REPROJECT

     Format:  reproject sourcemapname targetmapname iffname

     Reprojects data from the source map to the target map.  The 'newname'
argument is optional, but if it is supplied, the new map's IFF file will be
save to that name.  Otherwise, a requester will be presented to the user. 
For use in scripts without user intervention, the iff filename must be
supplied.


SET:


     The 'set' command sets various values of modules or the EBS program. 
All of these commands are similar in syntax.

     LOCATION

     Format:  set location

     Executes a mouse click and returns the value of the resulting location
in a location string.  If the current map is a tactical map, it will also
check the terrain and add the altitude and cover values.  The result will be
in the format:

     x y z plane interstice px py altitude cover

     This is one of the rare cases where a 'set' command returns a value. 
It does so to prevent the need to issue another get command to get the
actual location after a mouse click is executed.  It sets the current
location of the remote pointer.


                                                  9






     MARKER

     Format:  set marker markername elementname value

     Sets the value of the specified element of the marker named to 'value'. 
A list of elements follows.

     The following list of elements in a marker module may be set with this
command.  See the description of the module for the values allowed for each
of them.

          LABEL
          NAME
          NOTE
          LAT - note that LAT, LONG and ALT also set the location for any
     objective, supply module or unit attached to the marker.
          LONG
          ALT
          FLAGS
          COLOR
          TYPE
          PLANE - this also sets the plane value for the any attached unit,
     supply or objective module.
          INTERSTICE
          MAPID - resetting the MAPID transfers the marker to the new map. 
     If there is no map with the specified ID, you will not be able to show
     the marker.
          UNIT - EBS automatically maintains the identity of unit labels and
     those of their markers.  Setting this value may result in a change of
     label for the marker.
          OBJECTIVE
          ITEM
          SUPPLY
          SCRIPT - Marker scripts are executed each time that marker is
selected by any of the various means for selecting a marker.

     POINTER

     Format:  set pointer pixelx pixely

     Sets the location of the current remote pointer to the X/Y cursor
location provided.  No click is executed, the pointer is simply moved.

     POINTREL

     Format:  set pointrel +pixelx +pixely

     Sets the location of the pointer relative to its current location.  The
pixelx and pixely locations must be located on the current screen.

     TERRAINENTRY:

                                                 10






     Format:  set terrainentry entrynumber cover value

     The main distinguishing feature of the TERRAINENTRY, is that there are
32 of them, and they must be addressed by number.
          COVER
          LOS
          ALTITUDE
          MARGIN
          FLAGS
          TITLE
          COLOR

     UNIT:

     Sets the values of the following list of items in a unit module.

          LABEL
          MOVES
          SPEED
          MANNING
          DAMAGE
          CURRATTACK
          TARGET - the primary target of the unit.  It will also be the
     primary target of the current attack.
          DEFENSE
          UNITID - a unit identification number, which I normally use to
     provide an easy way to define a class of units for use in scripts, such
     as '100' is infantry, '200' is armor, etc.  EBS does not use these
     values.  They are most useful in script design.
          MARKER
          TACTICS
          SUPERIOR - the immediate superior of the unit.  For further
     discussion of chains of command see the section below concerning
     SISTERPREV and SISTERNEXT.
          SUPPORTED - a unit which this unit will fire in support of.  This
     value is used for artillery and other indirect fire units who require
     observers to specify who the observer is.  They then choose targets and
     fire on them according to lines of sight drawn from the supported unit.
          OPTIONS
          HEIGHT - the average height of members of the unit, used for lines
     of sight.  Set this value to zero if you wish to ignore height, but
     make sure to also set all margin values in the terrain table to zero as
     well.
          INTERSTICE - interstice where the unit is located.  This value is
     taken directly from the marker module, and is also set in that module. 
     This keyword simply provides an indirect way of setting the value when
     working through the unit list.
          PLANE - plane value.  See above under interstice.
          ALTITUDE - altitude.  See above under interstice.
          FORCE - the force to which the unit belongs.  Setting this value
     automatically adds the unit to the list of units in the force.  It will

                                                 11





     also cancel chains of command for the unit if those attach it to units
     belonging to the wrong force.
          INTEL
          COVER
          ENDURANCEBASE
          FORMATIONLEAD
          ZONEOFCONTROL
          HIDE
          SUPPLYTYPE
          TRANSPORT
          MOUNTTIME
          TETHER
          RANGEFROMHQ
          REVIEWCOUNTER
          REVIEWCURRENT
          COUNTER
          MOVECOUNTER
          STATUSCOUNTER
          SUPPLYCOUNTER
          TELEPORTS - this value is extracted from the movement module when
     the unit is initialized for play, but it may also be set.  The value is
     not error checked, so you can set the number of teleports available to
     a unit to a value higher than the base value specified in the movement
     module using scripts.
          PSHIFTS - see TELEPORTS
          ISHIFTS - see TELEPORTS
          ENDURANCECOUNTER
          LOCATION
          DESTINATION
               SINGLE - sets the destination of the unit specified to the
          current location of the remote pointer.
               CHAIN - sets the destination of the unit specified to the
          list of destinations beginning with the first location of the
          current location chain of the remote pointer.
               TARGET - sets the destination of the unit specified to the
          location of its target and initiates chase of that target.
               FORMATION - calculates the difference between the specified
          unit's location and that of its formation lead and sets its
          destination to the leader's destination with appropriate offsets.
               LOCS - reads the location string entered at the end of the
          command and sets the specified unit's destination as that
          location.
          ATTACK
               LABEL
               WEAPON
               IFWEAPON
               CURRAMMO
               STARTAMMO
               COUNTER
               FLAGS
               EFFECT
               TARGET

                                                 12





               SECTARGET
               LINKATTACK - there is a single rule about linked attacks: 
          don't link an attack back onto part of its change.  Doing so will
          give you a module error 4, infinite loop.  EBS checks, and will
          not accept the value.
               MAGICAMMO
               MAGICDICE
               MAGICDSIZE
               TYPEID
               TERRAINFLAGS
               SUBFLAGS
               SCRIPT
               DURATION
               INTERVAL
               MULTIPLE
               TGTLOC - accepts as its argument a location string.
               NUMBER - accepts the actual number of unit members used in
          the attack as the argument.
 

          CURRENTDAMAGE - only available for a unit with manning of one,
     returns the current number of damage points which the individual
     possesses.  Allows healing and direct causing of damage via a script. 
     Use the 'modify unit damage' command to change damage values on a unit
     with more than one member, and 'modify apply' to actually apply that
     damage to all units at the end of a turn.


     MOVES

     Format:  set moves movename element value

     Sets the values of elements of movement modules.

          LABEL
          FLAGS
          BASESPEED
          MULTIPLES
          INTMOVE
          ISHIFTS
          INTXFR
          INTACCELERATION
          PLANEPOINTS
          PLANEXFR
          PSHIFTS
          MAXALT
          TAKEOFF
          FACECHANGE
          CLIMB
          DESCEND
          AIRACCELERATION
          TELEPORTS

                                                 13





          TPORTTIME
          SUBFLAGS
          SPEEDTHRESHOLD
          ALLMULTS - this keyword requires a special format for the
     arguments.  The first argument following the word is the number of the
     first value to be set out of the 32 possible movement multiples. 
     Following this should be a list of multiples separated by spaces.  EBS
     will set all the values which are available and leave any values
     following the end of the command unaffected.  This allows the user to
     set multiple values with a single EBS command.

          The format to set the fifth through tenth values follows:

          'set moves movename allmults 5 100 90 75 100 110 100'

          The value 100 will be entered into the fifth multiple, 90 into the
     sixth, 75 into the seventh, 100 into the eighth, 110 into the ninth and
     100 into the tenth.

          Note that if you intend to set all twenty, you must still enter a
     '1' as the first argument following the word 'allmults'.

     WEAPON

          LABEL
          RANGE
          HITS
          DAMAGES
          TYPE
          FLAGS
          GAP
          INIT
          SCRIPT
          ALLRANGES
          ALLHITS
          ALLDAMAGES
 
     IFWEAPON:

          LABEL
          FLAGS
          RANGE
          HITS
          DAMAGES
          RADIUS
          GAP
          INIT
          X
          Y
          SCATTER
          MINTROOPS
          MAGICTYPE

                                                 14





          SCRIPT
 

     DEFENSE:

          LABEL
          ARMORS
          IFDEFENSE
          MAGICDEFENSE
          ANGLEBONUSES
          FLAGS
          DAMAGEMIN
          SURPRISEPENALTY
          SCRIPT
          ALLARMORS
          ALLANGLEBONUSES
          ALLMAGICDEFENSES
 
     TACTICS

          LABEL
          FLAGS
          MORALE
          LOYALTY
          BERSERK
          CPA
          SCRIPT
          REVIEWBASE
 
     TURNINCREMENT - sets the number of seconds to execute for each 'execute
turn' command when not in scenario mode.
     SAVEINCREMENT - sets the number of seconds between status saves.  If
this value is zero, EBS will not perform status saves automatically.
     FORCE
          LABEL
          FLAGS
          NUMBER
          OBJECTIVE
          ENEMY
          FRIEND
          NEUTRAL
          FANATIC
          FIRSTUNIT
          STRATEGYLABEL
          PASSWORD
          REVIEWBASE
          SURRENDER
          STRATEGYREVIEW
          MOVEPOINTMULT
          DEFPOINTMULT
          OFFPOINTMULT
 

                                                 15





     PLAYER:

          LABEL
          FLAGS
          PASSWORD
          PORT
 
     MAP:

          LABEL
          FLAGS
          TYPE
          IFFFILE
          PLANE
          INTERSTICE
          RADIUS
          TERRAIN
          DEFAULTTERRAIN
          MULTIPLE
          LAT1
          LONG1
          LENGTH
          WIDTH
          MEASURE
          BASELAT
          BASELONG
          BASEALTITUDE
          SECTIONS
          PIXLEFT
          PIXTOP
          PIXWIDTH
          PIXHEIGHT


     OBJECTIVE:

     Format:  set objective objectivename element value

     Sets the element values of an objective module.

          LABEL
          FLAGS
          FORCE
          VALUE
          BASETIME
          VICTORYPTS
          PENALTY
          MINFORCE
          MINTIME
 
     SUPPLY:


                                                 16





     Format:  set supply supplyname element value

     Sets the element values of supply modules.

          LABEL
          FLAGS
          TYPE
          FORCE
          TIME
 
     STRATEGY:

     Format:  set strategy strategyname element value

     Sets the values of elements of strategy modules.

          LABEL
          FLAGS
          LLSPEED
          LLDEV
          LRSPEED
          LRDEV
          CLSPEED
          CLDEV
          CRSPEED
          CRDEV
          RLSPEED
          RLDEV
          RRSPEED
          RRDEV
          DELAY
          REAROFFSET
          SUPPLY
          COMMAND
          CONCENTRATE
          RANGEFROMBASE
          CHOICESCRIPT
          ACTIONSCRIPT
 

     MEASURE:

          LABEL
          MULTIPLE
 

     GRID:

     Format:  set grid gridname element value

          LABEL
          FLAGS

                                                 17





          COLOR
          DRAWMODE
          STARTX
          STARTY
          ENDX
          ENDY
          VERTICALSEP
          HORIZONTALSEP
          GRAIN


     REMOTEPOINTER:

     Format:  set remotepointer rem1

     Sets the current remote pointer.  The argument value may be 'rem1' or
'rem2'.


     COLORS:

     Format:  set colors 1 0 1 2 3 4 4 6 7 5

     Sets the colors for the remote brush.  As with the various 'all' type
settings, such as 'allmults' and 'allarmors', the first value is the number
of the first color to be set.  The EBS drawing brush has nine colors,
numbered as follows:

               1   2   3
               4   5   6
               7   8   9

     The first number is the number of the first color.  Thereafter, enter
the numbers of the colors from the pallette you wish in each position.  It
may be easier to understand the effect of this command if you try the brush
requester available from the drawing menu.  The color in position five is
used when single pixel drawing modes are selected, otherwise, all nine
colors are entered.

     The purpose of this brush format is to enter a customized grouping of
terrain.  Since EBS calculates terrain values from a nine pixel pattern,
this command allows setting the colors to produce such a pattern, custom
designed.


     PORT:

     Format:  set port portname element value

     Sets the values of a port module.

          LABEL

                                                 18





          FLAGS
          DAMAGECMD
          MOVECMD
          DEVICE
          NUMBER
          BAUDRATE
          NUMBER
          DEVNUMBER
 
     Note that the use of ports is test only for future use in multi-machine
games.


     SUBCOUNTER:

     Format:  set subcounter

     This command sets the subcounter to the current value of the
timecounter, preparing it to count elapsed seconds from that time.  The
subcounter cannot be set to a specified value; it may only be set to the
value of the timecounter.


     TIMECOUNTER:

     Format:  set timecounter timeinseconds

     This command sets the timecounter to the time provided.  This command
should be used with care during scenario execution, as it could modify
values which EBS is counting on to be accurate.


     FONTNAME:

     Format:  set fontname diamond.font

     Sets the filename of the large font used to print in the count window.


     FONTSIZE:

     Format:  set fontsize 15

     Sets the size of the current large font used to print in the count
window.


     ITEM:

     Sets the element values of an item module.

          LABEL

                                                 19





          FLAGS
          ID
          NOTE 


     ENDSECOND:

     Sets the name and arguments of a script to be executed by EBS at the
end of each second of conduct conducted.  This script may be used to update
other programs on the current status of a scenario or to implement extra
features in EBS through the use of scripts.

     ENDTURN:

     Sets the name and arguments of a script to be executed by EBS at the
end of each call to the 'execute turn' command or its menu equivalent.  This
script is only applicable when EBS is not in scenario mode, since EBS never
exits turn execution one a scenario is started until an end condition is
met.


     LLFP:

     Format:  set llfp 'nameofscript arg1 arg2 etc'

     Sets the script used to determine the lat long based on pixel location
for a custom map definition.  If this script name is not set, no custom maps
may be used.

     Normal format would be:

     set llfp 'llfp [cpx] [cpy]'


     PFLL:

     Format:  set pfll 'nameofscript arg1 arg2 etc'

     Sets the script used to determine the pixel location based on a lat
long or X/Y coordinates.  If this script name is not set, no custom maps may
be used.


     ENDTIME:

     Format:  set endtime timeinseconds

     Sets the end time for a scenario in seconds.  This time should be
greater than the current timecounter value.


     ISCREENWIDTH - interlaced screen width.

                                                 20





     ISCREENHEIGHT - interlaced screen height.
     NISCREENWIDTH - non-interlaced screen width.
     NISCREENHEIGHT - non-interlaced screen height.

     Sets the default values for the dimensions of the screen which EBS will
open.  The default values are:  640, 400, 320, and 200.

     REFRESHINC - time between full screen refreshes during non-scenario
play.

     CURRENTLOC - location values concerning the current location.  All
values about the current location may be set.  This is only valid for LLFP
and PFLL scripts, as it sets the values which will be displayed by EBS. 
This is mosly useful for user defined maps.

     TARGETLOC - This is only valid during IFWeapon or Weapon scripts, and
gives the location at which an attack is actually occuring, considering hit
rolls, etc.  All values concerning a location may be set or gotten.

     FILEPATH - Sets the filepath which EBS uses for map files.  This
defaults to 'map:'.  The path must be correctly terminated with a '/' or a
':' as appropriate.

     REXXPATH - Sets an additional directory in which EBS will search for
AREXX (tm) scripts.  The search order is:  current directory, REXXPATH, then
REXX:.

     CHAIN - Sets the following values for a location chain.
          LABEL
          FLAGS - user defined, none are actually defined for a chain.
          COLOR - the color in which the location chain should be drawn.
          MODE - the drawmode, either JAMIT or COMPLEMENT.
          LOCS - the locations to be added to the chain.  It accepts the
     following values:
               CLEAR - clears all locations and starts over.
               CURRENT - adds the current locations from the current
          remotepointer to the list of locations.
               STRING - adds a location in the standard format to the
          location chain.

     MAXLOCS - sets the maximum number of locations which EBS will maintain
for each pointer for drawing purposes, such as in drawing a chain above.

     BASELOS - the base, unobstructed visibility.  All terrains which
obstruct visibility reduce this value, so it should be set to cover
conditions.  Reduce it for night or bad weather games, increase it for high
visibility conditions.


GET:



                                                 21





     LASTLOC:
     Format:  get lastloc pointerword

     Returns the last location of the specified pointer as a location
string.  See below under 'pointers' for a list of the pointerwords.

     SCREEN:

     Format:  get screen

     Returns the address of the EBS screen in HEX.


     DISTANCE:

     Format:  get distance pointers mptr rem1
              get distance current rem2
              get distance total rem1

          POINTERS
          Gets the distance between the two current locations of the
     specified pointers.  Any pointer may be named; the two do not need to
     be in the same list.  If either pointer has no location defined for it,
     the result will be zero.

          CURRENT
          Gets the distance between the last location and the current
     location of the specified pointer.

          TOTAL
          Gets the total distance of the location chain for the current
     pointer.


     TERRAINENTRY:

     Same as the 'set terrainentry' list of keywords.


     UNIT:

     Format:  get unit unitname lastpos

          Gets the various element values and certain summaries of values
     for the named unit.  It takes all the keywords of the 'set unit'
     command plus the following.


          ATTACK
          Allows all the options of set for attacks plus the following two:
               NEXT
               PREVIOUS

                                                 22






          LASTPOS - returns the position of the unit prior to the last
     second of movement.
          TRANSPORTING - returns the label of any unit which this unit is
     transporting.
          TRANSPORTEDBY - returns the label of a unit which is transporting
     this unit.
          FINALDEST - Under most circumstances, this will return none, but
     if the unit is moving toward a transport unit in preparation to mount,
     it will return the destination to which that unit intends to be
     transported.
          HEALTHY - returns the number of members of the unit which are
     uninjured.
          WOUNDED - returns the number of members of the unit which are
     wounded.
          OUT - returns the number of members of the unit which are out of
     action.
          WOUNDSTATUS - returns the average number of points lost by the
     wounded members of the unit.
          SUBORDINATE - returns the label of the first subordinate unit. 
     This may be used with the SISTERNEXT and SISTERPREV commands to trace a
     chain of command.
          NEXT - returns the next unit in the full unit list without regard
     to force.
          PREVIOUS - returns the previous unit in the full unit list without
     regard to force.
          FORCENEXT - returns the next unit in the list of units in that
     force.
          FORCEPREV - returns the previous unit in the list of units in that
     force.  This command, and the preceding command can be used to work
     through all units in one force only rather than for all units currently
     defined.
          SISTERNEXT - returns the next unit which is immediately
     subordinate to this one.
          SISTERPREV - returns the previous unit which is immediately
     subordinate to this one.

     Note:  Some expansion may be necessary on the lists of units.  EBS
maintains three different lists or systems of lists of all the units which
are currently defined.  These are:

     1 - a list of all units currently defined.
     2 - a list of units for each force.
     3 - a series of lists tracing the chain of command for each unit.

     In the first case you might use this list for any action which must be
taken regardless of force, such as updating a copy of EBS on another machine
as to the location of all units.  Such a script is provided in the sample
scripts.  Also, if you are taking over the process of turn execution, this
method could be used to give the 'move' command to all units currently
defined.


                                                 23





     In the second case, you might use this list to give strategic commands
to all the units in a single force, or to get data about all those units. 
This might be done for a strategy script replacing the normal strategy
modules.

     In the third, you can trace the chain of command to determine whether
the unit is currently in command, or what unit is the highest in the chain. 
This is similar to what EBS does internally when a unit is tasked to
"ATTACKHQ" during a scenario.  In that case, of course, the unit requires an
intelligence roll to determine whether it can locate the unit, so a
programmer should take unit knowledge into account in designing such
scripts.

     The chain of command listings go from HQ to first subordinate, then all
units immediately subordinate to the HQ are accessed via
sisternext/sisterprev.  If you take the FIRSTSUBORD of a headquarters unit,
then trace the SISTERNEXT values until you get a return of none, you will
have examined the entire list.  In addition each of those subordinate units
may have subordinates of their own listed in a similar fashion.  Overall, a
quite complex chain of command can be created.

     Tracing the list in reverse requires use of the SUPERIOR keyword.  That
is also the value to use in the 'set unit' commands.  Setting the SUPERIOR
of any unit automatically adds it to all the lists necessary.

     MOVES:

     Format:  get moves movename element

     Used to access the values of a movement module.  Returns any of the
values listed under the 'set moves' command plus the following two:
          NEXT
          PREVIOUS


     WEAPON:

     Accepts all the keywords of the 'set weapon' command plus the
following:
          NEXT
          PREVIOUS

     IFWEAPON:

     Accepts all the keywords of the 'set ifweapon' command plus the
following:
          NEXT
          PREVIOUS


     DEFENSE:


                                                 24





     Accepts all the keywords of the 'set defense' command plus the
following:
          NEXT
          PREVIOUS

     TACTICS:

     Accepts all the keywords of the 'set tactics' command plus the
following:
          NEXT
          PREVIOUS

     TIME:

     Format:  get time

     Returns the current scenario time in seconds.

     MARKER:

     Format:  get marker markername elementname

     Returns the values of the elements of a marker module.  Accepts all the
keywords used in 'set marker' plus the following two elements:

          NEXT - returns the next element in the list of markers.
          PREVIOUS - returns the previous element in the list of markers.
 
     TARGETDATA:

     Format:  get targetdata attackername targetname

     This is a PLAYER interface command which return the data needed for
PLAYER to conduct an attack on a target.  The format is:

     75 10000 Y 10000 0 2

     75 = the target's total defense value.
     10000 = the range to the target in centimeters.
     Y = there is a line of sight for the unit to the target ('N' if not).
     10000 = the distance which the attacker was able to see; will equal the
range if the line of sight check was successful.
     0 = the height of blocking terrain if the line of sight was blocked by
a hill or other high object.
     2 = the relation of the target to the attacker.  (Values are: 0 =
FRIEND; 1 = NEUTRAL; 2 = ENEMY; 3 = FANATIC.)


     COVER:

     Format:  get cover


                                                 25





     Returns the cover value of the current location of the current remote
pointer.


     ALTITUDE:

     Format:  get altitude

     Returns the altitude of the current location of the current remote
pointer.


     FORCE:

     Returns values of force modules.  Accepts all keywords of the 'set
force' command, plus the following:
          NEXT
          PREVIOUS

     PLAYER:

     Returns the values of player modules.  Accepts all keywords of the 'set
player' command plus the following:
          NEXT
          PREVIOUS


     MAP:

     Returns the values of map modules.  Accepts all the keywords of the
'set map' command plus the following:
          NEXT
          PREVIOUS


     OBJECTIVE:

     Returns the values of objective modules.  Accepts all the keywords of
the 'set objective' command plus the following:
          NEXT
          PREVIOUS


     SUPPLY:

     Returns the values of supply modules.  Accepts all the keywords of the
'set supply' command plus the following:
          NEXT
          PREVIOUS


     STRATEGY:

                                                 26






     Returns the values of strategy modules.  Accepts all the keywords of
the 'set strategy' command plus the following:
          NEXT
          PREVIOUS


     MEASURE:

     Returns the values of measure modules.  Accepts all the keywords of the
'set measure' command plus the following:
          NEXT
          PREVIOUS


     GRID:

     Returns the values of grid modules.  Accepts all the keywords of the
'set grid' command plus the following:
          NEXT
          PREVIOUS


     PORT:

     Returns the values of port modules.  Accepts all the keywords of the
'set port' command plus the following:
          NEXT
          PREVIOUS


     SUBTIME:

     Returns the current value of the subcounter in seconds.


     FONTNAME:

     Returns the name of the font currently used as the large font for the
count window.  It is returned in the form "diamond.font" which is the
default large font.


     FONTSIZE:

     Returns the size of the current large font as a number.  This may be
any size allowed for the font selected under font name.


     ITEM:

     Returns the element values of item modules.  Accepts all the keywords

                                                 27





of the 'set item' command plus the following:
          NEXT
          PREVIOUS


     ENDSECOND:

     Returns the name and arguments of a script to be executed by EBS at the
end of each second of conduct conducted.


     ENDTURN:

     Returns the name and arguments of the EBS script to be executed at the
end of each turn (the number of seconds of combat conducted each time the
'execute turn' or its equivalent menu option is called).

     LLFP:
     Returns the name and arguments of the current Lat Long from Pixels
script.

     PFLL:
     Returns the name and arguments of the current Pixels from Lat Long
script.

     ENDTIME:
     Returns the end time for the current scenario.

     REXXPORT:
     Returns the name of the EBS port for rexx commands.  If you are running
only one copy of EBS this will always be "EBS," but if you run a second copy
for some reason, it will have a number attached to it.

     COLORS:
     Returns the current nine color terrain pattern as a string suitable for
use as an argument to the set colors command.

     ISCREENWIDTH - interlaced screen width.
     ISCREENHEIGHT - interlaced screen height.
     NISCREENWIDTH - non-interlaced screen width.
     NISCREENHEIGHT - non-interlaced screen height.
     Format:  get iscreenwidth

     ISCREENWIDTH, ISCREENHEIGHT, NISCREENWIDTH and NISCREENHEIGHT return
the default value for the width or height of a interlaced and non-interlaced
screens.

     PIXELCOUNT

     Format:  get pixelcount colornumber

     Counts the number of pixels of the colornumber specified.  Color number

                                                 28





values are from one to the maximum number of colors displayable on the
screen.  These values can be used to determine quantities of a particular
terrain type on the map, provided that it is in an appropriate projection. 
Note that certain projections, such as the 'S' map type will make the
results of this command totally irrelevant.  The command returns two values,
the first is the number of pixels are of the specified color, the second is
the number of pixels which are part of the map.

     Thus, a map which occupies the full size of a low resolution, non-
interlaced screen and is half blue, when asked for a count of the blue
pixels will return:

     32000 64000
      

     REFRESHINC:

     The interval between map refreshes when a scenario is in continuous
execution.  This can become important when there are no units ready for
command, such as when all units are retreating, or one is simply observing
the progress of a scenario with the computer playing both sides.  The value
is the number of seconds of game execution between complete refreshes of the
map.  If EBS is in scenario mode, the display will be the view of the
current attacker.

     CURRENTLOC - gets all values of a current location.  See 'set
currentloc' for conditions and details.

     TARGETLOC - gets all values of a target location.  Set 'set targetloc'
for conditions and details.

     REMOTEPOINTER - gets the value of the current remote pointer.

     TURNINCREMENT - gets the value of the current turn increment.

     FILEPATH - gets the current filepath.

     REXXPATH - gets the current file path added to the search for AREXX
(tm) commands.

     CHAIN - gets all values of a location chain.  See 'set' for the other
values.  The following keyword is modified:
          LOCS - Format: 'get chain chainname locs n' where 'n' is an
     integer less than the total number of elements in the location chain.

     In addition, the following values may be gotten:

          NEXT
          PREV

     MAXLOCS - gets the maximum number of locations maintained for each
remote pointer.  Uses the current default pointer.

                                                 29






     BASELOS - returns the base LOS distance.


MOVE:

     This command moves units either using their normal movement modules and
destinations or an absolute location.  All moves are conducted "legally" for
scenario purposes, so that previous location data is maintained as accurate.

     ALL
     Moves all units in the unit list using currently defined destinations
and movement modules.  It maintains all counters.

     CURRENT
     Moves the current unit using current destination and movement module
data.  Maintains all counters.

     UNIT

     Format:  move unit unitname

     Moves the named unit toward its destination using movement module. 
Maintains all counters.

     ABSOLUTE

     Format:  move absolute unitname locationstring

     Moves the unit to the location specified by the location string.  Legal
values for the previous location of the unit are maintained, but no counters
are modified, and the movement module is not checked.  The move will be
conducted whether or not it is legal under EBS movement rules.


PROJECT:

     Duplicates the functions of the main EBS menu.  This command exactly
duplicates the project menu items, including requesters.  To save items to
filenames designated in scripts, use the 'execute' command set.

     LOAD
     Format: load map
          MAP
          UNIT
          CONFIG
          SCENARIO
     SAVE
          MAP
          UNIT
          CONFIG
          SCENARIO

                                                 30





          DISPLAY
     REFRESH
     EDIT
     MARKERS
     COMMAND
     DRAW
     TURN
     MOVEMENT
     CLEAR
     MAINFLAGS
     SCENARIOFLAGS
     ABOUT
     QUIT

LOCK:
UNLOCK:

     These two commands lock and unlock EBS preventing or allowing keyboard
input.  When conducting any turn execution, it is a good idea to lock out
all other input.  I don't know of any disasters which will occur if you
ignore this, except that definitions changed while EBS is taking other
actions on a module could cause results which are "undefined."


WINDOW:

     Format:  window open edit

     Opens or closes one of the auxilliary windows for EBS.  The window is
opened in the location where it was last located or at its default.

     OPEN
          MARKER
          EDIT
          COMMAND
 
     CLOSE


MENU:

     Creates menus in the following windows (keywords): MAIN, MARKER,
MAPEDIT, COMMAND.  They have the following minimum user defined menu
numbers:

     MAIN - 4
     MARKER - 3
     MAPEDIT - 4
     COMMAND - 3

     These values are the minimum number for the lowest number menu which
may be defined by the user.  The command string may be any valid internal

                                                 31





EBS command or the name of an AREXX (tm) script (if you have AREXX (tm)). 
Internal commands must be specified by the '@' as menu options default to
AREXX (tm) scripts rather than internal commands, unlike the command window.

     Format:  menu window menunum itemnum keyword string
              menu main 4 0 name system  ; sets up menu for system commands
              menu mapedit 4 3 name NewTactical ; sets up a menu item to
create               ; a new tactical map on the 4th menu of the menu strip
for the
              ; mapedit window
     NAME
     COMMAND
     KEY
     ENABLE
     DISABLE
          ENABLE and DISABLE turn the menu item on or off.  No string is
     required.
     REMOVE
          Again, no string is required.  This erases the menu item.


CLEARMENUS:

     Clears menus in the following windows (keywords): MAIN, MARKER,
MAPEDIT, COMMAND.


WBENCHFRONT:
WBENCHBACK:

     Format:  wbenchback

     Moves the workbench screen to the front or to the back.

EBSFRONT:
EBSBACK:

     Format:  ebsback

     Moves the EBS screen to the front or to the back.


NOTIFY:

     Presents a message to the user requiring a response before continuation
of program execution.  The message will be truncated to the width of the
screen, so take that length into consideration in designing the message.


REQUEST:

     EBS has a variety of requesters, and values on which they can operate. 

                                                 32





The formats are individual for each one.

     STR1

          Format:  request str1 windowname

          Presents a string requester in the window specified by windowname. 
     See the WINDOW command for a list of valid window names.

     STR2

          Format:  request str2

          Presents a string request window, independent of the location and
     stacking of the other windows.

     LIST

          Format:  request list module

          Presents a list requester for the list specified.  The following
     keywords are supported.

          UNIT
          FORCE
          MOVEMENT
          DEFENSE
          WEAPON
          IFWEAPON
          TACTICS
          OBJECTIVE
          SUPPLY
          PLAYER
          STRATEGY
          MAP
          PORT
          MARKER
          ITEM
          MEASURE

     OPTIONS

          Format:  request options module

          Presents an option requester for the current module from the
     specified module list.

          UNIT
          FORCE
          ATTACK
          TERRAIN
          MOVEMENT

                                                 33





          DEFENSE
          WEAPON
          IFWEAPON
          TACTICS
          SUPPLY
          PLAYER
          STRATEGY
          MAP
          GRID
          MARKER
          OBJECTIVE
 
     FILE

          Format:  request file type

          Presents a file requester of the type specified to the user.  It
     returns the result as a filename with full path name.

          SCENARIO
          UNIT
          CONFIG
          MAP
          IFF


LIST:

     Format:  list keyword

     Creates a string containing the names of the elements of the specified
list separated by spaces.  If done internally, the list is put in the info
window, otherwise it is returned as a string to the AREXX (tm) script.

     MARKERS
     UNITS
     MOVEMENT
     WEAPONS
     IFWEAPONS
     DEFENSES
     TACTICS
     ATTACKS
     OBJECTIVES
     SUPPLY
     PLAYERS
     STRATEGY
     MAPS
     PORTS
     ITEMS
     MEASURES
     FORCE
     READY - all units ready to conduct an attack.

                                                 34





     CHANGED

          Format:  list changed lists

          Lists all items in the various lists which have been changed since
     last saved.

          LISTS - lists all lists which have changed elements.
          MARKERS
          UNITS
          FORCES
          MOVEMENTS
          DEFENSES
          WEAPONS
          IFWEAPONS
          TACTICS
          OBJECTIVES
          SUPPLY
          PLAYER
          STRATEGY
          MAP
          PORT
          MEASURES
          ITEMS


MODIFY:

     Format:  modify unit unitname number value

     The current number and damage values of units may not be set directly,
because there are a number of internal values which must be kept accurate. 
The MODIFY command allows increasing or decreasing these values.  The
'value' argument may be a positive or negative integer which is subtracted
from the target's value.  To increase the size or damage value of the unit,
use a negative number; to decrease it, use a positive number.

     UNIT

          For both of the following commands, the results are set up, but
     not applied unless the 'modify apply' command is executed afterward. 
     EBS is set up to apply all damage simultaneously at the end of a
     second.  Note that the 'modify apply' command applies all the results
     set up to all units, so it should only be called after all 'modify
     unit' commands desired have already been executed.

          NUMBER
               Directly subtracts the number of members specified from the
          unit and zeros out the damage value of each member so removed from
          the unit.

          DAMAGE

                                                 35





               Applies the number of damage points specified to the unit,
          causing casualties as appropriate.

     APPLY

          Format:  modify apply

          Applies all results of combat to all units.  All 'modify unit'
     commands should be completed prior to calling this command which
     performs the simultaneous application of all combat results.


OPTIONON:
OPTIONOFF:

     The OPTIONON and OPTIONOFF commands use a similar syntax and list of
subordinate keywords.  OPTIONON turns an option in a set of options on,
OPTIONOFF turns that same option off.

     Format:  optionon force forcename optionword

     The following list of keywords apply to both commands:

          UNIT
          A unit has the following two groups of options, thus the format is
     slightly different from the standard.

          Format:  optionon unit unitname main optionword
                   optionon unit unitname attack attackname optionword

               MAIN
                    CHECKLOS
                    PRIMARYSYSTEM
                    INFOWINDOW
                    SCENARIO
                    TIMEWINDOW
                    COUNTWINDOW
                    FILTERSELECT
                    FILTERON
                    MARKSECTORS
                    MARKZONES
                    DOICONS
                    COURSEPLOTTING
                    POINTERS
                    MARKERTOFRONT
                    A2090SAVE
                    TURNMINUTES
                    POINTERLOCK1
                    POINTERLOCK2
                    DRAWLOCK

               UNIT

                                                 36





                    SIMPLE
                    AUTOMODE
                    FULLAUTO
                    AUTOONLY
                    RETREATING
                    DEFENSIVE
                    ACTIVEDEFENSE
                    NEVERDEVIATE
                    CONSTANTLOS
                    SHIELDSUP
                    ENEMYSIGHTED
                    UNDERFIRE
                    INCOMBAT
                    INCHARGERANGE

               ATTACK
                    INDIRECT
                    DIRECT
                    MAGICAL
                    MEETCHARGE
                    CHARGING
                    AIRTARGET
                    GNDTARGET
                    NONTARGET
                    INTERSTICE
                    STOPTOFIRE
                    PTBRANGE
                    SHTRANGE
                    MEDRANGE
                    LNGRANGE
                    MOUNTED
                    WITHSHIELD
                    SMOKEATTACK
 
          FORCE
               KILL
               DEFENSIVE
               OFFENSIVE
               BERSERK
               CAUTIOUS
               STATIC


          WEAPON
          IFWEAPON

          Both of these items (WEAPON and IFWEAPON) use the same list of
     options as an attack.  Note that attack and weapon flags must match on
     any item which indicates capability, such as CHARGING.  Specific uses,
     such as the ideal range indicators, are designed to be used in specific
     attacks, however, if you wish attacks using the weapon to default to
     the range or other attribute desired, select that option for the

                                                 37





     weapon, then enter it in the various attacks which will use it.

          DEFENSE
               ONEARMOR
               SURPRISED

          MOVEMENT
               COVER
               FAST
               HARDFRONT
               CLOSEFRONT
               FREE
               TELEPORT
               PLANESHIFT
               INTERSTICE
               ENTERATTACK
               RANDSEARCH
               STOPINAIR
               EXACTFORMATION
 
          TACTICS
               DAMAGE
               HARD
               CLOSEST
               DANGER
               NOTTARGET
               FASTEST
               RECKLESS
               MAXRANGE
               FLEXCPA
               IDEALRANGE
               CONCENTRATE
               OBSERVER
 
          OBJECTIVE
               ONOBJECTIVE
               INZONE
               LOSTOOBJECTIVE
               GAMEENDS
               TIMEHOLD
 
          SUPPLY
               MOVING
               STOPPED
               LOSNEEDED
               ONMAP
               RETREATING
               ATSUPPLY
 
          PLAYER
               ACTIVE
 

                                                 38





          STRATEGY
               KILL
               DEFENSIVE
               OFFENSIVE
               BERSERK
               CAUTIOUS
               UNDERFIRE
               SIGHTEDENEMY
               INCOMBAT

          MAP
          The format for MAP options is the same as that for the units, the
     alternate keyword being for the list of grids attached to that map.

               MAIN
                    PVTBITMAP
                    TACTICALMAP

               GRID
                    GRIDON
                    DISTANCEGRID
 

          PORT
               INTERNAL
               EXTERNAL
               SERPORT
               MODEM
 
          MARKER
               SHOWN
               RANGEON
               FACINGON
               SHOWZOC
               SHOWDEST
               SHOWTARGET
               SHOWCMD
               LASTMOVE
               LABEL
               OWNIMAGE
      
          TERRAIN

          Format:  optionon terrain terrainnumber optionword

          The terrain must be specified by number rather than label.  Legal
     values are from 1 to 32.

               MOVE
               LOS
               ALTITUDE
               COVER

                                                 39





 
          MAIN
               CHECKLOS
               PRIMARYSYSTEM
               INFOWINDOW
               SCENARIO
               TIMEWINDOW
               COUNTWINDOW
               FILTERSELECT
               FILTERON
               MARKSECTORS
               MARKZONES
               DOICONS
               COURSEPLOTTING
               POINTERS
               MARKERTOFRONT
               OPTIMIZECOURSE
               POINTERLOCK1
               POINTERLOCK2
               DRAWLOCK
 
          SCENARIO
               LOCKED
               FORCES
               UNITS
               VERBOSE
               PHASES
               ZOOMTOBATTLES
               HISTORYFILE
               STOPAFTERBATTLE
      


DRAW:

     The draw command allows drawing using the measuring units of the EBS
map.  The option words PIXELS and SCALED apply to these commands.  Normally
location arguments are passed in map coordinates (using the current map
definition).  If the word SCALED is added to the end of the command, the
unit of measurement is the unit defined for the current map, otherwise the
unit is centimeters.  If the word PIXELS is added to the end of the command,
arguments are entered in pixels.  Note that the option words must be the
last thing on the command line, regardless of how many embedded commands are
included.  EBS extracts those words first before any other parsing of the
command is accomplished.

     Format:  draw pattern x y optionword

     This option word is, of course, optional.

     PATTERN


                                                 40





     Gets the pattern of colors at the current location of the remote
pointer.  These colors are returned as a string of numbers separated by
spaces suitable for use as an argument to a 'set colors' command.

     COLOR

     Gets the single pattern of colors at the current location of the remote
pointer.  The color is returned as a single number.

     BOX

     Format:  draw box startx starty endx endy optionword

     Draws a box with corners startx/starty and endx/endy.  The order of the
corners provided is immaterial (upper left, lower right, etc).  The box is
an outline in color 5 of the terrain pattern.

     CIRCLE

     Format:  draw circle centerx centery radius optionword

     Draws a circle centered at centerx and centery with the specified
radius in color 5 of the terrain pattern.

     LINE

     Format:  draw line startx starty endx endy optionword

     Draws a line in color 5 of the terrain pattern.  As with 'draw box' it
is immaterial which end of the line is specified first.

     PLINE

     Same as 'draw line', except that the line is drawn with the entire nine
pixel terrain pattern.

     FBOX

     Same as 'draw box', except that the box will also be filled with color
5 of the terrain pattern.

     FCIRCLE

     Same as 'draw circle', except that the circle will also be filled with
color 5 of the terrain pattern.

     PBOX

     Same as 'draw box' except that the box is drawn and filled with all
nine colors of the terrain pattern.

     POUTLINE

                                                 41






     Same as 'draw box' except that the outline of the box is drawn with all
nine colors of the terrain pattern.

     POINT

     Draws the current terrain pattern at the location specified.

     PPOINT

     Draws one pixel of color 5 of the current terrain pattern at the
location specified.


NEW:

     Format:  new unit name sourcename

     This is a simple command to create a new, blank, module of the type
specified.  The 'name' argument is the name for the new module; the
sourcename is the name of an existing module whose values you wish copied
into the new module as defaults.

     UNIT
     MOVES
     WEAPON
     IFWEAPON
     DEFENSE
     TACTICS
     MARKER
     ATTACK
     FORCE
     MEASURE
     GRID
     OBJECTIVE
     SUPPLY
     STRATEGY
     PLAYER
     PORT
     ITEM


CLEAR:

     Format:  clear unit optionword

     The only applicable optionword is QUERY.  If it is the last thing on
the command line EBS will query the user at the console as to whether he
desires the list of modules cleared, otherwise, EBS deletes all the modules
in the list.

     This command uses the list of modules presented under the 'count'

                                                 42





command below.  Its purpose is, however, to clear out an entire list of the
type of module specified.


DELETE:

     Format:  clear unit unitname optionword

     Similar to 'clear' except that only the item named is deleted.  Use of
the QUERY option is identical.


COUNT:

     Format:  count map
              count map grids
              count unit
              count unit attacks
              count unit destinations

     Counts the number of modules there are in each list.  This is
particularly valuable when something must be done to all elements of a list
from the EBS script language.  One way of covering an entire list is by
getting the first element of it, then counting your way through using the
'next' variable.  This takes time and extra EBS commands sent from AREXX
(tm).

     A simpler way to do so is to get a count of the elements of the list,
then use a simple counting loop.  All arguments in EBS which require the
module name will also accept the module number.  The difference is, that
when dealing with more than one machine or more than one copy of EBS, the
lists may not be identical.  In that case, the name provides a unique way of
accessing a particular module.

     MAP
       GRIDS
     UNIT
       ATTACKS
       DESTINATIONS
     UNIT
     FORCE
     MOVEMENT
     DEFENSE
     WEAPON
     IFWEAPON
     TACTICS
     OBJECTIVE
     SUPPLY
     PLAYER
     STRATEGY
     MAP
     PORT

                                                 43





     MARKER
     ITEM
     MEASURE
     ALL
 

SECTOR:

     Format:  sector sectornum item

     Returns the average values for each of the following items for a
sector.

     COVER - average cover in the sector.
     ALTITUDE - average altitude of the terrain in the sector.
     TROOPS - total troops of all forces.
     SPEED - average speed for the movement module specified.
          Format:  sector sectornum speed infantrymoves
     FORCE
          Format:  sector sectornum force item

          Uses the same keywords as the FORCE command to return values which
     reference a particular force, such as enemy numbers in the sector.  

ZONE:

     This command has the same format and keywords as the SECTOR command,
but provides the average values for whole zones.


UNIT:

     Format:  unit unitname keyword

     Returns a TRUE or FALSE for whether the specified item is true about
the unit, with the exception of distance (see below).

     MOVED
          This is TRUE if the unit has been moved since its status was last
     updated by EBS.
     DISTANCE
          Returns the distance of the last second's movement by the unit
     specified.

     TRANSPORTED
          This is TRUE if the unit is being transported by another unit.
     INTELCHECKED
          This is TRUE if the unit has had all its information checked for
     quick display of the unit view.
     SITECHECKED
          This is TRUE if the unit has had all of its lines of sight check
     for quick display of the unit view.

                                                 44





     COMMANDED
          This is TRUE if the unit has received commands since the last time
     it was ready to receive them.

FORCE:

     Format:  force forcename keyword

     Returns the following values for a force for the entire EBS map.  It is
similar to the 'sector force' and 'zone force' commands otherwise.

     NUMBER
     ENEMY
     STRPOINTS
     DEFPOINTS
     MOVEPOINTS
     OFFPOINTS
     ENEMYSTR
     ENEMYDEF
     ENEMYMOVE
     ENEMYOFF
 

COURSE:

     Format:  course unitname keyword

     Returns values relating to the position, destination and current course
of the unit named.

     COURSECLEAR
          Returns TRUE if there is a clear course between the unit and its
     destination, FALSE otherwise.

     CALCCOURSE
          Returns the course in degrees and the distance in centimeters from
     the unit's current position to its destination.  Zero or 360 degrees is
     always to the top of the map.  Use of the SCALED keyword will result in
     a distance value stated in the unit specified for the map.

     SETCOURSE

          Format:  course unitname degrees distance

          Sets the course of the unit named to the number of degrees
     specified, and to a destination 'distance' centimeters away on that
     course.  Accepts the response of the 'calccourse' command as its input. 
     If necessary, internal logic for moving around obstacles is used in
     projecting a course through a series of points to the destination. 
     Returns the destination which has been set.

     RETREAT

                                                 45






          Format:  course unitname retreat attackername

          Sets the unit's course as a retreat from the attacker named at the
     end of the command.  Returns the destination actually set, or zeros if
     none was successfully set, meaning the unit is unable to retreat under
     EBS rules.


LOS:

     Format:  los keyword values keyword values
              los sectorc sectornum sectore sectornum
              los loc rem1 loc rem2
              los unit unitname marker markername
              los locstr 1000 1000 0 0 0 0 1 locstr 1000 1500 0 0 0 0 1

     Calculates whether there is a line of sight between any two locations
specified by the following list of keywords.  They may be mixed as desired,
for example, the command 'los unit leadunitname marker objectivemarkername'
would inform the user whether the lead unit (specified by name, this is not
an EBS variable) has an LOS to its objective.

     SECTORC
          Calculates the LOS to the center of the sector specified.

     SECTORE
          Calculates the LOS to the nearest edge of the sector specified.

     LOCSTR
     LOC
     MARKER
     UNIT


PIXX:

     Converts pixels to location strings.  The location strings returned may
be used as arguments for any functions which call for a location string.

     PIX
          Format:  pixx pix px py

          Returns a location string with full values based on the px and py
     location specified.

     LATLONG
          Format:  pixx latlong x y z 0 0 interstice plane

          Calculates the pixel values and returns the location string
     complete with the pixel values.  Any values entered in the position for
     the pixels in the location string will be ignored.

                                                 46







INFO:

     Format:  info put string
              info add string

     This command simply places the information provided in the string into
the EBS information window.  The 'info put' command erases any previous data
entered into the window, while the 'info add' command adds this info to any
already in the window.  Be careful in using this command to avoid adding
more information that the information window has buffers for.  Extra
information will be discarded.  The capacity of the information window is
2048 bytes, and even this amount cannot be displayed on lower resolution
screens.

     PUT
     ADD


RANDOM:

     Format:  random upperlimit

     Returns a value between one and 'upperlimit'.  The random number
generator is automatically seeded from the clock at startup.  The random
number must be less than 65535.


POINTERS:

     The following keywords are used in all cases where pointer
specification is required:

     MPTR - the mouse pointer.  Information may be accessed from this
pointer, but its location may not be changed remotely.
     REM1 - the first remote pointer.  Fully accessible from remote scripts. 
The REM1 pointer is used by default for pointer to markers and to targets. 
Any internal function which moves a pointer uses this one.
     REM2 - the second remote pointer.  Fully accessible from remote
scripts.  Not used by default for any other function within EBS.
 
     Remote pointer commands will use the default remote pointer.

3.6 Expressions and Operators

     The EBS script language also supports operators and expressions used in
commands.  Command processing will often be speeded by using these operators
rather than getting values, calculating in AREXX (tm) then again entering
values in EBS.

     'C' language escape values, including octal or hex entries, '\n', etc.

                                                 47





are supported as parts of strings.  Several of these, such as '\f' have no
function in the current version of EBS, but will not produce errors.

     (IF)  - this doesn't exist as such.  Just enter a boolean expression. 
This must use one of the comparison operators.  Explicitly do a comparison. 
For example [1] commands [ENDIF] will not work, but [1 == 1] commands
[ENDIF] will.
     ELSE
     ENDIF

     These three operators combine to produce IF-ELSE-ENDIF structure. 
Sytax is:  [expression1] commands [ELSE] commands [ENDIF].  These
expressions can be nested up to 256 levels.

     Binary operators take the form 'expression1 op expression2'.  EBS
supports the following binary operators:

     Comparison:
          Operator       Function
          ==             Equality
          !=             Inequality
          <              Less than
          <=             Less than or equal to
          >              Greater than
          >=             Greater than and equal to
     Math:
          +              Addition
          -              Subtraction
          *              Multiplication
          /              Division
          %              Modulo division
     BITWISE:
          &              AND
          |              OR
          ^              XOR
          <<             SHIFT LEFT
          >>             SHIFT RIGHT

     LOGICAL:
          &&             AND
          ||             OR

     Unary operators take the form 'op expression'.  EBS supports the
following unary operators.

     Comparison:
          Operator       Function
          !              LOGICAL NOT
          ~              BITWISE NOT 
          UNSIGNED       Converts number to unsigned for printed return
          ENVIRONMENT    Returns an environment variable value


                                                 48






* AREXX is a trademark of William B. Hawes.      



















































                                                 49






                                   Index

'@'  4, 32
'set  24, 25, 26, 27, 41
'set'  9
[]  4
{}  4
$  4
@  4
ACTIVEDEFENSE  37
ALLMAGICDEFENSES  15
Altitude  9, 11, 26, 39, 44
AREXX  3, 4, 5, 32, 34, 43
ATSUPPLY  38
Attackername  7
Back  13
BASEALTITUDE  16
BASETIME  16
Below  7
CDEFENSE  5
Centered  7
CFORCE  5
CGRID  5
CHECKLOS  36, 40
CIFWEAPON  5
CLEARMENUS  32
CLOCATION  5
CMARKER  5
COBJECTIVE  5
CONSTANTLOS  37
Coordinates  40
COUNTWINDOW  36, 40
Cover  9, 11, 12, 25, 26, 38, 39, 44
Covering  43
CPLAYER  5
CSTRATEGY  5
CSUPPLY  5
CTACTICS  5
CUNIT  5
CWEAPON  5
DEFAULTTERRAIN  16
Defense  5, 11, 15, 24, 25, 33, 34, 38, 42, 43
DEFENSES  8, 34, 35
Definition  40
Distance  22
DISTANCEGRID  39
Executed  7
FIRSTDEFENSE  6
FIRSTFORCE  6
FIRSTIFWEAPON  6
FIRSTMARKER  6

                                                 50





FIRSTMEASURE  6
FIRSTOBJECTIVE  6
FIRSTPLAYER  6
FIRSTSTRATEGY  6
FIRSTSUPPLY  6
FIRSTTACTICS  6
FIRSTUNIT  6, 15
FIRSTWEAPON  6
Font  19, 27
FONTNAME  19, 27
FONTSIZE  19, 27
Force  5, 11, 12, 15, 16, 17, 23, 24, 26, 33, 34, 36, 37, 42, 43, 44,
          45
FORCENEXT  23
FORCEPREV  23
FORCES  35, 40, 44
Grid  5, 7, 17, 27, 34, 39, 42
GRIDON  39
Grids  39, 43
IFDEFENSE  15
IFWeapon  5, 12, 14, 24, 33, 34, 37, 42, 43
IFWEAPONS  8, 34, 35
INFOWINDOW  36, 40
Interstice  6, 9, 10, 11, 16, 37, 38, 46
Is  5, 9
Iscreenwidth  28
Item  19
Lastloc  22
Location  5, 6, 7, 8, 9, 10, 12, 13, 20, 22, 23, 26, 30, 31, 33, 40,
          41, 42, 46, 46, 47
Locations  5, 10, 22, 46
LOS  11, 39, 46
LOSNEEDED  38
LOSTOOBJECTIVE  38
MAGICDEFENSE  15
Map  9
Marker  4, 5, 6, 8, 10, 11, 25, 31, 32, 33, 34, 39, 42, 44, 46
Markername  10
MARKERS  8, 10, 25, 31, 34, 35, 47
MARKERTOFRONT  36, 40
MEASURE  16, 17, 27, 33, 42, 44
MEASURES  8, 34, 35
Menu  3, 4, 7, 9, 18, 20, 28, 30, 31, 32
Menus  3, 7, 31, 32
MINFORCE  16
Module  3, 4, 5, 6, 8, 10, 11, 12, 13, 16, 18, 19, 24, 25, 30, 31, 33,
          42, 43, 43, 44
Modules  4, 5, 8, 9, 13, 17, 24, 26, 27, 30, 42, 43
Movement  5, 12, 13, 14, 23, 24, 30, 31, 33, 34, 38, 43, 44
MOVEMENTS  8, 35
Moves  24
Must  7

                                                 51





NewMarker  6
Objective  5, 10, 15, 16, 26, 33, 34, 38, 42, 43, 46
Objectivemarkername  46
Objectivename  16
OBJECTIVES  8, 34, 35
Of  7
Offsets  12
ONOBJECTIVE  38
OPTIONS  11, 33, 36, 39
Pixelcount  28
PLANETERRAINS  8
Player  5, 9, 16, 25, 26, 33, 34, 35, 38, 42, 43
PLAYERS  8, 34
Pointer  5, 6, 7, 8, 9, 10, 12, 18, 22, 26, 41, 47
POINTERLOCK  36, 40
Pointers  7, 22, 36, 40, 47
Pointerword  22
Pointerwords  22
REAROFFSET  17
REFRESHINC  29
REMOTEPOINTER  18
REPROJECT  9
Reprojects  9
REQUEST  32, 33, 34
Requester  9, 18, 33, 34
Requesters  30, 32
Resetting  10
SAVEINCREMENT  15
Scenario  5, 8, 15, 19, 20, 24, 25, 28, 29, 30, 34, 36, 40
SCENARIOFLAGS  31
Screen  22
Set  3, 5, 6, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 22, 28, 30, 35, 36,
          45, 46, 46
SETCOURSE  45
Sets  8, 9, 10, 11, 12, 13, 18, 19, 20, 32, 45, 46
Setting  3, 11, 18, 24
Setup  9
Strategy  5, 17, 24, 26, 27, 33, 34, 35, 39, 42, 43
STRATEGYLABEL  15
STRATEGYREVIEW  15
SUBCOUNTER  19, 27
Supply  5, 10, 16, 17, 26, 33, 34, 35, 38, 42, 43
SUPPLYCOUNTER  12
SUPPLYTYPE  12
Tactics  5, 8, 11, 15, 25, 33, 34, 35, 38, 42, 43
Targetdata  25
TELEPORT  38
TELEPORTS  12, 13
TenDegreeGrid  7
Terrain  9, 11, 16, 18, 25, 28, 29, 33, 39, 41, 42, 44
TERRAINENTRY  10, 11, 22
TERRAINFLAGS  13

                                                 52





TERRAINTABLE  8
The  9
Time  25
Timecounter  19, 20
TIMEWINDOW  36, 40
TURNINCREMENT  15
Unit  3, 4, 5, 10, 11, 12, 13, 22, 23, 24, 25, 30, 33, 34, 35, 36, 40,
          42, 43, 43, 44, 45, 46
Unit's  46
UNITID  11
Units  8, 11, 12, 13, 23, 24, 29, 30, 34, 35, 36, 39, 40
Variable  4, 43, 46
Variables  3, 4, 5, 6
Weapon  5, 6, 7, 12, 14, 24, 33, 34, 37, 38, 42, 43
WEAPONS  8, 34, 35
Window  19, 27, 31, 32, 33, 34, 47
Windowname  33
Windows  31, 32, 33



































                                                 53
