Train Interrupt goes into an infinite loop.

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
vvv99
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Sep 12, 2023 4:39 am
Contact:

Train Interrupt goes into an infinite loop.

Post by vvv99 »

Hello All,

Please see the attached game save.

I have created an interrupt for fueling my trains once the onboard fuel falls below a configured level. The issue here is that the once the fuel is loaded, the trains do not proceed to the next station in the list.
interrupt-issue-01.png
interrupt-issue-01.png (5.02 MiB) Viewed 186 times
Thanks!
Attachments
game-04-middle-02.zip
(15.06 MiB) Downloaded 6 times
Tertius
Smart Inserter
Smart Inserter
Posts: 1413
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Train Interrupt goes into an infinite loop.

Post by Tertius »

The interrupt triggers again, because the solid fuel < 25 part of the OR is still true. You need to use AND instead of OR.
User avatar
EvilPLa
Inserter
Inserter
Posts: 49
Joined: Sat Nov 14, 2020 7:26 am
Contact:

Re: Train Interrupt goes into an infinite loop.

Post by EvilPLa »

This is how I did my refuel interrupts, no more infinit loops, here for krastorio2
09-02-2025, 09-30-17.png
09-02-2025, 09-30-17.png (36.78 KiB) Viewed 142 times
Wise men speak because they have something to say Fools because they have to say something. (Plato)
Tertius
Smart Inserter
Smart Inserter
Posts: 1413
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Train Interrupt goes into an infinite loop.

Post by Tertius »

Ok, a full proper universal refuel interrupt for vanilla Nauvis looks like this. It will trigger if there is less than half a stack of fuel remaining, whatever fuel it is.

Literally, the interrupt condition triggers if all possible fuel types are below threshold. Or the other way round, if no fuel type is above threshold.
This means as long as any (whatever) fuel is above threshold, the interrupt doesn't trigger, which finally means if there is enough fuel of whatever it doesn't trigger, which is exactly what we want.

It will not retrigger, because the train will not leave until all locomotives are fully fueled. And if all locomotives are fully fueled at least one of the fuels in the interrupt trigger has more than the threshold, so the interrupt trigger condition will be false.

Unfortunately, the green "fuel" wildcard is completely useless because of the different fuel stack sizes. This is something to fix for Wube.
Ok, you can use it to target fuel specific refuel stations, but that's not generally used, I guess.
09-02-2025, 15-16-00.png
09-02-2025, 15-16-00.png (77.13 KiB) Viewed 111 times
It's the task of the refueling station to force some given fuel into the locomotive(s). For example, if you upgrade to rocket fuel, and some of your locomotives still have lower fuel, you build a filtered inserter taking every fuel out off the locomotive(s) except the wanted fuel (rocket fuel), so blacklist=rocket fuel. To upgrade from that to nuclear fuel, you simply change the blacklist to nuclear fuel.
Post Reply

Return to “Gameplay Help”