GAME files

Description

This format is used for the save game files. It doesn't store area specific information. Instead, it stores information on the party members and the global variables which affect the party members.

GAME file versions

GAME V1.1

Overall structure

GAME V1.1 Header

OffsetSize (datatype)Description
0x00004 (char array)Signature ('GAME')
0x00044 (char array)Version ('V1.1')
0x00084 (dword)Game time (300 units == 1 hour). According to Eddy Jansson, this field is exactly 7 hours (2100 units) ahead of the time displayed in the game. Precisely why this is so is unknown.
0x000c2 (word)Unknown
0x000e2 (word)Unknown
0x00102 (word)Unknown
0x00122 (word)Unknown
0x00142 (word)Unknown
0x00162 (word)Unknown
0x00184 (dword)Party gold
0x001c4 (dword)Unknown
0x00204 (dword)Offset to NPC structs for party members.
0x00244 (dword)Count of NPC structs for party members. (i.e. how many characters in party)
0x00284 (dword)Unknown
0x002c4 (dword)Unknown
0x00304 (dword)Offset to NPC structs for non-party members.
0x00344 (dword)Count of NPC structs for non-party members.
0x00384 (dword)Offset to GLOBAL namespace variables (i.e. non-local plot variables).
0x003c4 (dword)Count of GLOBAL namespace variables.
0x00408 (resref)The resref of some area. (Possibly refers to a .are type resource.
0x00484 (dword)Unknown
0x004c4 (dword)Count of journal entries
0x00504 (dword)Offset to journal entries (near end of file)

Now, the format diverges a little between BG and PT. In BG, the next fields in the header look like:

OffsetSize (datatype)Description
0x00544 (dword)Unknown
0x00588 (resref)Current area (?)
0x006084 (bytes)Unknown

In Planescape, the next fields look like:

OffsetSize (datatype)Description
0x00544 (dword)Offset to entries of an unknown format (26 bytes apiece) in middle of file. My belief is that these entries cover some aspect of the inter-NPC relations, but I don't have much hard evidence to back it up, and I don't have any idea what the meaning of the various fields would be, so...
0x00584 (dword)Unknown
0x005c8 (resref)Current area (?)
0x00644 (dword)Offset to "kill variables", which are set when a particular creature type is killed. Which variable is set is determined by beasts.ini, I believe.
0x00684 (dword)Count of "kill variables".
0x006c4 (dword)Offset to an array of bytes, (apparently usually 0 or 1), whose significance is not known. These bytes appear at the end of the file, and may indicate which pictures appear in the journal, or which quests have been undertaken, or any number of things. I do not yet know the purpose of the bytes.
0x00708 (resref)Current area (?)
0x007864 (bytes)Unknown

GAME V1.1 NPCs (both in-party and out-of-party NPCs)

This structure represents data about any character who can possibly be in your party.

OffsetSize (datatype)Description
0x00002 (word)Unknown
0x00022 (word)Party order (0-5, or 0xffff if not in party)
0x00044 (dword)Offset from start of file to CRE resource data for this character.
0x00084 (dword)Size of CRE resource data for this character.
0x000c8 (bytes)Unknown
0x00144 (dword)Unknown
0x00188 (resref)Area where character is currently located.
0x00202 (word)Current X coordinate of character
0x00222 (word)Current Y coordinate of character
0x00242 (word)X coordinate of viewing rectangle. possibly this is stored per character so that multi-player games allow the characters to have different saved view rects?
0x00262 (word)Y coordinate of viewing rectangle
0x0028100 (bytes)Unknown
0x008c16 (bytes)Unknown
0x009c3*8 (resref array)Unknown
0x00b412 (bytes)Unknown

For BG/TotSC:

0x00c032 (bytes)Name
0x00e04 (dword)Unknown
0x00e4116 bytes (Char stats)stats for this character
0x01588 bytesUnknown

For Torment:

0x00c032 (bytes)Unknown
0x00e03*4 (dword)Unknown
0x00ec116 bytes (Char stats)stats for this character
0x01608 bytesUnknown

For Icewind Dale:

0x00c032 (bytes)Name
0x00e04 (dword)Unknown
0x00e4116 bytes (Char stats)stats for this character
0x01588 bytesUnknown
0x016032 (bytes)Unknown

GAME V1.1 Character stats (i.e. most powerful vanquished, etc)

OffsetSize (datatype)Description
0x00004 (strref)Name of "most powerful vanquished"
0x00044 (dword)XP of "most powerful vanquished"
0x00084*3 (dword array)Unknown
0x00144 (dword)kill XP (chapter)
0x00184 (dword)kill number (chapter)
0x001c4 (dword)kill XP (game)
0x00204 (dword)kill number (game)
0x00244*8 (resref array)Favorite spells
0x00444*2 (word array)favorite spell count
0x004c4*8 (resref array)Favorite weapons
0x006c4*2 (word)favorite weapon count

GAME V1.1 Game variables (plot variables)

These structures represent variables with a textual name an an integer value. Most variables are in some namespace or other -- a namespace being a 6-byte character string. Most variables go in the "GLOBAL" namespace, though some go in area-specific namespaces.

OffsetSize (datatype)Description
0x000032 (char array)Variable name
0x00208 (bytes)Unknown
0x00284 (dword)Variable value
0x002c40 (bytes)Unknown

GAME V1.1 Journal entries

Every time some text is entered into your journal, its strref is added to this table, along with the time (in seconds! not in 12-second increments, as the earlier game time in this file), as well as the "current chapter".

OffsetSize (datatype)Description
0x00004 (strref)Journal text
0x00044 (dword)Time in seconds (I believe. The number goes up approximately 12 times too fast to be on the same scale as the earlier time values.
0x00084 (dword)Current chapter number. (Always 0 for Torment).

[ back to index ]