Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Single Lever Airlocks  (Read 1710 times)

CancerousCthulhu

  • Bay Watcher
    • View Profile
Single Lever Airlocks
« on: August 04, 2014, 08:32:10 pm »

So I built two bridges to make an airlock for my trade depot early game. I linked one, pulled the lever and it was raised. Linked the other one, pulled the lever again. Now both were upright forming walls. Pulled it again and they were both down. Did I do something wrong? ;~;
Logged
Guys I don't think we want to mess with using dwarves as fusion material here. Be careful.

Cellmonk

  • Bay Watcher
  • You might find it, whatever it is.
    • View Profile
Re: Single Lever Airlocks
« Reply #1 on: August 04, 2014, 08:49:00 pm »

Unfortunately bridges can't easily be set up like that due to the way lever signals work. The Lever outputs either an on or an off signal, and the bridges respond to an on signal by raising and an off signal by lowering. Therefore, when you connect one bridge, and send it an on signal, it raises, but when you connect the lever in its on state to a lowered bridge and send it an off signal, it just stays lowered.

If you want to create a single lever airlock (which is an awesome idea, btw), you need to have an inverter somewhere in the mix. You need to have something which takes an on signal (for example, through a gear box connected to a pump), and gives an off signal to one of the bridges (from a pressure plate, for example).

The wiki has some good resources on dwarven logic: http://dwarffortresswiki.org/index.php/DF2014:Mechanical_logic

EDIT: be forwarned that many logic gates introduce a delay into your system, which may compromise the airlock. There are some nearly instantaneous inverters (I think one using a powered pump and a pressure plate has almost no delay), but if you have issue with even tiny delays compromising the airlock, you can try to design a delay mechanism for the non-inverted bridge.
« Last Edit: August 04, 2014, 08:57:58 pm by Cellmonk »
Logged

CancerousCthulhu

  • Bay Watcher
    • View Profile
Re: Single Lever Airlocks
« Reply #2 on: August 04, 2014, 08:56:58 pm »

Unfortunately bridges can't easily be set up like that due to the way lever signals work. The Lever outputs either an on or an off signal, and the bridges respond to an on signal by raising and an off signal by lowering. Therefore, when you connect one bridge, and send it an on signal, it raises, but when you connect the lever in its on state to a lowered bridge and send it an off signal, it just stays lowered.

If you want to create a single lever airlock (which is an awesome idea, btw), you need to have an inverter somewhere in the mix. You need to have something which takes an on signal (for example, through a gear box connected to a pump), and gives an off signal to one of the bridges (from a pressure plate, for example).

The wiki has some good resources on dwarven logic: http://dwarffortresswiki.org/index.php/DF2014:Mechanical_logic

Thanks for that info, I thought it was just a toggle, not a certain signal. This fort is pretty early on still, so I don't think I can yet handle an inverter... maybe soon :D
Logged
Guys I don't think we want to mess with using dwarves as fusion material here. Be careful.

krenshala

  • Bay Watcher
    • View Profile
Re: Single Lever Airlocks
« Reply #3 on: August 04, 2014, 08:57:51 pm »

Its been a while since I set one up, but if I remember correctly you can set it up this way:

1) build both bridge and the lever.
2) link one bridge directly to the lever.
3) pull the lever
3) build a gear and link the second bridge to the gear
4) link the lever to the gear
5) pull the lever again

It should, if I'm remembering it correctly, now work the way you want it to (only one open at a time).
Logged
Quote from: Haspen
Quote from: phoenixuk
Zepave Dawnhogs the Butterfly of Vales the Marsh Titan ... was taken out by a single novice axedwarf and his pet war kitten. Long Live Domas Etasastesh Adilloram, slayer of the snow butterfly!
Doesn't quite have the ring of heroics to it...
Mother: "...and after the evil snow butterfly was defeated, Domas and his kitten lived happily ever after!"
Kids: "Yaaaay!"

Panando

  • Bay Watcher
    • View Profile
Re: Single Lever Airlocks
« Reply #4 on: August 04, 2014, 09:00:02 pm »

You don't need an inverter since you can just use a clever combination of raising bridges, retracting bridges and doors/floodgates.

In brief, a raising bridge obstructs passage when it is raised, but a retracting bridge over ramps allows passage when it is retracted. Also doors and floodgates operate in the opposite phase to raising bridges so you could use doors on the fortress side, and a raising bridge on the outdoors side. Hatches and retracting bridges operate in the same phase so do not complement each other.

You can actually use retracting bridges exclusively as well by requiring a change in z-level. A retracting bridge allows horizontal passage over a pit/water/magma moat when it is extended, it allows vertical passage up/down ramps when it is retracted. Retracted bridges never kill, which is nice if you're not building a death trap. They also cannot be obstructed from extending over empty space although a heavy creature can stop them retracting, this typically makes them more secure for lock-down than raising bridges, you might get stuck in lockdown, but wont be prevented from locking down.

So you could for example have the depot separated from the fortress by a pit (make sure it's wider than 1-z to prevent easy jumping, and use smooth walls to prevent climbing), the depot should be connected to the surface by ramps, with a retracting bridge over the ramps. With both bridges linked to the same lever, when the bridges are open, the caravan can enter the depot from outside but things in the depot can't enter the fortress. With the bridges extended, nothing can enter the depot from outside, and the dwarves can come in from inside.
« Last Edit: August 04, 2014, 09:09:31 pm by Panando »
Logged
Punch through a multi-z aquifer in under 5 minutes, video walkthrough. I post as /u/BlakeMW on reddit.

Cellmonk

  • Bay Watcher
  • You might find it, whatever it is.
    • View Profile
Re: Single Lever Airlocks
« Reply #5 on: August 04, 2014, 09:09:17 pm »

In brief, a raising bridge obstructs passage when it is raised, but a retracting bridge over ramps allows passage when it is retracted. Also doors and floodgates operate in the opposite phase to raising bridges so you could use doors on the fortress side, and a raising bridge on the outdoors side. Hatches and retracting bridges operate in the same phase so do not complement each other.

That's really good advice. It might be incompatible with my obsessiveness regarding things being single level, but it is certainly a simpler and just as (more?) effective approach than going out of one's way to make inverters.
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: Single Lever Airlocks
« Reply #6 on: August 04, 2014, 09:17:16 pm »

It CAN be single level using retraction + raising (well, you'd need a pit underneath to make the retracting bridge needed, but not anything you'd ever have to look at).  It does have the problem though that it's not really an "airlock" more just a "groundlock" Flying creatures could still waltz over the pit.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Cellmonk

  • Bay Watcher
  • You might find it, whatever it is.
    • View Profile
Re: Single Lever Airlocks
« Reply #7 on: August 04, 2014, 09:30:36 pm »

It CAN be single level using retraction + raising (well, you'd need a pit underneath to make the retracting bridge needed, but not anything you'd ever have to look at).  It does have the problem though that it's not really an "airlock" more just a "groundlock" Flying creatures could still waltz over the pit.
The key is to have a change in elevation, such that creatures must path from the pit upwards. The entrance would be connected to the pit via tunnel, which would have ramps leading up to the depot. The bridge would cover this pit, thus blocking the path of all creatures (including building destroyers and flyers) who wish to climb up. It's like a hatch.

Also, a retracting bridge for traversal over a pit blocks on an "on" signal, and a raising bridge used as a door blocks on an "on" signal, so using it in that manner wouldn't work. Only a scenario where unretracting the bridge (with an "off" signal) allows access would allow for a retracting/raising airlock.

EDIT: Oops I misread it. But the point stands, that system wouldn't work, unfortunately.
« Last Edit: August 04, 2014, 09:36:47 pm by Cellmonk »
Logged

GavJ

  • Bay Watcher
    • View Profile
Re: Single Lever Airlocks
« Reply #8 on: August 04, 2014, 09:34:01 pm »

edit: Oh  nevermind, got the on/offs wrong, gotcha.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Single Lever Airlocks
« Reply #9 on: August 05, 2014, 03:11:47 am »

Its been a while since I set one up, but if I remember correctly you can set it up this way:

1) build both bridge and the lever.
2) link one bridge directly to the lever.
3) pull the lever
3) build a gear and link the second bridge to the gear
4) link the lever to the gear
5) pull the lever again

It should, if I'm remembering it correctly, now work the way you want it to (only one open at a time).
Except you can't link anything to gears. You need a latch to transform the gear's state into a signal.