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).
- 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.
- 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.
- 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:
"stonehearth:portals:castle_door",
- 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.
- 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.