			The appendixes:
			===============

This is a reference guide for the functions used withing the game.  Not
all of them are here (we probably missed a few), but it will prove 
extremely helpful when redefining game play. I suggest that you either
keep this document handy or print it :). (BTW: This document is still
under construction)

COMMAND RELATED FUNCTIONS:
**************************

Part A - Requirement Functions

        This is a list of the values used in the requirement function of
the commands, what they do, and which type of commands use them. Whenever X
appears in the description, it is the requirement variable. When I use the names
of the Human units, it also refers to the equivalent Orc unit. All the values
are from version 1.33.

 Value  Meaning                     Used For

172688  Always                      Move, Patrol, Stand Ground, various others.
172796  Can build Oil Platform      Tanker command 5
172820  ??                          Cancel group command 1
172852  ??                          Cancel group command 2
172900  ??                          Cancel group command 3
173044  Can upgrade arrows to X+1   Lumber mill commands 1 & 2
173080  If arrow upgrade = X        Attack for archers and axethrowers.
173112  Can upgrade sword to X+1    Blacksmith commands 1 & 2
173148  Can upgrade ballista to X+1 Blacksmith commands 5 & 6
173184  Can upgrade to Rang./Bers.  Lumber mill 3
173260  Can upgrade range           Lumber mill 5
173324  Can upgrade scouting        Lumber mill 4
173388  Can upgrade Marks./Regen.   Lumber mill 6
173452  Always                      ? Human/? Orc Attack, Patrol, & Stand Ground
173464  If sword upgrade = X        Attack for units with upgradeable weapons.
173496  Can upgrade shield to X+1   Blacksmith commands 3 & 4
173532  If shield upgrade = X       Stop for units with upgradeable shields.
173564  Can upgrade cannon to X+1   Foundry commands 1 & 2
173600  If cannon upgrade = X       Attack for ships with upgradeable cannons.
173632  Can upgrade armor to X+1    Foundry commands 3 & 4
173668  If armor upgrade = X        Stop for ships with upgradeable armor.
173700  If attack ground flag set   Attack Ground.
173756  Can upgrade Hall to X+1     Hall commands 2 & 3
173924  Can upgrade Tower to X+1    Watch tower commands 1 & 2
174004  Can research upgrade X      Mage Tower commands 2-6, Church command 1
174100  Can research upgrade X      Church commands 2 & 3
174152  Know Spell X                Mage commands 4-9, Paladin commands 10-12
174216  Can train Peasant           Hall command 1
174288  Can train Archer            Barracks command 2
174344  Can train Ranger            Barracks command 3
174400  Can train Footman           Barracks command 1
174472  Can train Ballista          Barracks command 4
174532  Can train Knight            Barracks command 5
174608  Can train Paladin           Barracks command 6
174684  Can train Mage              Mage tower command 1
174756  Can train Oil Tanker        Shipyard command 1
174828  Can train Destroyer         Shipyard command 2
174900  Can train Transport         Shipyard command 3
174948  Can train Battleship        Shipyard command 4
174996  Can train Submarine         Shipyard command 5
175044  Can train Flying Machine    Inventor command 1
175104  Can train Demolition Squad  Inventor command 2
175152  Can train Grypon Riders     Grypon Aviary command 1
175804  Can build Wall              Basic build command 7
175856  Can build Hall              Basic build command 3
175884  Can build Lumber mill       Basic build command 4
175912  Can build Blacksmith        Basic build command 5
175940  Can build Farm              Basic build command 1
175968  Can build Barracks          Basic build command 2
175996  Can build Watch Tower       Basic build command 6
176024  Can build a basic building  Peasant command 7
176148  Can build Shipyard          Advanced build command 1
176200  Can build Foundry           Advanced build command 2
176252  Can build Oil Refinery      Advanced build command 3
176304  Can build Stables           Advanced build command 5
176376  Can build Inventor          Advanced build command 4
176448  Can build Church            Advanced build command 6
176500  Can build Mage Tower        Advanced build command 7
176552  Can build Gryphon Aviary    Advanced build command 8
176604  Can build an Adv. Building  Peasant command 8
176744  Is not carrying any goods   Peasant command 5, Tanker command 6
176824  Is carrying goods           Peasant command 6, Tanker command 7
176904  Is transporting passengers  Transport command 5


Part B - Action Functions

        This is a list of the values used in the action function of
the commands, what they do, and which type of commands use them. Whenever X
appears in the description, it is the requirement variable. When I use the names
of the Human units, it also refers to the equivalent Orc unit. All the values
are from version 1.33. NOTE: All id's are counted from 0, ie footman is 0..

Value      Command

123174     Move 
121904     Stop
123740     Attack
123160     Patrol 
123712     Stand Ground
123432     Attack Ground
124000     Repair
123920     Harvest Lumber/Mine Gold
124148     Return with goods
189704     Bring up a menu for unit x
166764     Cast spell X (where X is)
            38=Holy Vision
            39=Healing 
            40=Unused 
            41=Exorcism 
            42=Flame Shield 
            43=Fireball 
            44=Slow 
            45=Invisibility 
            46=Polymorph 
            47=Blizzard 
            48=Eye of Killrog 
            49=Bloodlust 
            50=Raise Dead 
            51=Death Coil 
            52=Whirlwind 
            53=Haste 
            54=Unholy Armor 
            55=Runes 
            56=Death and Decay 
123756      Demolish/Self Destruct
124224      Build structure #X (where x is it's id)
		(WARNING! Only a unit with act like peasant set in the
			UDTA can do this)
		(DON'T TRY IT WITH X BEING A UNIT)
42932       Build unit #X
		(Similar warnings as last one)
42908       Upgrade Spell #X
42952       if x=0 upgrade -> Stronghold if x=1 upgrade -> Castle
42884       Upgrade Weapons #X

UNIT RELATED FUNCTIONS:
***********************

At the moment the use of function a (in the unit editor) is unknown.
However function b is used for the side bar stats.  

Here is a list for version *1.3*

Value   Shows
178280  Nothing
180380  Picture, name, health, level
180476  Standard unit, sword and shield upgrades
181276  Standard unit, ballista and shield upgrades
181608  Standard unit, arrow and shield upgrades
182172  Picture, name, health
182588  Unknown
182864  Standard ship, doesn't show health when has passengers
183316  Standard unit, cannon and armor upgrades
184224  Food stats
185560  Standard building, Training:
185860  Show all production
186296  Standard building, Training:
186736  Show wood production, Upgrading:
187044  Standard building, Upgrading:
187344  Standard building, Researching:
187636  Standard building, Training:/Researching:
188032  Standard building, Upgrading:
188336  Unit stats except speed
188664  Show oil production
189076  Show oil remaining.

TO GET THE VALUES for v1.33 just add 400 to the above.
