With the .BIF / .KEY file formats you can extract the individual data files from any source in The Witcher. The KEY v1.1 file format is organized as follows:

Header[edit | edit source]

Offset Size Type Description
0 4 CHAR Signature ("KEY ")
4 4 CHAR Version ("V1.1")
8 4 DWORD Number of entries in FILETABLE.
12 4 DWORD Number of entries in KEYTABLE.
16 4 NULL
20 4 DWORD Offset to FILETABLE (0x440000).
24 4 DWORD Offset to KEYTABLE.
28 4 DWORD Build year (less 1900).
32 4 DWORD Build day
36 32 NULL

Filetable[edit | edit source]

(size = 12 * Number of entries)

Filetable Entry[edit | edit source]

Offset Size Type Description
0 4 DWORD BIF Filesize
4 4 DWORD Offset To BIF name
8 4 DWORD Size of BIF name

Nametable[edit | edit source]

Contains packed strings of BIF names.

Keytable[edit | edit source]

(size = 26 * number of entries)

Keytable Entry[edit | edit source]

Offset Size Type Description
0 16 Null-padded string Resource Name (sans extension).
16 2 WORD Resource Type
18 4 DWORD Resource ID
22 4 DWORD Flags (BIF index is now in this value, (flags & 0xFFF00000) >> 20). The rest appears to define 'fixed' index.

BIF v1.1 File Format[edit | edit source]

The BIF v1.1 file format is organized as follows

Header
Resource Table
Resource Data

Header[edit | edit source]

Offset Size Type Description
0 4 CHAR Signature ("BIFF")
4 4 CHAR Version ("V1.1")
8 4 DWORD Resource Count
12 4 NULL
16 4 DWORD Offset to RESOURCETABLE (0x14000000).

Resource Table[edit | edit source]

(size = 20 * number of resources)

Resource Table Entry[edit | edit source]

Offset Size Type Description
0 4 DWORD Resource ID
4 4 DWORD Flags (BIF index is now in this value, (flags & 0xFFF00000) >> 20). The rest appears to define 'fixed' index.
8 4 DWORD Offset to Resource Data.
12 4 DWORD Size of Resource Data.
16 2 WORD Resource Type
18 2 NULL

Resource Data[edit | edit source]

Contains packed binary resources.

Resource Types[edit | edit source]

0x0000 => 'res', #Misc. GFF resources
0x0001 => 'bmp', #Microsoft Windows Bitmap
0x0002 => 'mve',
0x0003 => 'tga', #Targa Graphics Format
0x0004 => 'wav', #Wave

0x0006 => 'plt', #Bioware Packed Layer Texture
0x0007 => 'ini', #Windows INI
0x0008 => 'mp3', #MP3
0x0009 => 'mpg', #MPEG
0x000A => 'txt', #Text file
0x000B => 'xml',

0x07D0 => 'plh',
0x07D1 => 'tex',
0x07D2 => 'mdl', #Model
0x07D3 => 'thg',

0x07D5 => 'fnt', #Font

0x07D7 => 'lua', #Lua script source code ( http://www.lua.org/ )
0x07D8 => 'slt',
0x07D9 => 'nss', #NWScript source code
0x07DA => 'ncs', #NWScript bytecode
0x07DB => 'mod', #Module
0x07DC => 'are', #Area (GFF)
0x07DD => 'set', #Tileset (unused in KOTOR?)
0x07DE => 'ifo', #Module information
0x07DF => 'bic', #Character sheet (unused)
0x07E0 => 'wok', # walk-mesh
0x07E1 => '2da', #2-dimensional array
0x07E2 => 'tlk', #conversation file

0x07E6 => 'txi', #Texture information
0x07E7 => 'git', #Dynamic area information, game instance file, all area and objects that are scriptable
0x07E8 => 'bti',
0x07E9 => 'uti', #item blueprint
0x07EA => 'btc',
0x07EB => 'utc', #Creature blueprint

0x07ED => 'dlg', #Dialogue
0x07EE => 'itp', #tile blueprint pallet file
0x07EF => 'btt',
0x07F0 => 'utt', #trigger blueprint
0x07F1 => 'dds', #compressed texture file
0x07F2 => 'bts',
0x07F3 => 'uts', #sound blueprint
0x07F4 => 'ltr', #letter combo probability info
0x07F5 => 'gff', #Generic File Format
0x07F6 => 'fac', #faction file
0x07F7 => 'bte',
0x07F8 => 'ute', #encounter blueprint
0x07F9 => 'btd',
0x07FA => 'utd', #door blueprint
0x07FB => 'btp',
0x07FC => 'utp', #placeable object blueprint
0x07FD => 'dft', #default values file (text-ini)
0x07FE => 'gic', #game instance comments
0x07FF => 'gui', #GUI definition (GFF)
0x0800 => 'css',
0x0801 => 'ccs',
0x0802 => 'btm',
0x0803 => 'utm', #store merchant blueprint
0x0804 => 'dwk', #door walkmesh
0x0805 => 'pwk', #placeable object walkmesh
0x0806 => 'btg',

0x0808 => 'jrl', #Journal
0x0809 => 'sav', #Saved game (ERF)
0x080A => 'utw', #waypoint blueprint
0x080B => '4pc',
0x080C => 'ssf', #sound set file

0x080F => 'bik', #movie file (bik format)
0x0810 => 'ndb', #script debugger file
0x0811 => 'ptm', #plot manager/plot instance
0x0812 => 'ptt', #plot wizard blueprint
0x0813 => 'ncm',
0x0814 => 'mfx',
0x0815 => 'mat',
0x0816 => 'mdb', #not the standard MDB, multiple file formats present despite same type
0x0817 => 'say',
0x0818 => 'ttf', #standard .ttf font files
0x0819 => 'ttc',
0x081A => 'cut', #cutscene? (GFF)
0x081B => 'ka', #karma file (XML)
0x081C => 'jpg', #jpg image
0x081D => 'ico', #standard windows .ico files
0x081E => 'ogg', #ogg vorbis sound file
0x081F => 'spt',
0x0820 => 'spw',
0x0821 => 'wfx', #woot effect class (XML)
0x0822 => 'ugm', # 2082 ??? [textures00.bif]
0x0823 => 'qdb', #quest database (GFF v3.38)
0x0824 => 'qst', #quest (GFF)
0x0825 => 'npc',
0x0826 => 'spn',
0x0827 => 'utx', #spawn point? (GFF)
0x0828 => 'mmd',
0x0829 => 'smm',
0x082A => 'uta', #uta (GFF)
0x082B => 'mde',
0x082C => 'mdv',
0x082D => 'mda',
0x082E => 'mba',
0x082F => 'oct',
0x0830 => 'bfx',
0x0831 => 'pdb',
0x0832 => 'TheWitcherSave',
0x0833 => 'pvs',
0x0834 => 'cfx',
0x0835 => 'luc', #compiled lua script

0x0837 => 'prb',
0x0838 => 'cam',
0x0839 => 'vds',
0x083A => 'bin',
0x083B => 'wob',
0x083C => 'api',
0x083D => 'properties',
0x083E => 'png',

0x270B => 'big',

0x270D => 'erf', #Encapsulated Resource Format
0x270E => 'bif',
0x270F => 'key', 
Community content is available under CC-BY-SA unless otherwise noted.