Flat roof where did you come from

I also encountered this bug. I caught it after I placed down the template and was able to fix it by selecting the roof and select the N/S/E/W slopes. It seems this bug turns the roof slopes off. Since I caught it before starting building and fixed it right away I didn’t think to take a screenshot sorry :frowning:

Hi everyone,
In stonehearth a14 build 2818, the flat roof bug now has logging in stonehearth.log. If you run into a flat roof, please upload your log. It will look something like:

2016-Jan-28 16:33:05.250443 | server |  1 |                             mod stonehearth.build.roof | [] apply_nine_grid_options { nine_grid_margin_right = 1, nine_grid_margin_back = 1, nine_grid_gradient = { }, nine_grid_margin_front = 1, nine_grid_y_offset = 0, nine_grid_margin_left = 1, brush = "stonehearth:build:brushes:roof:wooden_peaked_roof", nine_grid_slope = 1, nine_grid_max_height = 10 } leads to an empty nine_grid_gradient! stack traceback:
	stonehearth/components/roof/roof_component.lua:247: in function '_log_if_no_gradient'
	stonehearth/components/roof/roof_component.lua:241: in function 'apply_nine_grid_options'
	stonehearth/services/server/build/build_service.lua:1324: in function '_apply_nine_grid_options'
	stonehearth/services/server/build/build_service.lua:1315: in function 'cb'
	stonehearth/services/server/build/build_service.lua:1432: in function 'do_command'
	stonehearth/services/server/build/build_service.lua:1314: in function <stonehearth/services/server/build/build_service.lua:1309>

Thank you for all the help!
-Yang

2 Likes

Hi, sorry, New Guy question: How and where do we upload our log?

No worries! The log can be located in the game install directory. Assuming Steam, that would be C:\Program Files (x86)\Steam\steamapps\common\Stonehearth. From there you should see a file named stonehearth.log. If you have File Name Extensions disabled, you will have 3 files named stonehearth. You are looking for the file that opens in Notepad and is likely labeled Text Document. Once you find the file, you can upload it to the Discourse directly by dragging the file into the reply editor, or click the upload button from the editor and browse to the file. Please note that the log is overwritten every time you launch the game, so for this bug in particular it is important to upload the log before starting the game again.

Summary:
Beginning in A14 D2818, when placing default building templates, the roofs appear to lose their slant settings entirely, resulting in flat roofs. If you re-enable the slant directions, it will default to a height of 8 instead of 10, which if you don’t catch and fix that, may result in a broken, incomplete-looking roof on some buildings. If you adjust the max height too, the building will complete normally. If you change nothing, the roof will be built flat as designed.

Expected Results:
Normal building template with two-sided slanted roof (Ascendency)

Actual Results:
Flat featureless roofs, unless corrected.

Attachments:
Save game: A14_D2818.zip - Google Drive

Version Number and Mods in use:
A14 D2818 x64

Hi!
Please read this post: Flat roof where did you come from
And also please upload your stonehearth.log the next time this happens. The log has to be from during the game session where the roof first became flat.
Thank you!
-Yang

3 Likes

If I haven’t played since, will the log persist and be useful to you? If so I’ll pull it out now and attach it here.

As long as you haven’t launched the game since, yes, the log will be good!

…aaaaand done! It does contain the string mentiond in the other thread. :slightly_smiling:

megashub-stonehearth.log-20160128.zip (2.2 MB)

1 Like

Woohoo! Thank you for the log! I’ve finally managed to figure this one out.
It will happen if you try to move an already placed item (like a carpenter work bench) that is rotated. Then, if you go and try to place the roof, the roof will become flat. This is because the placed item has a rotation that is ever so slightly off from a round number, so instead of 270 degrees, it is 269.99999 and the roof rotation code expects everything to be a perfect multiple of 90.

Fixed for next unstable release.
Thanks for all the help everyone.
-Yang

5 Likes

that seems like the most confounded cause of a bug ever… glad to hear its fixed for the next build!

3 Likes

Victorious!! :smile:

1 Like

So glad you had the final bit of code to help @yshan narrow this weird bug down and squash it! I had submitted my saved game file but it probably wasn’t that helpful - like trying to find a needle in the proverbial haystack of code with a save file!

This community is really a rarity in the gaming development world, truly. I’ve tried to get involved with other Alpha early access games to give this sort of feedback but it’s been frustrating and usually unhelpful for the most part. Stonehearth’s Discourse is a one-of-a-kind place and that speaks volumes for the future of this great game!

3 Likes

Tested on D2820. Confirmed fixed, at least for me. Thanks, Yang!

3 Likes