Templates not shown

Summary:
templates not shown and an error message.
upon further investigation, I found that one of my templates I made was causing the problem. once I removed it from the templates folder my templates are back to normal.

release-701 (x64)
stonehearth/lib/build_util.lua:612: attempt to index local ‘template’ (a nil value)
stack traceback:
[C]: ?
stonehearth/lib/build_util.lua:612: in function ‘get_custom_templates’
stonehearth/call_handlers/build_call_handler.lua:44: in function <stonehearth/call_handlers/build_call_handler.lua:43>

release-701 (x64)
c++ exception: lua runtime error
stack traceback:

Steps to reproduce:

  1. put my template that I made in the building templates folder
  2. load game attempt to build the template I made that isn’t working.
  3. once you click on place a building you will get the error message.

Expected Results:
templates to be there
Actual Results:
templates are not there
Notes:

Attachments:
template that doesnt work.zip (68.6 KB)

Version Number and Mods in use:
R-701
System Information:

hey there @Kodi4444,

to upload the template simply go to the templates folder, put the buggy template in a .zip and then drag and drop that .zip into the reply box and it’ll auto-upload.

hope this helps :slight_smile:

1 Like

it wont let me it says:
Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, txt, csv, log, obj, qmo, doc, docx, pdf, xml, evtx, qcp, qcm, qb, lua, zip, dmp, 7z, bmp, rar, mp4).

@Kodi4444, that’s why @8BitCrab said to compress it into a .zip. Get the template json file (and the related image, which is a png file), right-click on them, click on Send To…->Compressed folder (zip), and then try to upload it here.

2 Likes

I feel silly, I forgot to put it in a zip folder.

The template json file is empty, no wonder why it’s throwing an error.
The image looks fine, I wonder why it managed to save the image but not the data. :confused:

Is the image correct, @Kodi4444? The corners without roofs, and only 3 floors?

1 Like

yes, the image is correct. its a modular design i am able to add more buildings on top like more beds when i need them.

1 Like

Summary:
Tried to make a template (big one) and when I attempted to save it, it broke. When accessing build menu the error will repeat itself occasionally and templates will not save.

Steps to reproduce:

  1. Create Template

Expected Results:
Template is created
Actual Results:
Error when accessing creations
Notes:

Attachments:

Version Number and Mods in use:
release-701 (x64)
System Information:
release-701 (x64)
stonehearth/lib/build_util.lua:612: attempt to index local ‘template’ (a nil value)
stack traceback:
[C]: ?
stonehearth/lib/build_util.lua:612: in function 'get_custom_templates’
stonehearth/call_handlers/build_call_handler.lua:44: in function <stonehearth/call_handlers/build_call_handler.lua:43>

and

release-701 (x64)
c++ exception: lua runtime error
stack traceback:

I wonder if it’s an issue with really big templates. You’ll have to delete that template, @Jabberwockie, or you’ll keep getting the error. It should be inside: C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\saved_objects\stonehearth\building_templates

(Probably the json file is empty, like in @Kodi4444’s case).

will do thankies much!

Am now getting this error when I put roofs on things, and the building wont go into build mode

release-701 (x64)
…onehearth/components/building/building_component.lua:399: attempt to index local ‘entity’ (a nil value)
stack traceback:
[C]: ?
…onehearth/components/building/building_component.lua:399: in function 'get_building_envelope’
stonehearth/components/roof/roof_component.lua:245: in function ‘clip_overlapping_structures’
…onehearth/components/building/building_component.lua:827: in function 'layout_roof’
stonehearth/services/server/build/build_service.lua:1180: in function 'grow_roof’
stonehearth/services/server/build/build_service.lua:1128: in function 'cb’
stonehearth/services/server/build/build_service.lua:1582: in function 'do_command’
stonehearth/services/server/build/build_service.lua:1127: in function <stonehearth/services/server/build/build_service.lua:1125>

Upload that savefile, @Jabberwockie. Sounds like a different bug. 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.

I was able to recreate this design and it worked. But I’m not sure if did something different this time.

1487770026615.rar (5.6 MB)

Here is the save file, the error pops right after you add a roof to the build by the fields. If you figure out where the bug is could you let me know? I’d rather not have to start all over lol. If not I understand!