Page 1 of 1

[0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 6:38 am
by Orborde
Take a look at this savegame: https://www.dropbox.com/s/560nfi9xs4qnk ... n.zip?dl=0

The northbound signal I'm standing by is green, but there is a train sitting on the tracks to the north. Why is this signal green instead of red?

I have tried deconstructing and reconstructing the signal and the rail intersection, as well as backing the train in and out of the intersection a few times.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 10:25 am
by Boogieman14
Your track and signal layout is incorrect (some might even say it's a mess :lol: ). When you mouse over a piece of rail, you'll see that there's 3 trains in the block. Let them run, and some will run into each other (or get stuck with a No Path message - meaning it can't find a working path to its destination). I recommend you watch a tutorial on factorio trains (a quick search on youtube and I found this one by Gepwin, haven't watched it entirely, but he does show a setup with multiple trains)

Alternatively, you could submit it to -root for a Factorio Fixit. Chances are, he'll simply rip out the trains completely and replace with belts and pipes though :lol:

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 4:32 pm
by Orborde
Oh, it's definitely a mess :) . But messiness notwithstanding, if there is a train (or 3!) on the block, the signal leading to that block definitely shouldn't be green.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 4:37 pm
by Boogieman14
I think the problem here is that the track loops back on the signal, both sides of the two-way signal belong to the same block. I would maintain that this is a design flaw rather than a bug :) If you add a two-way signal at the top of that track, you'll get reds all over the place.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 5:46 pm
by kovarex
We should probably make some different behavior for signal that has the same block on both sides, maybe it should change colors rapidly or something.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 5:51 pm
by Orborde
Here's a better illustration of what I think was the problem (at least, cleaning up my layout to remove this track configuration fixed it): https://www.dropbox.com/s/2midtn6gtvkpd ... n.zip?dl=0

Image

The northeast-bound signal here definitely should not be green. The problem appears to be only when the tracks are right next to each other like this; spacing them out a bit makes the signal behave correctly.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 6:01 pm
by Boogieman14
Place the right signal a few tiles down and it'll turn red as well, problem there is probably the partially overlapping curves, causing that right signal to again have the same block incoming and outgoing (hover mouse over the signal to see these block numbers).

I suppose an 'invalid placement' indication would help clarify this situation, but I still don't think it's a bug per se :)

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 6:35 pm
by User_Name
Orborde wrote:Here's a better illustration of what I think was the problem (at least, cleaning up my layout to remove this track configuration fixed it):.
Yep, looks like a bug to me. Train signals placed like in your picture work like a paired signal for two-sided track, although they are on different tracks, and this causes erratic behavior.

Workaround is to have 1 tile offset.

Here, your trains run happily
Save:
https://dl.dropboxusercontent.com/u/343 ... Green3.zip
Pic

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 6:59 pm
by n9103
I would only call it a bug if the opposing signal doesn't get a blue highlight, as they do when normally placing on opposite sides.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 7:19 pm
by User_Name
n9103 wrote:I would only call it a bug if the opposing signal doesn't get a blue highlight, as they do when normally placing on opposite sides.
Signal does not behave like a double signal anyway. Nor like a single one.
And no, there is no highlight.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 7:33 pm
by Boogieman14
n9103 wrote:I would only call it a bug if the opposing signal doesn't get a blue highlight, as they do when normally placing on opposite sides.
They're not on opposite sides. They're on two different stretches of track. The will not and should not 'connect'. The problem appears to be that the northbound signal is placed in a position where the two curves are actually still considered to be in the same block. As I said, move the northbound signal down just a short distance and everything's working as expected.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 8:20 pm
by n9103
I'm just saying that because it could be that the devs set up a behavior like this, since there's no room in the middle for a signal.
But yes, all signs point to being a bug, though an easily avoided one.

Re: [0.11.3] Incorrect train signal behavior

Posted: Thu Nov 27, 2014 8:44 pm
by User_Name
Well, I made better picture.

The signals in the white circles are working as expected. Two trains running on this track without issues.
The signal in the red circle is ALWAYS green. It does not interfere with the other signals operation. It does not divide track in blocks.
It just sits there, forever green, doing nothing.

Image

Re: [0.11.3] Incorrect train signal behavior

Posted: Fri Nov 28, 2014 2:51 pm
by kovarex
Ok, so I made a change to make it less confusing.

Whenever the player creates signal, that doesn't split blocks, it will change colors green->orange->red the same way as when it is not connected.

Here are two examples of such a situation:

In a loop with just one signal, both sides of the signal control the same block, so the signal actually do nothing.
Image

The second situation is technically the same, as the overlapping rails makes it to single block.
Image

So I'm moving this to fixed for the next release.