πŸ›‘οΈ TA Archive

File Formats in TA

Total Annihilation is full of quirky but well-documented formats. Here’s the overview:

Containers

Maps

Units

Misc

TNT heights: one elevation per 16Γ—16 cell

The height data lives in the map attributes array, pointed to by PtrMapAttr (header offset 0x10). Each entry is 4 bytes and covers one 16Γ—16-pixel cell of terrain:

The header’s Width/Height fields are in 16-pixel units, exactly the resolution of this array, so there are Width Γ— Height height values. The 32Γ—32-pixel texture tiles are twice that size β€” 4 height cells per tile.

Notes:

Source: the classic TNT format write-up by Saruman & Bobban (DFR), updated by me22 with Kinboat’s findings β€” ta-tnt-fmt-v2.txt.

Playing with third-party content

Just drop the files into the TA folder (or ...\Cavedog\Total Annihilation) β€” TA reads every HPI/UFO archive in that directory. For units, also watch the .unit list / side patch (see the Knowledgebase on unit building).

Fun fact: the embedded minimap

Every TNT file contains a built-in 252Γ—252 pixel minimap (pointer in the TNT header, offset 0x28). That’s the preview image TA shows in its map selection screen β€” and the very same images used on this site’s map cards. How to extract them yourself: Reverse Engineering TA Files.