CHR file format
Applies to:
BG2, BG2: ToB, all EE versions
General Description
This file format describes an exported party member. The format consists of a CHR header, followed by a standard CRE file.
CHR V2.0 is used in the BG1 part of BGEE, SoA part of BG2(EE), IWD part of IWDEE. CHR V2.1 is used in SoD (if experience has reached START_MP_XP_CAP/161000 from startare.2da), ToB (or SoA if the pc had more than START_MP_XP_CAP/2950000 experience points), HoW (if started there).
CHR V2.0 is used in the BG1 part of BGEE, SoA part of BG2(EE), IWD part of IWDEE. CHR V2.1 is used in SoD (if experience has reached START_MP_XP_CAP/161000 from startare.2da), ToB (or SoA if the pc had more than START_MP_XP_CAP/2950000 experience points), HoW (if started there).
Detailed Description
Overall structure:
CHR file header
Internal CRE v2.0 file header
Known spells section
Spell memorization info
Memorized spells section
Effects
Items section
"Item slots"
Offset | Size (data type) | Description |
---|---|---|
0x0000 | 4 (char array) | Signature ('CHR ') |
0x0004 | 4 (char array) | Version ('V2.0' or 'V2.1') |
0x0008 | 32(string) | Name of Protagonist/Player |
0x0028 | 4 (dword) | Offset to CRE structure |
0x002c | 4 (dword) | Length of the CRE structure |
0x0030 | 2 (word) | Index into slots.ids for Quick Weapon 1 (0xFFFF = none) |
0x0032 | 2 (word) | Index into slots.ids for Quick Weapon 2 (0xFFFF = none) |
0x0034 | 2 (word) | Index into slots.ids for Quick Weapon 3 (0xFFFF = none) |
0x0036 | 2 (word) | Index into slots.ids for Quick Weapon 4 (0xFFFF = none) |
0x0038 | 2 (word) | Show Quick Weapon 1 |
0x003a | 2 (word) | Show Quick Weapon 2 |
0x003c | 2 (word) | Show Quick Weapon 3 |
0x003e | 2 (word) | Show Quick Weapon 4 |
0x0040 | 8 (resref) | Quick Spell 1 resource |
0x0048 | 8 (resref) | Quick Spell 2 resource |
0x0050 | 8 (resref) | Quick Spell 3 resource |
0x0058 | 2 (word) | Index into slot.ids for Quick Item 1 |
0x005a | 2 (word) | Index into slot.ids for Quick Item 2 |
0x005c | 2 (word) | Index into slot.ids for Quick Item 3 |
0x005e | 2 (word) | Show Quick Item 1 |
0x0060 | 2 (word) | Show Quick Item 2 |
0x0062 | 2 (word) | Show Quick Item 3 |
CRE V2.0 File. Supported
CRE format versions match the ones used in the particular game