Is there any word on skipping stations

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
salopesensible
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Feb 09, 2021 11:47 pm
Contact:

Is there any word on skipping stations

Post by salopesensible »

Edit: Nidan has the answer viewtopic.php?p=678470#p678470! Nidan is amazing :)

:D
I know 2.1 took away the ability to a & b where (a) = disable a train station on a schedule AND (b) = skip that station.

So I can't have: A(load) -> b,c,d,e,f Unload. All I see in the forums when this is asked is "why" and "that's stupid" replies.

Why. I have a biter problem. I have walls built. I need to supply the walls to stations spaced throughout the map. I only want a train going to these areas if something gets destroyed. It WAS very easy before. Setup the schedule. If the station was disabled, the train skipped it. Interrupts do not do this. The best they can do is ferry from a to b until b is full, then go a to c until it is full. Meanwhile F is being overrun because it needs to replace some turrets and the speed level 3 modules needed at c will cause A to C over and over until C gets the modules.

Is there *any* indication that this will be addressed somehow? Easiest is to allow disabled stations to be skipped. Keep interrupts. They are handy. I have to have separate trains that go a->b,c,d,e,f over and over rather than just feed stations that need attention. doing a-> b,b,b,b,b (5 stations named b and b's are disbabled if not needed) doesnt' work because if B3 needs level 3 speed or anything, b4 will never be serviced. I also can't tell which station b is which (eg. B-West, B-Central, etc).
Last edited by salopesensible on Fri Aug 15, 2025 1:22 pm, edited 2 times in total.
Loewchen
Global Moderator
Global Moderator
Posts: 10319
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Is there any word on skipping stations

Post by Loewchen »

The disabled station behavior was changed in 2.0 when interrupts were introduced. Put the loading station in the regular schedule and create interrupts for the unloading stations, allow the interrupts to interrupt interrupts.
Nidan
Filter Inserter
Filter Inserter
Posts: 331
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Is there any word on skipping stations

Post by Nidan »

salopesensible wrote: Thu Aug 14, 2025 11:33 pm I know 2.1
2.0. 2.1 doesn't exist yet (except, maybe, for those with source access).
Interrupts do not do this.
It's some effort to set up, but doable. Have A as the only stop in the schedule, then add interrupts "train at A and B not full -> go to B", "train at A or B and C not full -> go to C", "train at A, B or C and D not full -> go to D", "train at A, B, C or D and E not full -> go to E", "train at A, B, C, D or E and F not full -> go to F" in that specific order. This assumes A never gets disabled.
Is there *any* indication that this will be addressed somehow?
None that I've seen (and I don't think that'd be needed).
doing a-> b,b,b,b,b (5 stations named b and b's are disbabled if not needed) doesnt' work because if B3 needs level 3 speed or anything, b4 will never be serviced.
Stations can have a priority, you could increase it based on the time the station spent waiting for a train.
robot256
Smart Inserter
Smart Inserter
Posts: 1253
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Is there any word on skipping stations

Post by robot256 »

(Nidan beat me to it, maybe my long explanation will be helpful.)

This is easier than it looks to do with interrupts, though it is a little cumbersome to expand. The key is to use "Station not full" and "At station" in the interrupt conditions to control when they can trigger.

1. Assuming Station A is the supply depot, put it as the only station in the normal schedule.
2. Make an interrupt called "Go to Station B". The conditions are "At Station A" AND "Station B is not full" AND (Cargo contains enough items, or inactivity).
3. Make another interrupt called "Go to Station C". The conditions are ("At Station A" OR "At Station B") AND (Cargo contains enough items). Check the "interrupts other interrupts" box so that the train can depart directly for Station C from Station B.
4. Subsequent interrupts do the same, so that they can be reached from all earlier stops but not from later stops in the list. When the train reaches the last stop, or runs out of items, no interrupts will trigger, and the train will return to Station A.


HOWEVER: Another, possibly better solution to your problem is simpler than ever before, and uses station *priority*.

1. Name all the outpost train stops the same, e.g. "Outpost". Set up the circuit network so that the enable when a certain number of items are missing.
2. Make a combinator to calculate the station priority based on how many items are missing. You also might use an arithmetic combinator multiply "Each (red)" * "Each (green)" to weight items differently. Send the priority value to the train stop.
3. Give the train a single schedule entry, Depot, which waits until the train is loaded.
4. Give the train a single interrupt, "Go to Outpost". Enable the "interrupt other interrupts" so that the train can go from one outpost to another. Make the condition for the interrupt "No items are empty" (so that it returns the depot when any stack is depleted and does not get stuck trying to unload items that aren't there).

Now the train will go to the highest-priority stop first, and if it still has items left, directly to the second-highest priority stop, etc. Which might be taking stacks of turrets to Station F even if Station B needs a handful of repair packs.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Tertius
Smart Inserter
Smart Inserter
Posts: 1388
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Is there any word on skipping stations

Post by Tertius »

salopesensible wrote: Thu Aug 14, 2025 11:33 pm Why. I have a biter problem. I have walls built. I need to supply the walls to stations spaced throughout the map. I only want a train going to these areas if something gets destroyed. It WAS very easy before. Setup the schedule. If the station was disabled, the train skipped it. Interrupts do not do this. The best they can do is ferry from a to b until b is full, then go a to c until it is full. Meanwhile F is being overrun because it needs to replace some turrets and the speed level 3 modules needed at c will cause A to C over and over until C gets the modules.

Is there *any* indication that this will be addressed somehow? Easiest is to allow disabled stations to be skipped. Keep interrupts. They are handy. I have to have separate trains that go a->b,c,d,e,f over and over rather than just feed stations that need attention. doing a-> b,b,b,b,b (5 stations named b and b's are disbabled if not needed) doesnt' work because if B3 needs level 3 speed or anything, b4 will never be serviced. I also can't tell which station b is which (eg. B-West, B-Central, etc).
It seems you want to supply your outposts, but if an essential item is missing, the outpost should be given preference over an outpost that's not missing this item.

General design is best with all the outposts with the same purpose have the same name, so they can be supplied by the same infrastructure and the same schedule. Adding more outposts would require no change in the infrastructure. Just add the outpost, and trains will eventually visit.

In general, use circuits to set train limit of any outpost to 1 or 0 if that outpost needs a visit of a supply train or not.

Now about the precedence. That's what the priority can be used for.
If any outpost lacks an essential item, use an additional circuit to set its priority to 1. If an outpost doesn't lack an essential item, set the priority to 0. This way, any outpost lacking an essential item is visited first. Keep in mind the default priority of a station is 50, but if you connect a circuit, the value from the circuit is used directly. So if a circuit doesn't provide a value, it's 0. You can feed 50 and 51, or just 0 and 1 and make sure every outpost station with that name is circuit connected, so no station has the default of 50.

About the schedule:
If you have a bigger base, you might need more than 1 supply trains. So build a depot for full supply trains waiting to deliver their goods in case multiple outpost stations open up or one opens up and the train is already supplying some other station.

Add the loading station as static schedule entry where the supply train gets filled. Use interrupts to make trains go to the outpost station or to the depot.
After a train has been filled, it should either go to an outpost station in case there is one open, or to the depot if there isn't any outpost open. We want the depot, so the loading station will empty, so any returning train is able to get refilled.
So add 2 interrupts.
Interrupt 1: condition at loading station AND outpost station is full: go to depot station.
Interrupt 2: condition not at outpost station: go to outpost station.
Order is important.

There is a bullet proof interrupt setup instead of the above (above might have edge cases), however it's not intuitive.
Interrupt 1: condition not at outpost station: go to outpost station.
interrupt 2: condition destination full or no path AND not at depot station: go to depot station.
Order is not important.

You can chain visiting outposts to avoid a just half-emptied train returning to the base by using more circuits. You need to detect in all outpost stations if the train has enough items to supply another outpost or if it needs to return to the loading station. This way either an interrupt triggers to return to the loading station or an interrupt to go to the (next) outpost. If you're interested in this, I can describe how to approach this. This needs a slightly different interrupt setup. Together with the required circuits it's not simple any more as the above, but not too complex to understand.
salopesensible
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Feb 09, 2021 11:47 pm
Contact:

Re: Is there any word on skipping stations

Post by salopesensible »

Nidan wrote: Fri Aug 15, 2025 12:15 am
salopesensible wrote: Thu Aug 14, 2025 11:33 pm I know 2.1
2.0. 2.1 doesn't exist yet (except, maybe, for those with source access).
Interrupts do not do this.
It's some effort to set up, but doable. Have A as the only stop in the schedule, then add interrupts "train at A and B not full -> go to B", "train at A or B and C not full -> go to C", "train at A, B or C and D not full -> go to D", "train at A, B, C or D and E not full -> go to E", "train at A, B, C, D or E and F not full -> go to F" in that specific order. This assumes A never gets disabled.
Is there *any* indication that this will be addressed somehow?
None that I've seen (and I don't think that'd be needed).
doing a-> b,b,b,b,b (5 stations named b and b's are disbabled if not needed) doesnt' work because if B3 needs level 3 speed or anything, b4 will never be serviced.
Stations can have a priority, you could increase it based on the time the station spent waiting for a train.
You can't (sans circuits) do (At A OR at B OR at C) AND (D not full). The game only allows one or inside of parenthesis. I'm sure circuit magic could do it.

This is like the new math out there. Where it take 15 minutes to do 123*13 but the old method takes 1 minute. :) I must be the only person who wants one supply train to run around and deliver walls & bullets to edge parts of a huge sprawling base. Noone gets what I'm trying to do. :)

BUT!!!! You've got the right answer here. 100%. I just use a circuit at the dropoffs to indicate a need. So if there is a need at dropoff1, I send a "1" signal out to all of the other stations. Then I can do if (at dropoff AND need at next dropoff), then go to next dropoff!!!!!

You did it! Amazing work getting this into my thick skull!
Last edited by salopesensible on Fri Aug 15, 2025 1:20 pm, edited 1 time in total.
Tertius
Smart Inserter
Smart Inserter
Posts: 1388
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Is there any word on skipping stations

Post by Tertius »

We all understand that you want to visit stations round robin and skip full stations, however that's not a good approach because it requires schedule changes whenever a station is added and you need a specially crafted custom rail track round your base that needs to be carefully updated if you expand the perimeter to not cut support for stations later in the loop. It's easy to build initially but needs much effort to update and expand.
As technical term: "it doesn't scale well".

My example scales from zero to infinity, you just need to add more of whatever you need but doesn't need to update any configuration. The initial schedule for 1 outpost and 1 loading station is the same as the schedule for 20 outposts and 3 loading stations. The only thing it assumes as prerequisite is a rail track that has direct connection to the loading station from your main rail network shared with your ore transport, not a single track round the base.

Again, if you want to use the general approach as I described, I can describe in more detail how you can make trains go from outpost to outpost as long as the train has enough supply, with another set of circuits. How difficult that is for you depends on how you detect an outpost needs items or doesn't need items. If your circuit already "knows" it lacks items the current train isn't able to deliver, so the train has to load and visit again, it's easy. If you just statically load the train until something is full and leave only by inactivity or time spent without circuits, it's hard.
Loewchen
Global Moderator
Global Moderator
Posts: 10319
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Is there any word on skipping stations

Post by Loewchen »

salopesensible wrote: Fri Aug 15, 2025 10:49 am You can't (sans circuits) do (At A OR at B OR at C) AND (D not full). The game only allows one or inside of parenthesis. I'm sure circuit magic could do it.
Sure you can, as I already said all you need to do is set the loading station in the regular schedule and create an interrupt for each unloading station. Set the interrupt condition of that station being not full and set the interrupt to be able to interrupt interrupts, you will have the exact same behavior as pre 2.0.
Nidan
Filter Inserter
Filter Inserter
Posts: 331
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Is there any word on skipping stations

Post by Nidan »

salopesensible wrote: Fri Aug 15, 2025 10:49 am You can't (sans circuits) do (At A OR at B OR at C) AND (D not full). The game only allows one or inside of parenthesis. I'm sure circuit magic could do it.
I'm aware disjunctive normal form is required. The conditions I suggested can be transformed into it, no circuits required. Likewise, any other boolean expression.
(A or B) and C <=> (A and C) or (B and C)
Noone gets what I'm trying to do.
We do, you want pre 2.0 train schedule behaviour. And yes, getting that under 2.0 rules is tedious. That's why you've got three suggestions to look at priorities for a potential replacement.
Tertius
Smart Inserter
Smart Inserter
Posts: 1388
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Is there any word on skipping stations

Post by Tertius »

Loewchen wrote: Fri Aug 15, 2025 11:42 am all you need to do is set the loading station in the regular schedule and create an interrupt for each unloading station. Set the interrupt condition of that station being not full and set the interrupt to be able to interrupt interrupts, you will have the exact same behavior as pre 2.0.
The first matching interrupt is triggered. You cannot control the order in which the interrupts are triggered. No, the other way round: the order always starts from the beginning, not from where you currently are. If you have stations A, B, C, D, E, F and you're currently at D, you want to go to E and F before you go to A again, the only eligible interrupts are E and F in this case. You need to exclude every possible previous station in your interrupts to avoid going to C when you currently are at D or later.

As far as I see, your approach with allowing interrupts while processing interrupts tries to prevent a train stalling when it has a full station as destination. However, just the same interrupt will trigger again, so it's the same infinite loop.
Loewchen
Global Moderator
Global Moderator
Posts: 10319
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Is there any word on skipping stations

Post by Loewchen »

Tertius wrote: Fri Aug 15, 2025 12:09 pm The first matching interrupt is triggered. You cannot control the order in which the interrupts are triggered. No, the other way round: the order always starts from the beginning, not from where you currently are. If you have stations A, B, C, D, E, F and you're currently at D, you want to go to E and F before you go to A again, the only eligible interrupts are E and F in this case. You need to exclude every possible previous station in your interrupts to avoid going to C when you currently are at D or later.
I did not think the sequence would matter since the default is that all other stations will be disabled unless there was an attack on a different station in the meantime, but yes it is a discrepancy to the old behavior.
Tertius wrote: Fri Aug 15, 2025 12:09 pm As far as I see, your approach with allowing interrupts while processing interrupts tries to prevent a train stalling when it has a full station as destination. However, just the same interrupt will trigger again, so it's the same infinite loop.
Oh, you don't even need interruption of interrupts for this, I repurposed this from a different usecase of mine, it will have no effect with this setup. Targeting a full station is ruled out anyway.
Post Reply

Return to “Gameplay Help”