Modular Beacon Power


Beacons are affected by their own modules. Fully configurable settings.

Tweaks
a month ago
1.1 - 2.0
589
Manufacturing Power

b [addressed] Non-recoverable error

a month ago

Got an error while trying to load a saved game

"The mod Modular Beacon Power (1.0.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event modular-beacon-power::on_init()
modular-beacon-power/control.lua:202: attempt to perform arithmetic on global 'quality_mult' (a nil value)
stack traceback:
modular-beacon-power/control.lua:202: in function 'check_beacon'
modular-beacon-power/control.lua:182: in function 'check_all_beacons'
modular-beacon-power/control.lua:20: in function <modular-beacon-power/control.lua:16>"

Not sure if it's cross-mod interaction that gives me this error, since the only other beacon related mod I have is the one that I made to enable inserting productivity modules and quality modules into beacons.

a month ago

I'm having trouble replicating this. Were you using other mods which change the effects of qualities or add new qualities? I've come up with some code to better accommodate custom qualities but want to be sure it addresses the problem before publishing a new version.

This may be unrelated, but I'm also noticing that when these two mods are used together, the allowed_effects for beacons doesn't include "productivity" by the time my mod starts evaluating which values are possible in data-final-fixes.lua. So some power consumption values that are only possible with prod modules (e.g. +80% or +160% in vanilla) don't end up working correctly. You could update the allowed_effects for beacons in data-updates.lua (in addition to data-final-fixes.lua) to fix that. Alternatively, I could add your mod as a dependency so that it loads first.

a month ago
(updated a month ago)

I'm having trouble replicating this. Were you using other mods which change the effects of qualities or add new qualities? I've come up with some code to better accommodate custom qualities but want to be sure it addresses the problem before publishing a new version.

This may be unrelated, but I'm also noticing that when these two mods are used together, the allowed_effects for beacons doesn't include "productivity" by the time my mod starts evaluating which values are possible in data-final-fixes.lua. So some power consumption values that are only possible with prod modules (e.g. +80% or +160% in vanilla) don't end up working correctly. You could update the allowed_effects for beacons in data-updates.lua (in addition to data-final-fixes.lua) to fix that. Alternatively, I could add your mod as a dependency so that it loads first.

Actually, I do have a mod that adds new qualities.
And I've confirmed the mod works properly and I am able to load a save when this https://mods.factorio.com/mod/Additional-Qualities mod is disabled.

As for that latter part, I'll do something on my side when I can but if you're going to do that alternative part, I think you should also include the other mods that enable putting in prod and qual modules into beacons. Since mine only does that one specific thing but the others also do the same thing and more, to prevent confusion. Just my thoughts.

New response