Plintorio - Advanced Electricity Poles

by Plinfut

Adds several customizations to electricity poles.

Content
12 days ago
2.0
85
Circuit network Power Cheats

a Backstory & Design Choices

16 days ago
(updated 12 days ago)

Version 1.0.0

I loved how easy it was to place electric poles in vanilla Factorio by dragging a whole line. But inserters often fell in the gaps where no power is supplied, so I had to place a lot of poles one by one. It felt strange to be forced to put in the extra work when an easier method is available. The solution: fill in the gaps of the coverage area using Better Poles.

The next "problem" was that a wire length of medium poles doesn't match up nicely with other ranges like those of robopots and radars. I planned to work with multiples of 10 and thus needed medium poles to be placed one tile further apart. I then figured other distances for all poles could come in handy for other layouts.

A good way to light up your base is to place a lamp next to every electricity pole, but that still had to be done individually until I discovered Pole Lamps. That replaces the vanilla poles and makes the lamps free though, and even reduces their electricity costs by 80%. That felt like an unnecessary cheat, so I kept the regular poles and added separate recipes for poles with lamps.

Finally, even if you use radars for really long distance transmission of circuit network signals, you may still need to carry them across several electric poles. I wasn't going to draw those one section at a time when everything else works automatically. Of course you may not want red and/or green wires everywhere, so I added a toggle for each.

12 days ago
(updated 12 days ago)

Version 2.0.0

When I wrote the first version of this mod, I had little experience with Factorio's modding system and code language. While working on other mods after this, I looked at many more examples and found a few ways to accomplish some things more efficiently, better organized and less prone to error. For example: I copied entire code blocks and manually replaced the pole name in multiple places. Later I realized I could reference the same code multiple times and insert the pole name dynamically. That way, if I find a bug or a Factorio update requires a change, I only have to fix it once instead of for each pole type.

Another thing I learned was that Factorio can layer icons, so I could combine icons from the vanilla game through code instead of in an image editor and include the result as a fixed image. This way, if the developers of Factorio decide to change the looks of electric poles, mine will reflect that automatically instead of me having to recreate each icon by hand.

This is all behind the scenes and shouldn't affect users. But two things that are visible in the game are a clearer thumbnail and icons. I noticed that it was difficult to see the difference between vanilla poles and poles with lamps when a number covers the bottom of the icon, such as the number of items you have in your inventory or how many you can craft. Therefore I moved the lamp on icons from the bottom to the right. (In the world they are of course still at the base of the pole.)

This thread has been locked.