Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.
Zero Tolerance for Disrespect

Destruction Derby 2 (PC) LEVEL.DAT

Featured Replies

  • 1 month later...

@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.

  • 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 by Rabatini

  • 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.

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 by ashijikuboido

  • 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.
00000000.dat@0000000000.png.2374b4615826f4f16f6c76a5823f5e51.png

drivers.zip

  • Supporter
26 minutes ago, ashijikuboido said:

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.


image.png.8d1c6dafc462f7cfbaa66388e7e39a7d.png

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 by ashijikuboido

  • 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 by Rabatini

  • 6 months later...

I forgot about this and decided to go the easy way when coming back to it. Here you go:

GitHub

GitHub - AcidicVoid/extraction-derby-2: Asset extraction...

Asset extraction tool for Destruction Derby 2, written in Python - AcidicVoid/extraction-derby-2

Have fun.

  • Author
  • Localization
Just now, ashijikuboido said:

I forgot about this and decided to go the easy way when coming back to it. Here you go:

GitHub

GitHub - AcidicVoid/extraction-derby-2: Asset extraction...

Asset extraction tool for Destruction Derby 2, written in Python - AcidicVoid/extraction-derby-2

Have fun.

I tried running the script but it won't convert to GLBs or PNGs because it returns these errors:

C:\Users\asd\Desktop\extraction-derby-2-main>uv run main.py C:\UniExtract\DATA\Dirinfo
unpacked  114 files (21.1 MB)
WARNING: LEV0: 221 validation problem(s)
WARNING: LEV1: 339 validation problem(s)
WARNING: LEV2: 331 validation problem(s)
WARNING: LEV3: 312 validation problem(s)
WARNING: LEV4: 331 validation problem(s)
WARNING: LEV5: 350 validation problem(s)
WARNING: LEV6: 352 validation problem(s)
WARNING: LEV7: 320 validation problem(s)
WARNING: LEV8: 327 validation problem(s)
WARNING: LEV9: 338 validation problem(s)
WARNING: LEVA: 322 validation problem(s)
WARNING: LEVB: 324 validation problem(s)
WARNING: LEVF: 96 validation problem(s)
parsed    13 LEVEL.DAT files
ERROR: LEV0: texture load failed: LEV0/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV1: texture load failed: LEV1/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV2: texture load failed: LEV2/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV3: texture load failed: LEV3/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV4: texture load failed: LEV4/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV5: texture load failed: LEV5/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV6: texture load failed: LEV6/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV7: texture load failed: LEV7/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV8: texture load failed: LEV8/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV9: texture load failed: LEV9/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVA: texture load failed: LEVA/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVB: texture load failed: LEVB/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVF: texture load failed: LEVF/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
textures  0 PNGs -> output\textures
ERROR: LEV1: cannot load textures for car export: LEV1/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
cars      0 GLBs -> output\cars
ERROR: LEV1: track export failed: LEV1/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV2: track export failed: LEV2/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV3: track export failed: LEV3/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV4: track export failed: LEV4/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV5: track export failed: LEV5/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV6: track export failed: LEV6/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV7: track export failed: LEV7/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV8: track export failed: LEV8/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV9: track export failed: LEV9/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVA: track export failed: LEVA/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVB: track export failed: LEVB/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
tracks    0 GLBs -> output\tracks
WARNING   3988 validation problem(s) - see output\logs

errorlogs.rar

18 minutes ago, mrmaller1905 said:

I tried running the script but it won't convert to GLBs or PNGs because it returns these errors:

C:\Users\asd\Desktop\extraction-derby-2-main>uv run main.py C:\UniExtract\DATA\Dirinfo
unpacked  114 files (21.1 MB)
WARNING: LEV0: 221 validation problem(s)
WARNING: LEV1: 339 validation problem(s)
WARNING: LEV2: 331 validation problem(s)
WARNING: LEV3: 312 validation problem(s)
WARNING: LEV4: 331 validation problem(s)
WARNING: LEV5: 350 validation problem(s)
WARNING: LEV6: 352 validation problem(s)
WARNING: LEV7: 320 validation problem(s)
WARNING: LEV8: 327 validation problem(s)
WARNING: LEV9: 338 validation problem(s)
WARNING: LEVA: 322 validation problem(s)
WARNING: LEVB: 324 validation problem(s)
WARNING: LEVF: 96 validation problem(s)
parsed    13 LEVEL.DAT files
ERROR: LEV0: texture load failed: LEV0/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV1: texture load failed: LEV1/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV2: texture load failed: LEV2/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV3: texture load failed: LEV3/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV4: texture load failed: LEV4/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV5: texture load failed: LEV5/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV6: texture load failed: LEV6/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV7: texture load failed: LEV7/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV8: texture load failed: LEV8/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV9: texture load failed: LEV9/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVA: texture load failed: LEVA/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVB: texture load failed: LEVB/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVF: texture load failed: LEVF/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
textures  0 PNGs -> output\textures
ERROR: LEV1: cannot load textures for car export: LEV1/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
cars      0 GLBs -> output\cars
ERROR: LEV1: track export failed: LEV1/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV2: track export failed: LEV2/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV3: track export failed: LEV3/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV4: track export failed: LEV4/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV5: track export failed: LEV5/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV6: track export failed: LEV6/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV7: track export failed: LEV7/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV8: track export failed: LEV8/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEV9: track export failed: LEV9/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVA: track export failed: LEVA/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
ERROR: LEVB: track export failed: LEVB/LEVEL.TX*: tile 0 at payload 0x0: expected b'CLUT' tag, found b'TEXT'
tracks    0 GLBs -> output\tracks
WARNING   3988 validation problem(s) - see output\logs

errorlogs.rar

Did you point to the DIRINFO file or to a folder? The script wants the original DIRINFO file.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.