Cities: Skylines

Cities: Skylines

543 ratings
Random Train Trailers 2.4.1
2
   
Award
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
226.179 KB
Feb 23, 2017 @ 3:39am
Apr 25, 2023 @ 11:28am
30 Change Notes ( view )

Subscribe to download
Random Train Trailers 2.4.1

In 2 collections by Acc3ss Violation
Acc3ss' Mods
7 items
Random Train Trailers Trailer Pool
39 items
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.

Popular Discussions View All (5)
50
Dec 1, 2020 @ 6:24am
PINNED: Config structure
Acc3ss Violation
7
Jun 24, 2022 @ 7:51pm
PINNED: Tutorial - randomizing and downscaling a very large cargo train
Acc3ss Violation
4
Nov 29, 2022 @ 11:04am
PINNED: Tutorial - Getting started with Cargo
Acc3ss Violation
223 Comments
BierPizzaChips Apr 14 @ 11:08pm 
This is a fantastic mod!!! Now i can run my favourite locomotives with trailers matching to the industry of the a districts cargo station. I LOVE this. Many, many thanks.:steamhappy::steamthumbsup:
The Loot Oct 25, 2023 @ 12:06am 
Bummer, but it is something I can mention to bsquiklehausen if he still has plans to update his old freight trains.
Acc3ss Violation  [author] Oct 24, 2023 @ 1:21pm 
No, the Empty trailers are only possible via the trailer variations.
The Loot Oct 24, 2023 @ 12:35pm 
Good point about the amount of short trains you'd get.

Is there a way that an "Empty" cargo can be set to spawn static trailers like the other types can? There's a "None" cargo, but documentation says that spawns them with any type of cargo.
Acc3ss Violation  [author] Oct 24, 2023 @ 9:10am 
The problem with cutting down the amount of trailers is that a lot of trains are actually more than 50% empty, at least during my testing, so you'd end up with a lot of really short trains, which looks a bit silly.

The empty cargo trailers are already a thing. The game has support for trailer variations and the mod does use that to make trailers appear empty based on cargo load of the train. Of course the assets themselves need to support these variations, but there are some out there that do and they work quite nicely.
The Loot Oct 24, 2023 @ 1:19am 
Would you still be interested in adding any new features?

I guess the simplest would be an option to check the vehicles load percent and then cut down the amount of trailers that can spawn to that percent of the maximum trailer count.

A more involved system, with the addition of an "Empty" cargo type for trailers, spawn those cars depending on how empty the vehicle's load is compared to the maximum.

Is something like that possible?
STC Continuum Aug 2, 2023 @ 6:08pm 
@Acc3ss Violation I set end offset to 3 and that worked. Thank you!
Acc3ss Violation  [author] Jul 24, 2023 @ 11:39am 
@STC Continuum Using an end offset of 1 should work on all of them, so the caboose should be there. Are some of those assets perhaps ones that automatically 'turn around' when reversing? I know some steam trains on the workshop do that. For those you may need a higher end offset than 1 because the last one or two cars are actually invisible, so the caboose isn't actually the last trailer.
STC Continuum Jul 22, 2023 @ 4:33pm 
So, I have a question. I am trying to get my freight trains to spawn with cabooses on the end, using the end offset set to 1. I have subscribed to several trains, all with cabooses, yet only one will actually spawn with a caboose at the end. What am I doing wrong, or is this a glitch?
Acc3ss Violation  [author] Apr 25, 2023 @ 11:28am 
Copy/paste buttons were just added in 2.4.1