Smart Train Combinator
A train-stop combinator that checks each wagon's dedicated buffer individually
before calling a train — instead of pooling all of a station's storage together.
## The problem it solves
The classic approach (and the original Simple Train Combinator)
sums all of a station's storage and calls floor(total / train_capacity) trains.
Nothing guarantees that each wagon's buffer actually holds its share — so a train can
be summoned while one bay is still half-empty, and you get partially-filled wagons.
Smart Train Combinator reads every wagon's own buffer and only calls a train when each one
is genuinely ready.
## How it works
Two entities, wired entirely by cable (no proximity guessing):
- Smart Train Combinator (2×2) — the brain. Wire it to the train stop and to the probes.
- Freight Bay Probe (1×2) — a passive shell, one per wagon. Wire its input side to
that wagon's buffer chests/tanks, and its output side back to the main combinator.
Each tick the main reads every probe's buffer network in isolation (wagons never sum), and computes:
trains = MIN over wagons of
floor(buffer / per-wagon capacity), clamped to your Max
(For unloading it uses free space instead of stored amount.) So 3 probes means trains are treated
as 3 wagons long, and the slowest-filling wagon decides when a train is called.
## Features
- Items and fluids. Per-wagon capacity is read from the chosen rolling-stock prototype, so
modded wagons and quality are handled correctly. - Drives the stop: train-limit signal (default
signal-L) and an optional priority signal
(defaultsignal-P) on a High / Important / Medium / Low level scaled by how full the station is. - Auto-naming with a live preview: the stop name is built from the tracked good, a green (load)
or red (unload) arrow, and one wagon icon per bay. - Three windows: base config, train-stop config, and a per-wagon buffer monitor.
- Blueprint, copy/paste and parametrization support.
- English and French locale.
- Compatible with Nullius and Ultracube.
## Setup
- Research Smart Train Combinator, then place one main + one probe per wagon of your trains.
- Wire each probe's input to that wagon's buffer chests/tanks.
- Wire each probe's output to the main combinator.
- Wire the main to the train stop.
- Open the main: pick the tracked item/fluid, the wagon type, the direction, and your max trains.
Enable train-limit / auto-naming / priority as you like.
## Credits
Inspired by Simple Train Combinator by Odja_Anarchist (GPLv3). This is an independent
implementation (no code reused), not a fork. Licensed MIT.