Train interrupt station wildcard match

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Hannibal08
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Jul 27, 2019 1:48 pm
Contact:

Train interrupt station wildcard match

Post by Hannibal08 »

TL;DR
Allow the "Anything" icon to match any icon found in a train station for an interrupt.

What?
Currently, interrupts can only work if you make a match with a specific station. ie, train has an item, find a station that has that item in the name. The problem comes when the train doesn't have an item or a signal to match on, and you want to send your train to any station matching some format. For this case, I think it makes sense to allow matching on a station using the "Anything" icon with a station.

For example, here is an interrupt to pick up some cargo when a train is empty.
11-01-2024, 18-54-48.png
11-01-2024, 18-54-48.png (56.8 KiB) Viewed 1579 times

I'd like for this interrupt to match this station (for example) so that it will go to pick up the stone.
11-01-2024, 18-49-48.png
11-01-2024, 18-49-48.png (13.22 KiB) Viewed 1579 times

Or it could match another station with any two icons at the beginning of the station name because the interrupt starts with two "anything" icons.
Why?
Because I think it's neat to have stations named after the specific item they are providing, while still allowing the generic train usage via interrupts. Without this "anything" match, I will need to rename the provider station to be the same no matter the item it provides.
Keymax
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Nov 04, 2024 12:24 am

Re: Train interrupt station wildcard match

Post by Keymax »

+1

This would also be useful to consider all provider stations interchangeable in one interrupt ("X provider" and "Y provider" would both match "[*] provider") while considering them separate in another. Currently, if you choose the naming convention "X provider" for your stations, then you cannot easily set up generic trains (go to any provider, then choose a destination based on what you picked up), and if you name all your provider stations the same, then you lose the ability to send trains to specific providers. With the feature suggested by OP in this thread, we could have both at the same time.
User avatar
AileTheAlien
Filter Inserter
Filter Inserter
Posts: 397
Joined: Sat Mar 11, 2017 4:30 pm
Contact:

Re: Train interrupt station wildcard match

Post by AileTheAlien »

I'm in a similar situation to you, although I'm keeping my pickup locations all named seperately like "X -> cargo". I'd assumed that the any-item wildcard would search train station names for item-icons, but it only searches the current cargo. This sort of doesn't make sense, since they've got "empty cargo" as a condition in the interrupt system, so I assumed it should match a station name when your cargo is empty.

One of the commentors on this Katherine of Sky video said they've got generic pickups working, but I don't see how that can work if the wildcard only checks the current cargo, which needs to be empty. :?

(I came to this suggestion, from this other suggestion, which suggests a different solution: iterate over every item, instead of every train station name.)
BorisOZ
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed May 10, 2017 12:21 pm
Contact:

Re: Train interrupt station wildcard match

Post by BorisOZ »

I think something like this would be quite cool, and would make it easier to make a generic pickup station that still has icons. The only issue I see is that it would need a way of deciding which station to pick, given that many of them probably have similar names. Interrupts will still assign trains to go to a station that is closed, which would be problematic as it would just mean all your trains get stuck trying to go to whatever is "first" in the matches. I think the other, similar, suggestion resolves this issue more appropriately.
AileTheAlien wrote: Mon Nov 04, 2024 5:15 am One of the commentors on this Katherine of Sky video said they've got generic pickups working, but I don't see how that can work if the wildcard only checks the current cargo, which needs to be empty. :?
I have made generic pickups by assigning the same name to all of my pickup stations and adding this to either the schedule or a cargo empty interrupt, and then an interrupt to decide where to go from there using the wildcards. It slightly reduces the readability of train stations as it's now hard to tell what stuff gets picked up where, but it seems to do the trick.
User avatar
AileTheAlien
Filter Inserter
Filter Inserter
Posts: 397
Joined: Sat Mar 11, 2017 4:30 pm
Contact:

Re: Train interrupt station wildcard match

Post by AileTheAlien »

BorisOZ wrote: Mon Nov 04, 2024 7:10 amI have made generic pickups by assigning the same name to all of my pickup stations and adding this to either the schedule or a cargo empty interrupt, and then an interrupt to decide where to go from there using the wildcards. It slightly reduces the readability of train stations as it's now hard to tell what stuff gets picked up where, but it seems to do the trick.
The commentor replied on that video with the same strategy. IMO, making my pickup station names less readable sort of implies that the wildcard is matching the wrong thing. The way they work now, it seems like they make trains act like belts, where you don't know what you're trying to transport unless you check the route. Or, they're meant for trains that are sitting filled with stuff, but I don't understand how a train got loaded with a specific cargo, to then use a generic interrupt. That seems like it should just have a schedule with a specific cargo defined. :|
User avatar
AileTheAlien
Filter Inserter
Filter Inserter
Posts: 397
Joined: Sat Mar 11, 2017 4:30 pm
Contact:

Re: Train interrupt station wildcard match

Post by AileTheAlien »

In this other thread, it's explained that wildcards are only filled when leaving a station. I also show a proof of concept, that allows you to send trains to wildcard stations and keep the icons in your station names. (So we don't need to add any new features to solve this problem.)
Post Reply

Return to “Ideas and Suggestions”