Power lines don't connect properly

This subforum contains all the issues which we already resolved.
User avatar
Nic
Fast Inserter
Fast Inserter
Posts: 140
Joined: Sun Oct 19, 2014 4:15 pm
Contact:

Power lines don't connect properly

Post 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
Factorio 2014-12-27 23-48-18-19.jpg (968.68 KiB) Viewed 9675 times
Click to expand
Factorio 2014-12-27 23-48-22-60.jpg
Factorio 2014-12-27 23-48-22-60.jpg (922.21 KiB) Viewed 9675 times
Click to expand

You can easily reproduce it.
I am Nic and I love to play games - the more unique the game concept is, the more I am up to buy a game and support the developers with my ideas.
If you want to watch my gameplay videos you do find them on YouTube: http://fwd.nicmd.de/ytng

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Power lines don't connect properly

Post 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.)
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

kovarex
Factorio Staff
Factorio Staff
Posts: 8188
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Power lines don't connect properly

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

User avatar
Nic
Fast Inserter
Fast Inserter
Posts: 140
Joined: Sun Oct 19, 2014 4:15 pm
Contact:

Re: Power lines don't connect properly

Post 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 :)
I am Nic and I love to play games - the more unique the game concept is, the more I am up to buy a game and support the developers with my ideas.
If you want to watch my gameplay videos you do find them on YouTube: http://fwd.nicmd.de/ytng

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Power lines don't connect properly

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

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Power lines don't connect properly

Post by MF- »

This is (if anything) a feature request. Should be moved.

kovarex
Factorio Staff
Factorio Staff
Posts: 8188
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Power lines don't connect properly

Post 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

User avatar
Nic
Fast Inserter
Fast Inserter
Posts: 140
Joined: Sun Oct 19, 2014 4:15 pm
Contact:

Re: Power lines don't connect properly

Post 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 :)
I am Nic and I love to play games - the more unique the game concept is, the more I am up to buy a game and support the developers with my ideas.
If you want to watch my gameplay videos you do find them on YouTube: http://fwd.nicmd.de/ytng

Garm
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Nov 18, 2013 9:46 pm
Contact:

Re: Power lines don't connect properly

Post by Garm »

What if i "want" them to remain separate?

Players might have separate power networks easily.

LordFedora
Filter Inserter
Filter Inserter
Posts: 310
Joined: Fri Nov 07, 2014 3:46 am
Contact:

Re: Power lines don't connect properly

Post 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

JLBShecky
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Mon Jul 21, 2014 5:27 pm
Contact:

Re: Power lines don't connect properly

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

kovarex
Factorio Staff
Factorio Staff
Posts: 8188
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Power lines don't connect properly

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

Garm
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Nov 18, 2013 9:46 pm
Contact:

Re: Power lines don't connect properly

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

kovarex
Factorio Staff
Factorio Staff
Posts: 8188
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Power lines don't connect properly

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

Garm
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Nov 18, 2013 9:46 pm
Contact:

Re: Power lines don't connect properly

Post by Garm »

Thank you

LordFedora
Filter Inserter
Filter Inserter
Posts: 310
Joined: Fri Nov 07, 2014 3:46 am
Contact:

Re: Power lines don't connect properly

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

kovarex
Factorio Staff
Factorio Staff
Posts: 8188
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Power lines don't connect properly

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

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: Power lines don't connect properly

Post by n9103 »

So... Our players are still living in cabling hell. :evil:
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

Post Reply

Return to “Resolved Problems and Bugs”