Script Grouped Yard Tracks
This script allows you to divide yards and depots up into groups of tracks, and to assign trains to groups, so that those trains automatically get dispatched to specific tracks in the yard/depot. This makes it easier to ensure you always have the correct rolling stock available to pick up shifts especially when you have different types of rolling stock stabled in a yard overnight. The script supports up to 8 groups and also has an option for an "ungrouped overflow area".
The script supports stacking of trains on the same track as long as there is enough space, with a configurable distance between stacked trains (default 8m).
The grouping system leverages the game’s tagging system. Create some tags for your train groups, and then assign each of your trains one of those tags. For example, you could create a tag structure like this:
Grouped Yards
|- Yard 1
|- Group 1
|- Group 2
|- etc…
To select the tracks for each group, you’ll need some kind of signal. I recommend placing marker signals down at the far end of each track. The script will try to put trains on the marker first, and then try to stack later trains behind those.
Finally, to actually use the script, on each entrance signal to the yard/depot, enable the Grouped depot stacking extension. Then open the newly added configration section.
Here, for each group you want to divide your yard into, select the group tag (e.g. Grouped Yards – Yard 1 – Group 1), and in each group’s target waypoints field, select the marker signals you placed on the far end of each track.
Overflow tracks
The overflow tracks field allows you to select additional tracks in the yard, that you can send trains to that do not belong in any group. You can also send grouped trains there, if their own group’s tracks are already full (can be disabled by turning off the Send grouped trains to overflow checkbox).