I have a problem where a train keeps leaving and returning to the same station, even though that station is disabled. Can someone explain what is happening?
This train carries the Ultracube mod's special cube to any available station named "Use". Station availability is controlled by setting train limit to 0 or 1 in circuit conditions. The train's schedule has two stops, "Use" and "Depart"; the reason for "Depart" is to make the train leave its current station and then find a new path to "Use". Every "Use" station has an adjacent "Depart" station.
The train keeps leaving and returning to this station, even though its train limit is set to zero. You can see the "Use" and "Depart" stations.
The train never arrives at this station:
If, while the train is between stations, I set it to manual and then set it back to automatic, then it will go to the other station.
Why does it work this way? My guess is that because the train is still occupying the "Use" station when it arrives at "Depart", the game ignores the train limit on "Use" and chooses the closest station as the destination.
Why does train return to disabled station?
-
half a cat
- Long Handed Inserter

- Posts: 65
- Joined: Sun Jul 16, 2023 4:03 pm
- Contact:
-
half a cat
- Long Handed Inserter

- Posts: 65
- Joined: Sun Jul 16, 2023 4:03 pm
- Contact:
Re: Why does train return to disabled station?
The attached save has the train setup that I described, and you can see it always returning to the same station.
- Attachments
-
- train-routing-bug.zip
- (1.63 MiB) Downloaded 20 times
Re: Why does train return to disabled station?
The train is considered at the stop until it leaves the rail block, the next stop is inside the rail block so it never leaves the first station, does not clear the stop reservation and can path back to it.
Re: Why does train return to disabled station?
or stops at another train stop, but passing a waypoint isn't stopping.The train is considered at the stop until it leaves the rail block
You can either
- put the stations far enough apart that the train has left the "Drop" station's block by the time the breaking point reaches the "Depart" station,
- stop at the "Depart" station (even an always true wait condition is fine, but there has to be a wait condition),
- ensure that the train cannot reach the "Drop" station from its corresponding "Depart" station, or
- make two (identical) schedule entries for the "Drop" station and get rid of the "Depart" stations.

