Allow LightningAttractorPrototype to support negative efficiency
Allow LightningAttractorPrototype to support negative efficiency
Would it be possible to add support for negative values to the efficiency of lightning rods? The idea is to allow you to have lightning strikes that require excess power to protect against instead of generating power, as a modded environmental hazard.
- MrSmoothieHuman
- Fast Inserter
- Posts: 152
- Joined: Sat Aug 05, 2023 1:20 am
- Contact:
Re: Allow LightningAttractorPrototype to support negative efficiency
+1, seems like a cool idea - even if it was a separate parameter and not directly “negative efficiency”
coder? i hardly know her!
-
- Filter Inserter
- Posts: 321
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Allow LightningAttractorPrototype to support negative efficiency
+1
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Re: Allow LightningAttractorPrototype to support negative efficiency
What happens if there is no more energy left in the energy source?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- MrSmoothieHuman
- Fast Inserter
- Posts: 152
- Joined: Sat Aug 05, 2023 1:20 am
- Contact:
Re: Allow LightningAttractorPrototype to support negative efficiency
Presumably it'd just stop working? thats the only way I can see it working personally (presuming you mean "the electric network" in this contextBilka wrote: Thu Sep 04, 2025 3:00 pm What happens if there is no more energy left in the energy source?

coder? i hardly know her!
Re: Allow LightningAttractorPrototype to support negative efficiency
no, I mean when lightning strikes an empty collector. should it damage the collector or do nothing? should the collector stop protecting the area?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Allow LightningAttractorPrototype to support negative efficiency
+1
Damaging/destroying the collector seems reasonable - if the collector is destroyed, it would then stop protecting the area it's supposed, as a natural consequence. So protecting the area would consume energy, or entity health if there is no energy.
Damage could just be whatever the lightning would normally do to an entity.
To protect against people spamming unpowered collectors (if this is a problem), modders could use a dying_trigger_effect to zap nearby collectors, or a (damaging) explosion upon destruction.
Damaging/destroying the collector seems reasonable - if the collector is destroyed, it would then stop protecting the area it's supposed, as a natural consequence. So protecting the area would consume energy, or entity health if there is no energy.
Damage could just be whatever the lightning would normally do to an entity.
To protect against people spamming unpowered collectors (if this is a problem), modders could use a dying_trigger_effect to zap nearby collectors, or a (damaging) explosion upon destruction.
Re: Allow LightningAttractorPrototype to support negative efficiency
To make sure my reply doesn't give a wrong impression: I am not working on this currently, it seems like too risky of a change with not clearly specified behaviour.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
-
- Burner Inserter
- Posts: 9
- Joined: Tue Feb 04, 2025 7:34 pm
- Contact:
Re: Allow LightningAttractorPrototype to support negative efficiency
Throwing my two cents in for a more concrete implementation idea:
If efficiency is negative, strikes will drain from the buffer instead of filling it.
A new field, minimum_buffer_content (value: float), is mandatory if efficiency is < 0. At runtime, if the current buffer energy is below this percentage, the attractor does not function. Value must be > 0 (a value of zero would act the same as efficiency == 0) and <= 1.
energy_source is now mandatory if efficiency ~= 0.
If efficiency is negative, strikes will drain from the buffer instead of filling it.
A new field, minimum_buffer_content (value: float), is mandatory if efficiency is < 0. At runtime, if the current buffer energy is below this percentage, the attractor does not function. Value must be > 0 (a value of zero would act the same as efficiency == 0) and <= 1.
energy_source is now mandatory if efficiency ~= 0.
-
- Filter Inserter
- Posts: 321
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Allow LightningAttractorPrototype to support negative efficiency
I'd say if it doesn't have enough energy available in the buffer, then the entity should explode. That, or some trigger event should be triggered, so that any number of effects can be defined (like how nuclear reactors explode, but burners dont).
If you need to reach me, message me on discord.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.