Smart Train Combinator


A train-stop combinator that validates each train's dedicated buffer individually, instead of pooling all station storage together. One main unit wires to the station; empty 'buffer probe' shells each wire to a single train slot's chests. The main reads every probe's network independently and calls a train only when that slot's buffer is actually ready. Inspired by Simple Train Combinator by Odja_Anarchist.

Utilities
5 hours ago
2.0
0
Trains Circuit network
Owner:
kardagan
Source:
https://github.com/kardagan/factorio-...
Homepage:
N/A
License:
MIT
Created:
5 hours ago
Latest Version:
0.1.6 (5 hours ago)
Factorio version:
2.0
Downloaded by:
0 users

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
    (default signal-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

  1. Research Smart Train Combinator, then place one main + one probe per wagon of your trains.
  2. Wire each probe's input to that wagon's buffer chests/tanks.
  3. Wire each probe's output to the main combinator.
  4. Wire the main to the train stop.
  5. 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.