680
« on: June 15, 2009, 05:25:38 pm »
as for the cave-ins 7x7, that seems to be rather small. You COULD collapse the roof above your head in a smaller space close to the surface, but deeper in the mountain, a collapsing space would need to be bigger. Therefore, for every tunnel that's dug out, why not calculate a "Collapse" Threshold for the walls? It would start like this:
Walls could start at one, then double each level it goes down. So, the tunnel at level 1 would have a tensile strength of 1, and be able to support a hallway 1 tile in width.
a tunnel down 2 z levels would have a strength of 2, and be able to support a hallway 2 squares in length.
A tunnel down 3 z levels would support a hallway (or room) 4 squares thick.
A tunnel down 4 z levels would support a hallway 8 squares thick.
So,
strength of level 1 is always 1 but for every additional layer the following equation applies:
Subtract 1 for each size of the tunnel above 1
x= layer of z levels N = width of tunnel (or room)
2^x – (1- N+1) x=layer of z level.
Now, we add in the layers above.
Soil has no tensile strength, so each full layer would have a weight of 1.
Stone is strong, and able to support itself, so it would have a strength of .5
The tunnel just underneath ground level is supporting nothing, so without further support, that soil tunnel can support nothing else.
Pardon the tech speak, i've tried to dumb it down as much as I could.
When layer=1: Strengthofwalls=1
for every lower layer:
x= layer of z levels, T= layers of stone, S = layers of soil
stegnth = 2^x - (.5 * T + 1 * S)
so, a tunnel at layer 5 with 4 layers of stone, and 1 layer of soil would be:
2^ 5 - ((1- N+1) +.5 *4 +1 * 1) or, for those of you who need it broken down:
32 - 3 = 29.
for tunnels above each other, the following values are used
soil is still 1, since it has no stength of its own, and the floors are still heavy.
stone tunnels would be say, 3.
a tunnel at level 5 with 2 tunnels in stone, 2 layers of stone and 1 soil level. above it would be
x= layer of z levels, T= layers of stone, S = layers of soil UT= tunnel in stone. US= tunnel in soil N = width of tunnel
strength = 2^x – ((1- N+1) + 3 * UT + 1*US + .5 * T + 1 * S)
2^ 5 - ((1- N+1) +3 *2 + 1*1 + .5 *2 +1 * 1)
32 – (0 + 6+ 1 +1 +1)
23
Now, this is a bit high, but there's more modifiers to it.
<B>Room equation: </B>
So a 3x3 room would be:
Recall that (1- N+1) is the equation for tunnels above 3. so, a 3 by 3 room at the 5th level would be
x= layer of z levels, T= layers of stone, S = layers of soil UT= tunnel in stone. US= tunnel in soil N = width of tunnel
n= 3x3 (N is calculated first)
strength = 2^x – ((1- 9+1) + 3 * UT + 1*US + .5 * T + 1 * S)
2^ 5 - ((9 +3 *2 + 1*1 + .5 *2 +1 * 1)
32 – (9 + 6+ 1 +1 +1) = strength of 14, so there's strength for 14 extra spaces.
<B>Bonuses</B>
allright, now that we got that out of the way, lets talk about supports and other bonuses, both positive and negative.
Supports: Supports act as a wall, so it allows an extra single space to be added.
I also propose that a “Build supports along wall” designation in the menu that will allow dwarves to use wood, to boost up wall strength by 1. this will allow us to have tunnels an infinite length without having to build and design support after support in the construction menu.
Megabests: Give megabeasts a weight of 2. this way, they will always collapse a tunnel at the surface, falling inward. They could collapse a tunnel located in the second soil layer, assuming its not supported.
Collapses: a collapsing stone tunnel would add a strength of 2 for each layer that falls. So, a stone floor falling down 6 z layers would hit with a strength of 12. a floor collapsing into the next one would have a strength of 2. if the NEXT one collapses, it would have a total strength of 4, the next layer would have a strength of 8, ect.
Objects
This one is a bit hard, but my vote is the rooms are chopped up into invisible 3x3 blocks, and all weight is added together. Once that value is calculated, the game takes all that information, and added to the entire 3x3 column downward. This way, a grouping of tables or a stockpile would have much more weight and effect than a single table. This also makes sure that the game isn't spending all of its time calculating the effect of a single table if a large room is directly underneath, say, a dining room.
I know this isn't done, but this is the framework of what i'm suggesting.
Oh, and new calculations are only done when a megabeast moves, or a new tunnel is dug.