Version 2 (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)
  • A final 00 00 (NUL terminator for the file table followed by a null terminator for the file itself?)

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 data 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
  • The eight bytes after a file name seem to always be 01 00 02 00 04 01 00 00 (at least in all the files I looked at - it 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
  • The 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 (always seeming to end 00 08)

Attachments (1)

Download all attachments as: .zip