Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Design: Dwarven Deadman's Switch  (Read 2569 times)

Halykan

  • Bay Watcher
    • View Profile
Design: Dwarven Deadman's Switch
« on: June 18, 2010, 01:14:07 pm »

After noting the idea cropping up in this thread I gave some thought to how you'd actually build such a device. The idea, in short, is a lever which the dwarves have to keep pulling to prevent some catastrophe from occuring.

This is what I came up with.


Basically, you have a pump feeding the "fill tank" from the "water in" tile - said tank can have any geometry you want really. It exists purely to hold water, and has only two necessary features: it drains through a floodgate at the bottom into the drain tank, and the highest point in the tank is adjacent to a 1x1 room with a pressure plate in it. More on that later.

The drain tank itself contains another pressure plate, and a hatch (or alternately, another floodgate) through which water exits the system. I suggest a hatch just to make things go smoothly but it's probably not necessary.

Technically, this could be a closed system (the water out loops back to water in) but that always has the potential to get weird, and also requires a fair bit of calculation. You may also have to calibrate it in that case, as it's hard to predict ahead of time how much water might lounge around in the drain tank.

The lever in question is connected to both the floodgate and the hatch. The floodgate begins closed, the hatch begins open - when the lever is pulled, the drain tank begins to fill. The drain plate is triggered once the water level reaches a certain height, and the floodgate and hatch are returned to starting position. Basically all that means is that the drain tank is used to take measured amounts of water out of the fill tank, identical for each lever pull.

The output plate at the top of the fill tank is only triggered if the tank fills completely and water spills over into the plate's room. You can set it for any degree of sensitivity you like, but I'd probably use 3/7 or more just to be sure nothing strange happens.

That's the basic design. The the amount of total time it takes for negligence of the lever to trigger the output is based on the absolute size of the fill tank, and the amount of extra time granted (related to how frequently the lever needs to be pulled) is proportional to the relative volumes of the fill and drain tank i.e. the larger the drain tank's percentage of the fill tank's size, the less often the lever must be pulled.

There's one wrinkle in the system, which is this scenario: imagine Urist comes along and pulls the lever. The drain room begins filling, but before it's finished a whole fill/drain cycle, Cog comes along and pulls the lever again. This interrupts the process. It doesn't break anything per se, but it makes the whole thing a bit less elegant, and also removes the equal weight of each lever pull.

The way most of the fluid logic guys would fix this is probably with a latch; they'd create a stored memory bit that the lever triggers to the "ON" position and which gets reset to "OFF" when the drain cycle finishes. While it's pretty awesome that that can be done, I think there's a simpler way to handle it in this particular case without having to resort to true logic systems.

X = wall
+ = floor
D = door
L = lever
P = pressure plate
Code: [Select]
XXXXX
XXLXX
PD+D+
XXXXX

Basically, the door on the right is the "in" door. The left door is the "out" door. Initially, the in door is unlocked. A dwarf enters the in door and pulls the lever. The lever toggles both doors - now the out door is open, and the in is locked. He leaves through the out door, and the pressure plate outside the out door locks it behind him. Effectively this bars any further input (lever pulling) until the drain cycle finishes and unlocks the in door again.

So, with that out there - does anyone have some good suggestions on how to employ this delightful invention? Or has anyone noted some problems in the design which might allow for unfortunate accidents? I do know that this design relies on the output plate being on the same z level as the pump and that pumps still pressurize water up to their own z level. I'm told that latter half is a bug (by the wiki) but that seems unlikely to actually be a bug.
Logged
If you don't remember whether the lever will collapse half the fortress, flood it with magma, flood it with water, flood it with water THEN magma, or kill the invaders, you pull it and hope you take the god damned goblins down with you
clicky

Hyndis

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #1 on: June 18, 2010, 01:29:28 pm »

Easy way is to have your fortress flooding by default. At the bottom of your fortress have a large number of drawbridges linked to a lever so that they crush the water into oblivion. Put the lever on repeat.

So long as the lever is being pulled the water will be crushed before it can flood. Have the water pour down a shaft from the surface first, then travel through the crushing room. If the crushing room fills up it will then spill into your fortress, drowning everyone.

If there are no dwarves to pull the lever, or if the lever gets destroyed, then there is no way to prevent the water from flooding your fortress.
Logged

Halykan

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #2 on: June 18, 2010, 01:41:57 pm »

Easy way is to have your fortress flooding by default. At the bottom of your fortress have a large number of drawbridges linked to a lever so that they crush the water into oblivion. Put the lever on repeat.

So long as the lever is being pulled the water will be crushed before it can flood. Have the water pour down a shaft from the surface first, then travel through the crushing room. If the crushing room fills up it will then spill into your fortress, drowning everyone.

If there are no dwarves to pull the lever, or if the lever gets destroyed, then there is no way to prevent the water from flooding your fortress.

That's a specific instance sure. What I was trying to construct though is a deadman's switch that can theoretically be hooked up to anything.
Logged
If you don't remember whether the lever will collapse half the fortress, flood it with magma, flood it with water, flood it with water THEN magma, or kill the invaders, you pull it and hope you take the god damned goblins down with you
clicky

JmzLost

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #3 on: June 18, 2010, 02:05:41 pm »

I'd probably replace the drain tank with a floodgate to atom smash the water.  Perhaps the entire bottom of the fill tank could be floodgates.  Mainly because I'd almost certainly mess up the linkages somewhere if I went for a complex drain system.

Also, I don't think levers toggle doors.  If you connect 2 doors to 1 lever, both doors will open and close together.  It might work if you hook the doors to a pressure plate in the drain, so when the drain is empty the doors are open, and as soon as there is water in the drain the doors close.

As far as something to hook the DeadDwarf switch to, simply placing the fill tank at the top of your fort and letting it overflow to drown everyone would be a start.  Link the output plate to a stack of pumps that draw the magma sea up to the surface, without any safeguards to prevent flooding your fort.  Link it to a support holding a floor that covers the entire map, 10 z-levels above everything, and dig out every tile of every z-level, see if you can collapse your entire fortress into the magma sea.  Link to a group of cages holding forgotten beasts, undead whales, elephants, whatever.  Bonus points for a pit of living creatures that can breed (elephants, hippos, etc).

JMZ
Logged
Also, obviously, magma avalanches and tsunamis weren't exactly a contingency covered in the mission briefing.
I can assure you that Ardentdikes is not the first fortress to be flooded with magma. What's unusual is that we actually meant to flood it with magma.

Hyndis

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #4 on: June 18, 2010, 02:29:44 pm »

You're going to need liquids either way, either magma or water. Water is easier to use since your source can be a simple brook, whereas with magma you do need a lot of pumping. You need to get the liquid higher than the highest inhabited level of your fortress. With water you can just use gravity to do that.

Regardless of the liquid, an atom smasher holding the flood back would work to keep the fortress dry. If the atom smasher is interrupted somehow, such as no dwarves to pull the lever or the lever gets destroyed, then nothing can stop the flooding. As a bonus the atom smasher can also smash your garbage.

If you don't want death by flooding, use the same setup but make it so that if liquid gets through to 7/7 on a pressure plate it will lower a bridge, opening up FUN onto your fortress.

An imprisoned BC would work for this, held back by a drawbridge forming a wall. Lower the the bridge and the BC is now free. Or you can dig into adamantine, unleash hell, and have it held back by only a drawbridge. Drawbridge lowers, allowing them access to the fortress.
Logged

Shrike

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #5 on: June 18, 2010, 04:43:58 pm »

well, what about pressure plates and animals wandering around? put a fortification on it and a destroyable door, and the moment something gets in deep enough to kill the animal, the defenses kick in.
Logged

Hyndis

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #6 on: June 18, 2010, 04:46:31 pm »

well, what about pressure plates and animals wandering around? put a fortification on it and a destroyable door, and the moment something gets in deep enough to kill the animal, the defenses kick in.

If its just one animal it will eventually die of old age. If its multiple animals then they will just keep on reproducing, and never die.

Also if you're relying on 7/7 water to trigger the mechanism, why not just make the pressure plate trigger when there is 7/7 water?
Logged

Shrike

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #7 on: June 18, 2010, 06:44:34 pm »

Well, might be a good idea to have a lever you can toggle to stop the problem while you replace the animal.
Logged

denito

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #8 on: June 18, 2010, 07:31:14 pm »

Wow this is a really ingenious idea.  To think of all the times I've been about to be overrun by goblins, and I'm about to trigger a wonderful fortress-ending self destruct to take the goblins out with me, and then no one is around to pull the lever?  Halykan has made a crucial insight:  it takes time to make a dwarf pull a lever and he might not make it, but making ordering to not pull a lever is much faster and guaranteed to succeed.  Brilliant, totally brilliant!

Edit:  It looks like Kogan Loloklam suggested the idea in the original thread.

You have to remember Murphy's law though:  the first tantrumming dwarf will smash the dead-dwarf switch lever.  "Urist!  You fool!  You've killed us all!"

It might be a good idea to keep a back-up dead-dwarf lever in a walled-off room.  Especially for those systems which depend on atom smashing water or magma to keep it from filling the fort.  Hard to hook those sort of things back up once the lever's gone you know.
« Last Edit: June 18, 2010, 07:43:14 pm by denito »
Logged
My wife: "Are you playing that midget fort game again?"

Avaline

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #9 on: June 18, 2010, 08:26:20 pm »

To note, Hyndis' pressure plate idea would work well for this deadman's switch.  I'm not sure if atom smashers smash traps but if so then something like this will work.
R = River (or other water source)
M> = Water Pump (arrow = direction)
O = open air
W = wall
B = Bridge
P = Pressure Plate
F = Floor

Above floor
RR M> OO
RR       WO
RRWWWWW
RR           <M
RRWWWWWW

Middle floor
RR WW BB
RR WW WP
RR WWWWW
bottom floor
WWWW FF
WWWW FF

Idea:  A pump contuously pumps water from a water source (like a river) into a pit of any depth.  The floor of the pit is a grate or retracting drawbridge with one regular floor containing a pressure plate set to 7/7 water (if your pit is mulitple floors deep, set the plate to be just 1 floor below the top so that everything else has to fill before the water reaches the plate). 

The grate drawbridge is linked to a DIFFERENT pressure plate in the fort set to trigger on a dwarf standing on it.  That plate is next to a lever that does nothing useful (well, nothing linked to this plan).  The lever is just to get a dwarf to go to the plate on command.

Below the bridge is another pit the same size as the one above it. 

Normal days:

Water is pumped into the upper pit to try to fill it.  A dwarf, meanwhile, is regularly told to pull the lever, causing him/her to step on the fortress plate.  The plate opens the grates/bridges and dumps the water into the bottom pit.  Not shown is a way to pump that water from the bottom regularly: doesn't matter how (stacked automatic pumps to push it into the water source, push the water into magma for an obsidian farm.  Flood the ground to harass the wildlife)


Deadman:

If no dwarf goes to land on the fortress plate, the water fills until the pit plate activates.  The plate activating causes..well..whatever you want to happen to happen.  Fun to escape, cave ins, magma waves.  Myself, I plan to have a fully automated Tower that you have to travel through to get into the fortress.  The deadman switch will keep the system OFF so that migrants/merchants/whatever can get in (though after traveling a LONG way through the tower maze).  On an attack, the dwarves will be burrowed, meaning the Deadman switch will activate and the Tower will Wake up, bringing traps and other bits of Fun for all until I let the dwarves free to deactivate it (note that even once activated, one press of the fortress plate will let the water escape and turn the thing off.)


Alternative Switches:

Mindless Switch:

Pressure plate on the main corridor or a dining room.  That way the fortress plate is CONSTANTLY pressed unless you are in Burrow mode.  For the sadistic, set the Deadman to your 'fortress killer' so that if the dwarves become so inactive that they stop going to that spot naturally (i.e. massive deaths or tantrum spiral) then they are deemed 'beyond hope' and things end in a spectacular way.

"Work or ELSE" Switch:

This setup:

77
M^
VM
OP

Two pits, two pumps (one auto, one manual), enough water to fill one pit. One pit with a pressure plate set to 7/7 water. 

The pit with the plate is linked to the drawbridge.  The manual pump pumps water into that pit.  The Automatic pulls water FROM that pit.  Thus, a dwarf has to constantly pump water to keep the Deadman switch going, though they have some time before it actually activates. 

For more evil, use ONLY the two-pump switch and have the pit plate set to 2/7 and have THAT be the Final switch.  Then it's a real deadman switch: stop pumping for more than a few seconds and it's over.  Plan on having a good few dwarves keeping everything alive for this one ;).



Logged

monk12

  • Bay Watcher
  • Sorry, I AM a coyote
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #10 on: June 18, 2010, 09:45:05 pm »

Has anyone given this a field test yet? I'm a few bugfixes behind, but if the situation arises that a dwarf ignores sleep, booze, and food in favor of his current job, it could mean either that any dwarf who ends up with the lever pull task will eventually die, or it could mean that the aforementioned dwarf could get so miserable they tantrum. With Fun results.

I'd also like to know how rough this is on FPS before devoting the resources to give it a go. If someone can devise a method that does not involve fluids (animals, maybe?) I would be most interested.

Most interested indeed.

Avaline

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #11 on: June 18, 2010, 09:51:08 pm »

Well, if you use my Mindless Switch alternative then you won't need to worry about a lever: just make sure the fortress plate is in a busy location. 

As for the FPS, it's really just a simple pump for the most part.  If you use the design I wrote up, you could use a regular pool instead of a river so that there's not much water overall being moved around.  It shouldn't be too bad.
Logged

Talfryn

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #12 on: June 19, 2010, 12:45:10 am »

Well, if you use my Mindless Switch alternative then you won't need to worry about a lever: just make sure the fortress plate is in a busy location. 

As for the FPS, it's really just a simple pump for the most part.  If you use the design I wrote up, you could use a regular pool instead of a river so that there's not much water overall being moved around.  It shouldn't be too bad.

Good idea, but if you ever move meeting halls you are screeewed.
Logged

Jake

  • Bay Watcher
  • Remember Boatmurdered!
    • View Profile
    • My Web Fiction
Re: Design: Dwarven Deadman's Switch
« Reply #13 on: June 19, 2010, 05:20:38 am »

If you need somewhere to dump the water that isn't an exploit, why not use the fact that the caverns have a path off the map edge? Or the magma sea/Funhouse, for that matter.
And it occurs to me that this would be one way to make reclaims considerably easier, as long as you include a drainage system of some sort linked to a walled-in lever on the surface somewhere. I believe the game bases the number of nasties lurking in the depths on the amount of useable space, so if nearly all the fortress is flooded you should only find a handful of nasties to fight off.
Logged
Never used Dwarf Therapist, mods or tilesets in all the years I've been playing.
I think Toady's confusing interface better simulates the experience of a bunch of disorganised drunken dwarves running a fort.

Black Powder Firearms - Superior firepower, realistic manufacturing and rocket launchers!

albatross

  • Bay Watcher
    • View Profile
Re: Design: Dwarven Deadman's Switch
« Reply #14 on: June 19, 2010, 10:20:19 am »

I suppose in theory this design could be used as a defense mechanism near the entrance of the fort to flush away intruders. Or, say, a magma man. Not that I have anything more specific in mind. Though it could be tricky to implement this... deaddwarf's switch. Oh, try to get a dwarf engrave "4, 8, 15, 16, 23, & 42" somewhere near the lever <.<
Logged
Pages: [1] 2