Station Renamer Combinator


Rename train stops from a text template. Wire signals in, type a name like {icon} Unload, and the first signal fills it in. Supports Factorio's train-interrupt wildcards, which double as type filters.

Content
2 days ago
2.0
9
Trains Circuit network

Changelog

Version: 0.5.5
Date: 2026-08-02
  Bugfixes:
    - The live preview ignored wildcards. Dropping the "any item" wildcard into the station name
      showed the raw wildcard icon in the "Station will be called" box instead of the item it
      stands for. The station itself was always named correctly -- only the preview lied, which
      made a working feature look broken.
    - The preview ignored the wildcard type filter too, so a fluid wildcard on a wire carrying an
      item previewed the unexpanded icon rather than the fallback the station actually gets.
  Changes:
    - The preview no longer computes anything of its own. It was a second implementation of "what
      will this station be called", written without the wildcard step, and that duplication was
      the bug. The preview and the rename now share one function, so they cannot drift apart.
  Info:
    - First automated coverage of the GUI. A headless server has no players and cannot build a
      window, but the preview caption is pure logic and is now asserted in-game: the preview must
      say exactly what the renamer writes. Ten new checks, 158 in-game assertions in total.
Version: 0.5.4
Date: 2026-08-02
  Changes:
    - Fixed the window header. The entity preview was taller than the header band and overflowed
      it, so the "Station name" label rendered on top of the machine's picture. The preview is
      gone: it was decoration -- you just clicked the machine -- and the header is now a clean
      single-line status strip saying whether the renamer is actually driving anything.
Version: 0.5.3
Date: 2026-08-02
  Bugfixes:
    - Fixed a crash introduced in 0.5.2 that made the combinator window unopenable again. The
      header band was given horizontal_spacing, which only exists on Table and Flow styles, so
      setting it on a Frame raised "Expected Table or Flow or HorizontalFlow style type but was
      Frame". The gap is a margin on the child now, and a new check fails the build if a
      flow/table-only style property is set on any other element type.
Version: 0.5.2
Date: 2026-08-02
  Changes:
    - Breathing room at the top of the window. The entity preview was cropping the combinator's own
      sprite at 60px, so it is 76px now; the header band gained proper padding instead of being
      squashed against the first label; and the status line stretches across the band rather than
      stopping halfway.
Version: 0.5.1
Date: 2026-08-02
  Bugfixes:
    - The rules text in the combinator window showed a literal "__1__" at the start of every line.
      __1__ is Factorio's locale PARAMETER placeholder, and it had been used as a bullet character;
      with no argument supplied it renders as itself. Now uses real bullets, and a new check fails
      the build if any locale string used without arguments still contains a __N__ placeholder.
Version: 0.5.0
Date: 2026-08-02
  Major Features:
    - Match POSITIVE or NEGATIVE signals, per combinator. Positive is ordinary stock readings and
      the biggest count wins. Negative is for deficits: a requester circuit emitting -400 iron is
      asking for 400 iron, and the MOST negative wins -- so a deficit circuit can stay negative end
      to end instead of needing an inverting combinator. Signals of the other sign are ignored and
      zero never counts.
  Features:
    - The combinator window now states the rules it follows, so which-signal-wins and what a type
      mismatch does are not things you have to guess.
    - Save migration: records written by an older version are backfilled on load, taking their
      defaults from the same table new renamers are built from, so a field added later cannot be
      missed. Anything invalid resets to its default rather than being trusted.
  Changes:
    - The window is a fixed narrow column instead of stretching past 1000 pixels wide. The long
      explanations moved into tooltips, the placeholder chips are a grid rather than one long row,
      and the duplicate {item}/{fluid} chips are gone -- the wildcard symbols already said that.
    - The fallback name has its own full-width row.
  Notes:
    - Blueprint support is now verified end to end by the test suite: a blueprint is created,
      tagged, built back as a ghost, revived, and the revived entity's settings are compared field
      by field against the original. Copy-paste, ghost revival and undo use the same paths.
Version: 0.4.1
Date: 2026-08-02
  Bugfixes:
    - Fixed a crash that made the combinator window unopenable. Refreshing the window assigned the
      style name "textfield", which does not exist -- Factorio ships invalid_value_textfield but
      the DEFAULT textfield style has no assignable name, so the assignment raised "Unknown style
      textfield" and took down on_gui_opened. The default's real name is now read off a live
      element instead of guessed.
  Changes:
    - Removed the separate "Insert icon" picker. The name field now uses Factorio's own in-field
      icon selector, the same one vanilla station naming uses, so inserting a literal icon works
      the way you already expect. The fallback field got it too.
Version: 0.4.0
Date: 2026-08-02
  Features:
    - Typeable wildcards: {item}, {fluid}, {fuel}, {signal} and {any} now mean exactly what the
      corresponding train-interrupt wildcard symbols mean, type filter included. Same predicates
      behind both, so the two forms cannot drift apart -- "{fluid} pickup" and the rich-text
      "[any fluid] pickup" are identical.
    - Those four also appear as chips in the combinator window, so they are discoverable without
      reading anything.
    - Write {{item}} for a literal "{item}" in a station name.
  Notes:
    - The rich-text wildcard buttons are unchanged and still there. Nothing needs migrating; this
      is purely an easier way to type the same thing.
    - {icon} remains UNFILTERED -- it takes whatever is on the wire. {item} only fires for items.
Version: 0.3.0
Date: 2026-08-02
  Changes:
    - The STRONGEST signal now names the station, not the first one in picker order. If a wire
      carries several candidates, the one there is most of wins. Ties still fall back to vanilla
      picker order, so a station whose candidates are level does not flap between them.
    - Negative signals are never considered. A negative is a subtraction some other circuit is
      doing, and naming a station after it is nonsense. A wire carrying only negatives now counts
      as a quiet wire, so the keep/fallback choice applies to it.
  Notes:
    - If you relied on 0.2.0 picking the first-sorting signal, set your source to emit only the
      signal you want, or give the intended one a higher count.
Version: 0.2.0
Date: 2026-08-02
  Major Features:
    - Interrupt wildcards in the station name. Drop Factorio's own "any item" / "any fluid" /
      "any fuel" / "any signal" symbols into the template and the real signal on the wire fills
      them in: "[any fluid] pickup" becomes "[fluid=crude-oil] pickup".
    - Wildcards double as a TYPE FILTER. A fluid wildcard fed an item declines to rename at all
      and falls back instead, so an item renamer and a fluid renamer can watch the same wire and
      only the right one acts.
    - Configurable fallback name for when the wire goes quiet, replacing the old on/off choice.
      Leave it empty and it degrades to the template with placeholders stripped.
  Features:
    - Wildcard buttons and a signal picker in the combinator window, so names are built by
      pointing rather than by memorising syntax.
    - The entity is now a teal decider combinator, recoloured at data-load time via sprite tint.
      No image files are shipped: the mod carries three numbers and keeps vanilla's exact
      perspective, lighting and shadow.
  Changes:
    - on_no_signal "blank" is now "fallback". Blueprints exported from 0.1.0 still import.
  Bugfixes:
    - The no-signal switch did nothing: control.lua referenced gui.NAMES.no_signal after the GUI
      rewrite renamed the key to nosignal, so the comparison silently never matched. A static
      check now fails the build if any gui.NAMES key is undefined.
    - The sprite tint was being applied to the shadow layer as well as the body, which would have
      painted a brightly coloured shadow on the ground. Caught by reading the data dump back.
Version: 0.1.0
Date: 2026-08-02
  Major Features:
    - Station Renamer Combinator: reads the first signal on one input wire colour and writes a
      train stop name built from a text template you type.
    - Template placeholders: {icon}, {Name}, {name}, {count}, {type}, {quality}, and {{ }} for
      literal braces. A template with no placeholder is a valid static name.
    - Configurable red or green input wire per combinator, so a station's own control signals can
      share the wire run without polluting its name.
    - Remote interface for other mods: get_config, set_config, copy_config, list.
  Features:
    - Live preview in the combinator window showing exactly what the station will be called.
    - Placeholder chips that append to the template, so the syntax is discoverable without docs.
    - Status readout: driving N stations, no stop found, conflict, or wire-walk truncated.
    - Two runtime-global settings: rename interval (default 30 ticks) and wire re-scan interval
      (default 120 ticks).
    - Conflict detection: when two renamers can drive the same stop, neither writes.
  Optimizations:
    - Wire-graph rediscovery is staggered across ticks, so per-tick cost stays flat as the number
      of renamers grows rather than spiking.
    - backer_name is written only when the computed name actually changed.
    - Early-out when no renamers exist: an installed but unused mod costs one table lookup.
    - Wire traversal is bounded at 256 nodes.