[Tutorial] Adding additional doors in the custom design builder

Maybe someone remembers the 2 pictures with the “castle” or “barracks”:

I like the door and the banner, so I’ve “modelled” both…

door.qb (586.1 KB)
flag.qb (12.4 KB)

… and want to start again with a few small guides. Let’s start with how you can add the door as an additional option in the custom design builder.

This guide is build on re-using the assets of the “wooden double door”, as the size fits and this way animations can be re-used (opening / closing of the door). It also makes the process overall easier. Unfortunately a .less-file has to be edited, so I don’t go in the direction of embedding this all into a mod-file (as to my understanding you cannot mixinto .less-files).

:one: - Models:

Look for “C:…\Stonehearth\mods\stonehearth\entities\construction”, dublicate the folder “wooden_double_door” and re-name it to “castle_door”. Go into the folder and re-name all files containing “wooden_double_door” in the name into “castle_door”. The result should look like that:

Download also the file “door.qb” from the link above and replace “castle_door.qb” with the file (don’t forget to rename it afterwards again).

Now enter the into each .json-file and replace the naming as you did with the game files, i.e. if you find a “wooden_double_door” replace the text with “castle_door”. Don’t overdo it here. If you see a text like “file(wooden_double_door_iconic.json)” change it to “file(castle_door_iconic.json)”. Iconic, ghost, etc. you do not have to touch.

:two: - Recipe:

Look for “C:…\Stonehearth\mods\stonehearth\jobs\carpenter\recipes”. Here we open the file “recipes.json” first. Again we can search for “wooden_double_door” and copy and paste the line. You should end up with something like:

"castle_door" : {
   "recipe" : "file(castle_door_recipe.json)"

As we are linking to the file “castle_door_recipe.json”, we have to create it. Copy and paste the file named “wooden_double_door_recipe.json” and rename it as required (into “castle_door_recipe.json”). Open the file and replace the term “wooden_double_door” with “castle_door” wherever you find it.

:three: - Building Designer:

The new door should also be displayed in the building designer. To do so, we go to: “C:…\Stonehearth\mods\stonehearth\ui\game\modes\build_mode\building_designer_2”, open the file “building_designer_2.less” and create a new entry similar to the existing one for the wooden_double_door:

.brush.castle_door {
   background-image: url(/stonehearth/entities/construction/castle_door/castle_door.png);

After that we open the file “C:…\Stonehearth\mods\stonehearth\data\build\building_parts.json” and add:

{ "name": "Castle door", "portrait": "/stonehearth/entities/construction/castle_door/castle_door.png", "brush": "stonehearth:portals:castle_door" },

… below the similar entry for the wooden_double_door.

Finally open “building_brushes.json” and do the same by adding:


:four: - Manifest:

Open “C:…\Stonehearth\mods\stonehearth\manifest.json” and add:

"portals:castle_door" : "file(entities/construction/castle_door)",

… again under the similar entry for the woode_double_door.

:five: - Start Stonehearth:

… and enjoy the new door.

If you like you can improve the adjustment. Create a specific .png-file which represents the new door and can be displayed in the game (e.g in the Building Designer and in the Workshop). Create a new iconic-version (in Qubicle), so the door is also looking different while it is in the stockpile. Adjust the resource-requirements, so it requires more than wood.


Lovely Thank you for this!


I’ve missed you @voxel_pirate … I truly, truly have… :smile: :clap:


Yay @voxel_pirate is back. I love your tutorials, this one is as good as the rest ;D Thanks.


So that people can have some unique images to go along with the qb files

Rename to castle_door.png

Rename to flag.png


Thanks… very kind! :smiley:

1 Like

So it turns out there is one more problem on top of the .less file in trying to add a new door to the build tools as a completely separate mod. The animations need to be in your separate mod as well, because there doesn’t seem to be anyway to point at another mods files. Any “file()” entry in a json is always read as relative to the base folder of the mod it is in right?

I can solve it by importing the needed files from data/rigs/, but that’s beside the point. Mods in other games are often built on top of other “library” mods. It would be a pity if that can’t happen here.

Edit: This post was due to my incomplete knowledge at the time. You can call the files needed directly, instead of through the file() shorthand. For instance, “animation_table” : “stonehearth/data/rigs/double_door/double_door.json”.

1 Like

I didn’t understand why you can make it as a separate mod. and what that .less means

I haven’t done anything with mixintos for a while but assume that they are only working with .json-files. Guess I will give it a try for the sake of trying, but also @Tuhalu seems to have a good point here.

1 Like

great guide for design builder :+1:

i tried it thrice and every time i needed to reinstall stonehearth cuz it doesnt work and i get black screen
pl help me

Welcome to the forum, @sloth :smile:
First, if you’re modifying the stonehearth.smod file, make a copy of it on another place, so if the game doesn’t launch, you can paste it back and avoid having to reinstall the whole game.

Second, if you made some mistake with the code, it’ll probably appear on your stonehearth.log file. You can take a look at it and if you don’t find a clue on how to solve it, paste its content here and we’ll try to help you.

ok thx for replying that quickly

Is there a mod for this?

No… but you can make one if you follow the tutorial and check if everything still works with the latest patch :wink:.

1 Like

i found my problem i dont seem to have the building_parts.json

1 Like

Oh, this tutorial got a little outdated :frowning:

Instead of building_parts.json, you have to add the corresponding entries in building_brushes.json (it’s located in the same folder).


ok ty for hellping otherwise i would never ever have found it out

1 Like

one last question so i just need to skkip the build_part.json part and straightly go to the brush part or

Yes, just skip that step and go to the building_brushes.