Spoiler tag

Wednesday, June 1, 2011

JSRF Tool v0.2 - Level model extract & Sounds extraction

Hello JSRF fans!

This post is focused on the new version of the JSRF tool, if you're not really interested in using the tool you probably don't need to read this boring technical description which I'll try to keep short and simple anyways.

So I haven't had time to work on this project at all, but I have taken a few days to try to fix some things, and it was hard to remember how things worked, but here's honestly a more or less efficient extraction tool.

When you open a JSRF .dat or .bin it will load nodes in the tree, I gave a color for each type:

Red nodes = Materials
Purple nodes = Models
Yellow nodes = Textures
Grey nodes = unknown/empty

Models (MDLB) and textures

In this version MDLB are all exported fine, still in .obj but with also the .mtl (material) so the texture is assigned to the model.
To export a model with textures create a "textures" folder in the same folder you export the model and use the "export all" yellow button to export the textures in the textures folder (it is important to use "Export All" since it gives the texture identifier number assigned to the material of the model for the .mtl to find)



Levels

As for level models (MDLBL) they all export fine with the right texture, but there is one model type which I never got around to extract properly so they just won't export, those are name "triangle strip" type in the "Triangles info" when you have an MDLBL selected.

The level models are located in the "Stage" folder and are split up in many files, you can only extract things from the .dat for the stages, these contain models and textures.
For instance the garage models and textures are split in the files:
-stg00_00.dat
-stg00_01.dat
-stg00_02.dat
-stg00_03.dat
-stg00_04.dat

You have to extract all the models and textures (to a folder named "textures" in the same folder you extracted the models) from those files to get the garage.
You may notice there are some "MDLB" in the stages files, those are objects also called props which are placed many times in the level, probably their spawn and position/rotation are defined in the .bin which I didn't look much into.

The level sky model/texture is in the files ending by "_t.dat" for the garage "Stg00_t.dat"

Sounds 

This one works perfectly and doesn't really need to be explained, just open a file in the folder "files\Media\Sounds\SE" and it will automatically switch to the "Sound" tab, you can either extract all the files to .wav format, or click one and play it.

Misc

I added a settings tab so you can define the JSRF folder files, export models/texture folders, so the tool now will open the latest folder you selected for exporting files.
There is also a "replace texture" button, which lets you inject textures, but it was quickly implemented, only us it if you really know what you're doing anyways, more explanations on the "readme.txt" file in the tool .zip file.

Let me know any particular problem in the comments ;)