Changing the supply area and wire distance of electric poles

Place to get help with not working mods / modding interface.
lepe
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 06, 2016 9:10 pm
Contact:

Changing the supply area and wire distance of electric poles

Post by lepe »

How would I go about changing the supply area and wire distance of electric poles while still having the visuals correctly display those?

Also, what is the name of the small electric pole entity?
I'm looking in the `Factorio/data/base/prototypes/entity/entities.lua` file, and I only see the other "electric pole" type items.
User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 260
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: Changing the supply area and wire distance of electric poles

Post by theRustyKnife »

lepe wrote:How would I go about changing the supply area and wire distance of electric poles while still having the visuals correctly display those?
If you're not talking about changing them runtime there's no problem with just changing the values in the prototype - the engine is luckily smart enough to figure the graphics out.
If you are then I don't think that's even possible without swapping out entities.
lepe wrote:Also, what is the name of the small electric pole entity?
I'm looking in the `Factorio/data/base/prototypes/entity/entities.lua` file, and I only see the other "electric pole" type items.
It's actually a part of the demo thus it's found in "Factorio/data/base/prototypes/entity/demo-entities.lua". It confused me at first too :D
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Changing the supply area and wire distance of electric poles

Post by Nexela »

Also keep this in mind when setting supply areas

viewtopic.php?f=23&t=28095
ShinyAfro
Inserter
Inserter
Posts: 27
Joined: Mon Jan 04, 2016 1:27 pm
Contact:

Re: Changing the supply area and wire distance of electric poles

Post by ShinyAfro »

lepe wrote:How would I go about changing the supply area and wire distance of electric poles while still having the visuals correctly display those?

Also, what is the name of the small electric pole entity?
I'm looking in the `Factorio/data/base/prototypes/entity/entities.lua` file, and I only see the other "electric pole" type items.
Factorio_0.13.10\data\base\prototypes\entity\demo-entities.lua
type = "electric-pole",
name = "small-electric-pole",

Basically i have no idea what the demo version is, but some of the earlier bits are in there and the other files build on the demo.

Easiest way to change wire length and area is like so, if you did not already know:
data.raw["electric-pole"]["small-electric-pole"]["maximum_wire_distance"] = 7.5
data.raw["electric-pole"]["small-electric-pole"]["supply_area_distance"] = 2.5
The wire is not a part of the poles code (Well, with the exception if defining connection points!) and will work at any distance really just by changing those two values.
User avatar
theRustyKnife
Filter Inserter
Filter Inserter
Posts: 260
Joined: Thu Feb 26, 2015 9:26 pm
Contact:

Re: Changing the supply area and wire distance of electric poles

Post by theRustyKnife »

ShinyAfro wrote:Basically i have no idea what the demo version is, but some of the earlier bits are in there and the other files build on the demo.
The demo is a cut-down version of the game that you can try for free on factorio.com ;)
lepe
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 06, 2016 9:10 pm
Contact:

Re: Changing the supply area and wire distance of electric poles

Post by lepe »

Thanks guys, your suggestions worked.
Post Reply

Return to “Modding help”