Total Annihilation’s AI is a curious piece of engineering: a fixed engine whose entire personality lives in plain-text profile files. The engine decides nothing about what gets built β every unit choice comes from the profile, and the profiles are editable with Notepad. That’s why 25-year-old AI profiles still work, why the mod scene could ship hundreds of them, and why a single wrong line can make the AI build nothing but crawling bombs.
Where the AI lives
Two pieces, both easy to miss:
- The engine β the skirmish AI code inside
Totala.exe. It handles economy, construction orders and unit control, but knows no unit names. - The profiles β text files in the
AI/subdirectory of your TA folder. Liketotala.ini, this directory is never created by the game. Cavedog’s original profiles live insidetotala1.hpi(theai/folder in the archive); anything you put into the on-diskAI/directory overrides or extends them.
The selection happens per map: every OTA file contains one line β
aiprofile=default;
β naming the profile file (without extension) the AI uses on that map.
When you pick “AI: Acid” in the skirmish screen, you’re just choosing
which text file the map’s AI opponents read. TA:CC shipped ten standard
profiles: Acid, AirBattle, Default, Hover, Krogoth, Metal,
Missions, SeaBattle, Urban and Waterwrld β named for the map type
each suits.
The consequences are worth internalizing:
- A water map with
aiprofile=default;will see the AI attempt a ground rush across open ocean. Swapping toaiprofile=SeaBattle;(or shipping a custom profile with the map) fixes it β this is why good map authors ship anaiprofile=line matching their terrain, and why our map metadata parser reads exactly that line. - If the named profile file doesn’t exist, TA falls back to the built-in behavior β which is why “the AI ignores my profile” so often turns out to be a filename mismatch.
When there is no aiprofile line at all
A surprising number of community maps ship without an aiprofile=
line (or with an empty one), and a handful of map archives lack an OTA
entirely. In all those cases the engine uses its built-in defaults β
the behaviour Cavedog hardcoded before any profile file is consulted.
Practically:
- The map is fully playable; the AI just plays generically.
- On standard terrain (green land map), the built-in default is usually fine β that’s what it was tuned for.
- On water/metal/high-wind maps, a missing profile wastes the map: the
author probably shipped or recommended one. Check the map’s readme, or
drop a matching standard profile into your
AI/folder and add theaiprofile=line to the OTA yourself (any text editor; the OTA lives inside the map’s.ufo/.zipnext to the.tnt).
Our map listings show which profile each map requests, and flag the ones whose requested profile isn’t among the commonly available files.
The format
A profile is plain text. Lines starting with // are comments. There are
exactly three commands, and every AI ever written for TA β including
the legendary BANZAI β is built from them:
// BANZAI Default Profile
plan easy
weight ARMSOLAR 18.20
weight CORWIN 18.10
weight ARMMAKR 1.40
weight ARMFLASH 0.95
limit ARMFLASH 50
limit CORLLT 4
plan medium
weight ARMSOLAR 18.35
weight CORGEO 12.00
...
plan hard
limit CORKROG 20
...
plan [easy|medium|hard]
Everything after a plan line applies to that difficulty setting only.
The profile is read top to bottom, and later lines override earlier ones β
so the file is organized as three blocks, one per difficulty. Our 41
BANZAI profiles each contain exactly these three blocks; NoControl.txt,
the smallest profile in our archive (404 bytes), shows the structure
naked:
plan easy
weight CONSTR 5
weight PLANT 4
weight SPECIAL 1
weight WEAPON 2
plan medium
weight CONSTR 6
weight PLANT 4
weight SPECIAL 1
weight WEAPON 3
plan hard
weight CONSTR 6
weight PLANT 4
weight SPECIAL 1
weight [UNITNAME] [value]
The heart of the system: a multiplier on the probability that the AI builds that unit. Default weight is 1.0; range roughly 0.05β255. In the BANZAI default profile above, solars sit at 18.20 (build them constantly), the commander’s factories get moderate weights, and everything at 0.00 is effectively switched off.
Two idioms worth stealing from the community:
- The delayed build trick (Switeck): weight something very low
(e.g.
weight ARMGUARD 0.05) β the AI only builds it when constructors have nothing else queued, so expensive units appear exactly when the base is finished. - Economy-first openings: BANZAI’s absurd solar/wind weights are why its bases grow so fast in the first minutes. Copy that pattern before touching anything else.
Units are addressed by their FBI short name β the same names we list
in every unit’s definition file: ARMFLASH (Flash), CORLLT
(CORE LT), ARMMOHO (Moho Metal Maker). The prefix tells the side
(ARM/COR); community units use their own names. Case-insensitive in
practice, but profiles in the wild are inconsistent β ours preserve
whatever the original author typed.
limit [UNITNAME or category] [count]
Caps how many of a unit the AI may have alive at once. limit ARMFLASH 50
means “never more than 50 Flashes”. Zero disables the unit entirely β the
most common line in any profile, and the standard way to teach a profile
about units it shouldn’t touch.
limit also accepts category names, which act on whole groups at
once. The Cavedog categories are:
| Category | Units covered |
|---|---|
constr |
Construction units and aircraft |
plant |
All factories |
special |
Special/one-off structures (silos, fortifications) |
level1 / level2 / level3 |
Everything by tech level |
So the classic early-game skeleton β limit constr 3, limit plant 3,
limit level2 10 on easy β is entirely category-based, and only the
later plan blocks get per-unit refinement.
Order matters
One subtlety Switeck nailed down: the file is read top-to-bottom and the topmost applicable line wins. If two lines change the same thing, the first one in the file is used. Weights at the top of the file, limits grouped under their plan block β that’s the layout all serious profiles follow.
Anatomy of a full profile
A BANZAI-style profile (our archive carries 41 of them, one per map type:
SeaMetal.txt, Urban.txt, AirBattle.txt, β¦) typically runs to
thousands of lines because it enumerates every unit that exists β
including third-party units the mod adds. The pattern per difficulty:
- Economy weights (solars/wind 10β18Γ, metal makers 1β7Γ)
- Factory weights (aircraft plant 2β5Γ on air maps, vehicle plant on land maps)
- Offense weights (0.5β1.5 for “normal” units, 0.95 for army core)
- Defense weights
- Junk at 0.00 β everything the AI should never touch
- Limits: caps on factories, caps on swarm units (Flashes at 50), caps on superweapons (Krogoths at 20 on hard)
The three plans differ mainly in aggressiveness of limits: on easy, BANZAI allows 4 Flashes and 0 Krogos; on hard, 50 Flashes and 20 Krogos. The unit pool is identical β difficulty is administered through limits.
Writing your own
The honest workflow, in Switeck’s words and ours:
- Start from the profile that matches your map type. Don’t write from scratch; the shipped ones are sane baselines.
- Zero out everything you never want to see (0.00 weight, 0 limit) β the fastest way to make an AI feel “smarter” is to remove its stupid builds.
- Weight the economy high (10Γ+) for the first minutes of growth.
- Cap swarm units so the AI keeps producing instead of parking.
- Test with cheats:
+nowiseeto watch,.speedup (community clients), and the AI will show its habits within minutes. - Name the file, drop it in
AI/, and setaiprofile=yourname;in the OTA β or just select it in the skirmish screen.
No compiler, no engine hooks β a text file. That’s the whole trick, and it’s why the TA AI scene could thrive for decades on shared profiles.
Where our knowledge comes from
- The original Cavedog
default.txt(intotala1.hpi), quoted by the classic TA Design Guide. - Switeck’s AI Design Guide (TAUniverse) β the reference tutorial of the era, source of the delayed-build trick and the topmost-line rule.
- 41 BANZAI profiles from a period installation, archived on this site β the source for every claim above about plan structure and weight/limit idioms.
If you find a directive we haven’t documented (later AI engines added their own), send it over β see the Imprint for contact.