Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Water Seeping Under Doors  (Read 6178 times)

dieffenbachj

  • Bay Watcher
  • Mr. Smiles
    • View Profile
Water Seeping Under Doors
« on: March 26, 2011, 11:26:47 pm »

I've always found it somewhat odd that doors make perfectly acceptable floodgates, and I'll often use them interchangeably, usually just with water but sometimes with magma.

At the same time, I sometimes have a desire for a steady trickle, instead of a flood, of water, and have always wanted Dwarf Fortress to have some kind of flow controller to make, for example, shallow basins of 1/7 water for bathing (though I've made due with water-sensitive pressure plates and floodgates). Controlling pressure by limiting the flow of water without using the diagonal wall trick is also something I've wanted.

It occurs to me that doors could be modified to serve this purpose. If water could flow through a door, but only up to a maximum depth of 1/7, it could be manipulated to create that bath AND it would mean that doors were good, but not perfect, at stopping floods (and if the flood was on your upper floors, it would still eventually lead to your lower floors being completely submerged).

I can imagine a system for irrigating underground crops with mud: a water source, a floodgate, and a door, when the floodgate opens the area gets flooded with 1/7 water from under the door, so there's no risk of overflow or accidental drownings...

So yeah. I think that would be interesting. Increase the amount of Fun by making anti-flood measures harder, but also allow for some utility with flow/pressure control.
Logged

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Water Seeping Under Doors
« Reply #1 on: March 26, 2011, 11:29:45 pm »

How would a crack at the bottom of the door stop the water on the other side from ever going above 1/7? That would take some magic right there.
Logged

dieffenbachj

  • Bay Watcher
  • Mr. Smiles
    • View Profile
Re: Water Seeping Under Doors
« Reply #2 on: March 26, 2011, 11:47:13 pm »

I have two answers for that:

a) I was hoping nobody here knew how physics actually worked.

b) I had that thought included in my suggestion originally, but cut it out because I knew if I left it out, someone would comment on it, thereby bumping the suggestion and starting a discussion. You made an excellent test subject *pats head*

Okay, so it would EVENTUALLY go above 1/7, but it would take quite a while since it's flow rate would be cut by 1/7th, and it would have to fill the entire room up to a depth of 1/7 before it could start going to 2/7, then to 3/7 and so on.

Unless Toady wants to model air-tight rooms and air pressure, which I doubt :P

It still wouldn't change the utility too much if that's how it worked, if anything it just makes it more Fun. Newbies discover that the door flow WILL in fact drown their dwarves if they ignore it for long enough, and people familiar with the door functionality would feel pressured to quickly stopper up any door-floods with actual floodgates before they get any worse.
« Last Edit: March 26, 2011, 11:49:00 pm by dieffenbachj »
Logged

DanielLC

  • Bay Watcher
    • View Profile
Re: Water Seeping Under Doors
« Reply #3 on: March 26, 2011, 11:54:31 pm »

How would it fill the room to 1/7? 1/7 water doesn't flow. Also, how will it know when the room is filled?

You could make it so that it fills to 1/7 at normal speed, but slows down at each additional water level.
Logged

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Water Seeping Under Doors
« Reply #4 on: March 27, 2011, 12:12:02 am »

Good point. With DF water physics if the door never allows more than 1/7 to pass then it would just fill the tile beyond the door to 1/7 and stop, as 2/7 would never flow through to become 1/7 in the next tile.
Logged

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: Water Seeping Under Doors
« Reply #5 on: March 27, 2011, 01:59:22 am »

You could have them take 1/7 of water from the flooded side and add it to whatever water is on the other side of the door. I'm not sure if it's the best way to go about it but I'd like doors to slowly leak.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Water Seeping Under Doors
« Reply #6 on: March 27, 2011, 02:56:53 am »

Adding 1/7 depth of water seems reasonable.  That way the water would flow out into the adjacent room, albeit slowly, and depending upon the evaporation in the area build up and eventually spread to maybe the next room.

Problem here is most fortresses don't have aboveground rooms... so there is not alot of evaporation to keep it all from getting out of hand.  FUN!
Logged
I like fortresses because they are still underground.

Norseman

  • Bay Watcher
    • View Profile
Re: Water Seeping Under Doors
« Reply #7 on: March 27, 2011, 04:18:16 am »

I think the quality of the door should be considered in its ability to slow water, and in the door's reliability. Here's how I'd do it:

Quality                         Rank   Slow percent   Maximum flow   Burst pressure        Burst/break chance   Burst/disassembled chance   Burst/opened chance   
Base quality door070%6 Z-levels10 Z-levels ± 530%60%10%
Well-crafted door175%5 Z-levels20 Z-levels ± 1029.2%58.3%12.5%
Finely-crafted door280%4 Z-levels50 Z-levels ± 2526.7%53.3%20%
Superior quality door385%3 Z-levels100 Z-levels ± 5022.5%45%32.5%
Exceptional door490%2 Z-levels170 Z-levels ± 8516.7%33.3%50%
Masterful door595%1 Z-level260 Z-levels ± 1309.2%18.3%72.5%
Artifact door6100%0 Z-levels370 Z-levels ± 1850%0%100%

Slow percent determines how much the door will slow down the water, compared to having no door. Slow percent is calculated as 70 + rank*5. For example, if you hit a finely-crafted door with 40 Z-levels of water pressure, it will reduce that to the equivalent of 8 Z-levels of water pressure.

Maximum flow determines how fast water can get through the door assuming you have an infinite amount of water pressure. It's calculated as the equivalent pressure of (6-rank) Z-levels. This doesn't matter for base quality doors - they will always burst before they reach maximum flow. However, if you put 40 Z-levels of water against a finely-crafted door, first, it will reduce the flow by 80%, making it equivalent to just 8 Z-levels. Second, the maximum flow of a finely-crafted door is 4 Z-levels, so we'll reduce 8 to just 4.

Burst pressure determines how many Z-levels of water pressure the door will take before it bursts open. The pressure difference is calculated by finding the maximum difference in pressure between any two passable tiles that are adjacent to and separated by the door. The maximum pressure a door can withstand before it bursts is calculated as 10+rank2*10.

Burst pressure will not be the same for every door of the same quality. Each door will have its own special burst pressure, and you won't know exactly what it is until you try it. Basically, whatever the burst pressure is you can randomly add or subtract up to one half of that to get the final burst pressure. For example, a base-quality door may burst under as little as 5 Z-levels of water pressure, or it may require as much as 15 Z-levels of water pressure to burst it.

Bursting can have one of three consequences - the door may be opened, disassembled, or broken. If the door is simply opened, it can be closed again (if you're using a lever) when the pressure difference is at least 1/2 of the door's maximum burst pressure. If the door is disassembled, it's been knocked off its hinges and you'll need to have a dwarf repair it. If the door has been broken, there will be nothing left of it.

Burst/break chance is the chance that, when the door bursts, it will get broken. Burst/break chance is calculated as (1-(rank/6)2) * 30.

Burst/disassembled chance is the chance that, when the door bursts, it will be disassembled. Burst/disassembled chance is calculated as (1-(rank/6)2) * 60.

Burst/opened chance is the chance that, when the door bursts, it will just be left open. Burst/opened chance is the remainder, so it's calculated as 100% - (Burst/disassembled chance + Burst/break chance).

This will make it so that doors can slow down water, but they're unreliable if you give them too much pressure. If you want to install drowning traps throughout your fortress, you'll either need to rely heavily on high-quality doors, or you'll need to carefully regulate the pressure using floodgates.
« Last Edit: March 27, 2011, 04:43:43 am by Norseman »
Logged

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Water Seeping Under Doors
« Reply #8 on: March 27, 2011, 04:34:05 am »

But with your system here wooden, stone, and metal doors are all the same.  Seems somewhat overcomplicated, although I do love the idea of doors busting open when there is too much pressure behind it.
Logged
I like fortresses because they are still underground.

Lav

  • Bay Watcher
    • View Profile
Re: Water Seeping Under Doors
« Reply #9 on: March 27, 2011, 05:23:40 am »

I think a much simpler system than the one Norseman is suggesting would be much easier to implement with effectively the similar results.

1. Doors, unless locked, should be opened by pressurized liquid (but not by regular flow). Optional: even locked doors may be broken if there's a lot of pressure (this depends on DF ability to detect pressure amount).
2. Doors, unless tightly closed, should allow 2/7 liquid on door's own tile, but no more. This will allow current liquids engine to flow excess water into the adjacent room using already existing mechanics.
Logged
Seems to be the way with things on this forum; if an invention doesn't involve death by magma then you know someone's going to go out of their way to make sure it does involve death by magma... then it gets acknowledged as being a great invention.

Jeoshua

  • Bay Watcher
  • God help me, I think I may be addicted to modding.
    • View Profile
Re: Water Seeping Under Doors
« Reply #10 on: March 27, 2011, 06:02:13 am »

2. Doors, unless tightly closed, should allow 2/7 liquid on door's own tile, but no more.

Okay, but then what happens when water is flooding from the OTHER side, too?
Logged
I like fortresses because they are still underground.

Norseman

  • Bay Watcher
    • View Profile
Re: Water Seeping Under Doors
« Reply #11 on: March 27, 2011, 06:51:14 am »

Regarding wood, stone and metal doors:
I think wood, stone and metal doors would have the same impact on slowing the water and preventing it from flowing too quickly, but they'd probably burst differently. Wooden doors, obviously, are the weakest. We could double the break chance, first by subtracting from the burst/opened chance, and then from the burst/disassembled chance if we need to. We could also cut their burst pressure in half. For metal doors, we could do the opposite, and cut the break chance in half, and add that to the burst/opened chance, and then double their burst pressure.

Wooden doors
Quality                         Burst pressure        Burst/break chance   Burst/disassembled chance   Burst/opened chance   
Base quality door5 Z-levels ± 260%40%0%
Well-crafted door10 Z-levels ± 558.4%41.6%0%
Finely-crafted door25 Z-levels ± 1253.4%46.6%0%
Superior quality door50 Z-levels ± 2545%45%10%
Exceptional door85 Z-levels ± 4233.4%33.3%33.3%
Masterful door130 Z-levels ± 6518.4%18.3%63.3%
Artifact door185 Z-levels ± 920%0%100%

Metal doors
Quality                         Burst pressure        Burst/break chance   Burst/disassembled chance   Burst/opened chance   
Base quality door20 Z-levels ± 1015%60%25%
Well-crafted door40 Z-levels ± 2014.6%58.3%27.1%
Finely-crafted door100 Z-levels ± 5013.3%53.3%33.4%
Superior quality door200 Z-levels ± 10011.2%45%43.8%
Exceptional door340 Z-levels ± 1708.3%33.3%58.4%
Masterful door520 Z-levels ± 2604.6%18.3%77.1%
Artifact door740 Z-levels ± 3700%0%100%

Stone doors would obviously follow the original table.

Regarding Lav's post:
It's a good idea to make it so that water can flow more easily through unlocked or loose doors, but I think it would be even better with bursting and quality/material specific characteristics. It's better to make it so that doors have a lot of different ways of failing when you use them to block water, because that's exactly why we don't use doors to block water in real life. We use floodgates precisely because they're stronger, better sealed, and they don't open by themselves if water pushes on them. Making doors complicated is precisely the right way to do it, so that they can be used to block water, but only with a somewhat high probability of Fun.
Logged

3

  • Bay Watcher
    • View Profile
Re: Water Seeping Under Doors
« Reply #12 on: March 27, 2011, 06:53:45 am »

There's no arbitary distinction between "wood" and "stone" and "metal" in DF; at least, not any more. Just base the chance of breakage on the attributes of the relevant material.
Logged

Lav

  • Bay Watcher
    • View Profile
Re: Water Seeping Under Doors
« Reply #13 on: March 27, 2011, 07:02:07 am »

Okay, but then what happens when water is flooding from the OTHER side, too?
Then you simply get a situation when there's 7/7 water from both sides of the door and 2/7 under the door.

It's a good idea to make it so that water can flow more easily through unlocked or loose doors, but I think it would be even better with bursting and quality/material specific characteristics.
Well, it's the question of perspective. Major goals (making doors unreliable liquid blockers and allowing water to seep under doors) may be achieved by relatively minor tweaks to the current game. As for your system - I wouldn't mind it in the slightest if it was implemented, but personally, I think time and effort required to implement these changes do not deserve the benefits gained and would better be spent on other issues. :-)
Logged
Seems to be the way with things on this forum; if an invention doesn't involve death by magma then you know someone's going to go out of their way to make sure it does involve death by magma... then it gets acknowledged as being a great invention.

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch
Re: Water Seeping Under Doors
« Reply #14 on: March 27, 2011, 11:23:31 am »

What of doors attach to a mechanism? They can't be locked or tightly closed IIRC.
Logged
Pages: [1] 2