rtay.io/blog/post

Switch to dark mode

Kahootz - Decompiling assets

One of the first things I noticed after installing Kahootz was that all the resource files are available in an open file structure, something really uncommon in modern applications. Usually assets are all compiled into much larger files which are dynamically extracted at runtime, but this program just has everything freely available in the Res folder:

File directory of the Kahootz3 installation folder and the Res subfolder

Inside each of the textures/Sounds/models folders are what you’d expect, but actually getting something usable out of this isn’t as easy as you’d expect.

This was developed over 10 years ago, when they presumably had different software standards and development environments, and as such I’m not actually familiar with any of the file types. After a bit of research here’s what I’ve discovered:

Type Potential use / description
.cst Director “Cast” file
.cxt Director “Cast” or “Object” file which is edit protected
.dxr Director “Movie” files that are non-editable
.ico Icon file that’s still somewhat common today
.ini Common configuration file type
.kb Keyboard script? Not sure; It’s in the “backgrounds” folder
.w3d Some sort of 3d model file used by Shockwave/Director
.wav Common audio format. I’m so happy I can just open these files as is

I think it’s probably clear by now that most of these files are relevant to “Director”, which refers to what was probably Macromedia Director at the time. Director was obtained by Adobe in 2005 and reached End Of Life in 2012, and so it’s really hard to find support or even a copy of the program.

I honestly spent a while trying to find and install different versions of Shockwave and Director in order to open these files without success. It turns out somebody else had partially solved my problem though, and created a tool to convert Shockwave 3D World Files (w3d) into a more usable format.

To test this, I just chose a random environment model ‘ENVI_SewerageTunnel.w3d’, which corresponds to this sewer level in the game:

Sewer scene open in the kahootz 3 program

And running the ‘ENVI_SewerageTunnel.w3d’ file through the 3D converter tool got me this collection of very usable files:

File directory of models and images for the sewer scene

Which I can easily enough open in blender.

Sewer model open in blender

I love how they’ve used a cone for the sky. Also it’s really interesting how there’s a separate simpler mesh in the model for collisions, which defines where the camera is allowed to fly in the game.

Here’s some cool blender renders of the sewer with different lighting. I haven’t modified any of the models/textures at all here.

Light falling through the grate illuminating the sewer Sunrays hitting the floor and illumating the rest of the sewer chamber Candid shot of a flashlight in the sewer as seen from above ground

I have a lot of work ahead of me extracting all these models. I’m considering making them all openly available and explorable in the browser with three.js or something, assuming the publishers no longer care about their long-abandoned proprietary software.

Oh, and I’ll get around to kahootz.club soon, I’m very busy with uni right now :)


A post by @rtaylz