- Piston tutorial: Build a highly stable, variable expansion system using our detailed scrap mechanic piston tutorial logic layouts.
- Logic setup: Configure seven logic gates, one switch, and two buttons to control alternating piston extensions dynamically.
- Stability control: Keep piston lengths and speeds identical to prevent chassis shaking and structural damage under heavy loads.
- Controller tools: Use standard connection tools for linear builds, or switch to advanced logic for complex mechanical builds.
Variable Piston Mechanics
Creating dynamic movement in Scrap Mechanic requires more than just placing pistons and connecting them to a driver's seat. Standard setups only allow binary states: fully retracted or fully extended. To achieve variable extension control, builders must implement a logic-driven variable piston extender. This system uses alternating signals to halt pistons at specific lengths, providing precise control over complex builds like elevators, cranes, and custom suspension rigs.
Before diving into the logic wiring, you must gather the correct resources. Building a variable system requires precise components to manage signal loops.
Video Highlights:
- Learn to configure a variable piston extender using seven logic gates.
- Understand the wiring connections between buttons, switches, and gates.
- Discover how to prevent chassis shaking by balancing piston lengths.
- Step-by-step demonstration of alternating signal patterns.
| Component | Quantity | Primary Function |
|---|---|---|
| Piston | 2 | Executes the physical extension and contraction of blocks. |
| Logic Gate | 7 | Routes and filters signals to determine piston states. |
| Switch | 1 | Acts as the master toggle to enable or disable the system. |
| Button | 2 | Triggers the extension and contraction sequences manually. |
Always ensure your vehicle or structure is anchored to a lift while building logic systems. Unanchored physics calculations can cause unexpected movements, leading to misaligned connections.
Step-by-Step Logic Wiring
Wiring a variable piston system requires careful gate configuration. A single incorrect gate setting will break the signal loop, causing the pistons to lock up or jitter uncontrollably. Follow these steps to wire the system correctly.
Piston Placement
Place two pistons back-to-back or in parallel alignment. Ensure they face the direction of intended motion. Set both pistons to the exact same maximum length and speed settings using the connection tool.
Gate Configuration
Place seven logic gates nearby. Configure one gate as NOR, one as XNOR, two as OR, and the remaining three as AND gates. Label or color-code them to keep track of their functions during wiring.
Input Connections
Connect your master switch to all three AND gates. Connect the first button (assigned for extension) to the first OR gate. Connect the second button (assigned for contraction) to the NOR gate and the XNOR gate.
Logic Loop Integration
Route the outputs of the alternating OR and NOR gates back into the AND gates. Finally, connect the designated output logic gates directly to the pistons to complete the control loop.
| Gate Name | Default Setting | Output Target |
|---|---|---|
| Gate 1 | NOR | Piston 1 / AND Gate |
| Gate 2 | OR | Piston 2 / AND Gate |
| Gate 3 | XNOR | AND Gate 2 |
| Gate 4 | AND | Main Loop Control |
If your pistons fail to respond when pressing the buttons, double-check that the master switch is turned on. The AND gates require an active signal from the switch to pass inputs through.
Piston Physics and Stability Tips
Scrap Mechanic features a complex physics engine that reacts dynamically to weight, velocity, and torque. When multiple pistons are chained together, they are susceptible to a phenomenon known as "spaghetti physics," where the connections bend, shake, or explode under stress. Maintaining stability is crucial for heavy-duty machinery.
To prevent instability, always use an even number of pistons when building long-reach extenders. Odd numbers of pistons create unbalanced forces during transition states, causing the structural blocks to vibrate. Additionally, keep the speed settings moderate; high-speed transitions increase the kinetic energy, which often overloads the joint limits of the physics engine.
| Issue | Common Cause | Recommended Fix |
|---|---|---|
| Chassis Shaking | Uneven piston speeds | Synchronize speed settings. |
| Bending Joints | Excessive weight load | Add structural guide rails. |
| Failed Extension | Logic signal loop lock | Reset the master switch. |
Piston Calibration Checklist:
- Verify all pistons have identical speed values
- Ensure an even number of pistons are used in the chain
- Build guide rails around the piston shaft to prevent bending
- Confirm the master switch is wired to all control gates
- Test the system on a lift before placing it on the ground
If your pistons continue to shake despite balanced settings, place a weight block at the end of the piston shaft. The added mass helps stabilize the physics calculations during fast movements.
Advanced Piston Controllers & Applications
For advanced builds, logic gates can be integrated with mechanical controllers to create automated sequences. Standard controllers allow you to set specific angles for bearings and precise lengths for pistons across multiple steps. By combining controllers with our variable logic setup, you can create automated doors, compact elevators, and retractable landing gear.
When comparing control methods, choose the one that fits your space constraints and complexity requirements.
Logic Control
- High customization
- Dynamic adjustment
- Requires more space
Controller Tool
- Compact footprint
- Simple step setup
- Limited dynamic inputs
Engine Drive
- Continuous motion
- High torque output
- Harder to control precisely
| Control Method | Complexity | Space Required | Best Use Case |
|---|---|---|---|
| Logic Gates | High | Medium | Variable cranes, elevators |
| Controller | Medium | Low | Cargo doors, folding steps |
| Engine | Low | High | Continuous conveyor systems |
You can connect a sensor to your logic gates to automate the piston system. For example, a sensor detecting a player can trigger the extension sequence automatically, creating hands-free sliding doors.
FAQ
Q: Why do my pistons shake violently when I press the buttons?
This usually happens when the pistons have mismatched speed or length settings, or when you use an odd number of pistons. Ensure all settings are identical and use guide rails to stabilize the build.
Q: Can I build this scrap mechanic piston tutorial setup without logic gates?
You can build a basic piston system using just a controller or a switch, but you will lose the ability to control variable steps and dynamic halting mid-extension.
Q: What is the purpose of the master switch in this tutorial?
The master switch enables the AND gates, allowing signals from the buttons to pass through. It acts as a safety toggle to prevent accidental activation.
Q: How do I increase the lift capacity of my piston elevator?
To lift heavier loads, place multiple pistons parallel to each other and connect them to the same logic output. This distributes the weight across multiple physics joints.
For more advanced building techniques and logic designs, check the official Scrap Mechanic Steam Community guides or join the community forums to share your creations.