Allow generic trains with "arbitrary item" not restricted to cargo

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

dexteritas
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Nov 13, 2020 5:57 pm
Contact:

Allow generic trains with "arbitrary item" not restricted to cargo

Post 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
Specific_Train.png (696.3 KiB) Viewed 1058 times
Then I remembered there was some blog post on a generic train item and tried this:
Generic_Train.png
Generic_Train.png (503.45 KiB) Viewed 1058 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:
Generic_Train_Test_1.zip
(2.12 MiB) Downloaded 78 times
Last edited by dexteritas on Sat Nov 02, 2024 4:30 pm, edited 1 time in total.
FaceOfBoe
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Nov 02, 2024 4:20 pm
Contact:

Re: Allow generic trains with "arbitrary item" not restricted to cargo

Post 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...
dexteritas
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Nov 13, 2020 5:57 pm
Contact:

Re: Allow generic trains with "arbitrary item" not restricted to cargo

Post 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.
SystemParadox
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Sep 03, 2020 7:04 pm
Contact:

Re: Allow generic trains with "arbitrary item" not restricted to cargo

Post 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.
Post Reply

Return to “Ideas and Suggestions”