November 26, 2025Nov 26 Localization What is LEVEL.DAT from Destruction Derby 2 and does anyone have an idea to start a new tool to extract car and track models into or edits maps or create and export custom car models? destructionderby2_leveldat.zip
January 8Jan 8 @mrmaller1905 I have looked into this for a while. The race tracks are not stored as big 3D models. Here's how the game works: 1. When a track loads, the respective LEVEL.DAT file gets loaded into a big area of RAM. It contains compressed data but I think it consists of compressed chunks with headers between them. 2. Based on the player's car position values, chunks of the track get loaded in on the fly. Seems like the game decompresses the chunks into a ring-buffer. I tried to make sense of the data and verify its structure to write an extractor, but I wasn't able to find correct vertex data yet. I'm almost certain, that I my decompressor isn't working, but it's not HOW it decompresses data but WHAT data it decompresses. One would likely have to determine and verify headers to make sense of the data structure and THEN decompress the respective chunks. Also, see my comment here: I'm not that good at reverse engineering and the project started to consume too much time. I had to pause it for now. If anyone wants to help out, you're very welcome.
January 8Jan 8 Supporter On 11/26/2025 at 3:48 PM, mrmaller1905 said: What is LEVEL.DAT from Destruction Derby 2 and does anyone have an idea to start a new tool to extract car and track models into or edits maps or create and export custom car models? destructionderby2_leveldat.zip 158.9 kB · 4 downloads # Script to extract Destruction derby 2 .DAT files - Rabatini get END_OF_TABLE long goto 0 # Lê o primeiro get OFFSET long for savepos CURR_POS if CURR_POS >= END_OF_TABLE get FILE_END asize xmath SIZE "FILE_END - OFFSET" log "" OFFSET SIZE break endif get NEXT_OFFSET long xmath SIZE "NEXT_OFFSET - OFFSET" log "" OFFSET SIZE math OFFSET = NEXT_OFFSET next You can use this BMS script to unpack the archives. It also works on sub-containers. For example, if an extracted file is another container, just use the script again to reveal the actual files inside. example is the first file. DD2.zip Edited January 8Jan 8 by Rabatini
January 8Jan 8 Supporter Thanks! On a quick glance, using shorts on ..02.dat: Edited January 8Jan 8 by shak-otay
January 8Jan 8 Supporter The game uses LZSS compression. Since 3D stuff isn’t my thing, I will attach the files for you to analyze. files decompress.zip
January 8Jan 8 Supporter 23 minutes ago, shak-otay said: Thanks! From ..00e.dat.unpacked: more. unpacked.zip
January 8Jan 8 Supporter 23 minutes ago, shak-otay said: Thanks, but around 10kB is rather small to contain bigger meshes, if any. yes!, Op just sent one file.
January 8Jan 8 Here's the extracted DIRINFO, containing all game resources. LEV0 to LEVF contain race track data, with the exception of LEV0, LEVC and LFV - they seem to contain generic data for menus, maybe the car model, etc. Each LEV directory contains a LEVEL.DAT file. That's where the models are. The TXx and TXC files are textures and CLUT. There is also a LEVEL_DECOMP.BIN - that's just from my script after running the decompression against the LEVEL.DAT file, what is most likely the wrong approach. You can ignore these files. The script also runs the DD2.BMS script posted here before against each LEVEL.DAT, that's where the qbms_out folders are from. That's where will continue research. PW: reshax PS: I overlooked that this thread is for the PC version of the game. I'm working with data from the PSX version. I can't tell if that will cause any discrepancies. EDIT: In case you want to take a look at it, this gist of mine contains the game's decompression algorithm, ported from Ghidra output. I think it is correct but I wasn't able to actually confirm it yet. https://gist.github.com/AcidicVoid/944c05c40c2ff5d3bb46abcb015d307c dirinfo_extracted.7z Edited January 8Jan 8 by ashijikuboido
January 8Jan 8 Supporter 1 hour ago, ashijikuboido said: Here's the extracted DIRINFO, containing all game resources. LEV0 to LEVF contain race track data, with the exception of LEV0, LEVC and LFV - they seem to contain generic data for menus, maybe the car model, etc. Each LEV directory contains a LEVEL.DAT file. That's where the models are. The TXx and TXC files are textures and CLUT. There is also a LEVEL_DECOMP.BIN - that's just from my script after running the decompression against the LEVEL.DAT file, what is most likely the wrong approach. You can ignore these files. The script also runs the DD2.BMS script posted here before against each LEVEL.DAT, that's where the qbms_out folders are from. That's where will continue research. PW: reshax PS: I overlooked that this thread is for the PC version of the game. I'm working with data from the PSX version. I can't tell if that will cause any discrepancies. EDIT: In case you want to take a look at it, this gist of mine contains the game's decompression algorithm, ported from Ghidra output. I think it is correct but I wasn't able to actually confirm it yet. https://gist.github.com/AcidicVoid/944c05c40c2ff5d3bb46abcb015d307c dirinfo_extracted.7z 6.46 MB · 1 download tks. the compression algorithm is the same. drivers.zip
January 9Jan 9 This can extract the textures btw.: https://gist.githubusercontent.com/dschrubba/696d154fd010b7afb6cc61ab47ec0e64/raw/d603bb6f1249e42ac478804c5d77f5ea1b792c9b/dd2_extract_textures.py (Not mine) Edited January 9Jan 9 by ashijikuboido
January 9Jan 9 Supporter 26 minutes ago, ashijikuboido said: This can extract the textures btw.: https://gist.githubusercontent.com/dschrubba/696d154fd010b7afb6cc61ab47ec0e64/raw/d603bb6f1249e42ac478804c5d77f5ea1b792c9b/dd2_extract_textures.py (Not mine) Tx0, 1, and 2 are uncompressed files; you can easily open them in MumuggTool. Drivers.bin is compressed with LZSS. I think the level file is compressed too, or at least the subfiles inside it are.
January 12Jan 12 I'm writing a tool to extract all DD2 race tracks and save them as textured 3D objects but I still struggle with the compressed files and the data structure. I tried to find compressed streams with Offzip: offzip.exe -S -a -z -8 LEVEL.DAT offzip_out 0 Then, I ran my decompression script on all files: python decompress.py offzip_out Here are all resulting (original and decompressed) files: offzip_out.zip Help is very welcome. Edited January 15Jan 15 by ashijikuboido
January 12Jan 12 Supporter 33 minutes ago, ashijikuboido said: I'm writing a tool to extract all DD2 race tracks and save them as textured 3D objects but I still struggle with the compressed files and the data structure. I tried to find compressed streams with Offzip: offzip.exe -S -a -z -8 LEVEL.DAT offzip_out 0 Then, I ran my decompression script on all files: python decompress.py offzip_out decompress.py 2.77 kB · 0 downloads Here are all resulting (original and decompressed) files: offzip_out.zip Help is very welcome. As I mentioned earlier, the only compression method I found was a custom LZSS format. To proceed, you'll need to unpack the container files first, and then apply the tool to the extracted data. lzss_dd2_decomp.py Edited January 12Jan 12 by Rabatini
January 14Jan 14 I removed this post to avoid confusion. Will update soon. Edited January 15Jan 15 by ashijikuboido
Create an account or sign in to comment