The Witcher uses a format called Rich Saved Game file that always end in TheWitcherSave extension. The format appears to be organized as follows:
- Header
- Resource Data
- Resource Table
- Coda
Header[]
Offset | Size | Type | Name | Notes |
---|---|---|---|---|
0x0000 | 4 | char | Magic Number | "RGMH". |
0x0004 | 1 | uchar | Header version | |
0x0005 | 3 | Structure padding. | ||
0x0008 | 8 | ulong | Header size | Always 0x2028 (1.1a). |
0x0010 | 4 | |||
0x0014 | 4 | ulong | ||
0x0018 | 4 | uint | Always 0xEE7C4A60 (1.1a). | |
0x001C | 4 | uint | Always 0x459E4568 (1.1a). | |
0x0020 | 4 | uint | Always 0x10D3DBBD (1.1a). | |
0x0024 | 4 | Always 0x1CBCF20B (1.1a) | ||
0x0028 | 2048 | u16str | "Lightning Storm". | |
0x0828 | 2048 | u16str | Name of last area | |
0x1028 | 2048 | u16str | Name of last area #2 | |
0x1828 | 2048 | u16str |
Resource table[]
Contains list of Resource Table Entries.
Resource Table Entry[]
Offset | Size | Type | Description |
---|---|---|---|
0 | 4 | DWORD | Size of resource name. |
4 | var | CHAR | Resource name |
4+var | 4 | DWORD | Size of resource. |
8+var | 4 | DWORD | Offset to resource data from beginning of file. |
Coda[]
Read from the bottom of the file:
Offset | Size | Type | Description |
---|---|---|---|
n−4 | 4 | DWORD | Number of resources in resource table. |
n−8 | 4 | DWORD | Offset to Resource Table from beginning of file. |