Bay 12 Games Forum

Please login or register.

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

Author Topic: Complex drawbridge mechanics  (Read 2064 times)

Haggoroth

  • Bay Watcher
    • View Profile
Complex drawbridge mechanics
« on: March 15, 2018, 10:19:37 pm »

So I have this idea, but I'm not sure it will work and I want to throw it out here:

I want to have two entrances to my fortress, one that is a 3 space wide caravan entrance with drawbridges on the same lever, while the other entrance is a 20 long, 2 wide tunnel that drawbridges line both sides and fold up against the walls of the tunnel.  I'm going to tunnel out like a 30z fall underneath this long tunnel.  Those drawbridges are on the same lever as the caravan route but opposite in that while one is down the other is up.

The 20 long tunnel is going to be the quicker route to my main hall.  The goal is that when a siege comes, I flip the lever, they pile up in the hallway and then I flip the lever again and they plummet to their doom.

Will this work?
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #1 on: March 16, 2018, 01:57:35 am »

- Why raising bridges rather than retracting ones, and why one on each side rather than just a row of 10 tile long two tile wide retracting bridges?
- Why would you want the kill drop on only one entrance and not on both (with separate levers)?
- "Shorter" probably won't work, as the longer tunnel will probably provide the shortest route from a lot of embark entry points.
- I'd have both tunnels open to access and only activate the drop when dropping siegers, and I'd flip the lever back again once it has dropped a batch of siegers.
- I don't think you can have a lever send an "on" signal to one device and an "off" to another. "On" sends an "on" signal (which does nothing if the target device is already "on"). It's possible to make inverters through additional hookups, although I've never done it, so it can be achieved.
Logged

Iduno

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #2 on: March 16, 2018, 03:34:16 pm »

- I don't think you can have a lever send an "on" signal to one device and an "off" to another. "On" sends an "on" signal (which does nothing if the target device is already "on"). It's possible to make inverters through additional hookups, although I've never done it, so it can be achieved.

Hook up device 1, flip switch, hook up device 2. One is always on, while the other is off.

Or better, an arbitrarily large series of switches connected to one or both bridges and also random floodgates in noble rooms.
Logged

Haggoroth

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #3 on: March 16, 2018, 03:35:57 pm »

- I don't think you can have a lever send an "on" signal to one device and an "off" to another. "On" sends an "on" signal (which does nothing if the target device is already "on"). It's possible to make inverters through additional hookups, although I've never done it, so it can be achieved.

Hook up device 1, flip switch, hook up device 2. One is always on, while the other is off.

Or better, an arbitrarily large series of switches connected to one or both bridges and also random floodgates in noble rooms.

Yes this is the functionality I hoped existed and was planning, but I hadn't tested yet.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #4 on: March 16, 2018, 05:00:56 pm »

- I don't think you can have a lever send an "on" signal to one device and an "off" to another. "On" sends an "on" signal (which does nothing if the target device is already "on"). It's possible to make inverters through additional hookups, although I've never done it, so it can be achieved.

Hook up device 1, flip switch, hook up device 2. One is always on, while the other is off.

Or better, an arbitrarily large series of switches connected to one or both bridges and also random floodgates in noble rooms.

Yes this is the functionality I hoped existed and was planning, but I hadn't tested yet.
And I don't believe it works. A lever sends open and close signals, not toggle signals. An example from my fortress is my prisoner atom smasher, where a pressure plate is used to raise the bridges and then close them again a while later (on top of the prisoners). However, that stalls in the open position occasionally when prisoners remain standing on the pressure plate, so I have an override lever. When the lever is pulled, nothing happens, because the bridges are already raised. When the lever is pulled a second time the bridges are closed (I keep the lever in the OFF position, so that's where it starts).
However, there are experts on the forum. We'll see if they will weigh in.
Logged

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #5 on: March 16, 2018, 10:13:09 pm »

However, there are experts on the forum. We'll see if they will weigh in.
I feel like you're about as expert as it gets over here  :P

Or, at least, you respond to almost every question, so I suppose you must be.

Anyway, the way you get around with the lack of toggle functionality is with an inverter/NOT gate -- basically turns an ON signal into an OFF signal, and vice versa. There are many different logic systems which you can use to accomplish this -- fluid, mechanical, and creature are the three big ones. Fluid one is simply a water source on one side of door (linked to the input signal) and a pressure plate that activates on 0-1 water with a drain on the other. When the door is closed, there is no water on the pressure plate, so it sends an ON signal. When the door is switched open, water flows onto the pressure plate, activating it. This is probably the easiest way to do it if you have an infinite water source like a river or cavern lake that is connected to the map edge on your embark.

In mechanical logic, you would have a loop of minecart track in a 3-wide, 2-long area. On the north square of track, you put an east-pushing roller; on the south square, a west-pushing roller. The north roller is connected directly to a power source; it will transmit power to the south roller as well. Put another east-pushing roller on the southwest square of track, and place a N/S axle on the northwest square of track, which will connect to this third roller. Place a gear assembly a tile to the north of the axle and connect it to a power source. Link this gear assembly to your input signal. Place a pressure plate that activates when a minecart rides over it on the northeast square of track; this will be your output. And finally, place a minecart on the north square of track. Make sure to restrict access to the area once it's finished to prevent dwarves from getting run over by the minecart.

I'm not a big expert on creature logic, so if you want to use that you'll have to do it yourself (or ask someone else on the forums), but it's probably the hardest method to use, so you're probably better off using one of the two above methods.
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

Haggoroth

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #6 on: March 16, 2018, 10:26:40 pm »

That is so much more work than it takes to just put in two levers.
Logged

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #7 on: March 16, 2018, 10:29:57 pm »

That is so much more work than it takes to just put in two levers.

Well, if you're a SISSY ELF, it is.  :P
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

Loci

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #8 on: March 17, 2018, 04:33:10 pm »

A lever sends open and close signals, not toggle signals.

This is quite true. However, it *is* possible to accomplish a single-lever control.

Most simply, a "single lever airlock" uses two bridges with reversed usability.

A more finicky design is to build the out-of-sync bridges as described by Iduno then pull the lever *twice* in quick succession for each activation. The first signal will be ignored by one bridge and trigger the other. The second signal will then be ignored by the already-triggered bridge and trigger the other. When done properly, the two bridges will both toggle and remain out-of-sync.
« Last Edit: March 17, 2018, 04:37:13 pm by Loci »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #9 on: March 18, 2018, 03:37:32 am »

A lever sends open and close signals, not toggle signals.

This is quite true. However, it *is* possible to accomplish a single-lever control.

Most simply, a "single lever airlock" uses two bridges with reversed usability.

A more finicky design is to build the out-of-sync bridges as described by Iduno then pull the lever *twice* in quick succession for each activation. The first signal will be ignored by one bridge and trigger the other. The second signal will then be ignored by the already-triggered bridge and trigger the other. When done properly, the two bridges will both toggle and remain out-of-sync.
Double pull ceased to work with any degree of certainty with the jobs rewrite back in 0.40.X, as dorfs now pull the lever once, walk away for 10 or so steps, then figures that they should take up a new job. Not only does it mean that the time it takes the dorf to return for a second pull may be too long, there is also a significant risk the second pull task has been taken up by someone down by the magma sea during the time the pull order has been "published" and the initial puller has been walking away.
Logged

Loci

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #10 on: March 19, 2018, 12:02:52 pm »

Double pull ceased to work with any degree of certainty with the jobs rewrite back in 0.40.X, as dorfs now pull the lever once, walk away for 10 or so steps, then figures that they should take up a new job. Not only does it mean that the time it takes the dorf to return for a second pull may be too long, there is also a significant risk the second pull task has been taken up by someone down by the magma sea during the time the pull order has been "published" and the initial puller has been walking away.

It worked in v0.44.07 when I tested it, but if you're having problems you can temporarily lock a door to keep the lever-puller from wandering off or switching jobs.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #11 on: March 19, 2018, 12:37:09 pm »

Double pull ceased to work with any degree of certainty with the jobs rewrite back in 0.40.X, as dorfs now pull the lever once, walk away for 10 or so steps, then figures that they should take up a new job. Not only does it mean that the time it takes the dorf to return for a second pull may be too long, there is also a significant risk the second pull task has been taken up by someone down by the magma sea during the time the pull order has been "published" and the initial puller has been walking away.

It worked in v0.44.07 when I tested it, but if you're having problems you can temporarily lock a door to keep the lever-puller from wandering off or switching jobs.
It usually doesn't work in my 0.44.05 fortress when activating the prisoner atom smasher override, but it isn't a problem that it takes a little longer as the victims are safely contained. Locking a lever puller in in anticipation of pulling frequently fails because the bugger decides there's nothing to do, and so goes to sleep on the floor, snoring loudly when you need that lever pulled...
In this case you can easily work around that by locking a door behind the puller that has two pull order on the lever (it will also block others from taking the second order, apart from blocking the original one from deciding it's time to harvest something).
Logged

Sanctume

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #12 on: March 19, 2018, 01:14:13 pm »

Can use both raising bridge and flood gate to toggle on the same lever.

According to the wiki, "The bridges work as inverted input as they block passage when receiving an on signal while floodgates open in that case."

Lever On = Bridge Raised (Block), and Floodgate Open. 
Lever Off = Bridge Down (Open), and Floodgate Close (Block). 

I would think that floodgates can be placed to be "indestructible" if it used to block from above, similar to hatches and grates. 


Have your 2-wide hallways be entered via 2 floodgates above 2 ramps.  And your trade depot path use a raising bridge.

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Complex drawbridge mechanics
« Reply #13 on: March 19, 2018, 03:48:34 pm »

You can use a retracting bridge to block a vertical passage.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Sanctume

  • Bay Watcher
    • View Profile
Re: Complex drawbridge mechanics
« Reply #14 on: March 19, 2018, 04:13:47 pm »

You can use a retracting bridge to block a vertical passage.

True, but OP wanted to use 1 lever to keep 1 passage open while the other closed
Pages: [1] 2