Automatic Train Painter

Automatically colors locomotives and wagons based on their contents.
3 days ago
0.17 - 0.18
23841
Owner: yeahtoast
Source: N/A
Homepage: N/A
License: MIT
Created: 11 months ago
Latest Version: 0.3.5 (3 days ago)
Factorio version: 0.17 - 0.18
Downloaded: 23841 times

Originally built upon Train Ore Color by Sirenfal.


Features:

Trains will change color as soon as they begin to move in Automatic Mode, based on entities in their inventory.

List of vanilla entities' colors and supported mods.
Item colors are based on their appearance on belts (i.e., their icons), while fluid colors are based on their appearance in pipes and storage tanks. If a train's inventory contains multiple entities, their colors will be blended proportionally to the quantity† of each entity present.

Perfect for keeping LTN trains color-coded! LTN trains will also be painted when dispatched from depots, based on the item(s) requested.


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 with a fluid wagon color mask included, such as WagonColors. 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 make the locomotives of an empty train a neutral gray and restore its wagons to their default look. It is ON by default.

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 (ie, 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.

Planned features/improvements:

  • Additional colors for entities. All vanilla entities are included. For a full list of supported mods and mods with planned future support, see the FAQ page. 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.

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 paint-on-dispatch functionality has been temporarily disabled due to LTN 1.12.3 event refactoring.
LTN dispatch painting works only when the depot light turns yellow, which only happens some of the time. I have no idea why that is, but at least it works some of the time.