[2.0.28] Automatic artillery train

Smart setups of railway stations, intelligent routing, solutions to complex train-routing problems.
Please provide - only if it makes sense of course - a blueprint of your creation.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 580
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

[2.0.28] Automatic artillery train

Post by Hares »

Sharing my design of automated patrolling artillery train.
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
12-22-2024, 19-06-38.png
12-22-2024, 19-06-38.png (2.59 MiB) Viewed 148 times


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
Otherwise, it will visit another artillery position based on priority which represents time since artillery train visited it. "Approach" and "Fire Position" share train limits (==1) and priority, but only the latter will reset the memory cell.

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
  1. Deploy train & train reload station (they are on the same blueprint). Train comes with schedule & reload interrupt.
  2. 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.
  3. 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.
  4. Deploy artillery position train stops in the safest spots of your outposts or perimeters as these train stops come with no defense.
  5. Let the fun begin!
Configuration
12-22-2024, 19-24-08.png
12-22-2024, 19-24-08.png (381.2 KiB) Viewed 148 times
This constant combinator uses logistical groups to allow bulk edits of configuration within the entire savefile, and comes with two options:
  • 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.
Post Reply

Return to “Railway Setups”