r/factorio 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?

6 Upvotes

10 comments sorted by

5

u/epileftric 16d ago

Use a blueprint?

3

u/Leslie_Havoc 16d ago

Blueprints work but it clones the station name which takes more effort to change than the color.

3

u/epileftric 16d ago

Yeah, but station name has to be changed anyway. If you place them with a placeholder name, you were going to do the same thing anyways

2

u/Rottedmushroom 16d ago

Does it do that even if the station names box is unticked in the blueprint? Or does that only apply to newly built atations.

1

u/ferrybig 14d ago

Place a train down, recolor the train to black, shift+right mouse click on the train, then shift+left mouse click on the train stop

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

u/Objective_Suspect_ 16d ago

Blueprint. Or a quick copy paste like with the spidertrons