Trailmakers Logic Blocks: Gates, Math, and Circuits
Learn Trailmakers logic blocks, from basic gates to accumulators, math, comparisons, and displays. Build circuits and troubleshoot common wiring mistakes.
Jump to

How Logic Blocks Work in Trailmakers
Trailmakers logic blocks let your creations count inputs, remember values, compare numbers, and control moving parts. They turn button presses and sensor signals into circuits that can handle more than a direct control binding. Start by separating two questions: what activates a block, and what numeric value does it send?
A signal can carry a positive, negative, or fractional value. Those values matter because receiving blocks can use them to scale their behavior. For example, a servo configured for 90 degrees receives a 0.5 signal and moves to 45 degrees; its speed is a separate setting.
Green control bindings represent positive input, while red bindings represent negative input. Opposing signals can cancel: positive one plus negative one equals zero.
Basic AND, OR, and XOR gates
With ordinary positive on/off signals, the basic gate conditions are:
- AND: Activates when every input is active.
- OR: Activates when any input is active.
- XOR: Activates when exactly one input is active.
Signed signals add another consideration. An AND gate receiving positive one and negative one can satisfy its activation condition while producing a summed value of zero. Check both the gate condition and the signal value when troubleshooting.
For a button-controlled thruster, connect the button through an OR gate to the thruster and leave Toggle disabled for hold-to-activate behavior. Inspect direct bindings on the receiving part, too, so another control assignment does not compete with the circuit.
Changes introduced in update 2.3
The March 12, 2026 update added several options relevant to logic builds:
| Block or system | Addition in update 2.3 |
|---|---|
| Logic Blocks | Logic Output Channel option |
| Functions Logic Block | ArcTan2, Log2, Ln (LogE), and Log10 |
| Logic Sensor blocks | Mute on Input toggle |
Older circuits can still explain the fundamentals, but the Functions block now has more operations than its earlier selection.
Official page: Trailmakers (playtrailmakers.com)
Accumulator: Store a Value or Count Activations
The Accumulator stores a number and changes it in response to input. Its minimum and maximum settings bound the stored value when those limits are enabled, while Scale determines how strongly the input changes it.
Image: Steam / Flashbulb
In continuous operation:
Change per second = input × Scale
An input of one with Scale set to five increases the stored value by five each second. A negative input decreases it. An input of seven with Scale five changes the value by 35 per second.
Steps mode changes the value once per activation instead of continuously. The same multiplication applies, so an input of seven with Scale five adds 35 for that activation.
Use continuous operation for a value you want to adjust while holding a control. Switch to Steps when each activation should register as a separate increment or decrement.
To inspect the behavior:
- Connect the Accumulator to a Number Display.
- Assign positive and negative controls, such as Space and Shift.
- Set Scale to one and observe the stored value while holding either control.
- Enable Steps and compare the response to separate activations.
- Set minimum and maximum limits if the value should stay within a defined range.
The distinction matters downstream: a comparison circuit reacts to the stored number, whether that number came from a held input or individual steps.
Aggregate: Combine Separate Numeric Inputs
The Aggregate block performs an operation across its connected input values. Its four modes are Sum, Product, Minimum, and Maximum.
Image: Steam / Flashbulb
| Mode | Operation | Example |
|---|---|---|
| Sum | Adds the inputs | 7 + 10 = 17 |
| Product | Multiplies the inputs | 2 × 4 × 4 = 32 |
| Minimum | Outputs the smallest input | Inputs of zero and four produce zero |
| Maximum | Outputs the largest input | Inputs of zero and four produce four |
Negative values participate in these calculations. A Product calculation of 2 × -3 × 4, for example, produces negative 24.
Check every input when Product unexpectedly returns zero. One zero-valued input makes the entire product zero, even if the other inputs are nonzero.
Keep Aggregate Product separate from Arithmetics Multiply in your planning. Product multiplies the individual input values together. Arithmetics Multiply adds its inputs first, then multiplies that total by a configured constant.
Arithmetics: Apply a Constant to Your Signal
The Arithmetics block combines incoming values into a sum, then performs the selected operation using that sum and a constant.
Image: Steam / Flashbulb
Let S mean the sum of the inputs and C mean the configured constant:
| Operation | Calculation | Example |
|---|---|---|
| Add | S + C | Inputs seven and 10, constant five: 22 |
| Subtract | C - S | Input eight, constant 20: 12 |
| Multiply | S × C | Input three, constant four: 12 |
| Divide | C ÷ S | Inputs two and one, constant 12: four |
| Input to the constant power | S raised to C | Input six, constant two: 36 |
| Constant to the input power | C raised to S | Constant 10, input two: 100 |
| Modulo | Remainder of S ÷ C | Input six, constant five: one |
Operand order is the trap with Subtract and Divide. Subtract takes the input sum away from the constant. Divide divides the constant by the input sum.
To scale a signal down by five, use Multiply with a constant of 0.2. Selecting Divide with a constant of five instead calculates five divided by your input sum.
Modulo gives the remainder after division. With a constant of five, an input of six produces one. Connect an Accumulator to Modulo when you want an increasing count to feed a repeating numeric sequence.
To reverse a signal’s sign, use Multiply with a constant of negative one. That also gives you a building block for comparing two changing values.
Functions: Transform Values, Angles, and Rounding
The Functions block generally applies its selected function to the sum of incoming values. Feeding multiple signals into it therefore changes the value being transformed.
Absolute and Sign
Absolute returns the nonnegative magnitude of a value. Negative five becomes positive five; positive five stays positive five; zero stays zero.
Sign reduces a value to its direction:
- Positive input produces one.
- Negative input produces negative one.
- Zero produces zero.
Use Absolute when direction should not affect the calculation. Use Sign when the next stage needs direction without the original magnitude.
Trigonometry and square root
Sine, cosine, and tangent use degrees, not radians. Sine of zero is zero, and sine of 90 degrees is one.
The inverse trigonometric functions return angles. Arc sine of one returns 90 degrees, while arc sine of negative one returns negative 90 degrees.
Square Root returns the square root of the input sum. Negative inputs produce zero in this block.
Update 2.3 expanded the available functions with ArcTan2, Log2, Ln (LogE), and Log10. Check the function selection when adapting a circuit built around the older set.
Ceiling, Round, and Floor
The rounding functions change the numeric signal itself:
- Ceiling: Rounds toward positive infinity.
- Round: Rounds to the nearest integer.
- Floor: Rounds toward negative infinity.
Floor turns 0.9 into zero. Ceiling moves a fractional value up to the next integer.
Place one of these functions before the receiving block when the circuit needs an integer. Turning on rounding in a Number Display changes only what you see.
Comparison: Turn a Numeric Threshold Into a Signal
The Comparison block compares its input sum with a configured threshold. It outputs one when the selected condition is true and zero when it is false.
Available conditions include:
- Less than
- Greater than
- Equal to
- Not equal to
- Less than or equal to
- Greater than or equal to
With a threshold of five, Less Than outputs one for inputs below five and zero at five. Less Than or Equal To still outputs one at five.
Choose the condition around the exact boundary you need. A circuit that should activate upon reaching five needs Greater Than or Equal To, rather than Greater Than.
Watch the Clamp Input setting
Clamp Input restricts the value being compared to the range from negative one to positive one. An input of three becomes one, and negative four becomes negative one.
Disable clamping when comparing a counter against a threshold such as five. A clamped value cannot reach that threshold.
For a simple threshold circuit, connect an Accumulator to Comparison, set the threshold to five, and select Greater Than or Equal To. Attach a Number Display directly to the Accumulator so you can watch the count alongside the comparison result.
Compare two changing values
The Comparison block uses a constant threshold rather than two separate comparison operands. Build a difference signal to compare changing values:
- Send the second value through Arithmetics Multiply with a constant of negative one.
- Connect that result and the first value to Comparison.
- Set the threshold to zero.
- Choose Greater Than to test whether the first value exceeds the second.
The Comparison block receives the sum of those inputs, which is the first value minus the second.
Randomizer: Choose When Random Values Change
The Randomizer generates values within a range. Its mode determines when those values change and when the block outputs them.
Output on Input continuously generates new random values while input is active. Releasing the input stops the output.
Change on Input keeps outputting its current value and changes it when triggered. Select this mode when the circuit needs to keep using a random value between activations.
Input Defines Range uses two incoming values as the range boundaries. Inputs of negative two and positive two produce random values between those limits. Changing the inputs changes the range during operation.
Another mode separates changing the stored value from outputting it:
- Negative input changes the random value internally.
- Positive input outputs the stored value while held.
Avoid sending equal positive and negative inputs simultaneously in that mode. Positive one and negative one cancel to zero.
Attach a Number Display while configuring the Randomizer. Observe whether the value changes continuously, stays between activations, or disappears when input stops before connecting the next circuit stage.
Number Displays and Color-Changing Light Panels
A Number Display shows the incoming numeric value. Its rounding option affects the displayed text without rounding the value passed onward.
That distinction can hide a fractional signal. A display can show a rounded integer while the next block still receives the original decimal value. Use a Functions rounding operation when downstream behavior requires an integer.
Branch displays off the circuit instead of routing the circuit through them. Connect the producing block directly to both the display and the next processing block. You can then remove the display without breaking the connection between the working blocks.
The color-changing light panel translates signal values into color:
- Positive inputs change hue as the value moves through the zero-to-one range.
- Negative inputs produce grayscale shades.
- Negative one produces white.
- Negative 0.25 produces a dark gray.
- Positive one produces red with full saturation.
Brightness adjusts how bright the selected color appears. Saturation controls its color intensity; zero saturation removes the hue, producing white when brightness is full.
To explore the panel’s range, connect an Accumulator bounded between negative one and positive one and use positive and negative controls to adjust its value. Connect a Number Display to the same Accumulator so each color has a visible numeric value.
Join the community
Official channels for news, updates and player help:

