Add wildcards for train composition, bidirectionality and wagon count

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

mrvn
Smart Inserter
Smart Inserter
Posts: 5999
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Add wildcards for train composition, bidirectionality and wagon count

Post by mrvn »

TL;DR
For interrupts add wildcards that are replaced by the train composition, bidirectionality or wagon count.

What?
Add three new wildcards for interrupts:

Train composition
For use in station names this gets replaced by the composition of the train, e.g. [item=locomotive][item=cargo-wagon][item=cargo-wagon][item=cargo-wagon][item=locomotive].

There should be 2 extra flavors for this: Replace any wagon with [virtual-signal=any-wagon] and replace any locomotive with [virtual-signal=any-locomotive] for use with mods that define new locomotives. This would be useful for refueling stops as they only care about where the locomotives are.

Note: If there can't be 3 flavors of this then use the last one, with everything mapped to the virtual signals. It's the most useful for refueling.

Train bidirectionality
For use in stations names this gets replaced by [virtual-signal=signal-train-bidirectional] if the train has locomotives facing both ways.

The use case for this is when both through stations and end stations are being used. Only bidirectional trains can go to end stations but both types can go to through stations. This symbol would be included in the station name and interrupt to filter out the right stations.

Train wagon count
For use in station names this gets replaced by the number of wagons in the train, not counting locomotives, e.g. for the above train: [virtual-signal=signal-4].
The reason why locomotives are excluded is so that an LCCCC and LCCCCL train can use the same through station.
Why?
Writing interrupts to fetch items for trains with one wagon, two wagons, 4 wagons, 8 wagons,.. and all their refuel interrupts becomes repetitive. The above would allow more universal interrupts that automatically adjust to the train the interrupt is used on.
User avatar
AileTheAlien
Filter Inserter
Filter Inserter
Posts: 400
Joined: Sat Mar 11, 2017 4:30 pm
Contact:

Re: Add wildcards for train composition, bidirectionality and wagon count

Post by AileTheAlien »

I'm still building out my 1-1 trains, but once I getback to 2-4 trains, this seems like I'll want it! :)
Post Reply

Return to “Ideas and Suggestions”