[MOD 0.12.x] Autowire - configurable automated pole wiring

Topics and discussion about specific mods
GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

[MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

Autowire

Image
Image

Info:
Adds a gui that lets you select which wires will be connected automatically when placing any electric power poles. Automatically connecting red/green requires you have the wires in your inventory, while copper are still free, as normally.
License
Long Description
Version history
Planned Features
Use in Mod Packs
Last edited by GopherAtl on Wed Jun 01, 2016 12:31 am, edited 8 times in total.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

Threw this together partly to relive myself of the tedium of running along stringing red and green wires when I'm playing with large-scale circuit networks that connect distant outposts, and partly to try my hand at the factorio modding api's gui systems.

I tried to make it support multiplayer, but have not yet been able to test that, so if you do test it, please report the results XD
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Adil »

GopherAtl wrote:way to auto-detect other mods' added power poles?
Just in case. All but the most exotic modded poles should have type=="electric-pole".
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

Adil wrote:
GopherAtl wrote:way to auto-detect other mods' added power poles?
Just in case. All but the most exotic modded poles should have type=="electric-pole".
:facepalm: I am the derp for not thinking of that at the time XD

Though after thinking about it, some mods might add poles that have their own customized wiring behaviors? in which case, a way to at least make an exception might be wise. A table of exceptions in the config file should work, though.

:edit: and now it does. 0.1.1 released, it now has a config.lua with an (initially empty) array "wire_exceptions," anything not named in that array of type electric-pole will be auto-wired.

If anyone knows of any mods off-hand that have power poles that should be excepted from autowiring behavior for whatever reason, let me know and I'll add them to the default wire_exceptions list.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

User avatar
hitzu
Filter Inserter
Filter Inserter
Posts: 530
Joined: Tue Sep 09, 2014 5:55 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by hitzu »

Great mod! Thank you :)

I can suggest another way to implement auto wiring without any additional GUI. Making it work on large distances so the player connects the first and the last power pole and all intermediate poles would be connected automatically by a shortest way if possible.

Alexs
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Alexs »

Unfortunately the mod is not working with me. Perhaps a problem with the mod: better electric pole? with me also no GUI is displayed ... your idea is clever. Sorry, Translated with Google

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

hitzu wrote:Great mod! Thank you :)

I can suggest another way to implement auto wiring without any additional GUI. Making it work on large distances so the player connects the first and the last power pole and all intermediate poles would be connected automatically by a shortest way if possible.
while I can see the utility if that feature, you're basically asking me to implement pathfinding and graph traversal on what could be a truly massive scale, it's doable, even doable in a way that doesn't bog the game down while it processes, but it's not something I can implement trivially.
Alexs wrote:Unfortunately the mod is not working with me. Perhaps a problem with the mod: better electric pole? with me also no GUI is displayed ... your idea is clever. Sorry, Translated with Google
I don't know why no gui is displayed. Interactions with better electric pole are possible, but that shouldn't affect the gui. I will test the two together later today when I get a chance.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

@Alexs Just tested it with the unofficial update of "Better Electric Pole" here, by lishget, as the original version by elmi has not been updated to 0.12.x, and it seems to work fine, no problems

Image

So I'm not sure what's happening for you.

Can you tell me what version of the game you're playing, and list all the mods you're using? Are all the latest versions?
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

Alexs
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Alexs »

Thank you for the fast reaction. I have just tested the small electricity pylon. he has the same problem. So it is not at the other mod. the message is the following:

Error while running event handler:
--autowire--/control.lua 58: attempt to index Local "settings" (a nil value)

...

Edit: I have just turned off all mods except for color-coding. still the same error. Factoriop has stood up to date. Alledings the 64-bit version ... a problem?
.
Last edited by Alexs on Tue Aug 18, 2015 2:37 pm, edited 1 time in total.

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

Alexs wrote:Thank you for the fast reaction. I have just tested the small electricity pylon. he has the same problem. So it is not at the other mod. the message is the following:

Error while running event handler:
--autowire--/control.lua 58: attempt to index Local "settings" (a nil value)

....
hmm. Are you sure you're running the latest version, autowire_0.1.2? How are you placing the poles? Is this in single-player?
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

Alexs
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Alexs »

I have just turned off all mods except for color-coding. still the same error. Factoriop has stood up to date. Alledings the 64-bit version ... a problem?

yes - singleplayer ...


NEWS: when I start a new game with all mods, I have the gui.
how can I save the old save game?
Last edited by Alexs on Tue Aug 18, 2015 2:47 pm, edited 1 time in total.

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

Alexs wrote:I have just turned off all mods except for color-coding. still the same error. Factoriop has stood up to date. Alledings the 64-bit version ... a problem?

yes - singleplayer ...
Hmm. I run a 64-bit version too, so that wouldn't be it. Will test with color-coding now, not used that mod before, some strange interaction may be happening...

:edit: Aha! I found the problem. Nothing to do with color-coding; the recent versions don't work when added to an already-existing save, after I changed it to make it properly support multi-player.

Will work on a fix now, hopefully won't take long.
Last edited by GopherAtl on Tue Aug 18, 2015 2:48 pm, edited 1 time in total.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

Alexs
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Alexs »

.. when I start a new game with all mods, I have the gui.
how can I save the old save game?

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

Alexs wrote:.. when I start a new game with all mods, I have the gui.
how can I save the old save game?
gimme just a minute, found and fixing the problem now!
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

Alexs
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Alexs »

great! I look forward to the new version. The Nixie tubes are very good! thanks for the quick troubleshooting. wow! concentrated expertise! Thanks for the work.

GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by GopherAtl »

Hrm. A proper fix is going to take a bit of figuring, not sure why it's not working now.

So this isn't a proper release, just a temporary patch.

Load this version and then place any kind of electric pole, and the gui should be added. It will work properly from there. (see attachment to this post)

:edit: Scratch that, found the problem and fix almost immediately after this post XD packing up a proper 0.1.3 release with the fix now which will properly handle being added to existing saves. Will update the OP and this post with links when I'm done (within 2 minutes) and remove the attachment here at that time.

:edit: and done. Linky to 0.1.3
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

Alexs
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Alexs »

many many thanks! IT WORKS! great :D

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Narc »

I've got a pull request for the Factorio 0.12.11 update and an unofficial autowire v0.1.4 update (direct download). Please prefer GopherAtl's official update, whenever that occurs.

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by Peter34 »

I've only now upgraded from 0.12.10 to 0.12.19, and the fixed autowire 1.3 gives an error message that ends the game.

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: [MOD 0.12.x] Autowire - configurable automated pole wiring

Post by SirRichie »

Peter34 wrote:I've only now upgraded from 0.12.10 to 0.12.19, and the fixed autowire 1.3 gives an error message that ends the game.
I think that the content of the error message and details on the actions that cause it will prove helpful.

Post Reply

Return to “Mods”