Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Air Locks...?  (Read 1696 times)

Air Locks...?
« on: March 18, 2013, 11:08:07 pm »

I know I have done this before, on the same version even, but I am having trouble with this for some reason. If I build a bridge, then link it to a lever and pull the lever, then connect the lever to another bridge, the first bridge should open when I close the second, with 1 lever. I've done this many, many times before, but this current fort is not having it. When I connect the second bridge and then pull the lever, it just closes the second bridge. Pulling it a second time, closes both bridges and they become in sync with each other, both opening or both closing when pulling the lever.
Logged

Torrasque666

  • Bay Watcher
    • View Profile
Re: Air Locks...?
« Reply #1 on: March 19, 2013, 12:41:51 am »

I struggled with this once. Then someone suggested using floodgates for one side instead.
Bridge(OFF)=Lowered, traversable (ON)= raised, blocking
Floodgate(OFF)=Lowered, blocking (ON)=raised, traversable

Using them will cause them to easily switch sides, and you save a mechanism for a total of 5 instead of 6

scratch that, you actually might waste mechanisms here, since floogates are only one tile wide.
Logged
BOOM FOR THE BOOM GOD!
LOOT FOR THE LOOT THRONE!

You seem to be under the impression that we're playing some game other than dwarf fortress. It doesn't matter how powerful you make a creature, we will find a way to destroy it. God is dead, and Urist killed him.

gchristopher

  • Bay Watcher
    • View Profile
Re: Air Locks...?
« Reply #2 on: March 19, 2013, 12:42:25 am »

That shouldn't work the way you describe it. A lever sends either an open signal or close signal when pulled once, depending on the state of the lever.

The only way I understand to make that work is, once the lever is connected to one raised and one lowered bridge, always order the lever to be pulled twice.

A bridge has a 100-tick response time, so if the lever is pulled twice in under 100 ticks, it will send both a raise and lower signal. One bridge will not yet be lowered, so should ignore the raise signal. The other will likewise ignore the lower signal.
Logged
Re: Air Locks...?
« Reply #3 on: March 19, 2013, 03:50:44 am »

I struggled with this once. Then someone suggested using floodgates for one side instead.
Bridge(OFF)=Lowered, traversable (ON)= raised, blocking
Floodgate(OFF)=Lowered, blocking (ON)=raised, traversable

Using them will cause them to easily switch sides, and you save a mechanism for a total of 5 instead of 6

scratch that, you actually might waste mechanisms here, since floogates are only one tile wide.

I was actually doing this for my prisons (using floodgates as the prison doors so they won't close if a dwarf is on them, but the gate blocking off the entire prison block was a bridge) and the same issue was happening.

@gchristopher: I don't know what they are *supposed* to do, but I do have another fort, in a different generated world, that has air locks like this.
Logged

Psieye

  • Bay Watcher
    • View Profile
Re: Air Locks...?
« Reply #4 on: March 19, 2013, 05:56:33 am »

One way of doing this would be to always double-pull your levers - then you catch the changing bridge in-transit so it ignores the second signal. But I prefer to just have bridges that have inverse roles to their ON/OFF switch: i.e. a bridge that denies entry when 'open' and allows entry when 'closed', using a ramp.
Logged
Military Training EXP Analysis
Congrats, Psieye. This is the first time I've seen a derailed thread get put back on the rails.

Broken

  • Bay Watcher
    • View Profile
Re: Air Locks...?
« Reply #5 on: March 19, 2013, 06:01:53 am »

Levers normally have an "on" and an "off" state, seen as whether the small tag at the top of the lever is to the left ("off" state) or the right ("on" state). Upon being pulled, the state of the lever changes, and everything they're connected to updates to the corresponding state of that lever, and does not just change states ("toggle"). This becomes important if you have several levers attached to the same device, or one trigger attached to several systems.

    Example: 2 levers (both in "off" position) are connected to a drawbridge. After pulling the first lever, the bridge will lift. Pulling the second lever tells the bridge to "open", which it already has done - no visible effect. When it is pulled a second time it will let the bridge down. This in turn requires the first lever (still in "open/lift" position) to be pulled twice to trigger a change (lift again), and so on.


You can use a Retractile bridge and a raising one to make a perfect, single lever airlock:

  Side View:
  Z1    XXXXXXR____      D = Raising drawbridge   / = Ramp   _ = Floor
  Z0    D_____/XXXX      R = Retracting bridge    X = Solid Rock or Constructed Wall

When one is closed (raised) the other is open (retracted) and vice versa.
« Last Edit: March 19, 2013, 06:04:20 am by Broken »
Logged
Quote
In a hole in the ground there lived a dwarf. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a dwarf fortress, and that means magma.
Dwarf fortress: Tales of terror and inevitability

MDFification

  • Bay Watcher
  • Hammerer at Law
    • View Profile
Re: Air Locks...?
« Reply #6 on: March 19, 2013, 08:16:17 am »

I think it's still possible to do with multiple levers. A single lever though will no longer work.

The floodgate thing is a good idea though. I think that a Bridge's On state is raised or retracted, but a Floodgate's on state is open. (This is just going from the fact that when you counstruct a floodgate it's closed, but when you construct a bridge it's lowered/extended.

Another potential solution is to use pressure plates that only activate for civilians rather than levers. That way when your citizens approach the bridge, it lowers. They then cross the bridge, raising it again. Of course, this causes a ton of problems with pathing. I suspect dwarfs won't path through the obstacle, even though moving towards it removes it. Still, if you could figure out how to use pressure plates right (for example, a heavily trapped other entrance that as they moved towards opened the gate, allowing them to cross the gate and close the entrance again) you won't have to micromanage every time a dwarf wants to go outside.

EDIT:

I think a system like this could work:
(X = Floodgate, P = Pressure plate, # = Wall, ^ = trap)


#  #### #
#P XPPXP#
#  #### #
# ^^^^^#
#######
« Last Edit: March 19, 2013, 08:22:13 am by MDFification »
Logged

vanatteveldt

  • Bay Watcher
    • View Profile
Re: Air Locks...?
« Reply #7 on: March 19, 2013, 08:47:54 am »

It is still possible with one lever, but requires more work....

see http://dwarffortresswiki.org/index.php/DF2012:Computing and especially http://dwarffortresswiki.org/index.php/DF2012:Fluid_logic#NOT

Assuming you have a river, you can set a bridge on a side channel to open together with your outer airlock bridge, which then activates a pressure plate that closes your inner airlock bridge. If you close the outer bridge, the river bridge closes and a floodgate opens to let the water out a drain, which then releases the pressure plate and opens your inner bridge.
Logged

vjek

  • Bay Watcher
  • If it didn't work, change the world so it does.
    • View Profile
Re: Air Locks...?
« Reply #8 on: March 19, 2013, 09:04:04 am »

A  gear-driven two-pressure-plate newtons cradle would also work, and be extremely fast (as in, react within 1 tick).

It could also react to citizens or not, and be fully automated.  I used such a system to drive a sump-pump drain/fill system, whereby if a room wasn't being filled, it was being emptied.  Worked perfectly.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Air Locks...?
« Reply #9 on: March 19, 2013, 09:37:54 am »

A perfect airlock will mess with liaisons and other visitors who need to path to a meeting. You can remedy this either by making your meeting-dwarf enough of a badass to stay in the airlock and swat aside any unwelcome visitors, or by using hatches in place of the retracting bridge. This will create a 100-tick window in which both sides of the airlock are open, so you should either burrow your dwarves or plan the layout so that nobody has any reason to be within 100 ticks of the hatches*.

This will make the liaison run for the fortress until they bash their head against the now-closed hatch, at which point they will be in the airlock.

*Assuming that speed calculatations haven't changed since 40d and the wiki is correct, and also that my maths is correct, Displayed Speed = 1,000,000 / (Raw Speed+100) and so Raw Speed = (1,000,000/Raw Speed) - 100. With the default values, the maximum Agility a normal dwarf can reach is 3000, for a raw speed of 233.3... (for comparison, ravens have a raw speed of 400). A dwarf moving at this maximum waits two ticks to move, with a 33.3... % chance of waiting a further tick to move. In 100 ticks, it will cover anywhere from 33 to 50 tiles, the average being 44 tiles.

Edit: I think that's right now, though that average seems on the high side.
« Last Edit: March 19, 2013, 09:47:54 am by Sutremaine »
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

MDFification

  • Bay Watcher
  • Hammerer at Law
    • View Profile
Re: Air Locks...?
« Reply #10 on: March 19, 2013, 01:38:23 pm »

Looking back at my design, it won't work. A version with only one floodgate does work, but two floodgates doesn't path properly.

What are you using your Airlock for? Do you just want to use it to prevent outside access to your fortress? If so, a goblin grinder style trap works just as well. If you're using the airlock in a literal sense to block miasma you can just use two doors with a space between them.
Logged

krenshala

  • Bay Watcher
    • View Profile
Re: Air Locks...?
« Reply #11 on: March 19, 2013, 08:25:13 pm »

I thought this was done with two bridges, one lever and a gear between the lever and one of the bridges?

(IIRC) Lever, gear and both bridges.  Link lever to gear. Link Lever to Bridge A.  Pull Lever.  Link gear to Bridge B.  Pull lever and watch both bridges change positions.  Repeat last step as needed.

This, of course, doesn't deal with the aspect of needing a path to the expedition leader/meeting area for liaisons and such.  It should deal with the airlock itself, however.
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!"

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Air Locks...?
« Reply #12 on: March 20, 2013, 08:11:15 am »

You can't link a gear to anything but a lever.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.