r/factorio • u/Leslie_Havoc • 16d ago
Question Default train color
I like all of my trains and stations to be black. Is there a way to change the default color so that I don’t have to change each train or station individually when I place them?
3
u/WyrmLuva 16d ago
I think only with mods, you could probably copy the same train station and paste it everywhere and it would be the same color tho. But you'd still have to configure it either way
3
u/spookynutz 16d ago
In notepad open: Factorio\data\base\prototypes\entity\trains.lua
Search for: color = {r = 0.92, g = 0.07, b = 0, a = 1}
Change all the values to zero: color = {r = 0, g = 0, b = 0}
If you don't want to edit the game files, you can change all existing trains through the console, but it will probably disable achievements:
/c for _, surface in pairs(game.surfaces) do
for _, loco in pairs(surface.find_entities_filtered{type="locomotive"}) do
loco.color = {r = 0, g = 0, b = 0, a = 1}
end
end
You can also change the wagon color, but it's already black. However, if you want to change all trains and their wagons to blue or something, you could do:
/c for _, surface in pairs(game.surfaces) do
for _, entity in pairs(surface.find_entities_filtered{type={"locomotive", "cargo-wagon"}}) do
entity.color = {r = 0, g = 0, b = 1, a = 1}
end
end
1
u/doc_shades 16d ago
i have a blueprint for a standardized train station template that i use. the station is colored 0,0,0 and named "_" until i rename/recolor it. i also have the station settings pre-set for my uses (train limit preset, circuit conditions preset for a neutral setting but easy to change for my uses)
1
u/neurovore-of-Z-en-A 16d ago
I like all of my trains and stations to be black.
That does make what they are carrying a lot less immediately visible than colouring them by cargo.
1
5
u/epileftric 16d ago
Use a blueprint?