[0.13.17] Circuit-closed signal does not send "green" state

Bugs that are actually features.
Post Reply
phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

[0.13.17] Circuit-closed signal does not send "green" state

Post by phi1010 »

Not sure if this is intended, but a closed signal will only send the "red" / "yellow" / "nothing" signals instead of "red" / "yellow" / "green".

I would expect to read red/yellow/*green* as if there was no influence by my circuit, independent from what color the signal actually displays. (Not only showing red in all cases is pretty useful, without this advanced safe rail crossings would get impossible; We can calculate the displayed color ourselves if we get the currently only yellow/red signal and our own input to the signal, knowing what the signal is configured to use.)

Demonstation with mods installed:
2016-08-20 22_11_53-Factorio 0.13.17 - Kopie.png
2016-08-20 22_11_53-Factorio 0.13.17 - Kopie.png (1.37 MiB) Viewed 2690 times

Minimal example without mods:
2016-08-20 22_24_16-Factorio 0.13.17.png
2016-08-20 22_24_16-Factorio 0.13.17.png (479.7 KiB) Viewed 2690 times
2016-08-20 22_24_08-Factorio 0.13.17.png
2016-08-20 22_24_08-Factorio 0.13.17.png (579.31 KiB) Viewed 2690 times
2016-08-20 22_24_02-Factorio 0.13.17.png
2016-08-20 22_24_02-Factorio 0.13.17.png (435.78 KiB) Viewed 2690 times
2016-08-20 22_25_27-Factorio 0.13.17.png
2016-08-20 22_25_27-Factorio 0.13.17.png (744.67 KiB) Viewed 2690 times
Version:
2016-08-20 22_25_46-Factorio 0.13.17.png
2016-08-20 22_25_46-Factorio 0.13.17.png (136.17 KiB) Viewed 2690 times
Last edited by phi1010 on Sat Aug 20, 2016 8:40 pm, edited 1 time in total.

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

Re: [0.13.17] Circuit-closed signal does not send "green" state

Post by Rseding91 »

Please upload a save file and steps to reproduce the issue showing what currently happens along with what you believe should actually happen.
If you want to get ahold of me I'm almost always on Discord.

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: [0.13.17] Circuit-closed signal does not send "green" state

Post by phi1010 »

Savefile attached (another one, I didn't save the one with the dark screenshots due to its simplicity). I'd expect a green light and a signal {green: 1} on the wire, instead of the white one with nothing on the wire.

Steps to reproduce: Simply build a signal and a light on a rail and configure the signal to show "red" and the light to show the track status color from the signal; the order didn't seem to matter.
Attachments
bugreport.zip
(2.32 MiB) Downloaded 87 times

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: [0.13.17] Circuit-closed signal does not send "green" state

Post by phi1010 »

This unexpected behavior can also be useful, but it might be better to include a configurable output in the dialog (if red, send iron, if yellow, send copper, if green, send steel and if safely closed, send steel). That way it wouldn't break existing creations relying on this behaviour, and the players actually get told that a signal can have four different output states, not just three. It currently feels as if the signals could only send red and yellow and I had to detect green signals by calculating green = !(red|yellow).

Twinsen
Factorio Staff
Factorio Staff
Posts: 1330
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.13.17] Circuit-closed signal does not send "green" state

Post by Twinsen »

The tooltip of read says the following: "Reads the color of the rail signal and sends the circuit network signal specified below. If the rail signal is red because it was closed from the circuit network, nothing will be outputted."
It was done this way so you can differentiate between the 4 states: green/yellow/red/red because circuit condition.

So if I understand your problem correctly, this is working as intended.

I'll consider adding the 4th state as an explicit output signal to avoid this confusion.

Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [0.13.17] Circuit-closed signal does not send "green" state

Post by Anson »

Twinsen wrote:tooltip: "... If the rail signal is red because it was closed from the circuit network, nothing will be outputted."
... done this way to differentiate between the 4 states: green/yellow/red/red because circuit condition.
I'll consider adding the 4th state as an explicit output signal to avoid this confusion.
playing with factorio 0.14.13, I was trying to fix my new signal setup for quite some time until i searched through the forum and found this thread :-) :-(
Indeed, it is "working as intended" and it even is documented (thank you for the detailed tooltip).
but i really am looking forward to your consideration of adding an explicit output signal for all four states so that it is a lot easier to handle in circuits.

currently, i also have several other signals on the same wire and thus can't do a simple test for "all signals = 0" to detect that fourth state, and even that would add additional combinators to the setup.
as long as it is only used to show the state with a colored lamp, i can use the trick of adding a "lower priority color signal" (pink/cyan) to the wire so that that color is shown on a lamp as long as no other color signal is outputted from the train signal, but that trick is not usable when i want to setup some circuit conditions based on that state.

by adding a fourth (color) signal to the signal output in the same manner as the first three colored signals (being able to redefine them yourself to ABCD, 1234, iron/copper/coal/stone, etc), it would nicely be possible to set it up as needed and avoid lots of additional logic circuitry. depending on needs, users even could redefine that fourth state's signal to red (if they are interested only in the state that the train sees, whether it can enter that block), or to green (if they want to check whether there is a train in the block), etc.

thus, YES, PLEASE add also the fourth state to the signal's signals!

ps: are there other words besides "signal" to avoid confusion when talking about the "signals of signals" (and shorter/prettier than "logical messages of train traffic lights")

Post Reply

Return to “Not a bug”