Interrupts and No Path to Destination

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Setcab
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Dec 01, 2025 7:49 pm
Contact:

Interrupts and No Path to Destination

Post by Setcab »

I'm a bit stuck on how to configure my trains. My goal is basically: if a train is at a pickup station and a drop-off station needs its freight, it should go there to deliver it. Else it should just stay there. If it gets stuck somewhere else and has no valid goal to go to, it should drive to a depot.

The interrupts that should achieve that are attached. It works if no drop-off station is active. For example, if all coal stations currently have train limit 0, the coal train will stay at its pickup station.
However, if there is a coal station with train limit > 0, but no path to it, the train will leave the station and then go to the depot. I don't want that! It leads to my depot being clogged up with trains full of resources I currently don't need while the trains could have better stuff to do.

What can I change so that no train leaves a station to go somewhere where no path exists?
Attachments
Dropoff.png
Dropoff.png (32.1 KiB) Viewed 151 times
Depot.png
Depot.png (34.73 KiB) Viewed 151 times
Tertius
Smart Inserter
Smart Inserter
Posts: 1492
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Interrupts and No Path to Destination

Post by Tertius »

Setcab wrote: Mon Dec 01, 2025 8:15 pm However, if there is a coal station with train limit > 0, but no path to it, the train will leave the station and then go to the depot. I don't want that! [...]

What can I change so that no train leaves a station to go somewhere where no path exists?
You try to handle an edge case. It's an error to have a no path condition. Some rail is disconnected or has bad signaling. You need to fix that error. It doesn't happen a driving train will suddenly stop dead in the middle of nowhere with "no path" except the track to the current destination is being destroyed.

The case the "no path or destination full" condition was primarily built for is that some unexpected material was loaded into the train, the cargo wildcard is used in an interrupt trigger and the destination station name was constructed with that unexpected material where no destination exists at all. For example there was a wooden chest loaded into a wagon for some reason but no wooden chest unloading station exists. In this case the train is redirected to a known station and can either sit there or be unloaded.

If you don't want your trains go to the depot, what is the intended use for your depot? If you want your full trains always stay in the loading station until they're able to deliver, it seems you want to use your depot for empty trains. So include the "empty cargo" condition in the trigger, for example like this:
12-02-2025, 10-03-40.png
12-02-2025, 10-03-40.png (50.54 KiB) Viewed 118 times
Setcab
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Dec 01, 2025 7:49 pm
Contact:

Re: Interrupts and No Path to Destination

Post by Setcab »

Thank you, adding the "empty train" condition is a good idea, I will try out.

I was aware that this is an edge case, but I want my logic to be robust towards edge and error cases if possible.
I'm currently building a new station in the water and my landfill production could not keep up, that is why there is no path. The tracks aren't laid yet.
Post Reply

Return to “Gameplay Help”