Automatic Train Painter

Automatically colors locomotives and wagons based on their contents.
25 days ago
0.17
5115
Owner: yeahtoast
Source: N/A
Homepage: N/A
License: MIT
Created: a month ago
Latest Version: 0.2.8 (25 days ago)
Factorio version: 0.17
Downloaded: 5115 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.

Planned features/improvements:

  • Change train colors when dispatched via LTN request. Implemented, but still some non-fatal bugs to work out.
  • Additional colors for entities. All vanilla entities are included. For a full list of supported mods, 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 try to get 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.

‡ - Currently, LTN dispatch painting works only after the yellow light turns on at the depot. Sometimes depots will skip yellow entirely; I'm not sure if that's a bug with this mod or LTN.