[2.0.19] Item Parameter cannot be used in condition of empty train ("Station is not full")

Bugs that are actually features.
C-Otto
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 01, 2024 12:56 pm
Contact:

[2.0.19] Item Parameter cannot be used in condition of empty train ("Station is not full")

Post by C-Otto »

I'd like to use the train interrupt feature as follows, making use of the "Item Parameter" virtual signal. I'll use "X" as a placeholder for the "Item Parameter" symbol.

My intention is to create an interrupt for an empty train which instantiates X with a suitable item (coal, iron ore, ...) so that said item is only loaded if a corresponding non-full unloading train station exists at the time of dispatching the train to the loading station.

To reproduce:

1) Create a train interrupt "Load"
2) Add precondition "Station is not full" and the configuration "'Consumer X' station is not full" AND "Empty cargo inventory"
3) Add Target "Supplier X" with configuration "Full cargo inventory"
11-16-2024, 16-20-41.png
11-16-2024, 16-20-41.png (51.24 KiB) Viewed 155 times
If loading train stations named "Supplier X" (using the placeholder as its names) or "Supplier Coal"/"Supplier Iron Ore"/... (using the raw resource icons in its names) exist, I expect this configuration to handle trains as follows when evaluating the "Load" interrupt:

1) Abort interrupt evaluation if train is NOT empty -> precondition does not apply
2) Abort if ALL stations named "Consumer X" are full (or none exists) -> precondition does not apply
3) Continue with "X=Coal" if a station named "Consumer Coal" exists, which is NOT full -> precondition is met
4) Send train to "Supplier Coal" and wait for it to be full

Combined with a suitable "Unload" interrupt, I expect this to cause empty trains to load and unload at the corresponding stations, with reduced (but not zero) risk of them not finding a "Consumer" station after loading up at a "Supplier" station. However, the train does not trigger the "Load" interrupt, presumably because the precondition is not met. If I manually trigger the interrupt, the train is sent to the station named "'Supplier X'" (i.e. the one with the Item Parameter symbol in its name).

Note that this works perfectly fine if I use the real station names (i.e. "Coal" instead of "X") in the "Load" interrupt.
11-16-2024, 16-20-26.png
11-16-2024, 16-20-26.png (21.23 KiB) Viewed 155 times
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5266
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [2.0.19] Item Parameter cannot be used in condition of empty train ("Station is not full")

Post by Klonan »

At this time it isn't a supported case, the item parameter only works with items in the cargo

We have ideas/plans to make it work with empty cargo, but at the moment this is not a bug

(You can use any signal and feed a list of supported items that way)
Post Reply

Return to “Not a bug”