Page 1 of 1
Power lines don't connect properly
Posted: Sat Dec 27, 2014 10:57 pm
by Nic
I found a weird bug where power lines don't connect when you remove certain poles (even though the polses you remove are not necessary).
You can see an example here:
- Factorio 2014-12-27 23-48-18-19.jpg (968.68 KiB) Viewed 9971 times
Click to expand
- Factorio 2014-12-27 23-48-22-60.jpg (922.21 KiB) Viewed 9971 times
Click to expand
You can easily reproduce it.
Re: Power lines don't connect properly
Posted: Sun Dec 28, 2014 4:13 am
by n9103
Power lines have had an optimization routine implemented to reduce the very cluttering amount of power lines on-screen, whereby most redundant connections aren't made.
Generally speaking, new connections aren't automatically formed at all when removing poles, only adding. (well, afaik. haven't played the last two patches though.)
Re: Power lines don't connect properly
Posted: Sun Dec 28, 2014 12:52 pm
by kovarex
Well, I believe there could be logic, that removing pole will check if the neighbours shouldn't be connected and do so if needed.
Re: Power lines don't connect properly
Posted: Sun Dec 28, 2014 4:42 pm
by Nic
kovarex wrote:Well, I believe there could be logic, that removing pole will check if the neighbours shouldn't be connected and do so if needed.
That would be very great
Re: Power lines don't connect properly
Posted: Sat Jan 03, 2015 9:49 am
by MF-
Well.. This used to by my primary way of creating separate power networks.
I do see the point, though. This could be useful when moving poles.
To separate networks I'd just have to nuke the wires on the pole before removing it.
As long as distinct networks arent connected, I'm not strictly against.
It would be just awkward to see stuff happening without your consent / a chance to confirm.
(" I just remove this pole... Whoaa, where did this connection come from? Gremlins? ")
PS: Link this thread if you post about this elsewhere.
Re: Power lines don't connect properly
Posted: Sat Jan 03, 2015 9:49 am
by MF-
This is (if anything) a feature request. Should be moved.
Re: Power lines don't connect properly
Posted: Sat Jan 03, 2015 10:24 am
by kovarex
MF- wrote:This is (if anything) a feature request. Should be moved.
Yes, but it is so easy to fix, that I will rather do it than argue about it
Also this is one of the small annoyance I had as well when playing it.
So it is done for 0.11.9
Re: Power lines don't connect properly
Posted: Sat Jan 03, 2015 10:58 am
by Nic
kovarex wrote:MF- wrote:This is (if anything) a feature request. Should be moved.
Yes, but it is so easy to fix, that I will rather do it than argue about it
Also this is one of the small annoyance I had as well when playing it.
So it is done for 0.11.9
Thank you kovarex
I totally overlooked that you already replied here
Re: Power lines don't connect properly
Posted: Sat Jan 03, 2015 8:08 pm
by Garm
What if i "want" them to remain separate?
Players might have separate power networks easily.
Re: Power lines don't connect properly
Posted: Sat Jan 03, 2015 8:20 pm
by LordFedora
You can already use shift click (i forget which one) to remove the wires from a pole, and copper wire to add some
Re: Power lines don't connect properly
Posted: Sat Jan 03, 2015 9:06 pm
by JLBShecky
Garm wrote:What if i "want" them to remain separate?
Players might have separate power networks easily.
Well they way that I see it working I don't think that it would cause problems, now I don't know if this is how it is being solved, but this is how I would think to solve it while causing as minimal of issues as possible.
When a player goes to remove an electric pole generate a list containing all the electric poles that are around it with it's wire reach distance. (defines.events.onpreplayermineditem)
Check remove all the electric poles to see which ones the electrical wire is connected to currently and make note of them. (We ignore red and green since they use extra resources.)
From the list of poles that are connected to the pole that is about to be removed we check each one to see if it can connect to the other poles and if it can then we make the connection between them.
After that the pole is successfully mined and the network that had the pole removed from it will still stay intact but will not affect any other nearby networks.
Of course that is how I would do it as a mod, for internal behavior of the electrical network there is a little more room for optimization as they should have access to what poles the current one is connected to, although that might be exposed by lua and I just don't know about it.
Re: Power lines don't connect properly
Posted: Sat Jan 03, 2015 9:58 pm
by kovarex
Garm wrote:What if i "want" them to remain separate?
Players might have separate power networks easily.
This reconnects only the neighbours that were already connected to the pole being removed. So it will obviously never connect networks that were separated already.
Re: Power lines don't connect properly
Posted: Sun Jan 04, 2015 1:53 pm
by Garm
kovarex wrote:
This reconnects only the neighbours that were already connected to the pole being removed. So it will obviously never connect networks that were separated already.
Then please make sure that when I separate the network using SHIFT this doesnt work as well. Because if i accidentally misclick on a pole with wire merging two networks I don't want to redo the entire process right from the beginning.
Re: Power lines don't connect properly
Posted: Sun Jan 04, 2015 2:19 pm
by kovarex
Garm wrote:kovarex wrote:
This reconnects only the neighbours that were already connected to the pole being removed. So it will obviously never connect networks that were separated already.
Then please make sure that when I separate the network using SHIFT this doesnt work as well. Because if i accidentally misclick on a pole with wire merging two networks I don't want to redo the entire process right from the beginning.
No need to worry, this logic is applied only when the electric pole is being removed (mined/destroyed), not when it is just being disconnected.
Re: Power lines don't connect properly
Posted: Sun Jan 04, 2015 4:32 pm
by Garm
Thank you
Re: Power lines don't connect properly
Posted: Sun Jan 04, 2015 5:12 pm
by LordFedora
wait, destroyed? that doesn't make any sense, "the bitter killed my pole, but he was nice enough to re-string the nearby poles so we didn't get a power outage!"
Re: Power lines don't connect properly
Posted: Sun Jan 04, 2015 5:27 pm
by kovarex
LordFedora wrote:wait, destroyed? that doesn't make any sense, "the bitter killed my pole, but he was nice enough to re-string the nearby poles so we didn't get a power outage!"
The game is ommiting the extra connections mainly for aesthetic purpose, to avoid having a tons of cables everywhere, so I don't see this being a huge problem.
Re: Power lines don't connect properly
Posted: Sun Jan 04, 2015 8:36 pm
by n9103
So... Our players are still living in cabling hell.