How to Mod Stonehearth with Qubicle
Minimum requirement: Qubicle Basic Edition
This tutorial is based on Stonehearth Alpha 1. Written by Tim Wesoly, CEO Minddesk and developer of Qubicle
Stonehearth will be a very modder friendly game. In fact even the models and scripts provided by the developers are mods. After installing the alpha browse to stonehearth/mods and you will find two files: “radiant.smod” and “stonehearth.smod”.
The “radiant.smod” file contains scripts that I assume are the core libraries. No need to tinker with these files – at least for now. The more interesting file is the “stonehearth.smod”. It contains all the voxel models – and other things like ui skins etc. Both files are renamed zip files. So in order to access the data in the file “stonehearth.smod” simply rename it to .zip and extract it:
- Browse to stonehearth/mods
- Make a backup copy of “stonehearth.smod”
- Rename “stonehearth.smod” to “stonehearth.zip”
- Unzip “stonehearth.zip”
You now have a folder called “stonehearth” in your mods folder containing more folders like “ai” and “call_handlers” etc.
In the “entities” folder you will find various QB files. QB is short for Qubicle Binary and one of my exchange formats. You can directly open/save QB with Qubicle Home/Master and the upcoming Stonehearth Editon (more info below).
Since you need to zip and rename/overwrite every time you want to change something the first thing you should do to speed up this tedious task is writing a batch file doing this automatically. Here’s my little step by step guide using 7-Zip a free compression tool:
- Download and install 7-Zip
- Create a text file and save it as “pack.bat” in the mods folder
- Open the file with a text editor and add the following lines
"C:\Program Files (x86)\7-Zip\7z.exe" u stonehearth.zip stonehearth\ DEL stonehearth.smod RENAME stonehearth.zip stonehearth.smod
First Modding Test
Ok, everything is prepared now and you can run a simple test:
- Open mods\stonehearth\entities\trees\oak_tree\medium_oak_tree.qb
- Change the Hue/Saturation with the correspoding modifier
- Export as QB
- Double-click the pack.bat
- Start Stonehearth
The color of some of the trees should have changed now. I guess it’s better to not change any sizes, positions or names of matrices. But that needs to be tested/confirmed.
Export Settings for QB
Use the following settings for the QB export:
- Z-Axis: Right handed
- Color Format: RGBA
- Single Object: Depends (Yes for most files)
- Hollow: No
- Compression: No
- Encode Visibility Mask: Yes
Most of the QB files consist of a single Matrix. An exception I found is the body model which uses 26 Matrices. I guess it’s better to leave the body the way it is for now.