Version 9 (modified by ibboard, 11 years ago) (diff)

--

Army Builder .ab File Format

The following is a description of the .ab file format, as determined by IBBoard with the help of a few .ab files and the GHex hex editor.

The file is split in to two main parts; the content and then the file table. The file table itself is then split in to two further parts; the header and the file list.

All numeric values in the following description are big-endian numbers. All strings are in ASCII/Latin-1. All "quoted strings" are literals. All 'other quoted strings' are references to tags or attributes in the .def file. All paired numbers (e.g. 09 or 30) are hex strings.

Top level file format

The file is broken down as follows

  • 32-bit offset for the start of the file table from the end of the value (so position = offset + 4, e.g. a value of 1000 means the file table starts at 1004)
  • Compressed file content (from position 4 to offset + 3)
  • File table (position offset + 4 to end)

The contained files

The detail of the compressed files is currently unknown. It is expected to be Zipped using standard Zip compression, but may use GZip or another compression method. Further investigation is necessary.

The file table

The file table is split in to a header (which also defines details about the file itself) followed by the file table with the list of files, their sizes, offsets within the file and other details. The first 2 bytes of the file table at offset + 4 is the offset of the actual file table entries as a 16-bit number.

The file table header

The file table header consists of the following (each item in the list is separated by a tab - 09):

  • A fixed "LWDExport" ("Lone Wolf Development Export"?) followed by a linefeed (0A), a colon (3A), "Army Builder" (app name of the file creator?)
  • The value of the 'game' attribute on the <game> tag in the .def file
  • The 'folder' attribute of the <structure> tag
  • The 'major' attribute of the <release> tag (as a string)
  • The 'minor' attribute of the <release> tag (as a string)
  • The major part of the 'required' attribute of the <release> tag (as a string)
  • The minor part of the 'required' attribute of the <release> tag (as a string)
  • An unknown number that appears to always be "0" (Hex: 30)
  • "ABExport"
  • The additional comment added when creating the file

The file table content

The file table starts at offset + 4 + 2 + file table header length. Each file entry consist of:

  • A 16-bit number for the file name length
  • The file name string
  • Eight bytes that always seem to be 01 00 02 00 04 01 00 00 (may be a coincidence or may be something to do with versioning)
  • A 32-bit file size of the uncompressed file
  • A 32-bit file size of the compressed data
  • Four unknown bytes with varying values
  • A 32-bit offset of the compressed data from the start of the file (so the first file should always have 00 00 00 04)
  • Eight unknown bytes
    • .aug files seem to have 00 00 49 A5 00 2D 00 08 or 00 00 49 A5 00 2E 00 08
    • .bmp files seem to have 00 00 49 A5 00 2B 00 08 or 00 00 49 A5 00 2D 00 08
    • .def files seem to have 00 00 49 D4 D9 2B 00 08
    • .ext files seem to have 00 00 49 A5 00 2E 00 08
    • .dat files seem to have:
      • 00 00 49 A5 00 2D 00 08 for plain files
      • 00 00 49 BD 92 7C 00 08 or 00 00 49 B3 69 92 00 08 for "AP" files
      • 00 00 49 C7 F1 32 00 08 or 00 00 49 BD 97 D1 00 08 for "Unit" files
      • 00 00 49 A5 00 2D 00 08 or 00 00 49 BD 92 7C 00 08 for "UniDat" files

The file table ends with a final 00 00, presumably to represent the fact that the next file name length is 0 - i.e. there are no more files).

Attachments (1)

Download all attachments as: .zip