v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "v0.34:Minecart logic"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 53: Line 53:
 
More gears than necessary were added to the example above to show how complex you can make the logic gates while maintaining a compact layout.
 
More gears than necessary were added to the example above to show how complex you can make the logic gates while maintaining a compact layout.
  
=== Double-carted power-to-signal converter ===
+
== Uncatagorized Components ==
 +
 
 +
Other components useful for computing in DF
 +
 
 +
=== Modified Weight Adjusted Memory Cell ===
  
 
[[File:Dcpts.png]]
 
[[File:Dcpts.png]]
  
BloodBeard, who invented this compact design, has this to say about it: "I was able to take the load adjusting pressure plate concept of my memory cell and put it into a power-to-signal converter. It functions much like the memory cell, but with different linkages (and an axle). Now I'm not so sure if this can be called a power-to-signal converter since you don't simply send power to a gear and the thing maintains an 'on' signal, but it's really all about how you use it.
+
Perhaps a power-to-signal converter, but perhaps not. I'll leave it uncatagorized since i'm unsure.
 
 
Both gears are off by default and the power is connected to the dark green gear. Be it by lever or pressure plate, both gears are switched on, sending power to both rollers (directed to the center). The copper cart pushes the iron one to the other side, but before the southern roller has time to push it back north the copper cart is rolled onto the pressure plate which turns off the dark green gear (and the southern roller). The light green gear is still engaged but no power is being sent to it because the dark green is off. This was the sort of "eureka!" moment when I saw that rollers immediately stop when power is cut (unlike screwpumps) to allow this. (sorry if this is common knowledge, I'm a bit late to the game in getting into the 2012 versions)
 
  
Both gears are switched again when you want to turn it off, activating the dark green gear and disengaging the light green, sending both carts back to their starting points, deactivating the pressure plate which turns the dark green off again (but keeps the roller on long enough to push the iron cart thanks to the pressure plates 'off' delay). Everything is back to how it was at the start.
+
This functions much like the memory cell, but with different linkages (and an axle). Both gears are off by default and power is connected to the dark green gear. Be it by lever or pressure plate, both gears are switched, sending power to both rollers (directed to the center). The copper cart pushes the iron one to the other side, but before the southern roller has time to push it back north the copper cart is rolled onto the pressure plate which is linked to the dark green gear, turning it (and the souther roller) off instantly. The light green gear is still engaged but no power is being sent to it.
  
With the other examples, only 1 gear is needed to be switched to turn them on and off. If you treat both of these gears as you would a single gear then I guess you could also call it a power-to-signal converter, and is the only one that has no moving water or minecarts when it's in the on position. Useful if you have a whole bunch of them and want to minimize lag.
+
Both gears are switched again when you want to turn it off, activating the dark green gear and disengaging the light green, sending both carts back to their starting points, deactivating the pressure plate which turns the dark green off again (but keeps the roller on long enough to push the iron cart thanks to the pressure plates 'off' delay).
  
Now i'm not sure, but the implications of that last component might be huge for dwarfputing. That with a single lever or single pressure plate you can trigger an on and off signal on another component without any continuous moving parts wasn't possible with the mechanical-fluid logic examples I listed at the top of this post. It might be possible to use it as a binary memory cell as well, except I don't think there would be a 'standard' design and the gearing/linkages would need to be customized to the task it performs. I might have to make something, or at least plan it to see."
+
With the other examples of power-to-signal converters, only 1 gear is needed to be switched to turn them on and off. If you treat both of these gears as you would a single gear then I guess you could also call it a power-to-signal converter, and would be the only one that has no moving water or minecarts when it's in the on position. Useful if you have a whole bunch of them and want to minimize lag.
  
 
== See Also ==
 
== See Also ==

Revision as of 23:42, 7 September 2012

The addition of minecarts to Dwarf Fortress has opened up new and exciting logic and computing options for the ambitious fortress manager. Minecart-based logic gates and memory cells are easy to build (arguably easier than fluid logic systems, they are easy to reconfigure, and react quickly.

Binary Memory Cells

Binary Memory Cells store binary data as a 1 or 0 (on or off). For minecarts this means a minecart occupies a pressure plate to create a 1 and by some means removed to make a 0.


Weight Adjusted Memory Cell

3tdcbm.png

The image is split into three versions to show where the minecarts go, what's beneath the minecarts and what's beneath the rollers and pressure plates.

The weight adjusted memory cell utilizes a pressure plates' load adjusting feature to only trigger at certain weights. In this example the pressure plate is set to trigger at a weight of 350. The iron minecart occupying the plate weighs less then that so it doesn't trigger while the copper cart (being the heavier of the two at 357) would trigger it. Sending power to the northern roller (which pushes south) will push the copper cart into the iron cart, sending it to the southern roller (which pushes north but is currently inactive) before being pushed itself onto the pressure plate, triggering it. The reverse is done to turn the memory cell off.

This design is the most space-efficient of the memory cells but lacks the activation speed of the next design due to the first cart having to push the second cart before being allowed to trigger the pressure plate.

A modular example of this design, accounting for extra gears to allow complex logic gates:

Modular3tdcbm.png

Compared to the water based it's nearly 3x smaller and functions just the same without the hassle of getting water to where you need it.

Newton's Cradle Memory Cell

Tpmch.png

This design has the advantage of activating the pressure plate almost immediately upon power being sent, on par with fluid/mechanical equivalent. Power is sent to the light green gear, pushing the top cart into the second cart. Like a Newton Cradle, the first cart transfers its momentum to the second cart, knocking it to the other end while the first cart rests on the pressure plate to send an on signal. The gear is then turned off. To turn it off power is sent to the dark green and the reverse happens. The modular design of the load adjusted memory cell can be applied to this as well to save space.

Power to Signal Converters

A power to signal converter sends an on signal when power is applied and an off signal when power is cut.

2x2 power-to-signal converter

2x2pts.png

When power is sent to the gear, the roller sends the cart around in a loop, passing over the pressure plate repeatedly to maintain on on signal. When power is cut the cart returns to the starting position and disengages the pressure plate. The roller in this example pushes the cart from E->W. Pay close attention to the track layout to make sure it works properly. The 2 walls at the top are all that's needed to keep it from derailing.

A modular layout:

Modular2x2pts.png

Single-carted power-to-signal converter

Scpts.png

The rollers are directed towards the center, so when power is applied to any of the gears the minecart continuously passes over the pressure plate to maintain an on signal, reverting to an off signal when the power is cut.

A modular layout:

Modularscpts.png

More gears than necessary were added to the example above to show how complex you can make the logic gates while maintaining a compact layout.

Uncatagorized Components

Other components useful for computing in DF

Modified Weight Adjusted Memory Cell

Dcpts.png

Perhaps a power-to-signal converter, but perhaps not. I'll leave it uncatagorized since i'm unsure.

This functions much like the memory cell, but with different linkages (and an axle). Both gears are off by default and power is connected to the dark green gear. Be it by lever or pressure plate, both gears are switched, sending power to both rollers (directed to the center). The copper cart pushes the iron one to the other side, but before the southern roller has time to push it back north the copper cart is rolled onto the pressure plate which is linked to the dark green gear, turning it (and the souther roller) off instantly. The light green gear is still engaged but no power is being sent to it.

Both gears are switched again when you want to turn it off, activating the dark green gear and disengaging the light green, sending both carts back to their starting points, deactivating the pressure plate which turns the dark green off again (but keeps the roller on long enough to push the iron cart thanks to the pressure plates 'off' delay).

With the other examples of power-to-signal converters, only 1 gear is needed to be switched to turn them on and off. If you treat both of these gears as you would a single gear then I guess you could also call it a power-to-signal converter, and would be the only one that has no moving water or minecarts when it's in the on position. Useful if you have a whole bunch of them and want to minimize lag.

See Also