Oh frig, mine (development stalled by work I actually get paid for) is minecart-based. I never play adventure so I was trying to make a design that wouldn't require any special geography (volcano, aquifer, river, etc). Back to the drawing board.
What's wrong with it being minecart-based?
You suppose DFHacking the fort into a lair before abandoning so stuff doesn't get scattered? Does this keep minecarts in motion or do they need to be re-started (e.g. by triggering a building like a door/hatch)? Because i totally have a proof of concept sketched out, and the basic design works. For actual application, some adjustments would be in order.
and, after pulling the levers in the correct order (right to left):
Yes, even more of the obscure pathing shit i keep building.
The 'key' cart has to pass through four 'cells' in which it bounces between two double-ramps, each exit blocked by a hatch cover. When a lever is pulled, one of the hatches is opened. If correct, the 'nice' hatch opens and lets the cart proceed, if incorrect, the 'naughty' hatch opens and sends the cart off to the left, where it's ramp-bug lifted up a level, pulled across a bit to the east and then sent barrelling through the lever corridor and back into the 'lock'. If the wrong lever isn't re-set, it will keep this up indefinitely (if you really wanted to build it like this, you should probably use a metal minecart - wooden ones are light enough that colliding with a humanoid stops them). If the cart successfully passes all four cells, it circles around to the southeast and gets caught in a 'holding cell' or latch, keeping the 'target' pressure plate activated. In the example here, the plate is only linked to the orthoclase door to the south, opening it when the operator has opened the lock, allowing them back out.
Limitations: if the intended mode of operation is giving a single pull to each lever in the correct order, you can't link a lever to 'naughty' hatches occurring later in the sequence, since that would leave them open when the cart arrives, producing an automatic (false) 'naughty' result. This effectively makes the last 'false' hatch cover unnecessary, it can't be opened in a meaningful sequence, because by this time, only one lever is left to pull.
If the mode of operation was _cycling_ the levers - pulling them, waiting a bit for the cart to react to the decision, then turning the lever back off - you could employ such added connections, also allowing for double uses of the same lever and complete trap levers (say the needed sequence is 1-2-4-1, pulling lever three is always bad; lever one would be connected to the 'nice' hatches of cells one and four and to the 'naughty' hatch of cell three; it would need to be deactivated before pulling levers two and four).
There's an added 'latch' cell to the far southeast, with its own cart. The hatch to the upper right is linked to _all_ combination levers, sending the cart to the part with the pressure plate, keeping it active. The plate is linked to the grate right next to the orthoclase door; when it opens, the passage out is blocked by a pit. So once you pull a single lever of the lock combination and don't get out in ~120 steps, you'll have to properly open the lock so you can get out through the door.
The lock is re-set by returning all levers to their original position and cycling these two levers:
The orthoclase lever operates the hatch holding the key cart in the door latch circuit. Cycle it to close the door again and return the cart into the lock circuit. The other (gabbro?) lever operates the hatch cover keeping the other cart in the latch circuit holding the grate open. The key levers must all be turned off for this to be useful. The 'grate cycler' is also connected to all 'naughty' hatches, which should un-stick carts buzzing around in the middle of the sequence. For the lulz, i also connected the 'door cycler' to all 'nice' hatches, but that's totally counter-productive. Cycle the grate last, only after the orthoclase lever is safely off and after checking that the door is closed.
If intermittent minecarts to the face aren't fun enough for you, you could also send all 'failed' solution attempts into another latch circuit or over a pressure plate, activating some other machinery, like the door holding back the magma/water. A latch would prevent any attempts to correct errors. And obviously, actually linking the 'solution' plate to an actual vault door or somesuch might be a good idea, too. I just liked, for the proof-of-concept-ness, the idea of locking the operator into the lock by starting the solution attempt and only releasing them after a successful job.
Materials needed: two minecarts, a grate, a door, eleven hatch covers, 40 mechanisms. Another eight mechanisms to allow cycling out minecarts 'stuck in the lock', six more permanently installed to provide 'dummy links' - up to nine more recoverable by deconstructing linked devices when linking to gear assemblies. I might have miscounted a mechanism or two.
PS: setting it up so the carts start at rest is fairly easy and only takes another hatch cover and eight mechanisms: Station the cart for the grate latch on top of the eastern hatch cover in its circuit. When the hatch opens, it will fall in and eventually emerge on the latch side, staying there and keeping the grate open. For the key circuit, you'll need to put a hatch on top of the eastern pit of the 'naughty' ramp in the first cell, where returning carts arrive from the south. Link that hatch to all lock levers, put the cart on top. Now pulling any lever will set the lock in motion. Returning any lever to 'off' will bring 'failed' carts to a rest on top of the hatch on their next pass. The cart in the grate circuit will not stop by itself unless you also install an activatable track stop or somesuch.