Almost Invisible Electric Wires


You can make the wires 80%, 50% or completely invisible. The Red and Green wire can be Blue and Yellow, or invisible too. Now you can customize it in settings.

Tweaks
4 years ago
0.16 - 1.1
857

i Could you make them invisble after placement and not while?

6 years ago

It is very hard to see if you next pole power is out of range or not during placement. I like the aesthetic of not showing them after placement but the mod as it stands IMO makes it not usable because of this issue.

6 years ago
(updated 6 years ago)

First, don't think I'm being pushy here, I'm just tossing out ideas for you. I know enough of what I'm doing I can just change it however I want, but not all users know how to do that. When I used to write mods for other games, some users would get pushy and behave as if I somehow owed them something. I've been in your chair and I know those users can turn the experience sour really fast.

With that disclaimer out of the way:
Here's an idea for you. You could toss in a settings.lua file, put in four boolean options (or however many you want to do) and say the boolean options are 80%, 60%, 40%, 20%. The user picks the one they want and then you just add a quick bit of logic to the lua to change which graphic images it points to. Then you just create a different image for each one with the opacity settings that match the option. You get the idea. Just a thought. You may want to give an option to disable the shadow.

PS: Make sure you put the setting to the write type, because if you use the startup type it can only be changed at the start of a new game, and that'll be annoying. https://wiki.factorio.com/Tutorial:Mod_settings

psuedo code:
if settings.runtime-global["eighty"].value == true then
data:extend(
{
<...all the various settings...>
filename = "AlmostInvisibleElectricWires/graphics/hr-copper-wire-80.png"
}

if settings.runtime-global["sixty"].value == true
<various settings>
filename = "AlmostInvisibleElectricWires/graphics/hr-copper-wire-60.png"
}

6 years ago

I do not know if we could show only "while" putting the pole .... Actually I'm really noob at mods, I've never done these settings before, I think it's going to be cool try to do it! Thanks for the tutorial link, i will learn to do it! XD

New response