RenderWare TXD: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
imported>Ikskoks
 
(74 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{GRAFPageHeader}}
{{GRAFPageHeader}}
== TXD ==  
== TXD, DIC ==  


* ''' Format Type ''':    Image <br>  
* ''' Format Type ''':    Image <br>  
Line 6: Line 6:




=== Format Specifications ===  
=== Format Specifications (TMNT 2003) ===  


<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
Line 36: Line 36:
   4 bytes (uint32) - RW version ID
   4 bytes (uint32) - RW version ID


   4 bytes (uint32) - image width?
   4 bytes (uint32) - image width
   4 bytes (uint32) - image height?
   4 bytes (uint32) - image height
   4 bytes (uint32) - bits per pixel? // e.g. 8
   4 bytes (uint32) - image depth (bits per pixel) // e.g. 8
   4 bytes (uint32) - image width (repeated?)
   4 bytes (uint32) - image stride  // usually the same as image width




   x bytes - image data
   x bytes - image data


   1024 bytes - palette data
   x bytes - palette data
}
}
</pre>
</div>
=== Format Specifications (GTA series and Kill Switch) ===
<div class="toccolours mw-collapsible" id="mw-customcollapsible-myDivision" style="width:800px; overflow:auto;">
<pre>
// Texture dictionary structure (rwID_TEXDICTIONARY)
// GTA: Vice City (PC)
// Kill Switch (XBOX)
// TXD file format
// texture dictionary chunk
4 bytes (uint32) - chunk type  // 0x16 0x00 0x00 0x00 - texture dictionary
4 bytes (uint32) - chunk size
4 bytes (uint32) - RW version ID  // 0xFF 0xFF 0x02 0x0C - RW v3.3.0.2
                                  // 0xFF 0xFF 0x03 0x10 - RW v3.4.0.3
                                  // 0xFF 0xFF 0x00 0x14 - RW v3.5.0.0
                                  // 0xFF 0xFF 0x03 0x18 - RW v3.6.0.3
                                  // 0x0A 0x00 0x02 0x1C - RW v3.7.0.2
                               
// struct chunk
4 bytes (uint32) - chunk type  // 0x01 0x00 0x00 0x00 - struct chunk
4 bytes (uint32) - chunk size  // 4
4 bytes (uint32) - RW version ID
4 bytes (uint32) - number of raster chunks // e.g. 1
number_of_raster_chunks *
{
  // raster chunk
  4 bytes (uint32) - chunk type  // 0x15 0x00 0x00 0x00 - raster chunk
  4 bytes (uint32) - chunk size 
  4 bytes (uint32) - RW version ID
  // struct chunk
  4 bytes (uint32) - chunk type  // 0x01 0x00 0x00 0x00 - struct chunk
  4 bytes (uint32) - chunk size
  4 bytes (uint32) - RW version ID
  4 bytes (uint32/char) - platform ID  // 5 - XBOX
                                        // 8 - PC
                                        // 9 - PC
                                        // "PS2\0" - PS2
  1 byte (uint8) - filter mode  // 0x00 - FILTER_NONE
                                // 0x01 - FILTER_NEAREST (point)
                                // 0x02 - FILTER_LINEAR
                                // 0x03 - FILTER_MIP_NEAREST
                                // 0x04 - FILTER_MIP_LINEAR
                                // 0x05 - FILTER_LINEAR_MIP_NEAREST
                                // 0x06 - FILTER_LINEAR_MIP_LINEAR
  1 byte - uAdressing + vAdressing  // 0x00 - WRAP_NONE
                                    // 0x01 - WRAP_WRAP
                                    // 0x02 - WRAP_MIRROR
                                    // 0x03 - WRAP_CLAMP
                                    // Note: each value takes 4-bits
  2 bytes - padding
  32 bytes (char) - raster name + padding // e.g. "intro3"
  32 bytes (char) - mask name + padding  // usually empty
 
  // texture header (16 bytes)
  4 bytes (uint32) - alpha flags?
  4 bytes (char) - D3D format?  // e.g. "DXT1", can be empty
  2 bytes (uint16) - width
  2 bytes (uint16) - height
  1 byte (uint8) - depth (bits per pixel)
  1 byte (uint8) - mip maps count
  1 byte (uint8) - raster type/tex code type?
  1 byte (uint8) - flags
  1024 bytes - palette  // optional, only present if depth<=8
  4 bytes (uint32) - texture data size
  x bytes - texture data
  // mipmap data (optional section)
  num_of_mipmaps - 1 *
  {
    4 bytes (uint32) - mip map data size
    x bytes - mip map data
  }
  // extension chunk
  4 bytes (uint32) - chunk type  //  0x03 0x00 0x00 0x00 - extension chunk
  4 bytes (uint32) - chunk size
  4 bytes (uint32) - RW version ID
}
// extension chunk
4 bytes (uint32) - chunk type  //  0x03 0x00 0x00 0x00 - extension chunk
4 bytes (uint32) - chunk size
4 bytes (uint32) - RW version ID
</pre>
</pre>
</div>
</div>
Line 56: Line 152:


* This file format occurs in games made with '''RenderWare''' engine.
* This file format occurs in games made with '''RenderWare''' engine.
* Usually files with this file format have '''TXD''' extension, but in '''Gaelic Games Football 2''' for PS2 extension is '''DIC'''.


=== Games ===  
=== Games ===  
List of games using this file format:
List of games using this file format:
* Agent Hugo [RW v3.7.0.2] (*.TXD)
* Agent Hugo: RoboRumble
* Bully
* Bully
* Gaelic Games Football 2 (PS2) [RW 3.7.0.2 Build A] (*.DIC) (DIC files packed in custom containers, see details [http://wiki.xentax.com/index.php/RenderWare_DAT here]).
* GTA III
* GTA III
* GTA IV
* GTA IV
* GTA Vice City
* GTA Vice City
* GTA San Andreas
* GTA San Andreas (PS2/PC) [RW v3.6.0.3] (*.TXD)
* Killswitch / kill.switch / Kill Switch [RW v3.5.0.0] (TXD files packed in custom containers, see details [http://wiki.xentax.com/index.php/RenderWare_DAT here]).
* Manhunt
* Manhunt
* Teenage Mutant Ninja Turtles (2003)
* Rolling (PS2/XBOX)
* Teenage Mutant Ninja Turtles (2003) (PC) [RW v3.4.0.5]
 
* Many more...
* Many more...


=== Compatible Programs ===  
=== Compatible Programs ===  


* [https://github.com/bartlomiejduda/Tools/blob/master/NEW%20Tools/TMNT%202003/TMNT_2003_TXD_Tool.py TMNT_2003_TXD_Tool.py]
* [https://github.com/aap/rwtools rwtools]
* [https://github.com/aap/rwtools rwtools]
* [http://www.steve-m.com/downloads/tools/rwanalyze/ RW Analyze]
* [http://www.steve-m.com/downloads/tools/rwanalyze/ RW Analyze]
* [https://www.gtagarage.com/mods/show.php?id=5508 ViceTXD]
* [https://www.gtagarage.com/mods/show.php?id=5508 ViceTXD]
* [https://www.gtagarage.com/mods/show.php?id=27862 Magic.TXD]
* [https://www.gtagarage.com/mods/show.php?id=27862 Magic.TXD] (works with GTA series and with Kill Switch and with Gaelic Games Football 2)
* [https://www.gtagarage.com/mods/show.php?id=8320 TXD Workshop]
* [https://www.gtagarage.com/mods/show.php?id=8320 TXD Workshop]
* [https://www.gtagarage.com/mods/show.php?id=2078 G-TXD]
* [https://www.gtagarage.com/mods/show.php?id=2078 G-TXD]
* [http://www.steve-m.com/downloads/tools/txdviewer/ TXD Viewer]
* [http://www.steve-m.com/downloads/tools/txdviewer/ TXD Viewer]
* [https://github.com/AmyrAhmady/rwexporter rwexporter]
* [https://www.romhacking.net/utilities/660/ Game Graphic Studio]


=== See Also ===  
=== See Also ===  
Line 89: Line 195:
* [https://www.burnout.wiki/wiki/Texture_(PSP) TXD file format for Burnout PSP games]
* [https://www.burnout.wiki/wiki/Texture_(PSP) TXD file format for Burnout PSP games]
* [http://wiki.xentax.com/index.php/RWS RWS Audio file format]
* [http://wiki.xentax.com/index.php/RWS RWS Audio file format]
* [[Killswitch_DAT]]
<br/><br>
<br/><br>


Line 97: Line 204:
[[Category:Format_Image | Type: Image]]
[[Category:Format_Image | Type: Image]]
[[Category:Extension_txd | Extension: txd]]
[[Category:Extension_txd | Extension: txd]]
[[Category:Extension_dic | Extension: dic]]
[[Category:BMS_None | BMS: None]]
[[Category:BMS_None | BMS: None]]
[[Category:File Format]]
[[Category:File Format]]

Latest revision as of 23:00, 12 January 2022

Back to index | Edit this page

TXD, DIC


Format Specifications (TMNT 2003)

// TMNT 2003
// TXD file format


// chunk header
4 bytes (uint32) - chunk type  // e.g. 0x23 - Platform Independent Texture Dictionary
4 bytes (uint32) - chunk size - 12
4 bytes (uint32) - RW version ID  // e.g. 0xFF 0xFF 0x05 0x10 - RW v3.4.0.5
4 bytes (uint32) - number of textures


num_of_textures *
{
   // texture header (112 bytes)
   16 bytes (char) - texture name  // e.g. "tit_studio_ps"
   56 bytes - unknown


   4 bytes (uint32) - chunk type // e.g. 0x18 - Image
   4 bytes (uint32) - chunk size - 8  (image chunk size)
   4 bytes (uint32) - RW version ID

   4 bytes (uint32) - chunk type // e.g. 0x01 - Struct
   4 bytes (uint32) - chunk size  // 16  (struct chunk size)
   4 bytes (uint32) - RW version ID

   4 bytes (uint32) - image width
   4 bytes (uint32) - image height
   4 bytes (uint32) - image depth (bits per pixel)  // e.g. 8
   4 bytes (uint32) - image stride  // usually the same as image width


   x bytes - image data

   x bytes - palette data
}

Format Specifications (GTA series and Kill Switch)

// Texture dictionary structure (rwID_TEXDICTIONARY)
// GTA: Vice City (PC)
// Kill Switch (XBOX)
// TXD file format


// texture dictionary chunk
4 bytes (uint32) - chunk type  // 0x16 0x00 0x00 0x00 - texture dictionary
4 bytes (uint32) - chunk size
4 bytes (uint32) - RW version ID  // 0xFF 0xFF 0x02 0x0C - RW v3.3.0.2
                                  // 0xFF 0xFF 0x03 0x10 - RW v3.4.0.3
                                  // 0xFF 0xFF 0x00 0x14 - RW v3.5.0.0
                                  // 0xFF 0xFF 0x03 0x18 - RW v3.6.0.3
                                  // 0x0A 0x00 0x02 0x1C - RW v3.7.0.2
                                 
// struct chunk
4 bytes (uint32) - chunk type  // 0x01 0x00 0x00 0x00 - struct chunk
4 bytes (uint32) - chunk size  // 4
4 bytes (uint32) - RW version ID
4 bytes (uint32) - number of raster chunks // e.g. 1


number_of_raster_chunks *
{
   // raster chunk
   4 bytes (uint32) - chunk type  // 0x15 0x00 0x00 0x00 - raster chunk
   4 bytes (uint32) - chunk size  
   4 bytes (uint32) - RW version ID

   // struct chunk
   4 bytes (uint32) - chunk type  // 0x01 0x00 0x00 0x00 - struct chunk
   4 bytes (uint32) - chunk size 
   4 bytes (uint32) - RW version ID
   4 bytes (uint32/char) - platform ID  // 5 - XBOX 
                                        // 8 - PC
                                        // 9 - PC
                                        // "PS2\0" - PS2
   1 byte (uint8) - filter mode  // 0x00 - FILTER_NONE
                                 // 0x01 - FILTER_NEAREST (point)
                                 // 0x02 - FILTER_LINEAR
                                 // 0x03 - FILTER_MIP_NEAREST
                                 // 0x04 - FILTER_MIP_LINEAR
                                 // 0x05 - FILTER_LINEAR_MIP_NEAREST
                                 // 0x06 - FILTER_LINEAR_MIP_LINEAR
   1 byte - uAdressing + vAdressing  // 0x00 - WRAP_NONE
                                     // 0x01 - WRAP_WRAP
                                     // 0x02 - WRAP_MIRROR
                                     // 0x03 - WRAP_CLAMP
                                     // Note: each value takes 4-bits
   2 bytes - padding
   32 bytes (char) - raster name + padding // e.g. "intro3"
   32 bytes (char) - mask name + padding  // usually empty
   

   // texture header (16 bytes)
   4 bytes (uint32) - alpha flags?
   4 bytes (char) - D3D format?  // e.g. "DXT1", can be empty
   2 bytes (uint16) - width
   2 bytes (uint16) - height
   1 byte (uint8) - depth (bits per pixel)
   1 byte (uint8) - mip maps count
   1 byte (uint8) - raster type/tex code type?
   1 byte (uint8) - flags

   1024 bytes - palette  // optional, only present if depth<=8

   4 bytes (uint32) - texture data size

   x bytes - texture data


   // mipmap data (optional section)
   num_of_mipmaps - 1 *
   {
     4 bytes (uint32) - mip map data size
     x bytes - mip map data
   }

   // extension chunk
   4 bytes (uint32) - chunk type  //  0x03 0x00 0x00 0x00 - extension chunk
   4 bytes (uint32) - chunk size
   4 bytes (uint32) - RW version ID
}


// extension chunk
4 bytes (uint32) - chunk type  //  0x03 0x00 0x00 0x00 - extension chunk
4 bytes (uint32) - chunk size
4 bytes (uint32) - RW version ID

MultiEx BMS Script

Not written yet.

Notes and Comments

  • This file format occurs in games made with RenderWare engine.
  • Usually files with this file format have TXD extension, but in Gaelic Games Football 2 for PS2 extension is DIC.

Games

List of games using this file format:

  • Agent Hugo [RW v3.7.0.2] (*.TXD)
  • Agent Hugo: RoboRumble
  • Bully
  • Gaelic Games Football 2 (PS2) [RW 3.7.0.2 Build A] (*.DIC) (DIC files packed in custom containers, see details here).
  • GTA III
  • GTA IV
  • GTA Vice City
  • GTA San Andreas (PS2/PC) [RW v3.6.0.3] (*.TXD)
  • Killswitch / kill.switch / Kill Switch [RW v3.5.0.0] (TXD files packed in custom containers, see details here).
  • Manhunt
  • Rolling (PS2/XBOX)
  • Teenage Mutant Ninja Turtles (2003) (PC) [RW v3.4.0.5]
  • Many more...

Compatible Programs

See Also