Automatic Train Painter


Automatically colors locomotives and wagons based on their contents.

Tweaks
a month ago
0.17 - 2.0
98.3K
Trains

g How does this mod handle "supply trains" with multiple types of items?

5 years ago

I like the concept very much and I am considering using your mod. It will be awesome for single-material trains.

But I am not clear how it will handle trains with multiple types of items in them (like personal supplies for building at remote sites, or those intended for automatic construction). For example: I have a rail building train that carries supplies when I construct long rail segments and mining outposts. I also have an automatic supply train that carries all the supplies to let local bots automatically build a Nuclear Powerplant once I place its blueprint.

How does the mod handle those mixed content trains? Does it try to guess/pick a color? Or does it let the player choose a representative color for them?

5 years ago
(updated 5 years ago)

Trains with multiple kinds of items are painted based on a weighted average of the colors assigned to each item and their quantities.

For example, a train filled with equal amounts of red and green wires will be painted a dull yellow:
[(R=255,G=0,B=0) x #red + (R=0,G=255,B=0) x #green] / total# = (R=127,G=127,B=0)

This works for any combination of items and amounts without limit.

New response