Train goes from one artillery position to another until it runs out of ammo, prioritizing train stops it has not visited for longest time.
Blueprint
How it works?
Pretty damn simple, by the way.Due to 2.0 train system engine limitation (see: 118475: [2.0.12] Train does not move between stops with same name (MR)), train schedule is required to have stops with different names to advance in the schedule, that's why schedule (and each artillery position) contains "Approach" and "Fire Position" stops tight together. Each "Fire Position" stop has a timer which resets when the train is parked, and increases both stops priority over time (default configuration: +1 priority per minute -- see configuration section below for details).
Train waits on the firing position until it runs out of ammo, or until certain inactivity period has passed. After that, it decides to either go home or visit another artillery position. It will go home if:
- It is low on fuel (see p.3 in Usage)
- It is completely out of ammo
- No artillery position train stops are available
Technically, this system can support multiple artillery trains, but the system was never tested for that. That will require additional adjustments to the rearming train stop including but not limited: adding extra reload stations, adding enabled conditions, setting dynamic limits, and/or adding depotting/waiting bays for it.
Usage
- Deploy train & train reload station (they are on the same blueprint). Train comes with schedule & reload interrupt.
- Make artillery as long as your rail system can handle (I personally use 1-4-1 train stops, but this system would work with any design). Add inserters to load artillery shells.
- Adjust refueling logic to match your rail system. Currently, the train is configured to refuel at specific refueling train stop, but you can refuel it on the hub and merge two interrupt conditions.
- Deploy artillery position train stops in the safest spots of your outposts or perimeters as these train stops come with no defense.
- Let the fun begin!
- P signal. Defines time interval (in ticks) after which priority of train stop increases.
Code: Select all
Priority = <Ticks since train left station> ÷ P
- T signal. Any non-zero signal here will reset the system -- all priorities will be reset; and artillery train will finish its route and might after that return home.