In case perhaps writing it out might help, how my cave in idea works in my fort in written detail:
Areas exceeding 3 tiles width or height from the nearest support or wall may be subject to cave in if the square area of the width multiplied by the height exceeds 100 'unbroken' squares.
Ie - where x is a wall, o is open space, n is a support
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- This is fine because the height of the room doesn't exceed 3 tiles and won't result in a collapse.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Because this room exceeds 100 tiles squared and exceeds 3 tiles height, it is prone to collapse.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoooooooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- This room exceeds 100 tiles but because the top part of the room doesn't exceed 3 tiles, and the bottom part doesn't exceed 100 tiles squared, the room is not prone to collapse. Squaring of the bottom part includes all the 'o's between the yellow ones.
Going back to fix the 2nd example given, supports would need to be added to the inside of the room. However, if added improperly it may still collapse.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoonoooooooooooooooooooooooooooonoox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoonoooooooooooooooooooooooooooonoox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Supports are added into the room, but the room is still prone to collapse. This is because the area of tiles squares between the yellow o's is still exceeding 100 squares.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoonoooooooooooonnnnoooooooooooonoox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xoonoooooooooooonnnnoooooooooooonoox
xoooooooooooooooooooooooooooooooooox
xoooooooooooooooooooooooooooooooooox
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adding more supports to reduce the area until there is no '100 tiled' squared areas left fixes the problem.
This would be the basic idea of what I'm getting at, but a more advanced idea would have '100 squared tiled' areas expanding into other rooms, and potentially there might be some exceptions made if the rooms exceed more then 1z level. However, I'll think about that more later in game.