Diagonal Foundation breaks Wall generation

Summary: A diagonal edge of a foundation will break the wall geneation script and also prevent you from removing the building afterwards.

Steps to reproduce:

  1. Start designing a custom building
  2. Have a foundation with a diagonal edge
  3. Try to have it automatically place a wall
  4. Enjoy the error console coming up
  5. Also: hope it didn’t save after you did that, because you can’t remove the walls or the building.

Expected Results: Poles on the ends of the diagonal edge and the normal wall pattern in between; being able to undo the wall placement.

Actual Results: Walls on half of the house, no way to remove them or even remove the building.

Notes:

release-701 (x64)
stonehearth/components/wall/wall_component.lua:372: attempt to index a nil value
stack traceback:
	[C]: ?
	stonehearth/components/wall/wall_component.lua:372: in function 'connect_to_columns'
	stonehearth/services/server/build/build_service.lua:1264: in function 'init_fn'
	stonehearth/services/server/build/build_service.lua:529: in function '_create_blueprint'
	stonehearth/services/server/build/build_service.lua:1262: in function '_create_wall'
	stonehearth/services/server/build/build_service.lua:1249: in function '_add_wall_span'
	stonehearth/services/server/build/build_service.lua:1078: in function 'visitor_fn'
	stonehearth/lib/build_util.lua:819: in function 'grow_walls_around'
	stonehearth/services/server/build/build_service.lua:1077: in function 'grow_walls'
	stonehearth/services/server/build/build_service.lua:1049: in function 'cb'
	stonehearth/services/server/build/build_service.lua:1582: in function 'do_command'
	stonehearth/services/server/build/build_service.lua:1048: in function <stonehearth/services/server/build/build_service.lua:1046>
	
release-701 (x64)
stonehearth/services/server/build/build_undo_manager.lua:415: assertion failed!
stack traceback:
	[C]: ?
	[C]: in function 'assert'
	...ehearth/services/server/build/build_undo_manager.lua:415: in function 'clear'
	stonehearth/services/server/build/build_service.lua:111: in function 'set_teardown'
	stonehearth/call_handlers/build_call_handler.lua:25: in function <stonehearth/call_handlers/build_call_handler.lua:23>

Version Number and Mods in use: release-701 x64, no mods

System Information: Windows 10 64-bit

1 Like

@Banane9
The problem you have here is the wall floor plan. Columns can only have two walls attached to them, or can only extend in two directions. The block that forms the point of the wall cannot connect to anything, and the block behind it can only extend in two directions, but the plan calls for three. If you remove that end block, you should fix the problem.

3 Likes

OR just make the point a pillar of individual blocks rather than make it a “wall” since that would ALSO work lol. i mean if he’s using nothing but walls to build this out that is in of itself going to look odd when looking at it form the side because it’ll be all corner pillars anyway so just design the diagonal part of the wall out block by block rather than by using walls to generate the shape that way you can decide what color and material it’ll be made out of.

Well, duh; but obviously that doesn’t change the fact that the game shouldn’t be preventing me from undoing the wall generation or even removing the building design.

1 Like

And arguably the fix would be to add support for diagonal walls, where there’s only pillars at the begininning/end of the diagonal and then wall parts on the diagonal blocks between them.

well there IS support for diagonal walls yours is just so narrow and small that the point is causing an issue. the point has a single block then 2 and then 3 when it SHOULD be 1, 2, and then 2 with a space between them. that 3 row is probably causing the issue for you because a single wall end can only support 1 other wall to be attached to it. there’s a limitation as someone above had already pointed out.

Well the game doesn’t actually do diagonal walls, it zig-zags it, and it makes sense and, well, it’s efficient, and considering this exact problem probably existed since a few years ago when custom buildings first got available, you were the first to actually make a building that causes it in my two year or so activity in the forums

It is a bug, i won’t deny it, but i feel like it is a lower priority fix, after-all the teams has linited time and building focused development just passed a few alphas ago, so i bet we’ll have to wait until future,… pushes? Focus shifts back to building, i think this was the third run on it

For now though, well, we’ll have to live with one less block, i mean, it’s not that bad

Also, i assume you can’t remove the building either?, if so, perhaps try using console commands, click on the building plan and in the console (ctrl+c) type “Destroy” and it should get rid of it, if it doesn’t, well, we’ll need a different plan

It’s all foundation blocks, your “fix” doesn’t make any sense.

Removing it using the console worked, thankfully.

I was trying to build a tower to connect the bottom/starting gound to the top of a flat mountain top, about 4 or 5 floors. The final level I wanted half walled in and the other half open to use as the path to the mountain top.

release-687 (x64)
stonehearth/components/wall/wall_component.lua:372: attempt to index a nil value
stack traceback:
[C]: ?
stonehearth/components/wall/wall_component.lua:372: in function 'connect_to_columns’
stonehearth/services/server/build/build_service.lua:1264: in function 'init_fn’
stonehearth/services/server/build/build_service.lua:529: in function '_create_blueprint’
stonehearth/services/server/build/build_service.lua:1262: in function '_create_wall’
stonehearth/services/server/build/build_service.lua:1249: in function '_add_wall_span’
stonehearth/services/server/build/build_service.lua:1078: in function 'visitor_fn’
stonehearth/lib/build_util.lua:819: in function 'grow_walls_around’
stonehearth/services/server/build/build_service.lua:1077: in function 'grow_walls’
stonehearth/services/server/build/build_service.lua:1049: in function 'cb’
stonehearth/services/server/build/build_service.lua:1582: in function 'do_command’
stonehearth/services/server/build/build_service.lua:1048: in function <stonehearth/services/server/build/build_service.lua:1046>

release-687 (x64)
c++ exception: lua runtime error
stack traceback:
release-687 (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:1579: in function 'do_command’
stonehearth/services/server/build/build_service.lua:142: in function <stonehearth/services/server/build/build_service.lua:140>
release-687 (x64)
…ehearth/services/server/build/build_undo_manager.lua:415: assertion failed!
stack traceback:
[C]: ?
[C]: in function ‘assert’
…ehearth/services/server/build/build_undo_manager.lua:415: in function 'clear’
stonehearth/services/server/build/build_service.lua:86: in function 'clear_undo_stack’
stonehearth/services/server/build/build_service.lua:91: in function 'set_active’
stonehearth/call_handlers/build_call_handler.lua:19: in function <stonehearth/call_handlers/build_call_handler.lua:18>

1 Like

Welcome to the forum, @Sirth7 :slight_smile:

Could you upload the savefile where that error is happening?

I had a similar problem i was designing a cathedral with 2 Towers and when trying to make 2 floorplans with walls that were touching i got an error message

release-687 (x64)
stonehearth/components/wall/wall_component.lua:369: attempt to index a nil value
stack traceback:
[C]: ?
stonehearth/components/wall/wall_component.lua:369: in function 'connect_to_columns’
stonehearth/services/server/build/build_service.lua:1264: in function 'init_fn’
stonehearth/services/server/build/build_service.lua:529: in function '_create_blueprint’
stonehearth/services/server/build/build_service.lua:1262: in function '_create_wall’
stonehearth/services/server/build/build_service.lua:1249: in function '_add_wall_span’
stonehearth/services/server/build/build_service.lua:1078: in function 'visitor_fn’
stonehearth/lib/build_util.lua:819: in function 'grow_walls_around’
stonehearth/services/server/build/build_service.lua:1077: in function 'grow_walls’
stonehearth/services/server/build/build_service.lua:1049: in function 'cb’
stonehearth/services/server/build/build_service.lua:1582: in function 'do_command’
stonehearth/services/server/build/build_service.lua:1048: in function <stonehearth/services/server/build/build_service.lua:1046>strong text