Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Water Level Control  (Read 3056 times)

Keldane

  • Bay Watcher
    • View Profile
Water Level Control
« on: February 07, 2011, 04:26:45 pm »

So a couple days ago I had an idea, and after some hemming and hawing about whether anyone else would care, I've decided to share it. It's an alternative method of preventing flooding by controlling the depth of water on a given tile.

The wiki has schematics for a fluid repeater involving a (raising) 1x1 bridge, a pressure plate set to trigger on 7/7 water, and a floodgate. Simply put, if you set them in a straight tunnel in the order listed, link both the bridge and the floodgate to the pressure plate, and then apply an infinite source of water flowing from the bridge side, this setup will repeatedly trigger and reset the pressure plate (when the pressure plate triggers, it raises the bridge to form a wall and block off the water supply, while opening the floodgate to allow enough water to flow off the pressure plate to reset it). Due to the fact that the tile the floodgate is on, and any tile after it, only has an inflow of one tile's worth of water at any given time, and the water under the floodgate is effectively atom smashed when the floodgate closes, any chamber that is on the same level as the repeater and that is positioned after the floodgate cannot fill past 4/7.

While there are numerous benefits to this (creating a swimming pool, for example), the one that we're most interested in is that if a given tile can't fill past 4/7 water, then it can't flood the level above it. This means that no matter how far below the water source the repeater is, as long as the repeater is positioned one level below any wells that are fed by its outflow, there will be no flooding. With this, there is no need for pumps or an open shaft into the caverns to build a well in your dining room; all you require is an aquifer, river, or similar infinite water source and seven pieces of stone.
Logged
WARNING:Side effects may include fatal badgerstorm and sudden appreciation for nobles.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Water Level Control
« Reply #1 on: February 07, 2011, 05:37:59 pm »

Or two pieces of stone.  Water flowing past diagonal walls (or statues, or trees, but not fortifications) loses its pressure, and cannot flood.  Like so:
Code: [Select]
WWWWW
++W++
+++W+
++W++
WWWWW

This will null the pressure and prevent flooding.  Also though, I just realized that the repeater can be used to remove water.  If there's another floodgate in front of it, connected to a dwarf-reachable lever, then you can selectively turn it on or off.  That way, when Urist McClumsyWarrior falls into the well and takes his shiny blue armor with him, you can turn on the repeater (or multiple repeaters) to drain the well.  This could also be a viable alternative to having a out-spout for your plumbing, if you had enough repeaters to destroy all the water that wanted to drain out.

Keldane

  • Bay Watcher
    • View Profile
Re: Water Level Control
« Reply #2 on: February 07, 2011, 11:16:59 pm »

True, the diagonal method does work, and I have used it. I was suggesting this as an alternative, which may be a little less 'exploity' in the eyes of some (I've seen at least one person say that they refuse to use diagonal gaps for that reason). This has the benefit of providing you with a repeater that can be used for other purposes while simultaneously preventing flooding, too.

Concerning destroying the water with repeaters, this repeater unfortunately will not work to that end. While it does destroy water on the single flood gate tile, it requires a constant flow of water coming in to function properly. Shutting off the water flowing in will prevent it from repeating, thus preventing it from destroying water that's already passed.

That's not to say that you can't use it to power a self-draining cistern...

Code: (Repeater Set-Up) [Select]
WWWWW
XBpXX
WWWWW

This is a slightly modified version of the repeater. W indicates walls, and it is oriented to allow water to flow in from the left.

The first X is a floodgate linked to an outside lever. This serves as an emergency shut off; as long as it's closed, the repeater does not function.

The B is the single-tile bridge. The direction in which it raises is irrelevant, but I usually make it raise in the direction the water is coming from - just a personal habit. When triggered by the pressure plate, the bridge raises, effectively becoming a wall and blocking off the water's flow. The reason for the use of the bridge here is so that the water is blocked from flowing in at the same time water is allowed to flow off through the second floodgate.

The p is the pressure plate. As mentioned previously, it is set to trigger on 7/7 water.

The second X is the floodgate directly linked to the pressure plate and thus the repeater mechanism. As mentioned above, when the pressure plate activates, it closes off the inflow by raising the bridge, while opening up the outflow by opening this floodgate. It is because of this simultaneous opening and closing action that there is only one tile of 7/7 water to drain into the tunnel further along.

The third X is linked to a second external lever. Its purpose is to prevent water from flowing through the repeater into the cistern without preventing water from flowing into the repeater in the first place. This way, the cistern can be drained without shutting off the repeater.

Code: (Cistern Wall) [Select]
~WW
~XW
~WW
~XW
~WW

In this design, the cistern wall has floodgates (indicated by an X) in alcoves in the wall of the cistern (indicated by a W). When the floodgates are open, water flows in; when they close, the water is destroyed. By linking these floodgates to the pressure plate in the repeater, water will be constantly destroyed, but as long as there is water entering the cistern, it won't be a problem.

Here's to hoping I explained that well enough to make sense.
Logged
WARNING:Side effects may include fatal badgerstorm and sudden appreciation for nobles.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Water Level Control
« Reply #3 on: February 07, 2011, 11:46:37 pm »

I don't see the diagonals as an exploit, so much as one possible method that water uses.  After all, if you try and let water flow through an empty tunnel, it can fast, but if you drop boulders, then the water's gonna slow down, so...

Keldane

  • Bay Watcher
    • View Profile
Re: Water Level Control
« Reply #4 on: February 07, 2011, 11:51:38 pm »

Aye, I don't see it as an exploit, either. Nevertheless, this remains a viable alternative, so if nothing else it provides more options. It will also continue to work if diagonals removing pressure is deemed a bug and is patched out, in theory.
Logged
WARNING:Side effects may include fatal badgerstorm and sudden appreciation for nobles.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Water Level Control
« Reply #5 on: February 08, 2011, 12:12:57 am »

I think it's a bugger-turned-feature, like the atom smasher.  The atom smasher may very well never be fixed, because it's too widely used, and very easy not to use, same as danger rooms.  Sure, you can get legendaries in a season, but you have to actively use this, it's not sitting there glaring at you.  Maybe it is a bug, maybe it's been reclassified, but it's widely used and easy to avoid, so I doubt it will be "fixed"

ext0l

  • Bay Watcher
    • View Profile
Re: Water Level Control
« Reply #6 on: February 08, 2011, 12:26:35 am »

Everything is an exploit  ::)
The repeater atom-smashes water with both the bridge and floodgate.
Logged

Dorfus

  • Bay Watcher
    • View Profile
Re: Water Level Control
« Reply #7 on: February 08, 2011, 08:47:34 am »

Depressurising water is easy. A simple airlock system is simple and non-cheaty. Another alternative is to build a cistern, wall it off, fill it, close the intake. Another alternative is to not worry about it.

I find airlock systems the best as they allow me to add water to its destination in precise increments (multiples of 7, of course).
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Water Level Control
« Reply #8 on: February 08, 2011, 01:59:42 pm »

Another alternative is to not worry about it.

Urist McPeasant cancels Drown: Not worrying about it.