Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: lapping water and presure plates  (Read 797 times)

se5a

  • Bay Watcher
    • View Profile
lapping water and presure plates
« on: April 27, 2012, 03:03:17 pm »

I seem to remember this being a problem, but the wiki does not appear to mention it for the last few versions.
has the way pressure plates work changed? if not what is the best way to set up pressure plates for opening floodgates if the water is over a specific amount?
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: lapping water and presure plates
« Reply #1 on: April 27, 2012, 03:30:14 pm »

The typical way to do this is to build a pressure plate, and set it to be triggered if the water is between 7/7 and whatever depth you want it to trigger, then link it to a floodgate.  When the water is at or above the set point, the floodgate will open.

The tricky bit comes from the fact that floodgates have a delay, and pressure plates have a minimum on time.  When the pressure plate sends an open or close command to the floodgate, the floodgate will wait 100 steps, and then open or close as commanded.  Any open or close commands received during those 100 steps will be ignored.  Problems can arise if the water level is above your trigger level, drops below the level for a moment (sending a close command to the floodgate), then rises back up before the floodgate has responded to the close command.  The open and close commands are only sent momentarily, so this can result in the floodgate staying closed because it ignored the open command.

To avoid this, use doors, which act just like floodgates but don't have the 100 step time delay.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Hyndis

  • Bay Watcher
    • View Profile
Re: lapping water and presure plates
« Reply #2 on: April 27, 2012, 04:51:19 pm »

Uneven water is great if you want a slow but very hands off repeater.

Dig a small pit. Even 2 tiles is big enough. One tile with a ramp, the other tile with a pressure plate. Make the pressure plate a repeater, and have it trigger only at 3/3 water.

Use a bucket to add exactly 5 units of water total to the pit.

This means one tile will have 2/7 water, and the other tile will have 3/7 water. The 3/7 water will keep cycling back and forth endlessly, and it will trigger the pressure plate every time its over the pressure plate.

This is not a fast repeater due to the built in reset delay of a pressure plate, so if you're trying to power spike traps with this it won't work, but its great for less urgent things, like atom smasher pits or for danger rooms.

To ensure that no one drinks the water dry for some reason, lock the door to the wave motion repeater room once its in motion. 3/7 water is shallow enough that you can attach additional things to the repeater without needing to turn it off.
Logged

Sadrice

  • Bay Watcher
  • Yertle et al
    • View Profile
Re: lapping water and presure plates
« Reply #3 on: April 27, 2012, 06:31:45 pm »

Does drinking water actually reduce the water level?
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: lapping water and presure plates
« Reply #4 on: April 27, 2012, 06:49:47 pm »

Does drinking water actually reduce the water level?
I don't know if a dwarf drinking out of water directly reduces it, but a well will reduce the water levels by 1/7 unit each time that it fills up the bucket.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

xmakina

  • Bay Watcher
  • in lapidem, Libertas
    • View Profile
    • Centre of the Back
Re: lapping water and presure plates
« Reply #5 on: April 28, 2012, 07:00:11 am »

Does drinking water actually reduce the water level?

Yes. I've seen a dwarf drink water and the tile drops to 6/7
Logged
Anyone who doesn't have a lever causing global apocalypse isn't playing the game correctly
But it should be easy enough not to use them in a way you feel is dumb while letting other people have their hilarity.