Page 3 of 5

Re: Set chain signals to red via circuit network

Posted: Mon Feb 10, 2020 2:12 pm
by steinio
Sad_Brother wrote:
Sun Feb 09, 2020 1:28 pm
steinio wrote:
Sun Feb 09, 2020 12:37 pm
Be aware that reserved signals (yellow) can't be switched to red anymore no matter if chain or rail signal.
Hope this doesn't strike through your planned use case.
Thanks for info, but where you get it?
What happens if condition to close become true then?
Wiki does not say it. But it also describe orange state so need correction.
Wiki https://wiki.factorio.com/Rail_chain_signal :
If it switches to yellow, the block is reserved for a train and the signals of intersection blocks switch to red (like regular signal).
Wiki https://wiki.factorio.com/Rail_signal :
Yellow - A train is not able to stop before the monitored block and will pass the signal. The debug option show_train_stop_point can be used to see the distance locomotives need to stop.
The signal will close after the train.

Re: Set chain signals to red via circuit network

Posted: Mon Feb 10, 2020 3:41 pm
by Sad_Brother
Thanks, but I did not found answers on those pages and fff before my previous post.
If close condition is true:
- green rail signal turn to red and do not output any logic signal;
- red rail signal become unable to change and do not output any logic signal;
- what would do yellow rail signal? (cannot test right now, wiki has no info).
steinio wrote:
Mon Feb 10, 2020 2:12 pm
The signal will close after the train.
I hope it will ignore close logic while yellow and still emit yellow logic signal.

Re: Set chain signals to red via circuit network

Posted: Wed Feb 12, 2020 3:13 am
by JasonC
steinio wrote:
Sun Feb 09, 2020 12:37 pm
Be aware that reserved signals (yellow) can't be switched to red anymore no matter if chain or rail signal.
Hope this doesn't strike through your planned use case.

Overall i'm also in favour of at least be able to switch a chain signal to red.
So we could not only lock an exit path but also an entering path to crossings or stations.
That's ok, re the behavior. It'll just mean looking both ways a bit longer before crossing I think. That switching behavior makes sense to me anyways.

Thanks for the heads up.

Re: Set chain signals to red via circuit network

Posted: Thu Feb 13, 2020 10:08 pm
by ssilk
<NO_NAME> wrote:
Sat Feb 08, 2020 8:43 pm
Unless you know about this secret hidden feature of chain signals, sometimes described with the code word "blue".
You took this example and my solution for that situation is correct. No blue signal needed here.

You can try to find a more complex example. ;)

JasonC wrote:
Sun Feb 09, 2020 4:12 am
The blue light on the chain signal will always throw a wrench in any of your plans.
Fact is, that you can rebuild the chain signal with circuit network and block signals. I don't say it's simple or fun, but it works.
On the other hand, if you could close chain signals with the circuit network, then all of this discussion becomes completely moot, and you open up a whole new set of interesting possibilities for train control that don't exist right now.
Need moar examples. :geek:
steinio wrote:
Sun Feb 09, 2020 12:37 pm
Be aware that reserved signals (yellow) can't be switched to red anymore no matter if chain or rail signal.
Hope this doesn't strike through your planned use case.
AFAIK the signal can be switched. But it has no more effect to the incoming train, because the brake-distance is too short (which is the sense of a reserved signal)

You can "forward" the yellow from the block signal into the chain block (like the chain signal does), that no other train can enter the chain. Well, you see, that this becomes soon very complex. ;)

So I really understand, why this is wanted, but I still think this is not needed for those super rare cases that we are speaking here about, because you can work around it for small parts of a track.

Re: Set chain signals to red via circuit network

Posted: Fri Feb 14, 2020 3:20 pm
by Sad_Brother
ssilk wrote:
Thu Feb 13, 2020 10:08 pm
Fact is, that you can rebuild the chain signal with circuit network and block signals. I don't say it's simple or fun, but it works.
Fact is, that circuit network cannot know train route, so you are wrong.
ssilk wrote:
Thu Feb 13, 2020 10:08 pm
steinio wrote:
Sun Feb 09, 2020 12:37 pm
Be aware that reserved signals (yellow) can't be switched to red anymore no matter if chain or rail signal.
Hope this doesn't strike through your planned use case.
AFAIK the signal can be switched. But it has no more effect to the incoming train, because the brake-distance is too short (which is the sense of a reserved signal)
It seems only test can tell. No other info reliable.
ssilk wrote:
Thu Feb 13, 2020 10:08 pm
You can "forward" the yellow from the block signal into the chain block (like the chain signal does), that no other train can enter the chain. Well, you see, that this becomes soon very complex. ;)
...and need route info...
ssilk wrote:
Thu Feb 13, 2020 10:08 pm
So I really understand, why this is wanted, but I still think this is not needed for those super rare cases that we are speaking here about, because you can work around it for small parts of a track.
I understand why many people like right turn but I still think you can just use left turn and all possible. :P

Re: Set chain signals to red via circuit network

Posted: Fri Feb 14, 2020 9:43 pm
by ssilk
Sad_Brother wrote:
Fri Feb 14, 2020 3:20 pm
ssilk wrote:
Thu Feb 13, 2020 10:08 pm
Fact is, that you can rebuild the chain signal with circuit network and block signals. I don't say it's simple or fun, but it works.
Fact is, that circuit network cannot know train route, so you are wrong.
Yes, I thought that this morning (I don't know why I didn't understood it yesterday, no time for correction since then) and that I put me into an ugly spot. :) Sorry for that and the inconvinience I caused.

Re: Set chain signals to red via circuit network

Posted: Thu Feb 20, 2020 6:07 pm
by Rseding91
ikarikeiji wrote:
Tue Mar 06, 2018 7:18 pm
Suggestion: allow a connected chain signal to be set to red by a circuit network signal just like a regular signal can be set to red.
That is impossible. Chain signals do not have any state themselves. They only relay the state from the signals ahead of them.

You have to set the signal ahead of them to red if you want this behavior. It literally can't be done with how chain signals work in the game now. It's not a matter of adding the circuit logic; it just doesn't exist as a thing.

It's like looking at a mirror and wanting to change the mirror to a different picture. You can't. All you can do is change what the mirror is reflecting. The mirror has no image itself to change.

Re: Set chain signals to red via circuit network

Posted: Thu Feb 20, 2020 6:29 pm
by ptx0
Rseding91 wrote:
Thu Feb 20, 2020 6:07 pm
ikarikeiji wrote:
Tue Mar 06, 2018 7:18 pm
Suggestion: allow a connected chain signal to be set to red by a circuit network signal just like a regular signal can be set to red.
That is impossible. Chain signals do not have any state themselves. They only relay the state from the signals ahead of them.

You have to set the signal ahead of them to red if you want this behavior. It literally can't be done with how chain signals work in the game now. It's not a matter of adding the circuit logic; it just doesn't exist as a thing.

It's like looking at a mirror and wanting to change the mirror to a different picture. You can't. All you can do is change what the mirror is reflecting. The mirror has no image itself to change.
wrong - I can throw red paint on that mirror and not see anything.

Re: Set chain signals to red via circuit network

Posted: Thu Feb 20, 2020 7:25 pm
by coppercoil
Rseding91 wrote:
Thu Feb 20, 2020 6:07 pm
It literally can't be done with how chain signals work in the game now. It's not a matter of adding the circuit logic; it just doesn't exist as a thing.
I like that word "now". Could it be redone for tomorrow in the future? UX is not related how the things are done.

Re: Set chain signals to red via circuit network

Posted: Thu Feb 20, 2020 9:44 pm
by <NO_NAME>
ptx0 wrote:
Thu Feb 20, 2020 6:29 pm
wrong - I can throw red paint on that mirror and not see anything.
Nice analogy.

So, couldn't you change chain signals to relay the state of signals ahead only where they are not blocked by circuit? Allow to cover the mirror with a red curtain?

EDIT: Or I guess, from a technical point of view, it could be pretending that all signals ahead are red.

Re: Set chain signals to red via circuit network

Posted: Thu Feb 20, 2020 10:13 pm
by ptx0
<NO_NAME> wrote:
Thu Feb 20, 2020 9:44 pm
ptx0 wrote:
Thu Feb 20, 2020 6:29 pm
wrong - I can throw red paint on that mirror and not see anything.
Nice analogy.

So, couldn't you change chain signals to relay the state of signals ahead only where they are not blocked by circuit? Allow to cover the mirror with a red curtain?

EDIT: Or I guess, from a technical point of view, it could be pretending that all signals ahead are red.
if circuitcondition == red; then

pretend = true

fi

Re: Set chain signals to red via circuit network

Posted: Fri Feb 21, 2020 1:20 am
by JasonC
Rseding91 wrote:
Thu Feb 20, 2020 6:07 pm
ikarikeiji wrote:
Tue Mar 06, 2018 7:18 pm
Suggestion: allow a connected chain signal to be set to red by a circuit network signal just like a regular signal can be set to red.
That is impossible. Chain signals do not have any state themselves. They only relay the state from the signals ahead of them.

You have to set the signal ahead of them to red if you want this behavior. It literally can't be done with how chain signals work in the game now. It's not a matter of adding the circuit logic; it just doesn't exist as a thing.

It's like looking at a mirror and wanting to change the mirror to a different picture. You can't. All you can do is change what the mirror is reflecting. The mirror has no image itself to change.
What you are saying here doesn't seem to agree with the game:

itsabug.png
itsabug.png (14.59 MiB) Viewed 4396 times

Re: Set chain signals to red via circuit network

Posted: Fri Feb 21, 2020 4:14 am
by ptx0
no, you see, that isn't red, it's just.. an... artifact of... some ... computed state.. thingy..

Re: Set chain signals to red via circuit network

Posted: Fri Feb 21, 2020 5:04 am
by Oktokolo
ptx0 wrote:
Fri Feb 21, 2020 4:14 am
no, you see, that isn't red, it's just.. an... artifact of... some ... computed state.. thingy..
Lulz - i guess they made the chain signal's "state" a function querying all signals until they reach a green/red or the end of line on each branches - and additionally asking the guarded block, whether it is occupied.
Curious, if the pathfinder could actually profit from caching that computation's result as actual state of the chain signal (wich is probably not worth the hassle for the speed gain, but would likely make circuit control possible too)...

Re: Set chain signals to red via circuit network

Posted: Sat Feb 22, 2020 2:41 am
by rlidwka
steinio wrote:
Mon Feb 10, 2020 2:12 pm
The signal will close after the train.
Not necessarily. Occasionally train inside a chain signal sequence repaths before now-closed circuit-controlled rail signal. When it happens - it stops right there with 'no path' flashing.

Here are more details if you wish:

viewtopic.php?f=48&t=74892&p=453013

Because if that bug, if you want to prevent train entering an intersection, you can't rely solely on closing signal at the end of chain sequence as ssilk suggested earlier: a train may enter such intersection and be stuck there.

Re: Set chain signals to red via circuit network

Posted: Sun Feb 23, 2020 6:33 am
by ssilk
Ya, I saw that “bug” already a lot of times... nice that someone nailed it down to a blueprint.

:D Kovarex: “we want to finish the game before retirement.” :lol:

Re: Set chain signals to red via circuit network

Posted: Thu Feb 27, 2020 2:11 am
by JasonC
Rseding91 wrote:
Thu Feb 20, 2020 6:07 pm
... Chain signals do not have any state themselves. They only relay the state from the signals ahead of them. ...

... You have to set the signal ahead of them to red if you want this behavior. ...
@Rseding91: I just wanted to follow up on this. What you said seems strange because it doesn't appear to match the game's behavior.

There must be a way to do a similar thing to a chain signal that a car in its block does, or, more appropriately, to make its circuit network input one of the things it looks for when "mirroring" whatever states, and if there isn't a way, surely there must be a way to add it...
JasonC wrote:
Fri Feb 21, 2020 1:20 am
Rseding91 wrote:
Thu Feb 20, 2020 6:07 pm
ikarikeiji wrote:
Tue Mar 06, 2018 7:18 pm
Suggestion: allow a connected chain signal to be set to red by a circuit network signal just like a regular signal can be set to red.
That is impossible. Chain signals do not have any state themselves. They only relay the state from the signals ahead of them.

You have to set the signal ahead of them to red if you want this behavior. It literally can't be done with how chain signals work in the game now. It's not a matter of adding the circuit logic; it just doesn't exist as a thing.

It's like looking at a mirror and wanting to change the mirror to a different picture. You can't. All you can do is change what the mirror is reflecting. The mirror has no image itself to change.
What you are saying here doesn't seem to agree with the game:
chainsignal.png
chainsignal.png (14.59 MiB) Viewed 4279 times

Re: Set chain signals to red via circuit network

Posted: Sat Apr 18, 2020 10:49 pm
by SilentWarrior
Hi everyone.

First post, yah!

Anyway.

I was dropped here because I want/need this exact feature.

I have a blueprint of small isolated sections of 4 rails, two each direction that are closed off within walls on every side and inside the sections you can change lanes from each side of the one way rails. In between the sections I have a small section with a passageway for my avatar. All of it is gated and the gates force close the train gates if my avatar is within one of those gates, this with a circuit.

Currently this is set to HOLY SHIT DONT DIE mode, sort of like an airbag in a car, it will close the gate instantaneously just right before my avatar dies from being ran over by very fast trains, this causes the trains to crash into the wall, a loud bang happens, all that jazz but my goal is reached, NOT let my avatar die.

The bots can repair the mess afterwards so its not ... per se ... critical, but its not great either.

Ideally I'd like the chain signal to turn red such that the train sees a red signal and stops, in addition to the gate.

The this tilable sections only have 2 normal signals but have about 10 chain signals, it works extremely well and its impossible for trains to get stuck with each other (the outside lanes can be stopping lanes for loading/unloading with the inner lane mostly being free for high speed train crossing).

Space-wise there is not flexibility because the sections are built to size of factories on top and bottom of it for optimal sizing as well, so the width is set (this constraint is actually awesome for creativity).

Even jerry rigging a long wire to the input signal wouldnt work as inside the sections the trains can cross over the rails, so, I would have to mimic the "blue light" logic anyway to avoid being ran over.

Thanks!

Re: Set chain signals to red via circuit network

Posted: Sun Apr 19, 2020 7:32 am
by Koub
Rseding91 wrote:
Thu Feb 20, 2020 6:07 pm
ikarikeiji wrote:
Tue Mar 06, 2018 7:18 pm
Suggestion: allow a connected chain signal to be set to red by a circuit network signal just like a regular signal can be set to red.
That is impossible. Chain signals do not have any state themselves. They only relay the state from the signals ahead of them.

You have to set the signal ahead of them to red if you want this behavior. It literally can't be done with how chain signals work in the game now. It's not a matter of adding the circuit logic; it just doesn't exist as a thing.

It's like looking at a mirror and wanting to change the mirror to a different picture. You can't. All you can do is change what the mirror is reflecting. The mirror has no image itself to change.
Just in case you missed the devs' answer :).

Re: Set chain signals to red via circuit network

Posted: Mon Apr 20, 2020 6:38 pm
by SilentWarrior
Makes sense.

But I already know its impossible, currently in the game ... well.. since I cant do it :P

Thats why its a feature request :P