Actually I am struggling a bit to provide interesting modding-tutorials without touching Lua (which I do not want to for the time being - at least until the new API is implemented). However, here is another one which shows how it will work later on to add all kind of variety into the game (at least how I think it will work also for other elements).
This time we will add some additional options to Stonehearth regarding the random look of our settlers (the example adds some hair-colors, but can be adjusted to change also the skin-color, etc.):
- Unzip the “stonehearth.smod”-file
- Create custom .qb-files which we will use to replace head_1.qb, head_2.qb and head_3.qb
Creating the .qb-files will again require a Stonehearth-Edition of QC (Home and Master will work, too ).
Relevant References (where to change / add something):
- Stonehearth >> Mods >> stonehearth >> entities >> humans
- Stonehearth >> Mods >> stonehearth >> services >> population >> data
- Stonehearth >> Mods >> stonehearth
Step by Step:
- Just take an existing folder (e.g. “female_1”) and use it as a template. You have to rename the folder into e.g. “female_4” and replace the existing heads with your designs. So go ahead and overwrite the existing files called “head_1.qb”, “head_2.qb” and “head_3.qb” with the new looks you have exported from Qubicle. You will also have to rename the .json-file into “female_4.json” but you do not have to change the content in the file itself.
- Open the file called “ascendancy.json” which is the only kingdom which is loaded into the game at the moment (later on this will allow to use different names and looks for each kingdom). In the file look for the code which looks like:
"female_entities" : [ "stonehearth:female_1", "stonehearth:female_2", "stonehearth:female_3" ],
and add an entry for “female_4”:
"female_entities" : [ "stonehearth:female_1", "stonehearth:female_2", "stonehearth:female_3", "stonehearth:female_4" ],
- Open the file “manifest.json” and look for an existing entry for the females (e.g. “female_1”). Just underneath it add another line where you introduce the new design:
"female_4" : "file(entities/humans/female_4)",
Once you have done all the steps, you are done. You do not have to zip the folder again and rename it into stonehearth.smod if you ensure that there is only the unzipped folder in the directory (otherwise your changes might not be taken into account because the Alpha might use the .smod-file instead of loading your changes in the folder which is named the same way).
A short (7 Min.) tutorial can be found here:
P.S. The optional heads will be added and do not overwrite the existing looks. So at the end you will end-up with a wider variety.