[2.0.28] interrupt "station is not full" with generic item does not trigger (unless a later interrupt triggers)

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Ralfinator
Inserter
Inserter
Posts: 35
Joined: Sun Jun 26, 2016 9:37 pm
Contact:

[2.0.28] interrupt "station is not full" with generic item does not trigger (unless a later interrupt triggers)

Post by Ralfinator »

The setup is as follows:
- I have a station "<iron ore> Pickup" at my mine, and "<iron ore> Dropoff" at my main base. I also have "Depot".
- My train schedule just says "go to Depot, wait 10s", the rest is meant to be handled via interrupts.
- The main interrupt is: "station is not full" with station name set to "<generic item> Pickup", that then adds both "<generic item> Pickup" and "<generic item> Dropoff" to the schedule.

This does nothing: even when "<iron ore> Pickup" is indeed not full, the interrupt does not trigger. Changing the interrupt to check "<iron ore> Pickup" works, so it seems like "<generic item>" somehow does not work properly when used with "station is not full". This sounds a bit like this problem. However, things are more weird than that.

- I added another interrupt after the first one, "item count" with "<generic item> greater than 0", adding "<generic item> Dropoff" to the schedule.

When I do that and put some iron ore into the train, the first interrupt triggers: both "<iron ore> Pickup" and "<iron ore> Dropoff" are added to the schedule! That makes no sense at all to me. If the second interrupt was triggered, it would only have added the Dropoff?

It seems a bit as if the fact that one interrupt triggered made Factorio evaluate all interrupts in a different mode, and now it realizes that actually the first interrupt (which on its own is inert) should have triggered, and it uses that one! However, that can't quite be what happens; I tried adding other interrupts that trigger and couldn't get it to trigger my "Pickup then Dropoff" interrupt.

Surely this is a bug? It would be great if "station is not full" with station name set to "<generic item> Pickup" worked properly. :) (I know there are other ways I can set up my train schedule, but that's besides the point.)

This is with Factorio 2.0.28 on Linux.

First interrupt, the one that is inert on its own:
Screenshot From 2025-01-16 00-00-41.png
Screenshot From 2025-01-16 00-00-41.png (46.85 KiB) Viewed 150 times
Second interrupt, if I add this one then the first one suddenly triggers:
Screenshot From 2025-01-16 00-01-18.png
Screenshot From 2025-01-16 00-01-18.png (36.06 KiB) Viewed 150 times
Last edited by Ralfinator on Fri Jan 17, 2025 10:03 pm, edited 1 time in total.
Loewchen
Global Moderator
Global Moderator
Posts: 9681
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: interrupt "station is not full" with generic item does not trigger (unless a later interrupt triggers)

Post by Loewchen »

Post a save with the issue and add the version of the game to the title please, see 3638.
Muche
Filter Inserter
Filter Inserter
Posts: 597
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: interrupt "station is not full" with generic item does not trigger (unless a later interrupt triggers)

Post by Muche »

I believe the issue is that "[generic item]" is trying to be matched against one of carried cargo items. This is a limited number of comparisons (at most 40*number of wagons, usually at most 1 for single-item trains).
You are expecting it to be matched against all items in the game (hundreds * 5 quality levels). I'd guess for performance reasons it was not done.

What I've seen done is to use "[generic signal]" instead, and at the depot station have a circuitry that loops through all approved items (e.g. set in a constant combinator).
Then a train sitting there would get one of item signals, check if applicable station is open and if so, interrupt's condition will get fulfilled and stations appended.
Ralfinator
Inserter
Inserter
Posts: 35
Joined: Sun Jun 26, 2016 9:37 pm
Contact:

Re: [2.0.28] interrupt "station is not full" with generic item does not trigger (unless a later interrupt triggers)

Post by Ralfinator »

I believe the issue is that "[generic item]" is trying to be matched against one of carried cargo items. This is a limited number of comparisons (at most 40*number of wagons, usually at most 1 for single-item trains).
Ah! Yes that explains everything. So it wasn't the other interrupt I added that made it suddenly work, it was the items I put in the train.
You are expecting it to be matched against all items in the game (hundreds * 5 quality levels). I'd guess for performance reasons it was not done.
I would say I am expecting it to be matched against all train stations. But I guess the way it is actually implemented is how you suggest.

You have solved a great mystery for me, thanks. :) I would, however, argue that if these generic items cannot reliably be used in station names in the interrupt condition, then the game should somehow make that clear. Currently the interrupt can be added and then behaves in really strange ways.
Post Reply

Return to “Pending”