Combat Robots Overhaul

by Wannie

Overhaul of Factorio's Combat Robots to make them more useful.

Tweaks
1 year, 3 months ago
1.1
6.75K

Changelog

Version: 2.1.9
Date: 02.01.2023
  Compatibility:
    - Fixed an issue with space exploration which caused the game to crash when landing a spaceship. Unfortunatly, due to the workings of space exploration, all combat robots will be removed upon landing. 

  Interfaces:
    - Added a interface which returns the targetList. To get the list, use e.g. remote.call("combat-robot-overhaul", "get_targetList", surface_index = 1). Surface_index can be omitted to get hte list for all surfaces.
Version: 2.1.8
Date: 29.11.2022
  Bugfixes:
    - Fixed an issue which caused the key-shortcut to not work
  Changes:
    - Defender Units now incorporate social distance from the players again
    - Default social distance is now set to 0 (so the player is in the middle)
Version: 2.1.7
Date: 19.11.2022
  Changes:
    - Removed some non-essential code
Version: 2.1.6
Date: 17.11.2022
  Changes:
    - Fixed a bug which caused the game to crash when the player died right before the combat robot could spawn
Version: 2.1.5
Date: 16.11.2022
  Changes:
    - Undid a change which caused the game to crash when the defender units attempted to defend something
Version: 2.1.4
Date: 12.11.2022
  Changes:
    - Fixed Bug which caused projectiles to vanish when spawning capsules in short order
    - Combat Robots will now spawn directly when flying with a jeptack. This is done to prevent a crash which happens when the player is damaged right after he has thrown a capsule but the entity hasn't spawned yet.
Version: 2.1.3
Date: 25.10.2022
  Changes:
    - Hopefully decreased the load time when deleting a lot of chunks
Version: 2.1.2
Date: 30.08.2022
  Changes:
    - Fixed an issue which caused units to not target nearest enemies while traveling
    - Changed the name of walls in exclude settings to stone-walls so defender-units don't defend them
Version: 2.1.1
Date: 10.08.2022
  Changes:
    - Fixed a bug which caused defender units to not defend the base
Version: 2.1.0
Date: 03.08.2022
  Changes:
    - Balanced the speed of defender units when attacking so they don't overshoot their target all the time
    - Hopefully fixed a bug where destoryer units got stuck for a long time and were destroyed one by one
    - Adjusted the destroyer units behaviour so they spread out more and don't clump together
    - Fixed bug where thrown capsules weren't counted towards the overall combatrobot follower count, thus allowing to have more bots than the limit
    - Increased performance when scanning area with lots of biter nests
Version: 2.0.10
Date: 26.07.2022
  Changes:
    - Registered worms and nests via game script so they are removed from the target list if another mods replaces or destroys them
Version: 2.0.9
Date: 05.12.2021
  Changes:
    - Disabled the corpse parameter on destroyer and defender units which led to the creation of two corpses for one unit
    - Thanks to Gelion17 the mod now has russian localization.
Version: 2.0.8
Date: 24.11.2021
  Changes:
    - Fixed a bug which occured when the base was attacked by invalid entities
Version: 2.0.7
Date: 17.11.2021
  Changes:
    - Fixed a Bug which caused the game to crash when all destroyer untis were destroyed 
    - Changed the reference for maximum_following_robot_count from the global force to the player force
Version: 2.0.6
Date: 16.11.2021
  Changes:
    - Fixed Bug which caused the game to crash when all defender units were destroyed
Version: 2.0.5
Date: 31.10.2021
  Changes:
    - Fixed Bug where Sentry Units didn't do any on_entity_damaged
    - Changed the base defense code of defender-units to make it more similar to the behavior of destroyer units 
    - Changed the move_to_target offset to a random number between -10 and 10 instead of the distance between group_position and unit
    - Cleaned up Code
Version: 2.0.4
Date: 15.10.2021
  Changes:
    - Replaced the Destroyer Unit prototypes with Spider Vehicle to improve the pathfinding and combat mechanics of the destroyer unit
    - Changed the attack as well as the defeding behaviour of destroyer and defender units
Version: 2.0.3
Date: ????
  Changes:
    - Removed the "destroyer" prerequisite from Follower-Robot-Count-5
Version: 2.0.2
Date: ????
  Changes:
    - Fixed Crash on_entity_damaged
Version: 2.0.1
Date: 07.09.2021
  Changes:
    - Changed Defender Units from Type "Unit" to "Spider Vehicle"
    - Overhauled the entire code base
    - Added Surface filters to targetList as well as Unit Groups (This should make it compatible with mods who change the surface like Space Exploration"
    - Added Compability Patch for "Industrial Revolution 2" and "Un-Minable Bots"
Version: 1.0.9
Date: 30.08.2021
  Changes:
    - Fixed Issue with invalid unitgroup on various occasions
Version: 1.0.8 
Date: 23.06.2021
  Changes:
    - Removed Destroyer Capsule from prequiste for max-follower-update-5  
    - Fixed Crash when moving backwards in crash
    - Fixed Crash when deploying new units when previous group was pdestroyed
Version: 1.0.7 
Date: 29.04.2021
  Changes:
    - Fixed Issue with the defense Exlusion List
Version: 1.0.6
Date: 20.04.2021
  Changes:
    - Fixed Issue when mining defender units
Version: 1.0.5
Date: 20.04.2021
  Changes:
    - Changed the vision distance & attack range of destroyer unit.
Version: 1.0.4
Date: 19.04.2021
  Changes:
    - Fixed crash when mining units.
Version: 1.0.3
Date: 18.04.2021
  Changes:
    - Fixed missing unit sounds.
Version: 1.0.2
Date: 17.04.2021
  Changes:
    - Fixed issue with defender and sentry units not attacking
    - Fixed issue with event filter not working properly
Version: 1.0.1
Date: 16.04.2021
  Changes:
    - Initial Release