Bay 12 Games Forum

Please login or register.

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

Author Topic: Help me understand machinery and triggers  (Read 2844 times)

TinyPirate

  • Bay Watcher
    • View Profile
Help me understand machinery and triggers
« on: August 22, 2012, 05:45:42 pm »

I have studied the wiki but I am not sure I understand how things precisely work. So, some scenarios and questions.


1) a door is hooked up to a pressure plate. When triggered, the door opens.
2) a lever is hooked to the door, pulled to open it
3) a second plate is hooked to the door
4) question: when second plate is triggered, the door will close?

I suspect not, due to ON and OFF signaling nature of plates.

So how would you create a system such as...

==v==[]==v==

V is plates
[] is door
= is track

One wants a cart to trigger the door to open, letting the cart through, and the second plate to trigger, closing the door behind the cart.

I want a row of plates, across a hallway, to trigger a single thing. I understand I should use a logic gate to take any single input from any plate to cause the trigger I want but I am not sure how. I guess I am concerned that subsequent trigger events will mess things up somehow.

DF engineering is amazingly addictive!

(ps. I am designing a multi-shot fully automated DF Blunderbuss - the only dwarf interaction is loading the three carts and pushing the cart into the blunderbuss's "magazine")

Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: Help me understand machinery and triggers
« Reply #1 on: August 22, 2012, 06:44:01 pm »

The door will close itself after a period of time. As the pressure plate is depressed, it opens the door. ~100 ticks after the cart leaves the pressure plate, it resets, sending a 'close' signal to the door.
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.

Kaos

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #2 on: August 22, 2012, 08:39:34 pm »

in other words, you don't really need the second plate after the door, the first plate will do just fine, cart steps on plate, door immediately opens, after the cart leaves the tile where the plate is it will untrigger on it's own in 100 ticks and the door will close

the tricky part would be if you want to make sure the door is only open just long enough to let the cart by and closes immediately after, to make sure it closes immediately after you need to calculate how many tiles the cart can go through in the 100 ticks period between the cart leaving the tile with the plate and when it reaches the tile where the door should go.

for instance if the cart moves at a rate of 1 tile per 10 ticks (just an example, this varies depending on the speed of the cart) after it leaves the tile where the plate is it will be able to move through 10 tiles before the signal closes the door, so if you put the door at the 10th tile the cart will be able to move through the tile while the door is still open and after it leaves that tile the door will close immediately.

TL;DR: pressure plates latch.
« Last Edit: August 22, 2012, 08:41:49 pm by Kaos »
Logged

TinyPirate

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #3 on: August 23, 2012, 11:56:19 pm »

Thanks for that! Kinda obvious really!
Logged

rhesusmacabre

  • Bay Watcher
  • UNDEAD-CANNOT BE ATTACKED
    • View Profile
Re: Help me understand machinery and triggers
« Reply #4 on: August 24, 2012, 02:56:27 am »

I want a row of plates, across a hallway, to trigger a single thing. I understand I should use a logic gate to take any single input from any plate to cause the trigger I want but I am not sure how. I guess I am concerned that subsequent trigger events will mess things up somehow.

There are several ways of doing this but, for the most elegant solution, I suggest you look at Bloodbeard's recent work, particularly this one:
How this works is I got 2 carts, a copper one at the top and an iron one in the center. A copper cart weighs 357 Urists and an iron cart 314 Urists. The pressure plate in the center is set to activate at 350 Urists, so the iron cart doesnt trigger it. Like the other double-carted design you activate the gear/roller (this time the light green one), making the copper cart push the iron cart to the other end before rolling onto the pressure plate and triggering it. Then visa versa (the iron cart will push the copper cart just fine even though it's a little bit lighter). This design is more compact than the other memory cell and as far as I can determine is best possible with the current game mechanics.

If your row of plates are all set to switch the top gear, the heavier copper minecart will be pushed onto the plate in the device as soon as any corridor plate is activated, triggering whatever you wish to be triggered. Any subsequent movement in your corridor will have no effect on the carts, as neither is now on the roller connected to the top gear. You can reset the system with a switch connected to the bottom gear (which will have to be switched twice to make sure the bottom roller is off. It would be possible automate this double-switch).
Logged

TinyPirate

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #5 on: August 24, 2012, 03:21:44 am »

Yes, his work is brilliant, thanks for reminding me! I'm using his "memory cell" for another part of my construction, it should work for my trigger as well.
Logged

TinyPirate

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #6 on: August 28, 2012, 09:44:11 am »

If you have...

(power)-->(gear1)(gear2)(rollers)

...and you flip gear 2 to be on, and then trigger gear, the rollers will get a signal, right? Or does toggling a gear without any power through to it do nothing? If I turn both on at the same time, I know that works, but just had problems with the above configuration not working as I had expected.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Help me understand machinery and triggers
« Reply #7 on: August 28, 2012, 10:12:48 am »

If you have...

(power)-->(gear1)(gear2)(rollers)

...and you flip gear 2 to be on, and then trigger gear 1, the rollers will get a signal, right? Or does toggling a gear without any power through to it do nothing? If I turn both on at the same time, I know that works, but just had problems with the above configuration not working as I had expected.
The rollers will be powered, yes. Toggling a gear does not require the gear to actually be powered at the time.

Also, remember that gears are special in that they are the only machines that actually toggle regardless of the type of signal they are given - if you link a lever to a gear assembly, pull it, then remove the lever, you will effectively be left with a gear assembly that is "off" by default instead of "on" by default, something which does not work with anything else.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Reese

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #8 on: August 28, 2012, 03:06:01 pm »

If you have...

(power)-->(gear1)(gear2)(rollers)

...and you flip gear 2 to be on, and then trigger gear 1, the rollers will get a signal, right? Or does toggling a gear without any power through to it do nothing? If I turn both on at the same time, I know that works, but just had problems with the above configuration not working as I had expected.
The rollers will be powered, yes. Toggling a gear does not require the gear to actually be powered at the time.

Also, remember that gears are special in that they are the only machines that actually toggle regardless of the type of signal they are given - if you link a lever to a gear assembly, pull it, then remove the lever, you will effectively be left with a gear assembly that is "off" by default instead of "on" by default, something which does not work with anything else.

Which is a really nice feature for the purpose of making a pressure plate that turns ON one pump and turns OFF another pump (say, the pump that keeps your main hallway empty of water and the pump that floods it for "cleaning")
Logged
All glory to the Hypno-Toady!

TinyPirate

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #9 on: August 28, 2012, 03:09:55 pm »

Damn it, my machine should work, but does not! Now to figure out why...

Could levers, which are pulled to disengage those self-same gears, be causing interference? Do I need to deconstruct them once they are pulled and the gears are placed in the "off" state that they need to be at the start?
Logged

Reese

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #10 on: August 28, 2012, 03:35:40 pm »

you don't need to deconstruct them, but you do need to make sure the linked levers have been pulled
(deconstruction is a good idea to prevent certain stealthy enemies from sneaking in and pulling them, though)

you should be able to tell if a gear is disconnected by checking power usage with [q]
Logged
All glory to the Hypno-Toady!

Triaxx2

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #11 on: August 28, 2012, 06:51:16 pm »

No, there shouldn't be interference. Levers, and plates both use a single send signal, and not a continual signal.

Check power as noted, and if that's not the case, check that all do-hickeys are connected to all thing-a-ma-bobs. ;)

In short, make sure everything is connected, and aligned and all floors that have to be removed have been. Check your work as well. I've accidentally found that I've done all the chopping and digging only to suddenly realize that I didn't channel a floor, or didn't line things up and had to rebuild.

And at least once I cross-connected a flooding system to a drainage system, and created a big mess. I now ensure all gears have at least two tiles of separation...
Logged

Reese

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #12 on: August 28, 2012, 10:19:58 pm »

also, check to make sure you are generating enough power to run everything
Logged
All glory to the Hypno-Toady!

TinyPirate

  • Bay Watcher
    • View Profile
Re: Help me understand machinery and triggers
« Reply #13 on: August 29, 2012, 05:50:37 am »

Thanks folks - I had enough power - I must have wired everything up wrong. I'm going to have to write long, detailed instructions and tick them off as I step through!
Logged

AutomataKittay

  • Bay Watcher
  • Grinding gears
    • View Profile
Re: Help me understand machinery and triggers
« Reply #14 on: August 29, 2012, 05:59:42 am »

Thanks folks - I had enough power - I must have wired everything up wrong. I'm going to have to write long, detailed instructions and tick them off as I step through!

That's generally good idea with anything more complicated than "Oh, just that bridge to this lever" :D

At least I should really try that, or using notes feature to say what's linked up to what
Logged
Pages: [1] 2