|
MOD File Format
This is a description of the MOD file format used in Neverwinter Nights.
The first thing in the file is the Header block.
|
MOD Header |
char[4] | Signature "MOD " |
char[4] | Version "V1.0" |
dword | Unknown |
dword | DescriptionBlockSize |
dword | NumberOfFiles |
dword | DescriptionBlockOffset |
dword | FileHeaderTableOffset |
dword | LookupTableOffset |
dword | Unknown |
dword | Unknown |
dword | Termination (-1) |
DescriptionBlock |
dword | 0 |
dword | TextLen |
char[TextLen] | Description |
The FileHeaderTable is a list of FileHeaders. NumberOfFiles above
dictates how many of these there are.
FileHeader |
char[16] | Filename |
dword | Index |
dword | FileType |
The filename is a unique identifier for the file. Here is a list of all known filetypes. The Index
is the index into the LookupTable.
The LookupTable is a list of offsets and sizes for each file.
The offset points to the beginning of the file data.
LookupTable |
dword | Offset |
dword | Size |
I've written a quick example that'll parse a MOD file, and dump
the main module.ifo file. DumpMOD.C
|