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 chunks. Each section has a 12 byte header and can either be empty, contain data or more child chunks. The content depends on the type and parent chunks.
uint32 - type uint32 - size, including child chunks and/or data uint32 - library ID stamp
The library ID stamp contains the version and build number of the RW library that wrote the file.
The library version is a hexadecimal number and has the form
0xVJNBB where V (3 bits) is the Renderware version, J (4 bits) is the major revision, N (4 bits) is the minor revision and B (6 bits) is the binary revision. Version 220.127.116.11 for instance would be encoded as
The library build is 0xFFFF in all versions used by GTA.
To make the library ID stamp,
0x30000 is subtracted from the version first and then packed as follows (where D is the 16 bit build number):
VVJJ JJNN NNBB BBBB DDDD DDDD DDDD DDDD
0xFFFF for instance is encoded as
For more information on how the version number can be calculated, see RenderWare.
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)
- 2d Effect (0x0253F2F8)
- Extra Vert Colour (0x0253F2F9)
- Collision Model (0x0253F2FA)
- Reflection Material (0x0253F2FC)
- Breakable (0x0253F2FD)
- Frame (0x0253F2FE)
Common File Structures
The basic structure of DFF and TXD files is given below. The Extensions are given as empty, their contents depend on the plugins and plugin data of the object they belong to. These are described elsewhere.
- Frame List
- Geometry List
- Atomic *
- Struct *
- Light *
- Struct *
- Camera *
- Texture Dictionary
* These chunks can appear multiple times. The count is usually given in the parent's struct.
Tools & Scripts
- GTAForums: RW Analyze discussion thread
- Original DFF format description by KCow
- Official RenderWare Site
- MultimediaWiki TXD
|Grand Theft Auto: Vice City|
|File Formats||.adf • .b • .col • .cfg • .dff • .dat • .gxt • .ide • .ifp • .img/.dir • .ipl • .raw/.sdt • .rep • .set • .scm • .txd|
|Documentation||Audio • Handling • Map Listing • Opcodes • RenderWare • Script Paths • Saves • Sound Effects • Statistics • Vehicles • Weapons|
|Tools||CLEO • Collision File Editor II • G-Tools • GXT Editor • IMG Tool • Limit Adjuster • KEd (map editor) • Sanny Builder • TXD Workshop • Magic.TXD|
|Tutorials||How to create a mission • How to create a script • Vehicle Mod Installation|
|Grand Theft Auto III|
|File Formats||.b • .col • .cfg • .dff • .dat • .gxt • .ide • .ifp • .img • .ipl • .raw/.sdt • .set • .scm • .txd|
|Documentation||Audio • Handling.cfg • Map Listing • Opcodes • Paths • RenderWare • Saves • Sound Effects • Statistics • Vehicles • Weapons|
|Tools||CLEO • Collision File Editor II • G-Tools • IMG Tool • Map Editor • Sanny Builder • TXD Workshop • Magic.TXD • Water Editor|
|Tutorials||How to create a mission • How to create a script • How to use Map Editor • Vehicle Mod Installation|