Cant save building templates after trying to save one with a name with foreign characters


Can’t save templates from my custom buildings
Version Number and Mods in use:

No mods, Update 593 (unstable build)

do you get an error message with this?

No. I finish my building and when I click on save, it asks me to name my template and when I click Ok, it just doesnt save my template. This is like this for several builds already and thought it’s going to be fixed, but maybe it’s a bug exclusive to me ^^

The only thing that I can think of is that the building template folder (…\steamapps\common\Stonehearth\saved_objects\stonehearth\building_templates) is set to read-only. If it is, just unset it and it should work.

@Krishi, are you using weird characters for the template’s name?

Just to make sure: Are you looking at the “Custom” tab below the templates menu? Standard ones and your own buildings are now separated. They changed the layout a couple (not sure when) of alphas ago and I was irritated a bit at first as well.

Nope, that isn’t the issue sadly.

Nope. Funnily there are still 6 templates in the folder and they worked in the past. But now even those do not show up in the custom tab. And the templates I tried to save are not there, so I guess they didn’t get saved.

Third nope. I looked in both tabs and my templates just aren’t there.

did you install via humblebundle or through steam?

Steam. Also no mods installed

does this help? Building Templates Not Showing in Game
or verifying integrity of the cache on steam?

Sadly not. Integrity was fine and sicne I want to save templates (and not copy othert emplates into my game) it doesnt help. :frowning:

So in that folder you only have the default templates, but those don’t show in the game either?
Could you upload your stonehearth.log file after you’ve attempted to save a template?

I found the reason for this bug. Stonehearth can’t handle some letters like the german ‘ß’. In the past I tried to name one of my buildings “Großes Lagerhaus” which means something like “Big Storehouse”. The ß got changed into something like Âó and it seems like stonehearth can’t display templates with such letters. After I changed the template file name to “Grosses Lagerhaus” I could see all my tempaltes I had ever saved. Witht he current build however, it seems like Stonehearth can handle ß partially. I tried to save a template with “Großes Lagerhaus” again and ingame the template got named “Großes Lagerhaus” and the file that got saved is only named “Gro”. This still indicates, that Stonehearth can’t handle it perfectly, but at least the templates do not disappear this way.
To make things more interesting, I tried to save a template with these letters as a name:
And you know what? Stonehearth has created a folder in my building_templates folder with chinese letters…?! The folder is named:
Though I dont know what that means. There is nothing inside the folder and the template I tried to save with ßöüäôúi isn’t in the building_templates folder either (not even a file with other strange letters). I also got this error message when I tried to save the building with those letters:
Page 1:

release-593 (x64)
std::runtime_error: 'boost::filesystem::path codecvt to string: error’
stack traceback:
[C]: ?
[C]: in function 'write_object’
radiant/modules/mods.lua:30: in function 'write_object’
stonehearth/lib/build_util.lua:426: in function 'save_template’
stonehearth/call_handlers/build_call_handler.lua:35: in function <stonehearth/call_handlers/build_call_handler.lua:30>
Page 2:
release-593 (x64)
c++ exception: lua runtime error
stack traceback:
I think the solution for this would be, that Stonehearth can either handle letters outside from the english alphabet or that it doesnt allow other letters than english ones.

I’m sorry for saying ß is weird :sweat:
With this question I meant characters outside of the english alphabet or signs like !?/($ etc
There are similar errors here: Building template causes lua error

Well, the problem is, that I had one template with ß in it’s name and after that, no template was shown anymore (neither old ones, nor new ones). And I only used normal letters for the templates after the one with ß, so that’s why I said “No, I dont use any strange letters”. If you had asked me if one of my old templates has a strange letter, I may have realized the error sooner. :smiley: