Electric Grid

by 0n0w1c

An overhaul of the electric network, engineer an Electric Grid! The overhaul is optional.

Overhaul
2 days ago
2.0
539
Power

i Make edits.

14 days ago
(updated 14 days ago)

Hi!
Thanks for the mod! :)

I would like to suggest making edits that I make every time you update this mod :))))

--- For some reason the translation into another language is not loading, I haven't figured it out yet. Maybe you can fix it.

--- You can add a startup setting to select the power supply area for the medium pole, I set it like this:
"medium_pole.supply_area_distance = 4.5"

--- You can add a startup setting to select the connection length for the large pole, min and max, I set it like this:
"big_pole.maximum_wire_distance = 32"

--- Make changes so that the large pole visually displays a blue backlight under itself when you place it somewhere:
"big_pole.supply_area_distance = 1"

--- Make changes so that the huge pole visually displays a blue backlight under itself when you place it somewhere:
"eg_huge_electric_pole.supply_area_distance = 1"

and add the visualisation itself:

eg_huge_electric_pole.radius_visualisation_picture =
{
filename = "base/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png",
width = 12,
height = 12,
priority = "extra-high-no-scale"
}

--- I overwrite the connection points in the huge pole, because I use another picture, with slightly better graphics.

Code:

eg_huge_electric_pole.pictures =
{
filename = constants.EG_GRAPHICS .. "/entities/huge-electric-pole.png",
priority = "extra-high",
width = 336,
height = 330,
direction_count = 4,
shift = util.by_pixel(51, -58),
scale = 0.5,
}
eg_huge_electric_pole.connection_points =
{
{
shadow =
{
copper = {2.78, -0.5},
green = {1.875, -0.5},
red = {3.69, -0.5}
},
wire =
{
copper = {0, -4.05},
green = {-0.59375, -4.05},
red = {0.625, -4.05}
}
},
{
shadow =
{
copper = {3.1, -0.648},
green = {2.3, -1.144},
red = {3.8, -0.136}
},
wire =
{
copper = {-0.0525, -3.906},
green = {-0.48, -4.179},
red = {0.36375, -3.601}
}
},
{
shadow =
{
copper = {2.9, -0.564},
green = {3.0, -1.316},
red = {3.0, 0.152}
},
wire =
{
copper = {-0.09375, -3.901},
green = {-0.09375, -4.331},
red = {-0.09375, -3.420}
}
},
{
shadow =
{
copper = {3.3, -0.542},
green = {3.1, -1.058},
red = {2.35, -0.035}
},
wire =
{
copper = {-0.0625, -3.980},
green = {0.375, -4.273},
red = {-0.46875, -3.656}
}
}
}

eg_huge_electric_pole.water_reflection =
{
pictures =
{
filename = constants.EG_GRAPHICS .. "/entities/huge-electric-pole_water_reflection.png",
priority = "extra-high",
width = 34,
height = 33,
shift = util.by_pixel(0, 58),
variation_count = 1,
scale = 5
},
rotate = false,
orientation_to_variation = false
}

--- Well, here's a new picture, if possible, it would be good to change them too :)
Just need to correct the icon size in eg_huge_pole.lua:
huge_pole_item.icon_size = 64

https://drive.google.com/file/d/1nQBtsZm28AcRkwYBGLrNrHo2UIzhrWqA/view?usp=sharing

14 days ago
(updated 14 days ago)

Thank you very much for the suggestions!
Would you tell me why you make these changes? I am thinking about how the current poles do not provide the desired/required abilities? Specifically, why add supply areas? Are the transmissions only poles problematic or deficient for your needs?

For the translation issue, that is due to this mod not yet using the localized strings properly in a locale file while being developed, I will fix this.

As for the huge pole graphic, unfortunately I am unable to include it. The images are part of the LGPL 3 licensed Cargo Ships Graphics, and that license is not compatible with the MIT license of this mod. Functionally, anyone with the Cargo Ships mod loaded would have two poles with the same image. What I should probably do is include support for it.

14 days ago

I'll try to describe my logic, I hope it will work :)

  1. I don't use a small pole on principle, it looks scary, so I only use medium-sized poles, and since there were changes in the mod, I kind of adjusted them to the logic, that is, the area is slightly larger than that of a small pole.

  2. A large pole - since the length of the connection of a huge pole is 64 cells, it is logical to make a large pole 32, since 16 cells are very few, and the difference is very big. In order not to roll this logic into concrete, it is better to let the user make a choice the way he needs, and he can play with his settings.

  3. Backlighting the poles in blue - it just looks more familiar and beautiful visually, all buildings have it.

  4. As for changing the connection points, they were adjusted only because of the new graphics of the pole.

A good choice would be to give the user the ability to make settings for their needs, in this case the user appreciates the product more.

I didn't know from the picture that you need to take the license into account :(

13 days ago

I have coded the startup settings to include such adjustments for poles and even released a version or two before deciding against it, and reverting the code. The lone exception being the huge pole maximum wire distance. I will think about this more, others probably have similar thoughts.

As a note, if you have Quality active, higher than normal quality transmission poles have a small supply area.

13 days ago

Why did you decide not to do it? What puts you off from it?

13 days ago

People do not understand the implications of making such changes. This mod "rages against the machine", and making such changes disrupts and can break the mod. A broken mod is not a good mod. :)

13 days ago

After further consideration, I decided the best option was to add a startup setting to disable the electric network overhaul.
This will effectively reduce the mod to supplying the transformator only.

11 days ago

Version 1.2.3 has been uploaded, it contains en/locale.cfg

8 days ago

Version 1.2.3 has been uploaded, it contains en/locale.cfg

Boss! Please add settings items to the menu in the localization. The main words seem to be there, but the menu is not translated.

8 days ago

Thank you for reporting the issue. Version 1.3.1 has been uploaded.

New response