This file format is used by several Aurora Engine files. The only
difference between them is the keys are different for each
file.
Header |
dword | Type ("IFO ", "UTT ", "ARE " etc) |
dword | Version "V3.2" |
dword | GroupTableOffset |
dword | NumGroups |
dword | ItemTableOffset |
dword | NumItems |
dword | KeyTableOffset |
dword | NumKeys |
dword | StringTableOffset |
dword | StringTableSize |
dword | NodeTableOffset |
dword | NodeTableSize |
dword | ListTableOffset |
dword | ListTableSize |
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 |
dword | GroupType |
dword | StartItem |
dword | NumItems |
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 |
dword | VariableType |
dword | Key |
dword | Value |
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 |
Type | Description |
0 | Byte, used for booleans and indices |
2 | ID, used for Portraits, and Appearance |
3 | HP, always used for HP |
4 | Masked Hex, used for flags, and RGB colors |
5 | Large Int, used for Percentages, Prices |
8 | Float, used for all fractional values |
10 | String, used for short strings |
11 | Key, used for variable names |
12 | Text, used for large blocks of text |
15 | List, used for lists of items |
All types above have their values stored in the Value field except
for the special ones listed below.
10 | String |
This type is used for short strings. Value is
an offset into the StringTable. The data referenced by Value is
structured like this: |
dword | String Length |
char[] | String Text |
11 | Key |
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: |
byte | String Length |
char[] | String Text |
12 | Text |
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 |
dword | Block Size |
dword | -1 |
dword | Number of Strings |
dword | String Number |
dword | String Length |
char[] | String Text |
15 | List |
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.
|