Township
 
This file format is used by several Aurora Engine files. The only difference between them is the keys are different for each file.
Header
dwordType ("IFO ", "UTT ", "ARE " etc)
dwordVersion "V3.2"
dwordGroupTableOffset
dwordNumGroups
dwordItemTableOffset
dwordNumItems
dwordKeyTableOffset
dwordNumKeys
dwordStringTableOffset
dwordStringTableSize
dwordNodeTableOffset
dwordNodeTableSize
dwordListTableOffset
dwordListTableSize

There is always at least 1 Group in the GroupTable. The first Group in the table is the Root. All other Groups will be referenced from this Group. Each Group looks like this:

GroupTable
dwordGroupType
dwordStartItem
dwordNumItems

GroupType is the type of group. All you really need to know is that -1 is for the Root Group.
Depending on NumItems, StartItem is interpreted in two different ways. If NumItems is greater than 1, then StartItem is an offset into the NodeTable, and NumItems are the number of consecutive Nodes in the NodeTable that correspond to this group. If NumItems is equal to 1, then StartItem is an index into the ItemTable. Note, it's not an offset, it's an index.

Now let's look at the ItemTable. This contains all the items in the file. They are referenced from both the NodeTable and from the GroupTable.

ItemTable
dwordVariableType
dwordKey
dwordValue

Key is an index into the Key table. It corresponds to the Variable Name.
VariableType dictates the type of the variable. See below.
Value is the value assigned to the Item. It depends on what the VariableType is

Variable Types
TypeDescription
0Byte, used for booleans and indices
2ID, used for Portraits, and Appearance
3HP, always used for HP
4Masked Hex, used for flags, and RGB colors
5Large Int, used for Percentages, Prices
8Float, used for all fractional values
10String, used for short strings
11Key, used for variable names
12Text, used for large blocks of text
15List, used for lists of items
All types above have their values stored in the Value field except for the special ones listed below.
10String
This type is used for short strings. Value is an offset into the StringTable. The data referenced by Value is structured like this:
dwordString Length
char[]String Text
11Key
This type is used to reference another object in the module. Value is an offset into the StringTable. The data referenced by Value is structured like this:
byteString Length
char[]String Text
12Text
This type is used for large blocks of text, such as descriptions. Value is an offset into the StringTable. See below for the structure. Number of Strings is almost always 0 or 1, 0 means the string is blank. String Number starts with 0 and increments for each string
dwordBlock Size
dword-1
dwordNumber of Strings
dwordString Number
dwordString Length
char[]String Text
15List
This type is used for lists of items. Value is an offset into the ListTable.

Now let's look at the Key table. This table is simply a list of 16 byte strings, each represents the variable name of a variable. They are indexed from the ItemTable. Note that they aren't always null terminated.

The StringTable has already been described above. Each part of this table is formatted differently depending on the VariableType of the Item referencing it.

The NodeTable is a list of dwords. Each dword is an index into the ItemTable for that node. This table is referenced by the GroupTable.

The final table is the ListTable. This table is also a list of dwords, referenced by the ItemTable by Items that are type 15. The first dword in each "chunk" of the table is the number of items in the list. The following dwords are indices into the GroupTable.

This isn't a very complicated file, but there's a lot of pointing back and forth between the different parts of the file, which can be confusing. To help, I've written a small example. DumpMOD.C will read a .MOD file, and dump the main module IFO file, which is of this filetype.

 
Gimp LogoSourceForge Logo