When does train interrupt status get updated?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
DarkLordKelvin
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jan 16, 2021 12:12 am
Contact:

When does train interrupt status get updated?

Post by DarkLordKelvin »

I am trying to design an interrupt sequence for generic trains to go to/leave a shunting yard, and I am having issues with my design. I am trying to get an interrupt to trigger when a train has been routed to the shunting station but has not yet arrived because it is stopped in a stacker. I am trying to create a "deshunt" condition that will cancel the temporary stop at the shunting station and re-route the train to an unloader station if one has become available.
02-08-2026, 12-43-17.png
02-08-2026, 12-43-17.png (31.63 KiB) Viewed 376 times
The middle train in the pic has iron ore, and there is an iron unloading station that has opened, so I want it to stop trying to go to the station "Shunt" and go drop off its load at the intended target. I cannot find the right sequence of conditions to get this desired action to trigger, and I am starting to wonder if it's because I am trying to do something that is outside the intended function of interrupts.

I made the interrupt "DeShunt" shown below. If I manually trigger it, it works as intended, but I cannot get it to trigger automagically. I was thinking that maybe the reason is that train interrupts only get updated when a train is idling at a stop for a few ticks? That's not explicitly stated in their description, but the more I think about it, the more I wonder if they would work properly otherwise.
02-08-2026, 12-52-34.png
02-08-2026, 12-52-34.png (39.89 KiB) Viewed 376 times
Anyway, thanks in advance for any help/tips.
Tertius
Smart Inserter
Smart Inserter
Posts: 1562
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: When does train interrupt status get updated?

Post by Tertius »

DarkLordKelvin wrote: Sun Feb 08, 2026 5:53 pm I am trying to get an interrupt to trigger when a train has been routed to the shunting station but has not yet arrived because it is stopped in a stacker. I am trying to create a "deshunt" condition that will cancel the temporary stop at the shunting station and re-route the train to an unloader station if one has become available.
That's not how interrupts will trigger. Interrupts are only checked if a train has no destination. If it has already a destination, and every train currently driving or waiting at some signal has a destination, this destination will stick and the train will drive there no matter what happens. The destination is acquired by reserving a slot at the corresponding station.

The destination is the pointer you see in the schedule that points to the current task within the schedule.

If a train isn't able to get a destination, it stays where it is and either switches to state "destination full" or "no path" - the two situations where you get this notification icon at the locomotive.
In this state interrupts are constantly being checked every few ticks. Also the interrupt trigger called "destination full or no path" can trigger if present and this can change the schedule.

In normal train operation, interrupts are only checked if a train is at a station, and its waiting condition just became true, and it is about to leave. In this moment the interrupt conditions are being checked, and if one triggers the corresponding schedule is added as temporary schedule.

Having said that, it can happen that a train is repathed to a different station with the same name. It can never happen it is repathed to a station with a different name. This repathing can happen if a train is waiting at a signal or about to wait at a signal.


Your design will not work. You created a station called "Shunt" and every train supposed to visit the stacker gets this station as destination. Now it has this destination, it MUST drive next to this station, and it must halt there, and the waiting condition must become true. Or if you just put the Shunt station as naked schedule entry without any conditions, this station becomes a waypoint a train must drive through. But you cannot remove and replace the Shunt station from the schedule once present. As long as the trains are waiting in the stacker, they're not arriving at the station or driving through, so no interrupts will be checked, so no schedule change can happen.

A waiting area as you envision needs a station for each lane of the stacker, all with the same name, all with train limit 1. Not one shared station for all lanes. Instead, for every train its own station. This way the train is able to arrive at the station (and not waiting in a distance at a signal as in your design) and is able to properly leave this station, and when it is about to leave it will check its interrupt triggers. This will work, however you need more space, since a station can only be added next to a vertical or horizontal rail.
DarkLordKelvin
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jan 16, 2021 12:12 am
Contact:

Re: When does train interrupt status get updated?

Post by DarkLordKelvin »

Tertius wrote: Sun Feb 08, 2026 7:10 pm
DarkLordKelvin wrote: Sun Feb 08, 2026 5:53 pm I am trying to get an interrupt to trigger when a train has been routed to the shunting station but has not yet arrived because it is stopped in a stacker. I am trying to create a "deshunt" condition that will cancel the temporary stop at the shunting station and re-route the train to an unloader station if one has become available.
That's not how interrupts will trigger. Interrupts are only checked if a train has no destination. If it has already a destination, and every train currently driving or waiting at some signal has a destination, this destination will stick and the train will drive there no matter what happens. The destination is acquired by reserving a slot at the corresponding station.
This is helpful .. so as long as a train has an "en route" status, it CANNOT be interrupted. I played with this a bit ... it also seems that the "en route" status is pretty robust, as I already tried experimenting with opening and closing the station by various means, and a train "en route" to a station will still go there even if the station is disabled via circuit logic. Does that all seem correct?

As you guessed, I was trying to use stackers to save space in the shunting station .. also because it just seems wasteful and kludgy from a design standpoint to have a dedicated station for every shunting line. Honestly, a shunting station had seemed like a bit of a kludge to begin with, I am just exploring different options for train management before expanding my train network. After thinking about it a bit more, I guess it makes sense to only route extra EMPTY trains to a shunting station .. full trains can just sit at the mining patches until they are needed. It is empty trains stuck at unloading stations that are more likely to cause a problem. I had managed that in my initial network by just having "the right number of trains", but I have had some recent jams as I have been expanding/cleaning up that made me think I needed to explore shunting.

I guess I will just add some stations and an "entry line" to my current "train launcher", so extra empty trains can park there out of the way.

Does this analysis/plan seem reasonable, or have I missed something important? Train logistics have honestly been a bit of a bugaboo for me over the years that I have played this game, and I never really understood them in 1.1 to my own satisfaction. I have been chronically guilty of having "way too long" belt arrangements to mine the patches around my initial bases on Nauvis and Vulcanus. The generic interrupt schedules in 2.0 made me think maybe I could handle trains now, and I have been happy with them so far.
Tertius
Smart Inserter
Smart Inserter
Posts: 1562
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: When does train interrupt status get updated?

Post by Tertius »

Your conclusions are correct, and your reasoning you need the depot (this is what the community calls this setup) for empty trains is also correct. It's a standard solution.

I actually built one of my main base ore stations as you described. There is both: a stacker with one station for each lane for empty trains (the empty one at the top). And I have a stacker in front of the unloading stations for full trains (the full one at the bottom). These stacker lanes don't have any station, they work with chain signals. Because of this, they need to be placed directly in front of the actual unloading stations.
Screenshot 2024-11-01 200903.png
Screenshot 2024-11-01 200903.png (159.57 KiB) Viewed 270 times
Schedule look like this for the ore/coal/stone unloading trains:
02-09-2026, 16-42-21.png
02-09-2026, 16-42-21.png (87.51 KiB) Viewed 270 times
02-09-2026, 16-42-49.png
02-09-2026, 16-42-49.png (34.9 KiB) Viewed 270 times
02-09-2026, 16-43-07.png
02-09-2026, 16-43-07.png (68.75 KiB) Viewed 270 times
02-09-2026, 16-43-28.png
02-09-2026, 16-43-28.png (49.36 KiB) Viewed 270 times
(the depot name in the interrupt has a different name than in the 1st screenshot - has been renamed since the screenshot)
DarkLordKelvin
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jan 16, 2021 12:12 am
Contact:

Re: When does train interrupt status get updated?

Post by DarkLordKelvin »

Thanks .. always fun to "discover" a truth that everyone else has known for ages :lol:

Your design is interesting ... I have always unloaded my ore trains directly into smelting stations, rather than having a combined ore depot like that. Are you belting the ore to where it is needed? Seems like that would lead to spaghetti-ness, but maybe not after unlocking foundries, if you are using molten metal trains too I guess.

Anyway, thanks for setting me straight on this stuff. I have been a long time player, but I haven't used this forum too much. Mostly I go to Nilaus videos for ideas when I get stuck, but he doesn't seem to have posted any how-to's or Masterclasses on interrupts. Coming here made me realize that I have been missing out on a useful resource that is not quite as "spoiler-prone" as Nilaus for design stuff. More than once I have gone to his vids for a focused reason, then gotten caught up in something amazing that he did, and then coming back to my own base and thinking, "Well this is all crap now". It can be a bit disheartening.
Tertius
Smart Inserter
Smart Inserter
Posts: 1562
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: When does train interrupt status get updated?

Post by Tertius »

I don't know why, but for some reason it eluded me it I can unload iron and copper ore directly into foundries and distribute infinite molten ore in just one pipe across the whole base. That screenshot is from the time before that, in fact it's a migrated 1.1 design. I'm currently redesigning my factory with some legendary item production in mind and a somewhat higher SPM, and for this the ore unloading stations will look different. However, the general train schedule and interrupt design will probably stay the same.
Post Reply

Return to “Gameplay Help”