Prevent train pathing?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
leitk
Fast Inserter
Fast Inserter
Posts: 115
Joined: Wed Jun 21, 2017 7:20 pm
Contact:

Prevent train pathing?

Post by leitk »

Is it possible to prevent automatic trains from deciding to go over a section of rail in all cases? I know I can set a signal to always red, but trains may go up to that signal and then try to find another path (or just get stuck). I know it's also possible to add a train stop to make one way less likely to be picked, but it still happens.

Currently I have a section of rail that I replace and remove as I drive over it manually, but that's a bit of a pain. But if the rail isn't there, the automatic trains NEVER try to go that way, which is what I want.

I like having a full loop so I can manually drive around, but the automatic trains go way out of their way if they use that section, and sometimes they're foolish enough to do that.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Prevent train pathing?

Post by DaveMcW »

leitk wrote:I know I can set a signal to always red, but trains may go up to that signal and then try to find another path (or just get stuck).
Put a chain signal before the last good path that leads away from the red signal. Trains will wait at the chain signal if the good path is blocked.
Loewchen
Global Moderator
Global Moderator
Posts: 10327
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Prevent train pathing?

Post by Loewchen »

In the path you do not want trains to take, place a signal on the left and a signal on the right side but not on the same level, you can do this by placing on both sides then removing one. This track will be completely ignored by the pathfinder.
Attachments
Track_zero_sided.png
Track_zero_sided.png (75.71 KiB) Viewed 2110 times
cbhj1
Fast Inserter
Fast Inserter
Posts: 175
Joined: Tue Apr 25, 2017 2:53 pm
Contact:

Re: Prevent train pathing?

Post by cbhj1 »

I like it, with a minor tweak the 2 way track becomes a no way track.

along these lines, wouldn't a single signal on the left instead of the right work if there is only one entrance to the section?
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Prevent train pathing?

Post by eradicator »

cbhj1 wrote:along these lines, wouldn't a single signal on the left instead of the right work if there is only one entrance to the section?
Yes. If a one-way section only has a signal "out" then no train can automatically go "in". But if there's only one entry then automatic trains wouldn't want to go there anyway?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
cbhj1
Fast Inserter
Fast Inserter
Posts: 175
Joined: Tue Apr 25, 2017 2:53 pm
Contact:

Re: Prevent train pathing?

Post by cbhj1 »

I was referring to a typical rail system in the game that has 2 or more one way tracks, where each section has a limited number of approach vectors, a single backwards signal becomes a roadblock since the trains don't path backwards.

fancier words for amusement rather than condescension :P
leitk
Fast Inserter
Fast Inserter
Posts: 115
Joined: Wed Jun 21, 2017 7:20 pm
Contact:

Re: Prevent train pathing?

Post by leitk »

Thank you, that was just what I was looking for.

Also, especially thanks for this:
Loewchen wrote:you can do this by placing on both sides then removing one.
As it wouldn't otherwise allow me to place it on the wrong side.
Post Reply

Return to “Gameplay Help”