TBGN File Format

Applies to:
BG1, BG1: TotS, BG2, BG2: ToB, PST, IWD, IWD:HoW, IWD:TotL, IWD2

General Description
This file format allows files to be transferred between IE installations, while keeping strrefs intact. TBGN caters specifically for NPC (i.e. adding information to the GAM file).

Detailed Description
Overall Structure:


Offset Size (datatype) Description
0x0000 4 (char array) Signature ("TBGN")
0x0004 4 (dword) Null
0x0008 4 (dword) NPC Header Offset
0x000C 4 (dword) NPC Header Count
0x0010 2 (word) Infinity Engine ID
  • value 0x01- Baldur's Gate
  • value 0x02- Planescape: Torment
  • value 0x03- Icewind Dale
  • value 0x04- Baldur's Gate II: Shadows of Amn


Offset Size (datatype) Description
0x0000 8 (char array) NPC filename (minus CRE extension)
0x0008 8 (char array) NPC start area
0x0010 2 (word) NPC X coordinate
0x0012 2 (word) NPC Y coordinate