Here's a good starting place for you manusll.
http://nwn.bioware.com/developers)
The above website contains documentation of the GFF and ERF file formats as well as how the GFF format is used for various template files (*.ut*) and dialogs.
****
One the great early pioneers of KotOR modding, eiz, documented some of the undocumented file formats, namely the v2.b 2DA file format and the RIM file format:
For the 2da file format (v2.b)
website (
http://blitz.phpwebhosting.com/content/Star_Wars:_Knights_of_the_Old_Republic)
2DA Format
2DA is the 2-dimensional array format, used to store a large number of tables pertaining to everything from game rules to graphics and sound definitions. It exists in two forms, 2DA V2.0 and 2DA V2.b; only the latter is described here, as the former is documented by BioWare at the For Developers section on the Neverwinter Nights website.
There is not much to say about the 2DA V2.b header, it's just the string "2DA V2.b" followed by a linefeed character.
Directly following the header is a list of column names. Each name is an ASCII string terminated with a tab character. The end of the list is signified by a null character.
Following the column list is a 32-bit unsigned integer containing the number of rows in the table. This is then followed with another tab-terminated list, containing the row names. Unlike the column list, it has no null terminator.
Following the row list is a two dimensional array, in row major order, containing 16-bit offsets into a data area for each cell in the table. Offsets are relative to the start of the data area. This is followed by 2 unused bytes, and then a data section of null terminated strings.
For the RIM format:
website (
http://blitz.phpwebhosting.com/content/Star_Wars:_Knights_of_the_Old_Republic)
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
Welcome to the forums! :)