Train Upgrader


Easily automate the replacement of large numbers of active locomotives and wagons in your rail system. Useful in combination with mods that add multiple tiers of locomotives or wagons.

Utilities
6 months ago
1.1
25.3K
Trains
Owner:
anachrony
Source:
https://github.com/GregorSamsanite/nullius
Homepage:
https://discord.gg/tZY2Rkte8Y
License:
MIT No Attribution
Created:
1 year, 2 months ago
Latest Version:
1.0.5 (6 months ago)
Factorio version:
1.1
Downloaded by:
25.3K users

Have you ever played with mods that add new types or tiers of trains, e.g. overhauls such as Bob's, Angel's, Pyanodon's, Nullius, Krastorio 2, or Seablock, or standalone train mods such as Space Trains, Electric Trains, Armored Train, Yuoki Industries Railroads, Steam Locomotive, etc?

If you already have a large rail base when gaining access to a new type of train, then you know the pain of trying to upgrade the whole system to a newer version of locomotive or wagon. You can't use the upgrade planner or even manually fast replace them with the new rolling stock. It's quite annoying to chase them all down, replace the cars one by one, while trying to maintain the same schedule and dealing with any cargo or fuel. Many people won't bother and still have older, slower models of train clogging their rail system.

This mod offers a simple, quick, and painless system for upgrading your entire train system to better versions of locomotives or wagons.

Simply set up a new train stop anywhere on your train network, and put two Train Upgrader chests next to it. Put the new type of locomotive, wagons, and/or fuel in the supplier chest. The upgrader station will gradually summon all of your automated trains that aren't already using the new type of rolling stock, a few at a time. While they're stopped at the station, their old locomotive and wagons will be swapped out for the new ones and placed in the receiver chest, and they will then go back to their normal schedule as usual. Their current fuel will be preserved unless you also put a new fuel type in the chest, which it will replace it with.

Upgraded wagons will maintain their existing cargo. Any filtered inventory slots will be scaled according to the new inventory size so that there are still a similar proportion of each filter type. If the number of slots are restricted below the maximum, then the limitation will be maintained.

If you only want certain types of rolling stock to be replaced you can filter slots in the receiver chest to only accept the things you want to be replaced, which will prevent anything that doesn't fit in that chest from being replaced.

This mod should be compatible with most train manager mods such as LTN. Just use a regular train stop for the upgrade station, not a station with specialized behavior. It is OK with Space Exploration space elevators, though it won't summon trains currently on other surfaces from the upgrade station. It should work with any type of mod that adds new trains, with the caveat that replaced trains must be compatible sizes. If a mod (such as Pyanodon's) adds trains with different sizes, it will only upgrade carriages within the same size category as one another. Only trains in automatic mode will be rerouted to upgrader stations, so if you want to exclude a particular train from upgrading, you could temporarily set it into manual mode. You may have more than 1 supplier or receiver chest on the same stop if you like, and it will use the inventory in all of them. Upgrader chests must all be within 2 tiles of train stop. You can have multiple train upgrader stations working simultaneously in parallel if you have a sufficiently large number of trains that upgrading them one by one is taking too long.