-
Notifications
You must be signed in to change notification settings - Fork 13
Dat file format
alexeevdv edited this page Jan 29, 2013
·
17 revisions
| Name | Data type | Description |
|---|---|---|
| itemsData | char[datFileSize - itemsListSize - 8] | Items binary data |
| itemsListCount | unsigned int | Number of items in the list |
| itemsList | itemsListEntry[itemsListCount] | List of items |
| itemsListSize | unsigned int | Size of items list in bytes(including itemsListCount) |
| datFileSize | unsigned int | Full size of DAT file |
struct itemsListEntry {
unsigned int filenameSize; // filename size in bytes
char filename[filenameSize];
unsigned char compressed; // 0 - uncompressed, 1 - compressed
unsigned int unpackedSize;
unsigned int packedSize;
unsigned int dataOffset; // offset from file beginning in bytes
}Items list reading sequence:
- Go to (size of DAT file - 4 bytes)
- Read datFileSize
- Compare datFileSize and size of DAT file. If not equal then file is corrupted
- Go to ( datFileSize - 8)
- Read itemsListSize
- Go to ( datFileSize - itemsListSize - 8)
- Read itemsListCount
- Read itemsListEntry
- Repeat previous action itemsListCount times
Back to Fallout 2 file formats