Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How to debug trigger linkages?  (Read 562 times)

PatrikLundell

  • Bay Watcher
    • View Profile
How to debug trigger linkages?
« on: November 28, 2014, 04:29:13 pm »

With a fair amount of effort I've set up a Kobold Extermination Device, i.e. a shortcut tunnel with locked doors at the ends and 12 Menacing Spike traps hooked up to a pressure plate triggered by a continously moving minecart (there are also drawbridges at both ends so that other nasties can be blocked from using it as a shortcut). So I try it out: nothing happens, i.e. none of spikes are triggered by the minecart. I'm also building another instance of the same concept, with an identical triggering, which I just tested with only the first spike hooked up, and it worked fine, so I think the problem is with the execution, not the concept. I've also triggered a coinstar with the same minecart trigger setup.
1. How can I find out if my pressure plate actually is set to trigger on any minecart weight, or even not on minecarts at all?
2. Is there a way to follow devices within triggering items (levers, pressure plates, etc.) to find out where they lead?
3. One potential issue with my setup is that I think the first Menacing Spikes were constructed before the pressure plate, but most afterwards. The wiki states construction order affects activation timing, but that ought only to result in spikes not firing synchronously, not some kind of deadlock, I would have thought?

If worst comes to worst, I'll deconstruct the pressure plate, rebuild it, and hook up the spikes again. If THAT fails, I'll have to tear down the spikes as well as the pressure plate and rebuild from scratch, but that's going to be really messy since the parts left after deconstruction will block reconstruction (temporary links only stockpile with a dump on top, I guess)...
Logged

Larix

  • Bay Watcher
    • View Profile
Re: How to debug trigger linkages?
« Reply #1 on: November 28, 2014, 07:19:38 pm »

Whether or not the plate triggers should be directly visible - pressure plates change colour when they trigger/untrigger. (If you use some graphics mod that fails to display this properly, get rid of it.) In any case, the default setting is for a plate to trigger for any cart, so it's not very likely to set up a plate with incompatible weight requirements by accident. However, _the plate has to be installed on actual track_ or it won't trigger when a cart passes it. Check if the tile underneath the plate is track or just floor.

"q"uery the pressure plate and order linkages to "S"pears. If the intended spike traps are _not_ offered, you can be sure that they're already linked.

Build order doesn't prevent proper activation; as you surmised, it can only shift activation around by single steps and cause asynchronous activity, no more. (It might be possible to gum up some very sensitive designs like pump stacks through wrong build order, but "nothing at all happens" generally has other causes.)

There are other interface options with dfhack, but this is a simple, quick method to check with the tools the normal game offers.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: How to debug trigger linkages?
« Reply #2 on: November 29, 2014, 03:31:35 am »

Thanks Larix!

It was the track issue (which I didn't know existed). There is no track underneath the non working pressure plate, but one under the working one. I certainly ORDERED tracks being engraved there, but something obviously went wrong. Engraving the missing piece of track did the trick!

I used the linkage selection check while setting up the linkage, and you're right, of course, that it can be used afterwards as well.
« Last Edit: November 29, 2014, 03:54:06 am by PatrikLundell »
Logged