Page 1 of 1
Allow generic trains with "arbitrary item" not restricted to cargo
Posted: Sat Nov 02, 2024 4:06 pm
by dexteritas
TL;DR
Add an "arbitrary item"-symbol that iterates over all items (not only the items in cargo) for train scedules.
Description
Using the new train interrupts, I was able to create the following behavior (similar to the mod
LTN):
- by default, the train is waiting at a "Depot" station
- (Interrupt:) If a requesting station of type X (ReqX) and a providing station of the same type X (ProX) are available:
- Go to ProX and load item X and
- Go to ReqX and unload item X
This works fine, but you have to define an interrupt for each item:

- Specific_Train.png (696.3 KiB) Viewed 1063 times
Then I remembered there was some blog post on a generic train item and tried this:

- Generic_Train.png (503.45 KiB) Viewed 1063 times
Because it did not work, I read
FFF-395 again, to find that "Any Item" only iterates over the items in cargo and can not be used for any arbitrary item. Therefore, I suggest adding an "arbitrary item"-symbol that iterates over all items (not only the items in cargo).
(I just found a similar suggestion:
Train interrupt station wildcard match.)
I made a minmal example:
Re: Allow generic trains with "arbitrary item" not restricted to cargo
Posted: Sat Nov 02, 2024 4:23 pm
by FaceOfBoe
I absolutely second this! I would love to see this as a feature!
While there is a quick fix (just connect a constant combinator beside *every* station, and use Signal Parameters Instead, this is annoying, and maybe you want to use the signals for something else...
Re: Allow generic trains with "arbitrary item" not restricted to cargo
Posted: Sun Nov 03, 2024 11:24 am
by dexteritas
FaceOfBoe wrote: Sat Nov 02, 2024 4:23 pm
I absolutely second this! I would love to see this as a feature!
While there is a quick fix (just connect a constant combinator beside *every* station, and use Signal Parameters Instead, this is annoying, and maybe you want to use the signals for something else...
Thanks for the workaround suggestion.
It works: In my case, you can put a constant combinator to each Depot station with all item signals that should be considered. Using a logistic group (see
FFF-382) for the constant combinator allows for later changes.
Re: Allow generic trains with "arbitrary item" not restricted to cargo
Posted: Tue Jan 20, 2026 9:07 pm
by SystemParadox
I would really like something like this.
One of the issues with both the combinator and interrupt-for-each-item approaches that's worth noting is that trains will fill slots for the first listed type (e.g. iron) before any trains start going to the next one (e.g. copper), regardless of distance or priority.
If you just have all pickup stations named the same (e.g. "Pickup") then that avoids this problem and the trains will pay attention to distance and priority across all possible pickup stations. It would be really nice if the solution to this worked in the same way - e.g. the wildcard didn't just iterate over possible items one-by-one, but rather iterated over stations by priority/distance as if they were all named the same and then just picked the first one that matched the wildcard.