Copper wire automatic connection

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
CzBuCHi
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Thu Feb 22, 2018 10:25 pm
Contact:

Copper wire automatic connection

Post by CzBuCHi »

TL;DR
When placing power pole connect it to nearby power poles with restriction, that new copper wire will not cross already placed copper wire connections.
What ?
I never like look of copper wires crossing each other, so every time when game decides to create one of these (see image) im manually rewiring all "wrong" connections to clean them up,
Why ?
Because of my (in)sanity? :) Also im not only one player with OCD.

---
Also automatic connections should work only for poles od same type - connection poles of different type would need to be done manually.
This probably requres to also implement Save copper wire configurations in blueprints
Attachments
Mess.png
Mess.png (1.6 MiB) Viewed 3092 times

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Copper wire automatic connection

Post by eradicator »

Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Copper wire automatic connection

Post by Tekky »

I also find it annoying when cables behave that way.

However, I don't see any way to prevent this from happening, since the game has no way of knowing in advance whether more poles will be placed that will cause wires to cross, unless you are constructing from blueprints.

The following thread is also related to saving wire connections in blueprints:

viewtopic.php?f=6&t=47949 Electric network cable connections saved in the blueprint

CzBuCHi
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Thu Feb 22, 2018 10:25 pm
Contact:

Re: Copper wire automatic connection

Post by CzBuCHi »

Tekky wrote:
Sat Jul 14, 2018 10:00 pm
game has no way of knowing in advance whether more poles will be placed
that true ... but game knows all currently existing pole locations so it can use that:

when new pole is added game try to connect it horizontaly or vertically to other poles (which handles almost all cases) and only no pole was found then search for any other connection that will not cross already existing one. (basically poles on same x/y axis takes precedence over all others and when found others arent connected at all)

there really slight chance, that two poles near each other will be added exactly at the same time - so they cannot be processed in parallel...

EDIT: sorry for necro posting :)

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Copper wire automatic connection

Post by Zavian »

CzBuCHi wrote:
Sun Oct 07, 2018 10:33 am
that true ... but game knows all currently existing pole locations so it can use that:

when new pole is added game try to connect it horizontaly or vertically to other poles (which handles almost all cases) and only no pole was found then search for any other connection
That sounds like a reasonable approach.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Copper wire automatic connection

Post by darkfrei »

Zavian wrote:
Sun Oct 07, 2018 10:59 am
CzBuCHi wrote:
Sun Oct 07, 2018 10:33 am
that true ... but game knows all currently existing pole locations so it can use that:

when new pole is added game try to connect it horizontaly or vertically to other poles (which handles almost all cases) and only no pole was found then search for any other connection
That sounds like a reasonable approach.
here is max 5 copper cables per pole, so you lost at least one diagonal connection

CzBuCHi
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Thu Feb 22, 2018 10:25 pm
Contact:

Re: Copper wire automatic connection

Post by CzBuCHi »

darkfrei wrote:
Sun Oct 07, 2018 11:16 am
Zavian wrote:
Sun Oct 07, 2018 10:59 am
CzBuCHi wrote:
Sun Oct 07, 2018 10:33 am
that true ... but game knows all currently existing pole locations so it can use that:

when new pole is added game try to connect it horizontaly or vertically to other poles (which handles almost all cases) and only no pole was found then search for any other connection
That sounds like a reasonable approach.
here is max 5 copper cables per pole, so you lost at least one diagonal connection
not sue what u mean ... basically ideal wires would look like this: (any pole will have max 4 wires attached to it)

Code: Select all

* ----- * ----- *
|       |       |
|       |       |
* ----- * ----- *
|       |       |
* ----- * ----- *
in current setup it will probably look more like this: (unwanted diagonals, missing horizontals and verticals, just a mess ...)

Code: Select all

* ----- *      *
| \ _     \ /  |
|     \   / \  |
*       *      *
|   X   |  X   |
* ----- * -----* 
( * = pole, | / - \ X = wires)

EDIT: try write monospace code on non-monospace font on first time :)

User avatar
Hyenna
Inserter
Inserter
Posts: 41
Joined: Mon May 14, 2018 6:49 am
Contact:

Re: Copper wire automatic connection

Post by Hyenna »

I wish it would simply save copper wire connections in blueprints.
The auto connection always mess up my power switch built from blueprint.
Just think about when you have larger blueprints with multiple power switches controlled by wirenetwork and you have to fix all of them manually.
Power Switch.jpg
Power Switch.jpg (133.54 KiB) Viewed 2752 times

Post Reply

Return to “Ideas and Suggestions”