Set chain signals to red via circuit network

Ideas that are too old (too many things have changed since) and ones which won't be implemented for certain reasons or if there are obviously better suggestions.

Moderator: ickputzdirwech

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2631
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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.
Image

Transport Belt Repair Man

View unread Posts

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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.

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Set chain signals to red via circuit network

Post 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.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Set chain signals to red via circuit network

Post 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.
If you want to get ahold of me I'm almost always on Discord.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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.

coppercoil
Filter Inserter
Filter Inserter
Posts: 470
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: Set chain signals to red via circuit network

Post 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.

User avatar
<NO_NAME>
Filter Inserter
Filter Inserter
Posts: 291
Joined: Tue Aug 02, 2016 9:52 am
Contact:

Re: Set chain signals to red via circuit network

Post 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.
I am a translator. And what did you do for Factorio?
Check out my mod "Realistic Ores" and my other mods!

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Set chain signals to red via circuit network

Post 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 4395 times
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Set chain signals to red via circuit network

Post by ptx0 »

no, you see, that isn't red, it's just.. an... artifact of... some ... computed state.. thingy..

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 883
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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)...

rlidwka
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Mar 17, 2019 10:43 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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:
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Set chain signals to red via circuit network

Post 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 4278 times
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

SilentWarrior
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Apr 16, 2020 3:20 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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!

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Set chain signals to red via circuit network

Post 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 :).
Koub - Please consider English is not my native language.

SilentWarrior
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Apr 16, 2020 3:20 pm
Contact:

Re: Set chain signals to red via circuit network

Post 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

Locked

Return to β€œOutdated/Not implemented”