Random Train Trailers 1.5
Cargo-based trailer selection feature added. Trains can now have their trailers reflect the cargo they carry. Enable it in the options menu. More info here.
Random Train Trailers is a mod that can randomize the spawning of vehicle trailers. This increases the variety of vehicles in your city without actually needing more assets.
A config file contains the vehicles for which the trailers can be randomized and what trailers to use for each vehicle.
Some parameters can be specified to modify the chance of having randomized trailers and how ‘rare’ each trailer is. A default config is included for several train assets so you can use the mod without having to do any setup yourself.
These trains can be found in this collection.
There is now a UI in game to edit the configs. The settings discussed in this discussion page can be found in the UI as well.
Does this work for all vehicles?
It used to but I changed it to just trains, metros and trams for technical reasons. It’s most useful for those cases anyway. If there’s a need for other vehicle types let me know.
Can I use trailers from other assets?
A vehicle’s trailer list can include any trailer (as long as it’s of the same type of vehicle) including those of other assets.
Just don’t go putting cargo trailers on passenger trains or whatever, the game does not like this and will probably start throwing errors at you. The same goes for using non-trailer assets as trailers.
Does this mess up my save?
No, it just changes the way vehicles spawn. Disable the mod and everything is back to normal. A game restart may be required though.
Workshop trains are too long, can I make them shorter?
Yes, either on a per-train basis using the editor or use the global limit in the mod options. (Setting the global limit to 0 disables it)
Is there a tutorial on how to use the settings?
Yes
This mod makes use of the C# detours library[github.com] by cope.
This mod also uses Harmony[github.com] for detouring.
It also uses some UI code from AVO by SamsamTS.
Cargo Info for the method to get a train’s cargo contents.
There are no mod compatibility issues as far as I know.
source[github.com]