Random Train Trailers 2.4.1

If you liked this item, please rate it up on Steam Workshop page.

Author: Acc3ss Violation

Last revision: 25 Apr, 2023 at 19:28 UTC (7)

File size: 221.18 KB

On Steam Workshop

Description:
What it is

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.

How it works

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. Check out this turorial page for info on how to get things going.

Questions you may have

Does this work for all vehicles?
Only ones that run on rails, so trains, trams and metros.

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 each setting?
Yes

Credits

This mod 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.

Compatibility

There are no mod compatibility issues as far as I know.

source[github.com]

Major change list

Trains, trams & metros (2.4.0)

Support for passenger trains, trams and metros has been added back in! You can create configs for them the same way as with cargo trains. Unlike cargo trains, these passenger vehicles will only be randomized once when spawning instead of at every stop, so you don’t have to worry about constantly changing capacities on your transit lines when randomizing trailer counts.

Industries DLC Update (2.0.0)

Mod has been rewritten to be compatible with the new Industries patch. Trailer variations are used properly, including when using the mod’s own cargo feature. You can enable it on the default cargo train if you want to see the differences between the game and the mod.

The mod now also supports 2 new cargo types: Mail and Metals. No idea if the game ever carries Mail by train, but when it does, you can have custom wagons for it! Metals could be useful for Coil wagons in combination with the DLC.

Note for Asset Creators
Check the Cargoes section (at the bottom) of this discussion page for info on how the mod handles the new Industries cargo types and submesh variations: https://steamcommunity.com/workshop/filedetails/discussion/870291141/133258092236504318/

New in 1.6

Config files (RTT-Definition.xml) get loaded from asset and mod directories, making it possible for asset authors to include trailer configs with their assets.

New in 1.5 Cargo changes trailers!

Cargo-based trailer selection feature added. Trains can now have their trailers reflect the cargo they carry. More info here.