Automatic Train Painter


Automatically colors locomotives and wagons based on their contents.

Tweaks
1 year, 3 months ago
0.17 - 1.1
88.9K
Trains
Owner:
yeahtoast
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
5 years ago
Latest Version:
1.2.0 (1 year, 3 months ago)
Factorio version:
0.17 - 1.1
Downloaded by:
88.9K users

Features:

Trains will automatically be colored, based on the contents of their inventory, as soon as they begin to move in Automatic Mode.

Item colors are based on their icons, while fluid colors are based on their appearance in pipes, storage tanks, and barrels. If a train's inventory contains multiple entities, their colors will be blended proportionally to the quantity† of each entity present.

Perfect for keeping Logistic Train Network trains color-coded!


Thanks to Xterminator for the Mod Spotlight video!


List of supported mods


Settings:

  • Paint locomotives. It is [ON] by default. When turned off, previously painted locomotives will remain painted in their respective colors.
  • Paint cargo and/or fluid wagons. The latter works only if using a mod like Fluid Wagon Color Mask.§ They are [OFF] by default. Turning these functions off after having already painted wagons will cause them to return to default colors after stopping and starting again in Automatic Mode.
  • Unpaint empty trains. This will set the locomotives of an empty train and its wagons to their default colors. It is [ON] by default.
  • Unpainted locomotive color. The default color for an unpainted locomotive, it can be any 3- or 6-digit hexadecimal number. Default is E4D1C7, original red is EA1100.
  • Unpainted cargo wagon color. The default color for an unpainted cargo wagon, it can be any 3- or 6-digit hexadecimal number. Default is 6D3A00.
  • Unpainted fluid wagon color. The default color for an unpainted fluid wagon, it can be any 3- or 6-digit hexadecimal number. Default is C8C8C8.
  • Enable LTN dispatch painting. Will (usually‡) paint the train based on the item(s) requested as it is dispatched from a Logistic Train Network depot. It is [OFF] by default.
  • Enable/input custom colors. See the FAQ page for more details.

Other Features:

  • Locomotive Equipment Grid: an unused feature of vanilla Factorio, this can now be enabled for locomotives via a Startup mod setting. By default a 2x4 grid large enough to fit a pair of 2x2 equipment modules (e.g., FARL and/or Shuttle Train) simultaneously, it can be extended to 16x16 if desired.
  • Manual Color Module: an inexpensive 2x2 equipment item that can be placed in the locomotive Equipment Grid. Trains with this item present will not be automatically painted, and will have manual colors preserved. It is researched with Automated Rail Transportation and costs 1 Electronic Circuit. It also provides 1 W of bonus power to the train, for reasons.

  • Station painting is not included, but can be done via the Automatic Station Painter mod. Thanks to doktorstick for creating this functionality as a standalone mod!


Planned features/improvements:

  • Additional colors for entities. All vanilla entities are included. The FAQ page contains the list of supported mods. Existing colors will be reviewed and updated periodically if sprite icons are changed. For other mods with new entities, make a request on the discussion page and I'll put them on the list.

Recommended Companion Mods:


Notes:
† - In order to keep the color of mixed cargo and fluid trains from being dominated by fluids due to their 25k fluid wagon capacity versus (typically) 2k-8k cargo wagons, the quantity of fluid is reduced during color calculation by a factor of 5. This is equivalent to cargo with a stack size of 125.

‡ - LTN dispatch painting generally works only after the train's depot light turns yellow, which does not always happen for unknown reasons. Additionally, unpainted trains that stop and start within about a second of completing their LTN delivery may be repainted, due to the LTN dispatcher not clearing the delivery in time. Stopping and starting a train outside of one second (60 ticks) of either of these events should set it to its correct painting state.

§ - Mods that employ their own fluid wagon coloring systems may experience various issues with automatic painting, including slight color mismatch and translucency.

Originally built upon Train Ore Color by Sirenfal.