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
a day ago
2.0 - 2.1
113
Trains Circuit network

Changelog

Version: 1.2.1
Date: 2026-07-10
  Features:
    - The main units now draw power (10 kW, via an invisible consumer glued onto the module — the
      constant-combinator base can't have an energy source of its own). A main without electricity
      shows the vanilla "no power" alert icon, reports the outage in its window and requests zero
      trains. Probes already consumed power but an unpowered probe used to be silently ignored (the
      script reads the wires directly, which works without electricity): a wired probe without power
      now also puts its main in error with zero trains requested, instead of pretending all is fine.
  Bugfixes:
    - Circuit-network discovery no longer crosses wire colours. The walk used to hop from a red wire
      to a green one through any entity on the way, so e.g. a green wire between the buffer tanks of
      two independent red-wired setups silently merged both networks: each main discovered the other
      main's probes and station and the station names alternated between the two resources. Each wire
      colour is now walked as its own network (matching the game's own circuit-network semantics), for
      both the main's discovery leash and the probes' buffer scan.
    - A train stop wired to more than one main unit (through any wire colour) is now a detected error:
      every main sharing the stop shows a red status ("train stop wired to more than one main unit"),
      requests zero trains and stops driving the stop (no renaming, no train-limit control) until the
      extra wire is removed. Previously the mains silently fought over the stop's name and limit.
  Changes:
    - The resource-type wording now matches the game's own terminology: "Item / Fluid" ("Objet /
      Fluide" in French) instead of "Solid / Liquid" — fluids include gases, which "Liquid" wrongly
      excluded. Applies to the module's type switch and the overview's type filter.
Version: 1.2.0
Date: 2026-07-07
  Features:
    - New global overview screen listing every Smart Train Combinator module in the game. Open it with
      the shortcut-bar button or the customizable key (default CTRL + ALT + T). Each row shows the
      module's tracked resource(s), an inline-editable wagon-type picker, up to four per-probe fill
      bars (stored versus one-wagon capacity, sorted by probe so they stay put; a "+N" tooltip lists
      the rest), and a station-call indicator (green calling, red on error, grey idle). A left filter
      column narrows the list by type (solid/liquid), resource (restricted to the chosen type),
      direction (load/unload), and storage flag. An "eye" button on each row closes the overview,
      focuses the module, and opens its interface.
  Bugfixes:
    - The base module window is now wide enough that its close (X) button is always visible. With the
      longer localized title the four titlebar buttons overflowed the fixed width and pushed the X out
      of the frame; the single-good window is now 416 px wide (the glued side panels follow along).
    - Removed the space in the auto-generated train-stop name (between the resource/storage icons and
      the arrow/wagons), so the icons sit flush.
    - The wagon icon in the auto-generated train-stop name now uses the wagon's ITEM tag ([item=...])
      instead of its entity tag ([entity=...]). The two render identically, but the rich-text icon
      picker (used when building a train interrupt by hand) inserts the item form; since station
      matching is an exact string compare, a hand-built interrupt now targets the auto-name correctly.
      NOTE: this changes the generated name, so re-point any existing hand-made interrupts that relied
      on the old [entity=...] form (or copy the station's current name).
  Changes:
    - New single-good modules now default to auto-renaming the station (both naming checkboxes ticked
      by default). Existing modules keep their current setting.
Version: 1.0.2
Date: 2026-07-05
  Bugfixes:
    - Nullius: the mod recipes can now be built again both by hand and in assembling machines. They
      were previously hand-craft-only (Nullius assemblers reject the vanilla "crafting" category),
      then machine-only once categorized. The recipes now use Nullius "*-crafting" categories, which
      both the assemblers and the character accept: the main modules use "large-crafting" (medium and
      large assemblers plus hand crafting), and the probes use "medium-crafting" (all three assembler
      sizes plus hand crafting).
    - Nullius: each module and probe no longer appears twice in Recipe Book (once as an item, once as
      a recipe). The recipe is no longer renamed with the "nullius-" prefix (which broke Recipe Book's
      item/recipe merge); it escapes Nullius's prototype hiding via its order prefix instead, keeping
      the recipe name equal to its product.
Version: 1.0.1
Date: 2026-07-05
  Bugfixes:
    - Clicking a ghost of any mod entity (from a blueprint, copy-paste or a planned build) no longer
      opens the wrong vanilla combinator GUI. Ghosts are now recognized by their ghost_name and their
      GUI is suppressed, since a ghost carries its configuration through blueprint tags and has
      nothing to configure directly.
Version: 1.0.0
Date: 2026-07-01
  Features:
    - New entity "Smart Train Combinator (Multi-Resource)": a FIFO dispatcher that tracks up to 10
      goods and renames the train stop to request one resource at a time. It commits to a request
      until a train arrives at the stop, then moves to the next (rename-on-arrival, so no duplicate
      train is summoned, and the same resource is never queued twice). Each train is mono-resource
      and is called only when a FULL wagon of that resource can be filled (or, when unloading, when
      a full wagon of free room is available). Auto-naming is mandatory and the train limit is 0/1.
    - Two buffer modes for the Multi-Resource module:
        * Shared buffer (generic Freight Bay Probes): several resources share the same bays; best
          for 2-3 resources with large chests.
        * Independent buffer (new "Typed Freight Bay Probe"): each probe is pinned to one resource,
          so every resource gets its own bays and train length can vary per resource (e.g. a 1-wagon
          iron train and a 2-wagon coal train). Accepts items AND fluids - the way to dispatch
          multiple fluids, each fluid in its own tank.
    - Enable gate on both modules ("request trains only when a condition holds"): pick a signal, a
      comparator and a value; while the condition is false the module requests 0 trains (the stop
      itself stays active). Ideal for fluids: only call the next train once the shared pipe is empty.
    - Storage option on the single module: adds a warehouse icon to the auto-name to mark both the
      evacuation source (loading) and the storage depot (unloading), so they are easy to tell apart.
      No change to the train-calling logic - it is a naming marker only.
  Changes:
    - Versioning now encodes the targeted game in the MINOR digit, from a single shared codebase:
      even minor (1.0.z) = the Factorio 2.0 build, odd minor (1.1.z) = the Factorio 2.1 build. A
      fix bumps the patch on both channels. The 2.0 build also carries the fixes that previously
      shipped only in the 2.1 (0.2.0) release.
Version: 0.2.0
Date: 2026-06-23
  Changes:
    - Compatibility with Factorio 2.1: bumped factorio_version to 2.1, base dependency to
      >= 2.1.0 and flib dependency to >= 0.17.0 (the 2.1-compatible flib release). No gameplay
      changes. The 2.0 release (0.1.6) remains available on the mod portal for players still on
      Factorio 2.0.
  Bugfixes:
    - Opening the main unit no longer crashes ("Unknown item name") when the tracked good or
      wagon prototype no longer exists (e.g. a mod such as nullius was removed or is not yet
      ported to the running game version). The choose-elem buttons now fall back to empty.
    - The buffer monitor and train-stop config windows no longer jump to a random spot when
      reopening the main unit while they were left open: their position is now remembered (and
      restored on the next open) instead of being recomputed against a not-yet-laid-out base.
Version: 0.1.6
Date: 2026-06-13
  Features:
    - Smart Train Combinator (2x2 main) + Freight Bay Probe (1x2): one probe per wagon, all wired
      by cable. The main reads each probe's buffer network in isolation and calls a train only when
      every wagon's dedicated buffer is individually ready (MIN over wagons of floor(buffer / wagon
      capacity)), clamped to a configurable Max trains.
    - Works for both cargo (items, any quality) and fluids; wagon capacity read from the chosen
      rolling-stock prototype, so modded wagons are supported.
    - Drives the train stop: train-limit signal (default signal-L) and optional priority signal
      (default signal-P) with a High/Important/Medium/Low level scaled by station fill.
    - Auto-naming: builds the stop name from the tracked good, a green (load) / red (unload) arrow
      and one icon per wagon, with a live preview.
    - Three windows (base config / train-stop config / per-wagon buffer monitor), blueprint +
      copy-paste + parametrization support, English and French locale.
    - Nullius and Ultracube compatibility.