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

b [Hopefully Fixed] Unrecoverable error after 1.1.93 update

1 year, 2 months ago

On game load this mod triggered an unrecoverable error. The message said to contact mod author. I have a screenshot of the error if there is somewhere I can submit that.

1 year, 2 months ago

Hi,

I don't get an error when I load just this mod with default mod settings in Factorio 1.1.93 into a new game or load a new game save.

Regarding the error you can either copy it from the Factorio log file, or upload a screenshot to a free and open image hosting site and post a link.

I will need a full mod list and mod settings list (both mine and other mods' settings).

1 year, 18 days ago

I think I might have run into this issue. The error message is:

The mod Inbuilt Lighting (20.1.13) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event inbuilt_lighting::on_configuration_changed
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    [C]: in function '__index'
    __inbuilt_lighting__/scripts/hidden-light.lua:22: in function 'OnEntityBuilt'
    __inbuilt_lighting__/scripts/hidden-light.lua:130: in function 'UpdateHiddenLightsForEntityType'
    __inbuilt_lighting__/scripts/hidden-light.lua:169: in function 'UpdatedElectricPoleSetting'
    __inbuilt_lighting__/control.lua:7: in function 'UpdateSetting'
    __inbuilt_lighting__/control.lua:51: in function <__inbuilt_lighting__/control.lua:48>

The error was happening when I loaded an older save, but has now cleared up and I can load the save without error now. I don't have a list of mods or saves that can re-create this issue, but I hope this error message could be helpful.

1 year, 17 days ago
(updated 1 year, 17 days ago)

That's just weird from looking at the code. Thank you for the full error.

The only thing I can think of is, do you have the lights on turrets mod setting enabled?
Although even then the current code won't cause an error, but maybe if the save was from an old version of this mod that had a bug in it, it could get into an error state. Hard to tell and just a guess.

Another possibility is that this mod is clashing with another mod in some bizarre interaction. But then you would have lost power poles as part of the error.

Added some protection to next version of code to avoid this error if it's turret lighting related (turret and real power pole on same position, with the turret lighting feature enabled).
Note to self: the error looks to indicate then when we remove the old hidden light at the location of the power pole, the power pole is also vanishing when we come back to it to add the new correct hidden light for it.

1 year, 17 days ago

I have enabled the 'Turret Edge Tiles Lighted' setting. I also increased the 'Power Usage' setting. My old save was just a month old or so; it was the same version. :(

Not sure if it helps, but my other mods are:
Krastorio2
Clockwork (always night, and pure darkness settings)
Rampant
Train Trails
Biter Trails
Bullet Trails

Thanks for looking into it. And also thanks for creating this mod. :)