[0.15] Waypoint stations

Topics and discussion about specific mods
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

[0.15] Waypoint stations

Post by aaargha »

Info Adds a special kind of train stops that unlock with the Automated rail transportation research. These train stops are meant to be used to guide train paths without forcing trains to stop.

Please note that they do not force trains to travel through them, it is enough for the train to start braking for the stop to send it on to the next destination. This means that it cannot be used to micro-manage train paths, but it will still work well over longer distances. Behaviour might be improved in 0.16.

Basically we listen to on_train_changed_state for the arrive_station state, if the destination is a waypoint -> go to the next destination.

Should also be usable in earlier versions of Factorio by changing info.json.

Feedback, suggestions and bug reports welcome.
Last edited by aaargha on Tue Jan 09, 2018 5:31 pm, edited 1 time in total.
quyxkh
Smart Inserter
Smart Inserter
Posts: 1031
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: [0.15] Waypoint stations

Post by quyxkh »

Heh. I was going to write this but then I saw a train blow through a stop it had been scheduled for and realized you can get waypoints in vanilla Factorio, put a signal just beyond braking distance and disable the stop on Red=1. This has _so_ many potential uses.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [0.15] Waypoint stations

Post by aaargha »

quyxkh wrote:Heh. I was going to write this but then I saw a train blow through a stop it had been scheduled for and realized you can get waypoints in vanilla Factorio, put a signal just beyond braking distance and disable the stop on Red=1. This has _so_ many potential uses.
That is a good alternative, and can allow for finer path control as the player can decide when the train should switch to the next station. There are however a few drawbacks to that approach and some situations where it does not really work:
  • Trains are likely to slow down as they start braking for stations way earlier than for signals. It's usually not a problem but there may be some cases where you can't fit the sensor signal where you want to.
  • It likely won't work well for multiple trains using the same waypoint: a train reaching the waypoint will also make all other trains heading to is switch destination.
  • It can be triggered by other trains: you need to make sure that other trains won't use this stretch of track as that can disable the station. This can sometimes be worked around by putting the station and sensor signal on its own branch but that will get pretty messy for multi-lane systems.
  • You can't have two waypoints with the same name: trains will go to the other waypoint once the first one disables.
That said, for many cases the vanilla setup will work just fine.

I agree that controlling train stops with signals has a lot of potential for interesting builds. The best I've seen so far is the "instant stop train station" that reduces the braking distance for stations to just a few tiles, but I'm sure there are many more uses for this.
Post Reply

Return to “Mods”