RenderWare binary stream file
RenderWare binary stream files are hierarchically structured binary data files used by the RenderWare 3.x graphics engine utilized by Rockstar North for their GTA III trilogy (only on PC, PS2 and XBOX, not PSP!) and related games (Manhunt, Bully).
GTA's model files use the file extension
.dff and texture archives use
.txd. Other possible extensions, not used by the GTA games, are
.dma. GTA3 does use
.anm for some of its cutscene animations, but it is the only GTA to do so.
RW streams are split up into sections. Each section has a 12 byte header and can either be empty, contain data or more child sections. Section content, especially of data sections, is determined by an ID in the header.
There is only one data structure common to all RW streams - the section header:
4 byte - DWORD - section identifier 4 byte - DWORD - section size, including child sections and/or data 4 byte - DWORD - RW version ID
The RW version ID varies depending on the RW engine version used for exporting the files. It must be the same for all headers within one file. Backwards compatibility is very limited.
Valid RW Section IDs
See the list of RW section IDs.
Rockstar's Custom Section IDs
Rockstar added several vendor specific RW plugins, which have their own ID range (0x0253F2F*).
- Pipeline Set (0x0253F2F3)
- Specular Material (0x0253F2F6)
- 2dfx (0x0253F2F8)
- Night Vertex Colors (0x0253F2F9)
- Collision Model (0x0253F2FA)
- Reflection Material (0x0253F2FC)
- Mesh Extension (0x0253F2FD)
- Frame (0x0253F2FE)
Common RW Version IDs
The following is an (incomplete) list of plain text RW versions commonly used in GTA and their encoded equivalent:
188.8.131.52 - 0x00000310 - only for multi-dff and generic, from old versions GTA III. 184.108.40.206 - 0x0800FFFF - PS2 and PC GTA III 220.127.116.11 - 0x0C02FFFF - GTA VC 18.104.22.168 - 0x1003FFFF - X-BOX GTA III, GTA VC 22.214.171.124 - 0x1400FFFF - Android GTA III 126.96.36.199 - 0x1803FFFF - GTA SA, Manhunt
Common File Structures
Model Files (DFF)
- Frame List
- Geometry List
- Geometry *
- Material List
- Material *
- Texture - optional
- Atomic *
- Collision Model - vehicles only
Texture Archives (TXD)
- Texture Dictionary
Texture Archives PS2 (TXD)
- Texture Dictionary
- Struct - 4b - Texture count
- Texture Native *
- Extension - empty
* These sections (and their child sections) can appear multiple times.
** Not always present, effect also unknown.
*** Require Pipeline Set to work for static objects, by default only for vehicles.
A byte may contain two indices, if bpp == 4.
16 bit images are in 1555 ARGB format or 565 (used by VC only on ancient hardware such as Riva TNT2 when you choose 16 bit color mode and game builds non-dxt version of txd files on disk).
The indices are swizzled and saved in a PS2 friendly format (CLUT).
Note: There are slight differences between GTA: III and VC formats concerning the raster/image format.
Tools & Scripts
- GTAForums: RW Analyze discussion thread
- Original DFF format description by KCow
- Official RenderWare Site
- MultimediaWiki TXD
|Grand Theft Auto: San Andreas|
|File Formats||.col • .cfg • .cut • .dff • .dat • .fxp • .gxt • .ide • .ifp • .img • .ipl • nodes*.dat • .rep • .rrr • .scm • .set • .txd|
|Documentation||Audio • Cryptography • Cutscenes • Game memory • Handling.cfg • Map Listing • Mission Packs • Opcodes • Paths • Replays • Saves • Scripts|
|Tools||CLEO • Collision File Editor II • ENBSeries • G-Tools • IMG Tool • Limit Adjuster • Map Editor • San Andreas Audio Toolkit • Sanny Builder • TXD Workshop|
|Tutorials||San Andreas v2.0 Modding • How to create a mission • How to create a thread • How to use Map Editor|
|Modifications||Design Your Own Mission • Gostown Paradise • GTA: United • Myriad Islands|