Errors when attempting to place and remove a roof

Attempted to place the first section of a roof with max offset (8) over a building blueprint and was given a permanent floating roof. The undo function seemed unable to remove it, and the roof didn’t change when I tried lowering the offset (or anything else for that matter), so I tried switching to a different roof type (from red stone to grey stone to clay) and was given another bug which seems to be concerned “build undo manager” not working correctly.

Edit: After playing further for a few minutes (and destroying the in-progress building to restart it) I found that I can’t place foundations at all anymore. Existing templates can’t be placed either. I can only assume this was somehow caused by the previous errors.

Steps to reproduce:

  1. Design a building up to the roof.
  2. Attempt to place a stone roof (8 offset, 1 max height).

Expected Results:
Roof is placed normally without issue.

Actual Results:
Roof appears to be placed, but without the walls meant to support the “offset” value. Roof placement can’t be undone.

On attempted build:

develop-3116 (x64)
…onehearth/components/building/building_component.lua:780: attempt to call method ‘layout’ (a nil value)
stack traceback:
[C]: in function ‘layout’
…onehearth/components/building/building_component.lua:780: in function ‘layout_roof’
stonehearth/services/server/build/build_service.lua:1423: in function ‘_apply_nine_grid_options’
stonehearth/services/server/build/build_service.lua:1405: in function ‘cb’
stonehearth/services/server/build/build_service.lua:1569: in function ‘do_command’
stonehearth/services/server/build/build_service.lua:1403: in function <stonehearth/services/server/build/build_service.lua:1398>

----- And on attempt to switch roof types:

develop-3116 (x64)
…ehearth/services/server/build/build_undo_manager.lua:46: assertion failed!
stack traceback:
[C]: ?
[C]: in function ‘assert’
…ehearth/services/server/build/build_undo_manager.lua:46: in function ‘begin_transaction’
stonehearth/services/server/build/build_service.lua:1566: in function ‘do_command’
stonehearth/services/server/build/build_service.lua:1403: in function <stonehearth/services/server/build/build_service.lua:1398>


Versions and Mods:
Alpha 18, no mods.

Hey @Dreamchime, thanks for the report! Can you upload the save where this is occurring, and the unhappy building template?

To upload a save, locate the folder in
C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\saved_games (assuming a default Steam install), zip the individual save’s folder (not the entire saved_games folder), and upload it. If the *.zip is less than 10 MB, feel free to upload it directly to the Discourse. If larger, please upload it to a cloud storage site like Dropbox, Google Drive, File Dropper, etc. and post the sharing link here.

In order to upload a building template:

  1. Save your build as a template in game.
  2. Open your game directory.
    Default location for a Steam install is:
    C:\Program Files (x86)\Steam\steamapps\common\Stonehearth
    Default location for a Humble install is:
    C:\Program Files (x86)\Stonehearth\
  3. Navigate to the building templates stored in \saved_objects\stonehearth\building_templates
  4. Locate the .json file for your template. For example, if you wanted to upload the “Clay Dining Room” template, find clay dining room.json.
  5. If you created this template in a recent version, you will also have a .png, for bug fixing purposes this is not important and does not need to be included in the .zip.
  6. Compress the .json file to a .zip file.
  7. Right-click the file you wish to zip.
  8. Left click Send to.
  9. Left click Compressed (zipped) folder
  10. Hit Enter on your keyboard.
  11. Upload the file to this thread in the Discourse by clicking the upload button in the editor and navigating to the file, or drag the file into the editor with your mouse.