Shield Generators


Adds turret shields and shield generators for civil structures.

Content
20 hours ago
1.1 - 2.0
31.7K
Combat

Changelog

Version: 0.5.8
Date: 2025-05-12
  Fixes:
   - Also make mod recognize new building prototypes added by Space Age
Version: 0.5.7
Date: 2025-05-12
  Fixes:
   - Mod now listens for on_space_platform_built_entity, hence shield generators now work on space platforms
Version: 0.5.6
Date: 2025-05-11
  Changes:
   - entity -> shield provider table no longer saved into savefile, but instead rebuilt every time savefile is loaded, reducing saves bloat
  Fixes:
   - Fixed another migration blopper from 0.5.3
Version: 0.5.5
Date: 2025-05-11
  Fixes:
   - Fixed migration crash introduced in 0.5.3
Version: 0.5.4
Date: 2025-05-11
  Changes:
   - Mod data structure migration was switched to separate library, Migratus Orchestrus
Version: 0.5.3
Date: 2025-05-09
  Features:
   - Shield health multiplier is now configurable
  Changes:
   - Mod data structure migration was greatly improved
   - Concentrated Solar reflectors are now blacklisted from having self shield (previously they had shield because they use turret base)
   - Shield provider internal data structure was simplified and should generally tick faster
  Fixes:
   - Fixed re-connected to power grid turrets taking way longer than expected to be "discovered" by script as active
   - Saves created in Factorio 1.1 are now properly migrated from
   - Disabling shield generator no longer crashes the game
   - Cloning shield generators have been slightly improved, it now properly copies its own shield upon clone
   - Reversing (unresearching through editor) "turret shield generators" research no longer robs them off provider shields if they have one
   - Visuals of shield generators no longer stop updating when shield generator energy drops to zero
Version: 0.4.2
Date: 2024-12-12
  Changes:
    - Bring back extra "valid" guard on shield bars, this should fix spontaneous crashes
Version: 0.4.1
Date: 2024-10-22
  Fixes:
    - Added back processing unit tech requirement to shield generators buildings tech
Version: 0.4.0
Date: 2024-10-21
  Features:
    - Factorio 2.0 support
Version: 0.3.6
Date: 2023-10-09
  Changes:
    - More assertions for fail-fast behavior of code
  Fixes:
    - Fixed rendering crash related to turret shields having exactly 0 energy stored while also having fully charged shield (issue first appeared in 0.1.4)
Version: 0.3.5
Date: 2022-07-23
  Fixes:
    - Add missing event filters for shield providers themselves
Version: 0.3.4
Date: 2022-06-06
  Changes:
    - Use event filters
Version: 0.3.3
Date: 2022-05-29
  Fixes:
    - Fix disabling shield had one piece of code thinking it is not connected to any power network (which is incorrect); This fixes crash where you disable and enable shield with no power in it's buffer
Version: 0.3.2
Date: 2021-12-20
  Changes:
    - same as 0.3.1 but for shield providers
Version: 0.3.1
Date: 2021-12-20
  Changes:
    - assert() tick argument passed to some functions
    - More soft last_damage_bar and last_damage check for validity with this version migration
Version: 0.3.0
Date: 2021-12-17
  Features:
    - Shield battery recharge control shortcut
Version: 0.2.4
Date: 27. 11. 2021
  Additions:
    - Added exeperimental per-world option to remove turret shield interfaces when they are idling (for worlds with insane (>>>30k) amount of turrets)
Version: 0.2.3
Date: 27. 11. 2021
  Fixes:
    - Building new entities inside existing shield provider no longer do hard validation (improved UPS)
    - Damaging entities under protection of shield provider no longer do hard validation (improved UPS)
Version: 0.2.2
Date: 24. 11. 2021
  Fixes:
    - Fix provider using wrong even distribution formula
Version: 0.2.1
Date: 24. 11. 2021
  Fixes:
    - Fix provider and self shields being stacked wrong, resulting in self shield not properly absorbing damage
Version: 0.2.0
Date: 21. 11. 2021
  Balancing:
    - Massively buffed shield generators power input
    - Buffed shield generators power capacity
    - Receiving damage on shielded entity now cripple shield build speed of entire provider
Version: 0.1.13
Date: 18. 11. 2021
  Fixes:
    - When applying migrations for 0.1.11 and 0.1.12, check data integrity
Version: 0.1.12
Date: 06. 11. 2021
  Fixes:
    - Fix last_damage tick not being set under certain conditions
Version: 0.1.11
Date: 02. 11. 2021
  Fixes:
    - Cloning cause a fatal error
  Changes:
    - Better shield bar damage receive visuals
Version: 0.1.10
Date: 02. 11. 2021
  Additions:
    - Visual effect on shield bar upon taking damage
  Balancing:
    - Damage must be at least 1 hitpoint for it to reset shield build speed
Version: 0.1.8
Date: 05. 09. 2021
  Fixes:
    - Fix crash when getting self shields after getting provider shield (bug appeared in 0.1.4)
Version: 0.1.7
Date: 18. 08. 2021
  Fixes:
    - Support on_entity_cloned event (fully: turret shields, minimal: shield providers)
    - Support above fixes issues with mods such as Space Exploration
Version: 0.1.6
Date: 29. 07. 2021
  Fixes:
    - Fix crash if shield is removed earlier than on_remove is fired and something else is also removed
Version: 0.1.5
Date: 11. 05. 2021
  Fixes:
    - Fix crash related to shielded entity destroying
Version: 0.1.4
Date: 11. 05. 2021
  Optimisations:
    - Destroy shield bar rendering objects when not visible instead of hiding them. https://forums.factorio.com/viewtopic.php?t=98277
Version: 0.1.3
Date: 11. 05. 2021
  Fixes:
    - Lazy iterated table is now save-aware, bloating save file but fixing multiplayer desync issues
Version: 0.1.2
Date: 05. 05. 2021
  Changes:
    - Fix recharge speed increase (from 1.5s delay + 6s increase to 1.5s delay + 3s increase)
    - Make recharge speed configurable
    - Change default recharge speed values
Version: 0.1.1
Date: 04. 05. 2021
  Changes:
    - Fixed "invalid key to next()"
Version: 0.1.0
Date: 04. 05. 2021
  Changes:
    - Mark self shields as placeable-off-grid. This might break existing blueprints, so it is marked as 0.1.0
Version: 0.0.15
Date: 04. 05. 2021
  Changes:
    - Power unconnected self-shields (turrets) are now performance free. Side effect: It might take a while when connecting them to power network