Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Pressure Plate Frustration  (Read 7141 times)

TealThanatos

  • Bay Watcher
    • View Profile
Pressure Plate Frustration
« on: June 22, 2010, 11:57:00 pm »

Are pressure plates broken in 31.08, or am I misunderstanding the fundamentals of how they work?

I construct a pressure plate, and set it to go off if any creature walks over it (including citizens). Min weight at min, max weight at max. So to my understanding, anything that walks on that should set it off. I link it to a door. I'm expecting the door to toggle from open to closed every time someone walks on the pressure plate, is that correct? Because it's not.

Another example: I set a pressure plate to go off if water of depth 1 to 7 is on it. My idea was to make a well that refills itself, by opening a floodgate, and having the pressure plate up near the top of the well linked to the floodgate. The idea is that after I open the floodgate, the well fills up, flows up and onto the pressure plate, which goes off and closes the floodgate that I've linked it to. I tried it, and nothing happened, the well just overflowed and flooded part of my fortress, it's like the pressure plate wasn't there at all.

The pressure plate was linked to the floodgate and set to go off if water of depth 1 to 7 was on it.

What am I doing wrong? Please help.
Logged

TealThanatos

  • Bay Watcher
    • View Profile
Re: Pressure Plate Frustration
« Reply #1 on: June 23, 2010, 12:34:45 am »

I found a solution. For anyone searching in future here it is (it was under the old versions wiki which is why I had trouble finding it).

Common procedures
[edit]Closing a floodgate when submerged
For this example, say we want to close a floodgate when a reservoir reaches a depth of 5.

Build the pressure plate, set to activate under water (w) from 0 (a, s) to 4 (z, x). Make sure it is set to reset (o) (The default is to resetv0.28.181.40d; it's in the correct state when the screen reads 'Resets').
Place the floodgate
Connect a lever to the floodgate, and open it.
Optionally remove the lever.
Connect the pressure plate to the floodgate.
Allow the pressure plate to be submerged.
The floodgate should close a few seconds after the water reaches a depth of 5 or more, and open again when the depth falls to 4 or less.

It's worth noting that the reaction time of the pressure plate-floodgate system is quite large - the reservoir may overflow before the floodgate shuts. In order to prevent this (for example, when building a well filled from a river or brook), build a run-off pool. This allows the gate enough time to close, and the water will spread out instead of overflowing as it would have in a smaller pool.



Source: http://df.magmawiki.com/index.php/40d:Pressure_plate#ixzz0reSFlctx
Logged

Psieye

  • Bay Watcher
    • View Profile
Re: Pressure Plate Frustration
« Reply #2 on: June 23, 2010, 06:58:33 am »

Ah yeah, it's considered common knowledge amongst regulars to look at the 40d pages of the wiki. Put simply, a pressure plate activating gives an "Open" signal. You cannot tell a door to close when a creature steps on it - you can only tell it to open. Thus if you wanted a system for "close door if a creature steps here" then you'd need at least 2 pressure plates and a hydraulic logic system. The 40d page on the wiki will tell you more.
Logged
Military Training EXP Analysis
Congrats, Psieye. This is the first time I've seen a derailed thread get put back on the rails.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Pressure Plate Frustration
« Reply #3 on: June 23, 2010, 07:38:57 am »

As pointed out, pressure plates don't send toggle commands, they send 'open' and 'close' commands when triggered and untriggered.

You can't set  pressure plate to close a door if a creature steps on it, since the pressure plate sends an 'open' command when triggered and a 'close' command when untriggered.  What you can do is use a floor hatch over a hole instead of a door.  Then the 'open' command from the pressure plate will cause the hatch to open, which will make the pathway be effectively blocked by virtue of having a hole in the floor.
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.

Daetrin

  • Bay Watcher
    • View Profile
Re: Pressure Plate Frustration
« Reply #4 on: June 23, 2010, 02:44:17 pm »

Alternately you can use a raising drawbridge. It's delayed, and doors are not, but it can work quite well.
Logged
All you need to know about Ardentdikes
It is really, really easy to flood this place with magma fwiw.

Doors stop fire, right?

se5a

  • Bay Watcher
    • View Profile
Re: Pressure Plate Frustration
« Reply #5 on: October 30, 2010, 03:52:51 pm »

I'm also having problems with this. This stuff needs to go in the wiki, I seem to remember a problem with the delay and water lapping, but can't seem to find info on it now. there's currently nothing on the 2010 wiki about pressure plates and water/liquid

Oh right, look in the older one.  duh, should have read the whole thing.
still, none of those seem to say anything about it only sending Open-Close rather than Toggle. Is that the case with floodgates too? I seem to remmeber setting it up to work either way...
« Last Edit: October 30, 2010, 07:40:05 pm by se5a »
Logged

se5a

  • Bay Watcher
    • View Profile
Re: Pressure Plate Frustration
« Reply #6 on: October 30, 2010, 08:45:58 pm »

ok, so how do you get a floodgate to Open when a specific water level is reached?
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Pressure Plate Frustration
« Reply #7 on: October 30, 2010, 09:12:36 pm »

ok, so how do you get a floodgate to Open when a specific water level is reached?
Create a pressure plate.  When you create the pressure plate, set it to be triggered by Water of the desired range.  Build the floodgate, then link the floodgate to the pressure plate.
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.

se5a

  • Bay Watcher
    • View Profile
Re: Pressure Plate Frustration
« Reply #8 on: November 01, 2010, 04:31:47 am »

so does it matter weather the floodgate is open or closed at the time you connect it up or not?
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Pressure Plate Frustration
« Reply #9 on: November 01, 2010, 07:39:36 am »

so does it matter weather the floodgate is open or closed at the time you connect it up or not?
No.  Pressure plates send 'open' and 'close' commands.  Floodgates obey the last command they received, they don't toggle like gears do.
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.