Train Foundry


A large train foundry building that assembles complete trains from blueprint templates: import a train blueprint, queue it, feed the parts with inserters, and watch the finished train fuel up and drive off onto your rail network on its own.

Content
10 hours ago
2.0 - 2.1
372
Trains

Changelog

Version: 1.0.0
Date: 2026-08-07
  Info:
    - The mod now targets Factorio 2.1 only. Factorio 2.0 is no longer maintained (a 2.0 branch is
      kept for a possible crash-only hotfix).
    - Upgrading an existing save: the platform is rebuilt automatically. An extension placed before
      1.0.0 keeps the old adjacency spacing and may show a small gap at the junction with the main
      building — just re-place that extension flush against it to fix it.
  Features:
    - The building is now made of real entities: stone walls with gates around the perimeter, two
      internal tracks (assembly and recycling), and decorative bands (industrial top, scrap bottom).
    - Recycling track (optional, per-foundry): a dead-end second track with a "Train Recycle" stop.
      A train left on it is destroyed and fully refunded (vehicles, fuel and cargo) into the buffer.
    - Rich placement preview (2.1): while holding the foundry item (real or ghost), a full picture of
      the building follows the cursor in both the game view and the map, so you can see exactly where
      the tracks and walls will land before placing. It also shows on a placed ghost.
    - New look: overhead crane gantry over the tracks, a 1x2 reserve chest (tall-steel-chest sprite
      from the Wide Containers Assets mod by Lebothegizebo, MIT), and the platform elements spaced so
      inserters fit between the chests and the circuit connector.
  Changes:
    - Extensions only snap to a foundry placed at the exact adjacency distance; placing one too far is
      refused and refunded.
  Bugfixes:
    - Top and bottom walls of the enclosure no longer go missing on reload.
Version: 0.7.0
Date: 2026-07-25
  Features:
    - Generic fuel option (off by default) in the Configuration window: off keeps the fuel from the
      blueprint (as before); on fills every locomotive with the best unlocked compatible fuel
      available in the buffer and adds a refuel interrupt covering every fuel the locomotive can
      burn (trigger at 10% of full, refill to fuel_full). A blueprint that carries no fuel at all
      always uses this generic fuelling (nothing to honour).
    - New "clear stuck train" button: if a built train cannot leave and sits on the internal track,
      one click destroys it and refunds its cost.
    - Component and fuel slots now show the item name on hover and open Factoriopedia on click.
    - Component buffer enlarged from 20 to 100 stacks.
  Changes:
    - Train Foundry is now split into two independent mods. This one keeps the blueprint source
      (unchanged buildings, entities and saves). A separate mod, "Train Foundry for Smart Train
      Combinator", builds trains from Smart Train Combinator models instead. Install either or both;
      their buildings can coexist on the same surface.
  Bugfixes:
    - Removing extensions no longer leaves orphaned rails east of the shortened foundry.
Version: 0.5.2
Date: 2026-07-24
  Bugfixes:
    - Trains built from a blueprint with no base stops - driven only by a group and/or interrupts,
      as in a logistic-network setup - now leave the foundry in automatic mode instead of manual,
      and keep all their interrupts.
Version: 0.5.1
Date: 2026-07-22
  Bugfixes:
    - Hide the foundry's internal helper entities (circuit connector, input and blueprint chests,
      rails and signal) from Factoriopedia.
Version: 0.5.0
Date: 2026-07-19
  Features:
    - Optional right-side (east) exit: trains can now leave the foundry to the right as well as the
      left. Open the foundry window, click the panel button in the title bar, and tick "Right (east)"
      in the Configuration window to lay an east exit track and signal. Either or both sides can be
      open at once; the train picks the side its schedule reaches. On a chained foundry the east exit
      follows the far (east) end of the chain and re-anchors automatically when extensions are added
      or removed. New foundries default to left-only, so existing setups are unchanged.
  Changes:
    - Reworked foundry sprite: both side walls are now closed; the exit track is drawn over the wall
      only where a train actually leaves, so it reads as a clean gate on each open side.
    - The side panel is now titled "Configuration" (exit sides + circuit read mode).
    - Blueprints are no longer rejected for locomotive facing: a train facing any direction is
      accepted, since the foundry can now dispatch to either side.
    - Placing a foundry no longer requires a pre-existing rail under the exit: the building lays its
      own exit track. Just connect your network to it afterwards.
Version: 0.3.1
Date: 2026-07-19
  Bugfixes:
    - Belts, inserters and other entities placed on the free apron area next to the foundry can now
      be hovered, configured and removed again: the building no longer steals the mouse-over from
      them. The foundry can still be opened from its body, from the circuit connector, and with the
      Ctrl+Alt+F shortcut.
Version: 0.3.0
Date: 2026-07-18
  Features:
    - Longer trains: place another Train Foundry right against the east side of an existing one to
      chain it as an extension. Each module adds room for 5 more vehicles (5 alone, 10 with one
      extension, 15 with two, and so on). Extensions have no chests or signal of their own; the
      whole chain is driven from the master's window, and its stock and exit stay on the west end.
    - Dedicated blueprint chest (blue) on the west apron: drop your train blueprints there. The
      book in the main window mirrors it; click a plan to queue it.
    - Equipment grids on locomotives/wagons are now requested and consumed from the stock like
      fuel and ammo (no longer created for free), and refunded on cancel.
  Changes:
    - The main window is now a regular window: Escape closes it. Clicking the blueprint chest
      opens a floating management window (unaffected by the blueprint library shortcut).
    - Reworked window: blueprint library with per-plan locomotive/wagon counts, rejected plans
      flagged in red with the reason, available/required ratio on each component slot, and a
      Clear queue button.
    - The master cannot be mined while it still has extensions (remove them from the right first).
    - The blueprint length limit now follows the chain: a plan that was rejected as too long
      becomes valid on its own once you add an extension (and vice versa), no re-import needed.
  Bugfixes:
    - Blueprints are validated before building: a plan is rejected up front if it is not a pure
      train, is too long for the foundry, is not on a straight track, or has no locomotive facing
      the exit (west) - instead of failing mid-build.
    - The circuit "requests" mode no longer counts the components of a train already being built.
Version: 0.1.0
Date: 2026-07-17
  Info:
    - First release. Build complete trains from blueprint templates.
  Features:
    - A large foundry building placed on the end of a rail line. Import train blueprints as
      templates, queue them, and each train is assembled and sent off onto your network on its
      own (composition, colors, fuel, schedule, train group and blueprint parameters included).
    - Internal iron chest stock feeds the builds; feed it by hand or with inserters.
    - Circuit connector: broadcast the stock contents or the missing components (picked in the
      window).
    - Shortcut-bar button (and CTRL+ALT+F) opens the foundry's window from anywhere. One foundry
      per planet.
    - Vanilla, Space Age and Nullius compatible.