[Solved] Struggeling with train signals

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Maartenv
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Dec 26, 2024 2:09 pm
Contact:

[Solved] Struggeling with train signals

Post by Maartenv »

This is my first playthrough of the game and i am currently working on a new railroad and i am having some struggles on how to implement something. I have two different tracks next to each other and some track connecting the both of them (as seen in the attachment). I want the following to happen: When two trains move towards each other on the same track i want one of the trains to switch to the second track. Where should i place the signals?

(I am not playing space age so i do not have access to anything added there)

Thx in advance!
12-26-2024, 15-15-34.png
12-26-2024, 15-15-34.png (930.23 KiB) Viewed 626 times
Last edited by Maartenv on Thu Dec 26, 2024 4:08 pm, edited 1 time in total.
Amarula
Filter Inserter
Filter Inserter
Posts: 569
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: Struggeling with train signals

Post by Amarula »

Welcome Engineer!
Having a track where trains can go both directions, a bi-directional track, is possible but very challenging. You may find it easier to switch to two uni-directional tracks - this will also be of benefit as your factory grows as it will support more trains. If you prefer to continue with the challenge...

Trains can only pass signals on the right side of the track, so for a bi-directional track EVERY signal must be paired. When you go to place a signal, the game will highlight a ghost showing the location of the pair to help you get this part right. If they are not paired, you will have pieces of one way track which will cause trains going the opposite way to show No Path.

Without recreating your tracks, I think putting pairs of signals at the entrance, on both paths after the split, before the X, after the X, before the merge, and after the exit should allow trains to move within that section of track. You will have to have a chain signal at both ends before leaving this section, to ensure that the trains wait where the opposite train can switch to the second track. You will have to experiment to find which other signals need to be chain signals - welcome to the challenge!

I also suggest you test your tracks with at least one cargo wagon. A test that works where just a locomotive will fit in a segment can easily break if the entire train doesn't fit. For example, it looks like a train that stops at the train stop will be sticking out into the passing section. Good luck and may your trains be many and bright!
My own personal Factorio super-power - running out of power.
Tertius
Smart Inserter
Smart Inserter
Posts: 1115
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Struggeling with train signals

Post by Tertius »

Train signal tutorial see here: https://wiki.factorio.com/Tutorial:Train_signals

In general: the most important thing is to think in rail blocks. A signal is dividing rails into blocks. They're visualized with different colors while you hold a signal in hand. One block is either empty or occupied by one single train. If a block is occupied by a train, the signal that's guarding access to this block is red and blocks access, otherwise it is green and allows access.

So create blocks and imagine how trains will advance from block to block.

Obtain details from the tutorial.
mmmPI
Smart Inserter
Smart Inserter
Posts: 4035
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Struggeling with train signals

Post by mmmPI »

9804_0086h49m 1s_nauvis.jpg
9804_0086h49m 1s_nauvis.jpg (23.4 KiB) Viewed 602 times
This makes the bottom lane to go from left to right and the upper one the opposite. It sort of ignore the crossing in the middle. ( simpler to begin with )


The following is a proposition where all tracks are bi-directionnal, more complicated, and not all that sure it's better than previous version for ingame purposes, but it fit more closely the requests, and can be used to copy or modify to try and understand the rules :
9804_0086h54m 0s_nauvis.jpg
9804_0086h54m 0s_nauvis.jpg (28.88 KiB) Viewed 602 times
computeraddict
Filter Inserter
Filter Inserter
Posts: 274
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: Struggeling with train signals

Post by computeraddict »

https://en.m.wikipedia.org/wiki/Passing_loop

First order of business is get rid of the X in the middle. It'll defeat your attempts to signal this. Next all you have to do is signal the siding blocks with rail signals going in (preferably only one direction per side so that two trains going the same way don't occupy both) then put chain signals on the exits.

Basically it's a short section where you abandon bidirectional track and have a short section of opposing unidirectional tracks.
mmmPI
Smart Inserter
Smart Inserter
Posts: 4035
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Struggeling with train signals

Post by mmmPI »

computeraddict wrote: Thu Dec 26, 2024 3:35 pm First order of business is get rid of the X in the middle. It'll defeat your attempts to signal this.
Not necessarily !
computeraddict
Filter Inserter
Filter Inserter
Posts: 274
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: Struggeling with train signals

Post by computeraddict »

mmmPI wrote: Thu Dec 26, 2024 3:37 pm
computeraddict wrote: Thu Dec 26, 2024 3:35 pm First order of business is get rid of the X in the middle. It'll defeat your attempts to signal this.
Not necessarily !
I mean, in your two signalings you either ignored the X or produced a design with it that can deadlock. It should be removed.
mmmPI
Smart Inserter
Smart Inserter
Posts: 4035
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Struggeling with train signals

Post by mmmPI »

computeraddict wrote: Thu Dec 26, 2024 3:40 pm I mean, in your two signalings you either ignored the X or produced a design with it that can deadlock. It should be removed.
No second design doesn't deadlock with the 2 trains, chain signals are used to avoid this.

Edit :

Here is a higher quality picture where trains aren't masking signals :
9804_0087h19m 1s_nauvis.jpg
9804_0087h19m 1s_nauvis.jpg (278.69 KiB) Viewed 534 times
It doesn't deadlock because trains are only allowed in the middle X when they can exit it, due to the chain signals.
Maartenv
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Dec 26, 2024 2:09 pm
Contact:

Re: [Solved] Struggeling with train signals

Post by Maartenv »

Thank you all for the replies and for the examples. In the end I will be going for a uni-directional track. On secound thought I makes a lot more sense in my situation.
For the people that made the examples, I will still be making them to try and understand them better to be able to use it in the future, so thank you!
mmmPI
Smart Inserter
Smart Inserter
Posts: 4035
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [Solved] Struggeling with train signals

Post by mmmPI »

Maartenv wrote: Thu Dec 26, 2024 4:18 pm Thank you all for the replies and for the examples. In the end I will be going for a uni-directional track. On secound thought I makes a lot more sense in my situation.
I think it's the recommended way to go when you have 2 parralels tracks, just have them uni-directionnal, and then reason as car-lane.
Maartenv wrote: Thu Dec 26, 2024 4:18 pm For the people that made the examples, I will still be making them to try and understand them better to be able to use it in the future, so thank you!
In the second "most complicated" setup, the rule of thumb that may not be obvious could be written as "chain signal at entrances" and "regular signal at exits" ( only when the "exit" is long enough for a full train to fit ). That's what most tutorials would suggest, but depending on the particular case in which you are trying to apply it, it can be very confusing.

In the second setup, the "X" can only be entered by passing a chain signal, but it's not easy to see as there are also regular signals around it. But given their position relative to the tracks, the "regular signals" are present at the 4 exit of the "X" not the entrances of the "X". and the same rule is applied at the smaller junctions.
Tertius
Smart Inserter
Smart Inserter
Posts: 1115
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: [Solved] Struggeling with train signals

Post by Tertius »

Maartenv wrote: Thu Dec 26, 2024 4:18 pm In the end I will be going for a uni-directional track.
Good decision. 👍
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 843
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

Re: [Solved] Struggeling with train signals

Post by IsaacOscar »

Maartenv wrote: Thu Dec 26, 2024 4:18 pm In the end I will be going for a uni-directional track.
A bu directional track is actually really easy, just put a chain signal on both ends facing into the rail, and normal signals on the opposite sides.
You don't need any complicated passings or anything, just a long line of tracks.
Of course it may slow down your trains, as only one will be able to use the track at a time.
Post Reply

Return to “Gameplay Help”