website
RIM File Format
The RIM file format, used mainly to store module data, is essentially a condensed version of the ERF format, using 1 table instead of 3 and eliminating the description string 'feature'. It consists of a 120 byte header, a resource index table, and raw resource data.
Header
The RIM header is defined as follows:
Offset Type Name Description
$00..$03 char[4] Signature This is the file signature. It should be "RIM ".
$04..$07 char[4] Version Format version. Currently "V1.0".
$08..$0B unsigned int Unknown_1 Appears to be reserved.
$0C..$0F unsigned int EntryCount The number of resources in the file.
$10..$13 unsigned int OffKeyList File offset to the resource list.
$14..$77 char Reserved Reserved area. Should be zeroed.
Key List
The key list is a struct array, with one entry per resource. Its length is defined in the header by the EntryCount field. The structure follows:
Offset Type Name Description
$00..$0F char[16] ResourceName The resource name, not including the extension. Maximum length is 16 characters, unused characters should be null.
$10..$11 unsigned short ResType The resource type, as defined in Resource Types.
$12..$13 unsigned short ResourceID The resource identifier should be a sequential number, starting at zero, and each resource in the file must have a unique ID.
$14..$15 unsigned short Reserved_1 Reserved. Should be zero.
$16..$19 unsigned int Offset The file offset for the resource data.
$1A..$1D unsigned int Length The resource data length.
Resource Types
ResType Extension Description
$0000 res Misc. GFF resources
$0001 bmp Microsoft Windows Bitmap
$0002 mve
$0003 tga Targa Graphics Format
$0004 wav Wave
$0006 plt
$0007 ini Windows INI
$0008 mp3 MP3
$0009 mpg MPEG
$000A txt Text file
$000B wma Windows Media audio?
$000C wmv Windows Media video?
$000D xmv
$07D0 plh
$07D1 tex
$07D2 mdl Model
$07D3 thg
$07D5 fnt Font
$07D7 lua
$07D8 slt
$07D9 nss NWScript source code
$07DA ncs NWScript bytecode
$07DB mod Module
$07DC are Area (GFF)
$07DD set Tileset (unused in KOTOR?)
$07DE ifo Module information
$07DF bic Character sheet (unused)
$07E0 wok
$07E1 2da 2-dimensional array
$07E2 tlk
$07E6 txi Texture information
$07E7 git Dynamic area information
$07E8 bti
$07E9 uti
$07EA btc
$07EB utc Creature blueprint
$07ED dlg Dialogue
$07EE itp
$07EF btt
$07F0 utt
$07F1 dds
$07F2 bts
$07F3 uts
$07F4 ltr
$07F5 gff Generic File Format
$07F6 fac
$07F7 bte
$07F8 ute
$07F9 btd
$07FA utd
$07FB btp
$07FC utp
$07FD dft
$07FE gic
$07FF gui GUI definition (GFF)
$0800 css
$0801 ccs
$0802 btm
$0803 utm
$0804 dwk
$0805 pwk
$0806 btg
$0807 utg
$0808 jrl Journal
$0809 sav Saved game (ERF)
$080A utw
$080B 4pc
$080C ssf
$080D hak Hak pak (unused)
$080E nwm
$080F bik
$0BB8 lyt
$0BB9 vis
$0BBA rim See RIM File Format
$0BBB pth Path information? (GFF)
$0BBC lip
$0BBD bwm
$0BBE txb
$0BBF tpc Texture
$0BC0 mdx
$0BC1 rsv
$0BC2 sig
$0BC3 xbx
$270D erf Encapsulated Resource Format
$270E bif
$270F key