How to have trains skip stops now?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
User avatar
blargh2015
Inserter
Inserter
Posts: 32
Joined: Sun Jun 03, 2018 3:47 pm
Contact:

How to have trains skip stops now?

Post by blargh2015 »

Scenario: I'm feeding coal from 1 mine to 5 outposts. They're outposts, and rail is expensive, so it's a giant rail loop.

A->B->C->D->E->A

The mine is at A. I want the train to keep going, and hit B, C, D, and E, in order, if they need coal, as indicated by a condition. i.e. if only B and D signal they need it, train will go A to B to D and back to A to restock.

I could have sworn I did this with enable/disable train stop in 1.1, but that functionality has changed with 2.0 to instead set a train limit of 0. This makes it so the train doesn't skip the stop - it sits waiting at the previous stop with "Destination full" and won't move on to the next stop.

What's the way to get this set up now? I tinkered with interrupts, but those seem way too complex for what I'm wanting to do, and seem like they could result in silly routing like A going to C then looping all the way around to D as it signals, then looping around to B when it signals, and never quite getting back to A to restock.
robot256
Filter Inserter
Filter Inserter
Posts: 873
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: How to have trains skip stops now?

Post by robot256 »

It's a little cumbersome but I can think of a way to make interrupts do what you want. The main thing is to not go backwards in the sequence, right?

The trick is to use all the features of interrupts available.

Main schedule: Goto A, leave condition is when coal is full.

Interrupt 1: Triggers when Train is at A and Space is available at B. Schedule is Goto B, leave after inactivity or time.

Interrupt 2: Triggers when (Train is at A and Space is available at C) or (Train is at B and Space is available at C). Schedule is Goto C, leave after inactivity or time.

Interrupt 3: Triggers when (Train is at A and Space is available at D) or (Train is at B and Space is available at D) or (Train is at C and Space is available at D). Schedule is Goto D, leave after inactivity or time.

Interrupt 4: Triggers when (Train is at A and Space is available at E) or (Train is at B and Space is available at E) or (Train is at C and Space is available at E) or (Train is at D and Space is available at E). Schedule is Goto E, leave after inactivity or time.

The interrupts have go in that order, since they are checked in order every time the train leaves a stop. At any given stop, only certain interrupts can possibly trigger, preventing silly routings from occuring.

At A, it can go to any open station, but will always pick the first open one in the list.

At E, none of the interrupts will trigger and it will always go back to A.

This would be a lot easier if you could put parentheses to say x and (y or z), instead of having to expand it into (x and y) or (x and z).
User avatar
blargh2015
Inserter
Inserter
Posts: 32
Joined: Sun Jun 03, 2018 3:47 pm
Contact:

Re: How to have trains skip stops now?

Post by blargh2015 »

Ooof, that's going to get cumbersome when I start adding more stops, but yes, key thing is to avoid trying to go backwards in the loop, and to always hit A every time around the loop.
natopotato
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Oct 24, 2024 5:33 am
Contact:

Re: How to have trains skip stops now?

Post by natopotato »

Definitely agree, the change where trains don't skip disabled stations broke a bunch of my setups, and interrupts just aren't powerful enough to circumvent this.


here's a setup i used to use extensively:
10-23-2024, 22-38-49.png
10-23-2024, 22-38-49.png (74.11 KiB) Viewed 380 times
these trains all have the same routine:
goto IRON IN
goto dummy
goto IRON OUT
goto dummy

the "dummy" stop has a circuit condition that disables it if any train tries to go to it. So trains just immediately skip the stop and go to the next one.
this had the behavior in 1.x where 2 trains, one at IRON IN and one at IRON OUT could "swap" places (both trains depart for eachother's stations at the same time). SUPER useful
10-23-2024, 22-41-28.png
10-23-2024, 22-41-28.png (6.04 KiB) Viewed 380 times
in 2.0 as you can see in the picture, instead of skipping the disabled "dummy" station, the train just goes there anyways and gets stuck.

you CAN make an interrupt that activates if the destination is full, but you can only send it to 1 specific station each time.

super frustrating
User avatar
Starfly
Inserter
Inserter
Posts: 22
Joined: Fri Mar 08, 2019 9:04 pm
Contact:

Re: How to have trains skip stops now?

Post by Starfly »

I would enable/disable receiver train stops per circuit (enable trainstation if connected coal buffer is below threshold). Then have a trainschedule of B->C->D->E and an interrupt for go get coal if you coal is empty.
Edit: oh just read the rest, disabling train stations works different now. Hmm. When trains dont skip a disabled station - is there even any way to have them skip one? Havent played around with trains for some years.
Kalanndok
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Dec 12, 2015 9:07 am
Contact:

Re: How to have trains skip stops now?

Post by Kalanndok »

Call all unloading stops the same and have them set their train limit to 1 if the require the train to stop.

Schedule the train to A to load.
Interrupt it if it has cargo to go to the unloading station and wait for 30 seconds.
If B is active it will go there, if not it will directly go to C (if active) and if C doesn't drain the cargo it will try the same with D and E.
Once a stop completely empties the train it will directly go to A without stopping and waiting at the other stops.
User avatar
blargh2015
Inserter
Inserter
Posts: 32
Joined: Sun Jun 03, 2018 3:47 pm
Contact:

Re: How to have trains skip stops now?

Post by blargh2015 »

Naming them all the same isn't great - I like having them "Coal Receiver - Iron Processing Outpost", "Coal Receiver - Copper Processing Output", things like that.
Kalanndok
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Dec 12, 2015 9:07 am
Contact:

Re: How to have trains skip stops now?

Post by Kalanndok »

Then have multiple interrupts and send the trains to differently named dropoff stations.

That will work. It will just introduce some unneccesary complexity in the interrupts.

For the train and the scheduling system it's not relevant that the coal receiver is using the coal for. Only thing that matters is "That's where I can dump my coal, bye".
Post Reply

Return to “Gameplay Help”