Bay 12 Games Forum

Please login or register.

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

Author Topic: Advanced logic for triggering and stopping a magma trap  (Read 1604 times)

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Advanced logic for triggering and stopping a magma trap
« Reply #15 on: October 24, 2017, 02:24:03 pm »

I have some unpleasant news. We should have consulted the wiki about how bridges behave with regards to signals:

Bridge
On: Turns the bridge into either a raised drawbridge, or a retracted bridge, depending on which option was chosen when the bridge was constructed.
Off: Returns the bridge to normal.

This means, whenever the minecart drops on the pressure plate, this pressure plate sends the ON signal which makes my magma bridge raise (which it is)

How could we negate this whole thing? I need a trigger a signal which would lower a raised bridge.

Yes, but 100 ticks later it sends a "close", lowering the bridge. You would have to use the lever linked to the bridge to reset it.
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.

Nagidal

  • Bay Watcher
    • View Profile
    • My gaming channel
Re: Advanced logic for triggering and stopping a magma trap
« Reply #16 on: October 24, 2017, 03:54:22 pm »

Yes, but 100 ticks later it sends a "close", lowering the bridge. You would have to use the lever linked to the bridge to reset it.

The pressure plate sends OFF 99 ticks after the pressure criteria are no longer met. The criteria will no longer be met after my dwarves will feel like removing the minecart. And after this it is another 100 ticks before the bridge really lowers.

I could probably speed this up by dropping the minecart on a ramp from which it would accelerate and drive over a pressure plate. Such pressure plate would be released very quickly. Even if it would be released the very next tick, it is still slow:

Tick 0: hatch under minecart opens
Tick 1 minecart lands on ramp, accelerates down the ramp
Tick 2 minecart depresses pressure plate, pressure plate sends ON
Tick 3 pressure plate is released
Tick 102 Pressure plate sends OFF
Tick 202 Bridge lowers

I thought we could lower the bridge in just above 100 ticks.

I think my only option to speed this up is to ditch all this fancy logic and go with what you suggested earlier: Rebuild the trap so that magma is held on top of a retracting bridge. The pressure plate which the goblins step on will trigger the retracting bridge directly. Such bridge will release the magma 100 (or 101) ticks after trigger.
Logged
I stream most of my DF sessions: gaming.youtube/nagidal146, they are archived on my youtube channel. (Dwarf Fortress Tutorials)

taptap

  • Bay Watcher
    • View Profile
Re: Advanced logic for triggering and stopping a magma trap
« Reply #17 on: October 24, 2017, 04:43:39 pm »

I believe navigating the topic would be easier if we all agree to talk about ON / OFF signals. Whether an ON signal corresponds with an open or closed path (for magma in this case) depends on
the FURNITURE = type of bridge in this case. Try ff's setup with a retracting bridge, that is a clean and easy way. A minecart, a pressure plate and two hatches is minimalist. If this is fancy logic for you then, well, bye.
« Last Edit: October 24, 2017, 05:14:09 pm by taptap »
Logged

Nagidal

  • Bay Watcher
    • View Profile
    • My gaming channel
Re: Advanced logic for triggering and stopping a magma trap
« Reply #18 on: October 25, 2017, 01:35:40 am »

It looks like we've been all victims to an XY problem here.  :-[

What I actually wanted is that enough magma is released to kill pretty much the whole siege (presuming that they are neatly spread on the switchback path below the magma reservoir).

I have almost no experience with pressure plates. I falsely implied that when they open hatches instantly, any bridges which are linked to a pressure plate would also magically open and close instantly. That's why I thought I need a solution for preventing the bridge to close the very moment a goblin leaves the pressure plate.

I did not know that pressure plates themselves have an inherent 99 tick latency before they send the OFF signal and that bridges, even when linked to pressure plates, retain their own 100 tick latency on top of that.

Then there was bloop_bleep who confused us with "[the pressure plate] sends an 'open' signal to the retracting bridge, which does nothing since it's already considered 'open.'". A retracting bridge actually behaves in accordance with the pressure plate signal names. The open or close signal actually opens (retracts) or closes (extends) the bridge, just like it opens or closes a door or a floor hatch. However, a raising bridge raises (closes) when it receives the open signal and lowers (opens) when it receives the close signal.

Code: [Select]
                   Signal name       Signal name       Delay
                   Lever: ON         Lever: OFF        instant
                   Plate: OPEN       Plate: CLOSE*     *99 ticks to send CLOSE

Door               opens             closes            instant
Hatch              opens             closes            instant
Floor hatch        opens             closes            instant
Floodgate          opens             closes            100
Grate              opens             closes            100
Bars               open              close             100
Upright spikes     extend            retract           40
Retracting bridge  retracts (opens)  extends (closes)  100
Raising bridge     raises (closes)   lowers (opens)    100
Gear assembly      toggles           toggles           instant
Track stop         disable           enable            40

To end on an up note I can say that Fleeting Frames has taught me some minecart logic, taptap some fluid logic, bloop_bleep came with a solution which will hopefully work good enough for me, and all in all I learned a lot about signals, pressure plates and moving parts in trap design.  :)
« Last Edit: October 25, 2017, 01:45:02 am by Nagidal »
Logged
I stream most of my DF sessions: gaming.youtube/nagidal146, they are archived on my youtube channel. (Dwarf Fortress Tutorials)

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Advanced logic for triggering and stopping a magma trap
« Reply #19 on: October 25, 2017, 01:56:40 am »

Maybe forgot about the aim, maybe conflated with retracting bridge.....Whoops? I've got to admit, a trap that only lets goblins through and kills everything else is somewhat amusing.

Now, well, if your walking area is too quick (less than 20 tiles), OFF signal relay (that you posited correctly) isn't going to work.

With raising bridges, there's the option to briefly mark them for deconstruction to make them fluid passable. Still need an On signal, followed by wait and then off signal, but it's delightfully direct.

bloop_bleep

  • Bay Watcher
    • View Profile
Re: Advanced logic for triggering and stopping a magma trap
« Reply #20 on: October 25, 2017, 02:26:36 am »

Ah. See, I thought you wanted the bridge to open when the first goblin steps on the pressure plate and only close when you pull the lever.

Though I admit that I didn't fully understand everything you were saying, and made some assumptions to fill in the gaps. My apologies for lending more confusion to the problem.
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.
Pages: 1 [2]