Inbuilt Lighting


Adds free lighting to power poles and optionally turrets as a QOL feature. Intended for map/zoomed out view and streaming/YouTube pre night vision. Blueprint friendly as they are regular power poles.

Tweaks
1 year, 2 months ago
0.16 - 1.1
36.0K

g [Added] Wire Reach Edit Help

1 year, 2 months ago

Hi, thanks for the mod. I was tinkering with the mod files to see if I could get the light radius to be based on wire reach rather than power supply area, for personal use. Unfortunately I haven't been having any luck. I think it is related to maximum_wire_distance being an optional value, but I'm not sure. When I try to reference it I get a crash, and when I try to check for it I end up just not getting any lights at all.

Any ideas on what might be going on or how to get the desired behaviour?

Thanks

1 year, 2 months ago
(updated 1 year, 2 months ago)

While maximum_wire_distance is optional if it wasn't supplied I'd imagine Factorio would give you a power pole that can't connect (or contribute connection distance) to other power poles.
I'd of assumed the property's are interchangeable in the mod tbh.
My only thought is to use the entity debug information thing in-game on the standard/no mod and see the runtime values of the property. Control+Shift+F while cursor on power pole from memory (will be in Factorio control list).

https://lua-api.factorio.com/latest/prototypes/ElectricPolePrototype.html#maximum_wire_distance

1 year, 2 months ago

thats the property I was looking at. I edited your function HiddenLight.UpdatedElectricPoleSetting() in inbuilt_lighting_20.1.12\scripts\hidden-light.lua to use power_pole.maximum_wire_distance instead of power_pole.supply_area_distance and I got crashes that seemed like null pointer exceptions basically. can't remember the exact error message.

I'm using the tool you mentioned and I'm seeing some things that differ from the API documentation, seems like max distance and the draw wires flags are bundled into a WireConnectionDistance struct,

anyway, not sure. maybe I'll give it another go later.

Thanks for the reply, please let me know if you have more thoughts.