Page 1 of 1

Electric pole wire connections

Posted: Thu Jan 26, 2017 5:29 am
by Silophant
I'd like to write a little mod that makes the power system work a little more realistically, without making it too tedious. Specifically, I'd like to make it so you have to use substations to transform power up to or down from high-voltage lines, so I need to make it so that big electric poles can only connect to each other and to substations, not directly to medium and small electric poles. My first thought was to create a separate wire type that only big electric poles and substations could connect to, and remove big poles ability to connect to copper wire, but reading through some threads here, it looks like the wire types are hardcoded into the core game and cannot be added to or modified. Can anyone confirm if that's the case or not, and if so, is there a workaround for that mechanic that I could use?

Re: Electric pole wire connections

Posted: Thu Jan 26, 2017 6:04 am
by Adil
You could use runtime scripting to simulate this behavior, you need to track on_entity_built, on_robot_built_entity events and make sure that no undesired connections between poles occurs. Also, during on_put_item event it is probably possible to prevent manual connections done by player. There's this mod that can be used as an example https://mods.factorio.com/mods/theRusty ... s-circuits.

Re: Electric pole wire connections

Posted: Thu Jan 26, 2017 1:51 pm
by Silophant
Perfect. Thanks!