Hi, I have been working on level creation tools, so far we can create levels but we also needed to be able to create custom 'mission' files to have custom spray can placements, player spawning and death warps.
So I have created a second add-on for Blender which exports and compiles the mission data and added a collection with the mission stuff in the Blender sample scene file.
I have also updated the Stage Exporter blender add-on with improvements/fixes and also added an option "Visual as Collision" so that the Visual models are used as Collision models in case you're just working with the physics materials so you don't need to copy and paste the Visual models into the Collision every time you add new meshes and want to export, just check the box "Visual as Collision" and the exporter will automatically use the Visual meshes as Collision.
In the previous linked file you will find the blender scene file, add-ons and tools used to compile the level, see this post for how to setup the Stage exporter in Blender.
For the mission exporter, there's a blender add-on to install and it's panel will appear in the Scene Properties panel, same as the stage exporter:
You will need to setup the Stage export path (same as in the stage exporter settings), the game's Media directory and finally the JSRF_Mission_Compiler.exe tool provided in the Stage creation tools v1
Now for how it works, you will find a "Mission" collection in the outliner that contains various items for the mission data.
Inside, the 'PlayerSpawnPosition' is just a model of Beat that is where the player will appear in the level.
The 'Items' collection contains the spray cans, just duplicate them and keep the same name (+ ending with some number) to place more cans.
Finally the 'Death Warps' that are the areas where if you cross the plane you will be teleported back to the spawn location, for which you want to have a 'dw_plane' and a 'dw_spawn' with the same name and ending with an underscore and a number such as "dw_plane_0" "dw_spawn_0" "dw_plane_1" "dw_plane_2" etc
When you click "Export Mission" the mission data will be exported to the Stage Export path and the mission will be compiled, it saves the mission file as the tutorial mission, so to load the custom mission and level simply go to "New Game" in JSRF's main menu.
Hey there, small update for the Graffiti Tool, I have added a setting for the Cxbx app folder, so the cache(changes) gets automatically cleared when modding graffitis.
If you already have some mods installed (without this tool) make a backup copy of your Media folder so your mods don't get lost.
The configuration should be pretty straigth forward, just go to the settings tab, choose the platform (PC - cxbx) or (Xbox)
Then select the folder of the JSRF Media folder, and also a copy of the original game files in another Media folder (so original files can be restored when uninstalling mods) And finally the cxbx app folder, or the xbox FTP settings.
For now mod submissions are closed, and you need to contact me if you want to be granted access to upload mods, if you wish to do so, contact me on Discord: neodos#5090
Let me know in the comments if you have any questions or issues with the app.
Hey, so for the past few months I have been working on the JSRF level compiler and also an add-on for Blender to export levels for JSRF, also the latest version of the JSRF Mod Tool processes and compiles the data into the game's level file format and boom! custom levels.
Once again huge thanks to Gurten, Daft, Demo, Fuse, Duck
from the JSRF Reverse Engineering community & the Cxbx team who made this possible.
This post is an overview of the process, however I will not be covering the topic of the 3D modelling process since it would be too long to cover, it's a subject on it's own and there's already plenty of tutorials out there for Blender, the focus of this post is on how the JSRF levels work and the tools to create them.
In this zip file you will find a Blender scene file with a test level, the dev textures for the collision materials, the Blender JSRF Stage Exporter addon an the JSRF ModTool which compiles the level data exported from Blender, and lastly a Mission file which loads when you select "new game", the level will be empty, only corn is standing around, place this file in the "Media\Mission\" folder.
You can find the source code for the JSRF ModTool here
Composition of a JSRF level
A JSRF level is mainly composed of 3D models, of two kinds, one for the visuals that we see and uses textures (top left picture), and another, invisible in-game which is used for the physics simulation(top right pic) and how the player controller interacts with the environment's surfaces.
On the left the visual models, on the right the physics collision model, notice how the collision model has less detail, it's simplified, for instance the stairs become a flat ramp but in the game the yellow surfaces act as stairs and the character takes steps as if there were stairs. The colors on the surfaces of the physics models help us recognize what type of physics material the faces of the model are assigned.
Lastly, the level also contains curves data for the rails we can grind in-game.
Setting up the Blender JSRF Stage Exporter
First
let's install the JSRF Exporter addon for Blender, make sure you have
downloaded the files, and have "JSRF_Stage_Exporter.py"
In Blender go to Edit >> Preferences >> Add-ons then click Install
Browse to and select "JSRF_Stage_exporter.py" and don't forget to tick the checkbox(highlighted in red here) to enable the add-on:
You can the find the JSRF Stage exporter menu at the bottom of the 'Scene' panel:
You will first need to setup the paths as follows:
Stage ID is the name of the stage it will be exported as in the Media\Stage\ directory
Stage Export Path is the folder where the Stage data will be exported
Media Directory should point to the JSRF Media folder
ModTool filepath should point to the JSRF_ModTool.exe
When
you press Export Stage, the stage data from blender will be exported,
then the JSRF ModTool will run and compile the stage (by default) as the Garage
(stg00)
Creating the visual model & using it as a base for the collision
When we start to make a level, we're not going to work on the fancy visuals, instead we roughly model the shape of the level and objects, assigning the physics materials as the default material/texture for the visual models since that's what we're going to use as temporary collision models.
So you'll want to assign the materials that come with the demo scene.
Here's what a test stage looks like:
This is just a test map but that's all you need to know to get started making and testing levels for JSRF, if you're going to do the proper visuals. You might want to use the old mod tool (download top right) to extract the game's models and textures to re-use them.
Here's what the scene in Blender should look like:
The main "Stage" collection contains "Visual" "Collision" and "GrindPaths", and the those three collections should contain other collections that contain the meshes, and curves for the GrindPaths collection, check how the demo scene is setup if you're not sure.
You must use this structure and naming (except for "Model_group_0" you can name those whatever you like) as that's how the JSRF Stage Exporter addon can process and export the level data.
As for collision models, you can have up to 1023 triangles per collision model group, that's just how the game engine works.
When you have blocked out your level's visual meshes(with the collision materials), as a shortcut you can copy paste the model groups from Visual collection into the Collision collection. For a finished level the collision models should be modeled separately or you can use part of the visual models as a base, but the models should be simplified as much as possible, for instance, for a set of buildings as collision model, you wouldn't have multiple buildings/boxes for collision, but simply a big wall joining the ground with more or less the same scale as the buildings, in some cases it can be boxes or skewed shapes, in general just try to simplify as much as possible.
The textures must be in .png format and their resolution must be square and of power of two (i.e: 128x128 or 256x256 or 512x512) the minimum resolution is 8x8 pixels, maximum 2048 (untested), generally recommend sticking to 512x512 as the maximum.
Limitations of JSRF's levels visual models
JSRF Level Visual models only support one UV per vertex, which means you have to treat the model so there aren't multiple UVs per vertex and you need to be very mindful about it, otherwise if you make a complex mesh and once compiled you see it in-game with messed up UVs, it might be tricky(in Blender) to find which part of the mesh is causing the issue.
Ok here's an example (the box in orange) of the issue and how it's solved:
Grind Paths
Grind paths can be created by extracting the edges of a mesh as curves, you then need to add them on the "GrindPaths" collection, inside it's own collection/group.
Also once you're done editing the grind path, make sure to do this for the curve objects: Object >> Apply >> All transforms Not ideal, but for now that'll be necessary.
To extract edges as a curve, you can use the following addon, note: in the script change the version from "blender": (2, 80, 0), to whatever version of Blender you're using so it loads up. In blender you'll find the button while in Edit mode (edges) right click and at the bottom "Edges to curve"
Note: right now bezier or other types of curves are not supported, or at least I don't know Blender well enough to tell you which type of curves the exporter would support, so try starting from extracting edges as a curve with the add-on I just mentioned, unless you know a way to manually make "curves" that are just point to point without smoothing.
Hey there, I am still working on the tools to create JSRF levels (nearly done) but I also have to prepare a tutorial, in the meantime here are some video tutorials on how to mod JSRF textures and models, thanks to YayoDeLaRiva and Lkymn for making these tutorials:
About a year ago I was trying to make custom levels for JSRF, I was able to build brand new visual models for the levels and compile the physics collision models too, but there was a part of the collision data I could not figure out, that needed to be calculated, and since it wasn't, in the new level, you'd just fall through the floor and clip through everything. So I sought help from others but we couldn't figure it out, at least not how we were trying, through binary/hexadecimal/statistical analysis.
His reverse engineer method is through disassembly, which means de-compiling the game's executable/program file aka turning the program's executable binary file into a (massive and convoluted) list of CPU instructions, then analyzing CPU instructions/functions to see how the game loads the files and how it processes the data, easier said than done though.
This technique definitely was the only way to reverse engineer this bit of data about the physics collision 3D meshes of JSRF and people who have the (dis)assembly reverse engineering skills, are hard to come by and they usually have better things to do, luckily Gurten was willing to take the time and help, and he did an amazing job.
Anyways here's the result of the first properly compiled JSRF level:
I may or may not make a blog post later on about the process of
how I tried to reverse engineering the level collision data(and failed)
+ with other people, and finally how Gurten went about it and
succeeded, but it'd be a pretty long blog post.
I didn't publish the second blog post part about "how I reverse engineered JSRF" because it quickly got too technical, long and would be boring and pedantic to the reader. Perhaps
I'll make a video with audio commentary and graphic animations explaining the reverse engineering process, the mod tool, and how
it evolved over a decade.
Video format with audio would definitely be a
more dynamic, concise and a fun format to watch rather than reading a
long blog post, but again, it would be a lot of work creating such video,
so we'll see.
For now, there's some more work to do on the tool and things to figure out about JSRF, on compiling levels, and also creating a level creator/editor
tool to make it more accessible to create levels for JSRF.
Hey there, I have still been working on the JSRF tool, mostly reverse engineering and experimenting recompiling levels(aka 'Stage') data, such features are not accessible in the tool's interface yet, if you're a developer and want to try it, it's all in the code.
While we're close to being able to create custom levels, we're stuck on figuring out part of the level collision 3D mesh data.
I have managed to recompile a custom visual mesh for the level, as well as part of the collision mesh data, but since part of the collision mesh is still unknown/not understood and has to be calculated, right now we just fall/go through the collision mesh.
In the following video, it's a new compiled visual mesh, while maintaining the original Garage's collision meshes:
This post is also about the JSRF Tool 2.7, where I have fixed MDLB model
importing, before, adding or removing material groups in the model(MDLB)
importing interface, would corrupt the materials groups, giving wrong
materials to the model.
It's finally fixed, if you're a developer
and have been using/modifying the source yourself, I recommend checking
out the GitHub repository where I might update the code, while I don't
make blog posts about it: https://github.com/neodoso/JSRF_ModTool, otherwise here's the tool with the fixes: