Total Annihilation Skirmish AI Profile Notes
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
by Andrew Griffin
last updated 11 November, 1997

  Well, here are my notes on how to create a skirmish AI
for TA. There appear to be 3 default AIs (which you can
change or modify) called AirBattle, SeaBattle and Default.
All AI scripts have the extension .txt and reside in the
/ai directory (see later). You can (fairly) easily make new
AIs - as to whether they are effective or not is another
matter :)

  I don't know everything about making skirmish AIs for TA,
and don't pretend to. Most likely there are more sections
that can be added - where I have some suspicions about extra
items, I have noted them.


AI DIRECTORY
------------
  First things first - where do you put these files?
Create a subdirectory in your TA directory, and call it
'ai' (no quotes). You will place all of your AI scripts in
this directory.


OTA FILES
---------
  Now, how to get your script used - this is more difficult.
Unless you are going to be changing one of the 3 original files
mentioned above. What you need to do is edit the .ota files for
the maps. Lukily, these files are only a few K in size so can
be easilly distributed with your AI (if you want to). Please note
that these .ota files need to be named correctly, and have long
filenames, so you have to use an archiving program (such as winzip)
that can work with long filenames.

  The line you need to change is 'aiprofile'. Put this value to the
name of your new AI profile, but leave off the .txt extension.
Remember to end the line with a ';'.

  But, how do you get these .ota files? Well, you need to extract
them from the .hpi files on your TA cdroms. There is a program
(look at www.annihilated.com) that allows you to do this - but
you need a LOT of disk space. The .hpi file you are interested in
is the one stored on the TA multiplayer disk (it is 90+ meg in
size).

  You put the modified .ota file in the /maps directory in your
TA directory (make this as you made the /ai directory).


BREAKDOWN OF AN AI PROFILE
--------------------------
  There are basically 2 parts to an AI profile, a weightings
section and a limits section. Weightings seem to affect how
frequently the AI player will construct something. Limits affect
the maximum number of that item that the AI player will build at
one time.

  However, limits work in another way - it looks as though the
AI player has a preference to build the items that have Limits
as soon as possible. This may lead to some problems (such as
metal and power shortages), so be careful when using limits.
  If you just want to stop the AI player from building something
too often, it may be a good idea to simply put the weighting
down very low (such as 0.25 or lower), or to zero.

ITEMS IN A PROFILE
  The basic item in an AI profile are the TA names for the
various units (in TA everything is called a unit, be they
kbots, vehicles or buildings). This is where my little program
somes in handy - you don't need to know what these abbreviations
are. At the end of this file is the list of the abbreviations
(taken straight from my skrmai.ini file), although not for the
Commander or Galactic Gate - we are only interested in skirmish
AI files here.
  However, there are also some other items that affect how the
AI player will build and grow. These appear to be fairly
interesting, and I will list them here, along with my (probably
not-so-intelligent) speculations about what else could be included.

  If you look in the unit .fbi files at the Category= section, you
will see these listed for various units. I am betting that (a few)
of the items in the Category= can be used here as controls.

The followings are the ones that I have seen (these definitely
work):
------------------------------------------------------------------
plant       This refers to the various construction plants (be they
            advanced construction plants or the basic type). So you
            can have the AI build lots of construction plants, or
            very few.
constr      Refers to the construction units.
special     Don't know (probably limited to those units that have
            'special' in Category).
level2      Refers to 'level 2' units.
level3      Refers to 'level 3' units.


The following are POSSIBILITIES ONLY! They may not (and probably
won't) work. I've guessed at what they would do. Try them out
and see if they work. I've tried out a couple and have noted the
ones that definitely don't work.
-----------------------------------------------------------------
level1      Refers to 'level 1' units.
noweapon    Refers to units without weapons.
notair      Refers to anything not an aircraft.
notsub      Refers to anything not a submarine.
vtol        Refers to aircraft.
kbot        Refers to kbots.         DOESN'T WORK.
tank        Refers to vehicles.      DOESN'T WORK.
ship        Refers to ships.
weapon      Refers to units with weapons.
jam         Refers to radar jammers.
rad         Refers to radars.
phib        Refers to amphibious units.
stealth     Refers to stealth units.
sonar       Refers to sonar stations.
antisub     Refers to anti-submarine units.
bomb        Refers to bombers.
kamikaze    Refers to crawling bombs
repairpad   Refers to aircraft repair pads
carry       Refers to light carriers
tport       Refers to transports.
underwater  Refers to submarines.
defensive   Refers to defensive structures like LLTs and the like.
torp        Refers to units armed with torpedos.
paral       Refers to units armed with paralyzers.
energy      To do with energy - producing or storage.
metal       To do with metal - producing or storage (strangely the
            dragon's teeth have this...).
storage     To do with storage - energy or metal.
extractor   To do with metal extraction.
strategic   Refers to the 'big' units like Berthas and Annihilators.

  These items affect both Core and Arm AI players, where imposing
weights and limits using the 'item-by-item' approach only affects
the side that could build that unit. If all of the above items can
be used (I would bet that at least a few of them could), then some quite
interesting skirmish AI profiles could be created, especially now that
the single player maps are being converted to skirmish/multiplayer
maps.

  In addition, you can create a profile that changes depending
on the difficulty level the player is playing at (my AI profile
editor doesn't do this, yet). You can also have information that
affects all difficulty levels, but this must be included BEFORE
the first difficulty level specific information.
Here is an example of what a very basic profile would look like,
with separate sections for each difficulty level.
// dummy AI profile
// note that the parser is case insensitive
// the following is the general rules
Limit special 10
Weight plant  2.5

// now come the difficulty level specific stuff
plan easy
Limit plant 3
limit constr 2

plan medium
weight ARMMOHO 1.5
Weight cormoho 1.5

plan hard
weight ARMANNI 2.3
weight CORDOOM 2.0
weight level3 3.5

  So, if you wanted to cater for different levels of difficulty,
you would include the general stuff first, and then the difficulty
level specific information.


  Why is this stuff interesting? Well, because it becomes possible
to custom make an AI for a skirmish map, for example making one
for Shore to Shore that builds a mess of ships and aircraft and
very few land units apart from amphibious tanks. Or for
making a peewee/flash rusher AI :)


blackmane
andrew_griffin@bigfoot.com

ARM Unit Abbreviations
ARMAAP=Adv. Aircraft Plant
ARMACA=Adv. Const. Aircraft
ARMACK=Adv. Const. Kbot
ARMACV=Adv. Const. Vehicle
ARMALAB=Adv. Kbot Lab
ARMAMD=Fortitude Anti-nuke
ARMANNI=Annihilator
ARMAP=Aircraft plant
ARMARAD=Adv. Radar Tower
ARMASER=Eraser
ARMASP=Air Repair Pad
ARMASY=Adv. Ship Yard
ARMATLAS=Atlas
ARMAVP=Adv. Vehicle Plant
ARMBATS=Millenium
ARMBRAWL=Brawler
ARMBRTHA=Big Bertha
ARMBULL=Bulldog
ARMCA=Const. Aircraft
ARMCARRY=Colossus
ARMCK=Const. Kbot
ARMCROC=Triton
ARMCRUS=Conqueror
ARMCS=Const. Ship
ARMCV=Const. Vehicle
ARMDRAG=Dragons Teeth
ARMESTOR=Energy Storage
ARMFAST=Zipper
ARMFAV=Jeffy
ARMFIDO=Fido
ARMFIG=Freedom Fighter
ARMFLASH=Flash
ARMFUS=Fusion Plant
ARMGEO=Geothermal Plant
ARMGUARD=Guardian
ARMHAM=Hammer
ARMHAWK=Hawk
ARMHLT=Sentinel
ARMJAM=Jammer
ARMJETH=Jethro
ARMLAB=Kbot Lab
ARMLANCE=Lancet
ARMLLT=Light Laser Tower
ARMMAKR=Metal Maker
ARMMART=Luger
ARMMERL=Merl
ARMMEX=Metal Extractor
ARMMOHO=Moho Mine
ARMMSHIP=Ranger
ARMMSTOR=Metal Storage
ARMPEEP=Peeper
ARMPNIX=Phoenix
ARMPT=Skeeter
ARMPW=Peewee
ARMRAD=Radar Tower
ARMRL=Defender
ARMROCK=Rocko
ARMROY=Crusader
ARMSAM=Samson
ARMSEER=Seer
ARMSILO=Retaliator
ARMSOLAR=Solar Collector
ARMSONAR=Sonar Station
ARMSPID=Spider
ARMSTUMP=Stumpy
ARMSUB=Lurker
ARMSUBK=Piranha
ARMSY=Ship Yard
ARMTHUND=Thunder
ARMTIDE=Tidal Generator
ARMTL=Torpedo Launcher
ARMTSHIP=Hulk
ARMVADER=Invader
ARMVP=Vehicle Plant
ARMWIN=Wind Generator
ARMZEUS=Zeus

CORE Unit abbreviations
CORAAP=Adv. Aircraft Plant
CORACA=Adv. Const. Aircraft
CORACK=Adv. Const. Kbot
CORACV=Adv. Const. Vehicle
CORAK=A.K.
CORALAB=Adv. Kbot Lab
CORAP=Aircraft Plant
CORAPE=Rapier
CORARAD=Adv. Radar Tower
CORASP=Air Repair Pad
CORASY=Adv. Ship Yard
CORAVP=Adv. Vehicle Plant
CORBATS=Warlord
CORCA=Const. Aircraft
CORCAN=The Can
CORCARRY=Hive
CORCK=Const. Kbot
CORCRASH=Crasher
CORCRUS=Executioner
CORCS=Const. Ship
CORCV=Const. Vehicle
CORDOOM=Doomsday Machine
CORDRAG=Dragons Teeth
CORESTOR=Energy Storage
CORETER=Deleter
CORFAV=Weasel
CORFINK=Fink
CORFMD=Fortitude Anti-nuke
CORFUS=Fusion Plant
CORGATOR=Instigator
CORGEO=Geothermal Plant
CORGOL=Goliath
CORHLT=Gaat Gun
CORHURC=Hurricane
CORINT=Intimidator
CORLAB=Kbot Lab
CORLLT=Light Laser Tower
CORMAKR=Metal Maker
CORMART=Pillager
CORMEX=Metal Extractor
CORMIST=Slasher
CORMOHO=Moho Mine
CORMSHIP=Hydra
CORMSTOR=Metal Storage
CORPT=Searcher
CORPUN=Punisher
CORPYRO=Pyro
CORRAD=Radar Tower
CORRAID=Raider
CORREAP=Reaper
CORRL=Pulverizer
CORROACH=Roach
CORROY=Enforcer
CORSEAL=Crock
CORSHAD=Shadow
CORSHARK=Shark
CORSILO=Silencer
CORSOLAR=Solar Collector
CORSONAR=Sonar Station
CORSPEC=Spectre
CORSTORM=Storm
CORSUB=Snake
CORSY=Ship Yard
CORTHUD=Thud
CORTIDE=Tidal Generator
CORTITAN=Titan
CORTL=Torpedo Launcher
CORTSHIP=Envoy
CORVALK=Valkyrie
CORVAMP=Vamp
CORVENG=Avenger
CORVP=Vehicle Plant
CORVRAD=Informer
CORVROC=Diplomat
CORWIN=Wind Generator
