Enemy Race Manager

by heyqule

Add support to have multiple races of enemies and add various enhancements to enemy races. E.g Enemy becomes tougher as they level based on your pollution and killing factors. Please visit the mod page or search "ERM -" mods to download the new demo races. This mod only enhance vanilla biters. Vanilla biters do not fully support all features in this mod.

2 days ago


Version: 1.7.3
Date: 2021-09-14

    - Fix an incorrect assignment of a cache value
Version: 1.7.2
Date: 2021-09-14

    - Fix a game start up crash when Bio Industry enables.
Version: 1.7.1
Date: 2021-09-03

    - Turn off debug mode.
Version: 1.7.0
Date: 2021-09-03

    - ---- Dropship Squad ----
    - Can be enable in setting and set its chance to spawn. Default to ON.
    - Flying units squad must be enabled as prerequisite.
    - Each unit cost 150 attack meter points.  Default 3000 points spawns 20 units.
    - ---- END Dropship Squad ----
    - ---- Squad Subtype: Precision Strike ----
    - The squads with this subtype go straight to inner base targets, bypass your defense.
    - Targets the area within 32 radius of any rocket-silo, artillery or mining-drill.
    - Dropship squad is always a precision strike squad.
    - Flying units squad can be configure to have this feature.  Default to OFF.
    - Strike location will be warn on the map. This option can be turn off.  Default to ON.
    - ---- END Squad Subtype: Precision Strike Squad ----
    - ---- FREE FOR ALL MODE [Experimental feature] ----
    - /ERM_FFA command enable Free For All mode.  It can be toggle on and off.  Enemy races will fight each other.
    - This feature may have performance implication.
    - This command limits to max enemy level 5 and 10.
    - High level units are excluded because unit spawns quicker than they die and cause performance issue.
    - Not recommend to use FFA on a death world map. They may never stop fighting and kill your performance.
    - ** Player building health and enemy damage will need to re-balance for this mode in a future release **
    - ---- END FREE FOR ALL MODE ----

    - Special attack group can now configure to spawn at certain interval (1, 2, default 5, 10) minutes.
    - 2 race split: the no man's land gap increase to 4 chunks to cope for free for all mode
    - Disabled health regen for all units. Turrets and spawners are not units and not affected.
    - Add 1.25x to max health for units to balance the health regen when race level > 1.
    - construction & logistic robots immune fire when player defence enhance option is on.
    - change how spawn chance are calculated for flying units squads
    - change attack meter threshold to use a formular based on max group size, instead of fixed value.
    - Special attack group capped at 600 units.

    - Fix incorrect GUI display regards to enemy map setting.
    - Fix "replace enemy" which always replace enemy with biters, introduced by last release.
Version: 1.6.0
Date: 2021-08-12

    - Compatibility for New Game Plus.
    - When the game resets, attack meter also reset.
    - When "reset evolution factor" is checked, level, tier and evolution points are preserved. Evolution factor and attack meter get reset.
    - When "reset research" is checked, everything reset.
    - Add "level up accelerator" option to accelerate level up by killing unit and turrets. It defaults to ON.
    - The point is based on 1% of spawner destroy factor for each killed units and 10% of spawner destroy factor for each killed turrets
    - level 10+ should play with "level up accelerator" enabled.

    - New experience curve for Level 4 - 20.
    - Evolution points: 12, 25, 45, 70, 115, 175, 250, 350, 450, 600, 750, 900, 1200, 1600, 2200, 3000, 4000
    - New XP curve takes less evolution points to reach level 10 and takes more evolution points to reach higher levels.
    - Added level 15 to max level option.
    - Level up checks once every hour instead of every 30mins.
Version: 1.5.6
Date: 2021-08-05

    - Added new color to unit_tint for terran unit coloring in map mode.
    - Changed max value for max autonomous group from 50 to 60
    - Changed max value for max group size from 250 to 600
    - Changed max value for attach group threshold from 6000 to 30000

    - Fixed a crash when replacing enemy biters which are belong to other force that is not named "enemy".  Those units now replace with "enemy" force.
Version: 1.5.5
Date: 2021-08-03

    - Re-added onUnitFinishGathering event.  Some build groups used max group size, instead of max build group size
    - Optimize custom attack helper

    - Fix an issue which "Full Expansion" does not work under new cron.
Version: 1.5.4
Date: 2021-08-02

    - Fix a crash when restoring Queues during on_load event
Version: 1.5.3
Date: 2021-08-02

    - Surface processor now based on surface name, instead of index.
    - Removed onUnitFinishGathering event. It may not needed.

    - Attempt to fix Multiplayer Desync by converting local variable to global
Version: 1.5.2
Date: 2021-07-30

    - Fix a crash on custom attack group spawn when command center does not exists. It now picks other unit spawners if that's the case.
Version: 1.5.1
Date: 2021-07-29

    - Added remote.call('enemy_race_manager', 'generate_attack_group', RACE_NAME, number_of_units)
    - e.g remote.call('enemy_race_manager', 'generate_attack_group', 'erm_zerg', 100)
    - Added remote.call('enemy_race_manager', 'generate_flying_group', RACE_NAME, number_of_units)
    - e.g remote.call('enemy_race_manager', 'generate_flying_group', 'erm_zerg', 50)

    - Fix Space exploration crash when creating a new map
Version: 1.5.0
Date: 2021-07-28

  Major Features:
    - Beta Features: Attack Meters, default ON
    - Beta Features: Flying Squads, default OFF.  It will be ON by default once attack meter is out of beta.
    - [Attack Meters] Enemy will send out an army to attack when a killed threshold is reached.  The check happens every 5mins
    - [Attack Meters] tallies kill points every minutes. 1 point for unit, 10 points for turret, 50 points for spawners.
    - [Attack Meters] The default threshold is around 3000 points(~150 units) per attack group. The threshold is configurable.
    - [Attack Meters] Each unit in attack group consumes 20 points.
    - [Flying Squads] enemy may send out dedicate flying attackers to your base.
    - [Flying Squads] Each unit in flying attack group consumes 75 points. Team size is around 40 units in default threshold.
    - This only supports planet nauvis at the moment.  Not yet compatible in other planet for SE.

    - Cron Processor, to divide large tasks into smaller tasks. e.g custom base builder and custom attack group builder

    - Change weapon rig bullet and shotgun-shell function to accept custom ammo-category
    - Double unit group gathering time.
    - Refactor custom attack handling.
    - Removed "sync with enemy" button from GUI.  Use /ERM_levelup command to change level instead.

    - Fixed race tier was not changed when using level up by command.
    - Fixed a crash caused by forces cache.
    - Fixed a crash by marking 'bobenemies' to be incompatible.
Version: 1.4.2
Date: 2021-07-16

    - Destroy all units which are not in unit_group. This should preserve building groups.
Version: 1.4.1
Date: 2021-07-16

    - Re-add the process of destroying units. It will only destroy unit when unit level is higher than race's level.
Version: 1.4.0
Date: 2021-07-16

    - Removed the process of destroying units when a race level up. It was unnecessary clean to them up.
    - Wall immune poison and fire, 66% resistance to others
Version: 1.3.1
Date: 2021-07-11

    - Fix a crash when unit_group was not found during the execution of build style: Command Center Expansion.
Version: 1.3.0
Date: 2021-07-10

  Major Features:
    - Added support functions for ERM_RedArmy 0.1.0 beta release.

    - You can adjust the split position for 2 way split. e.g you can adjust the split at -10000 on the y-axis.
    - Add a button to kill all enemy units with 32 radius to kill immortal units

    - Added 64 tiles no one's land for 2 way split. This will only apply to newly generated chunk or new map
    - All GUI buttons required admin role.
    - Various code optimizations

    - Attempt to fix run away high level units during the map processing. Some players are seeing immortal (high level) units.
    - Fix a compatibility crash with combat-mechanics-overhaul
    - Fix an issue which surface processor use random race when using replace race button.

    - Added animation rig to change animation prototypes.
    - Added weapon rig to change weapon / ammo prototypes.
Version: 1.2.0
Date: 07. 03. 2021

    - Air unit now use "flying-layer", instead of hardcoded layer-33.  This enhance collision layer compatibility with Space Exploration
    - ** ERM Race mods also need to update

    - Fix projectile collision issue for air units with Industrial Revolution 2 mod
Version: 1.1.0
Date: 07. 01. 2021

    - Explosion from explosive projectiles can now hit air by default.  This includes explosive cannon shells and artillery shells.
    - Air units use "layer-33" as air-unit collision layer.  This requires race mod updates.
    - Add an option to toggle whether ground weapon can hit air units. This includes shotgun pellets, tank-shells, grenades, poison capsule and slowdown capsule. Disable by default.
Version: 1.0.0
Date: 06. 27. 2021

    - --- Added a command to override race level ---
    - Usage: /ERM_levelup erm_vanilla,5
    - Overriding level must be equal or higher than the level calculated by evolution points.

    - Removed level up by tech command
    - Code Refactor.
Version: 0.7.0
Date: 04. 02. 2021

  Major Features:
    - ----- Support one force per surface/planet. -----
    - ######## How this works:
    - 1) When a new surface is discovered, a race is assigned to the surface randomly
    - 2) Spawners or worms are generated when new chunk is mapped. The mod checks their force.
    - 3) If it's not same as the assigned force, the mod replace the entity with random spawner/worm from assigned race.
    - ########
    - UI shows the surface you are on and which race(s) are on that surface.
    - When you are using "one force per surface", replacing a race changes the race of the surface you are on.
    - ------ Expansion Build Style ----
    - The enemy builds one building each time in base game. Enemy base expansion is a very slow process.  This feature changes that.
    - There are 4 build styles.
    - 1. "Default", The enemy builds one building each time a build request triggers using base game logic. It's very slow expansion.
    - 2. "Command Center Expand", If the enemy build group builds a command center, it expands  build formation setting. Otherwise, it builds single building. This occasionally expand 7 extra builds.
    - 3. "Build A Town", The enemy build group builds based on the formation setting
    - 4. "Fully Expand", When the group builds, all units in the group builds using build formation setting. This always expands based on the size of the build group. The default map setting is 20.
    - When the unit group doesn't have enough units to build a full formation, command center always builds first, next is support building and then turrets.
    - Build style and build formation options can be change during runtime.

    - --- Major Performance Improvement ---
    - Large base builder group will have 75% chance to break down to a smaller settle size group. Large base builder groups seems have significantly performance penalty.
    - The extra units become attack group.  If it did not break down, the large base builder group would also become attack group

    - Corpse stay 15 minutes by default, instead of 5 minutes. Its setting range is now 1 - 60.
    - Add info icon to settings and setting description update
    - 2 races split is now an option in "Enemy Mapping Method", instead of checkbox.  Please select "2 races split" before continue your save.
    - Buffed base game rails resistance.
    - Remove Rampant from dependency blocker.  It seems work with default settings.  However, its changes only apply to "enemy" force. I did not test with its new biters. Enabling them may have unexpected results.
    - A lot of changes and performance tweaks made for terrain (1.1.0),protoss (1.4.0) and zerg (1.4.0) race mod. Please update those too!

    - Fix a crash by removing force and race_settings when an ERM race mod has disabled.
Version: 0.6.1
Date: 03. 27. 2021

    - Fixed a crash when Krastorio2 loads before this mod.  Improved it with ignore_collision_for_area_damage in data-updates.lua
    - Fixed a crash in command ERM_LevelUpWithTech.  Marked as deprecated for next release.
Version: 0.6.0
Date: 03. 26. 2021

    - Add support for Cold Biter and Explosive Biter
    - All biters support leveling.
    - Override their resistances
    - They don't regenerate health to balance their overpower attacks
    - [Cold Biter]
    - Cold always 95, physical 75, fire/explosion -100 - -50, laser/acid -50 - 50
    - [Explosive Biter]
    - Fire/explosion always 95, physical 75, cold -100 - -50, laser/acid -50 - 50

    - Fix a crash when visit other planet / surfaces in Space Exploration
Version: 0.5.0
Date: 03. 20. 2021

    - Compatible with Armoured Biters mod
    - All armoured snappers and snapper spawner supports leveling.
    - Max health stacks with Armoured Biter settings. Health @ Level 10 is very close to original health.
    - Override Armoured Biters settings to align with this mod's resistances and health regen standard.
    - Most snappers have 80 elemental and 90 physical resistance.
    - Leviathan snappers have 80 elemental and 95 physical resistance.

    - Buffed vanilla worm and health
    - Buffed vanilla biter physical resistance
    - Tweaked resistance function. Max resistance @ level 12, instead of level 10.

    - Fix vanilla biters not showing up when using "2 Ways Race Placement"
    - Fix enemy only show in positive axis when using same race for both positive and negative axis with "2 Ways Race Placement"
Version: 0.4.0
Date: 02. 14. 2021

    - Added new mod setting to toggle enhanced vanilla defenses, enabled by default
    - Buff car health (750), resistance and damage (1.5x).
    - Buff tank resistances and damage (2x).
    - Buff stone wall health (500) and resistances.
    - Buff spidertron resistance.
    - Buff impact resistance for all vehicles to 90/50.
    - Buff bot health from 100 to 200, resistances to 75%

    - Gun turret HP buff now controls with enhance vanilla defenses setting.
    - Armors resistances buff now controls with enhance vanilla defenses setting.
    - Explosive rockets AOE can now hit air
    - Units are fully heal in 2 minutes.
    - Buildings are fully heal in 5 minutes.

    - Fix existing enemies are wiped when the level difficulty setting changed from higher to lower for an existing save.
    - Fix a crash after disable vanilla biter and they level up on existing map.
    - Z and P are required to update 1.3.0 for above bugfix to work.
Version: 0.3.3
Date: 02. 02. 2021

    - Change max unit attack range for default to 14.  So that gun turrets can hit them with 2 layers of walls.
Version: 0.3.2
Date: 31. 01. 2021

    - Add an option to select max unit attack range for units that uses maximum range. Default is 16. Advanced is 20.

    - Early game leveling should be a lot slower now.
    - Change level 2 and 3's evolution factor value. {0.4, 0.8}
    - Change level 4 and 5 base on hidden evolution value.
    - New hidden evolution level values are {40, 80, 120, 160, 200, 250, 300, 350, 400, 500, 600, 700, 900, 1100, 1350, 1750, 2500}
    - Change Armor resistances to resists all damage types.
    - Buff gun turret HP from 400 to 800.
Version: 0.3.1
Date: 30. 01. 2021

    - Fix "Enable 2 Ways Race Placement" trigger.
Version: 0.3
Date: 29. 01. 2021

    - Added support to change max groups and max group size for map settings.
    - Added race placement grouping, supports 2 races on nauvis

    - Improves entity placement in map_processor and replacement_processor
    - Force set friend handles in force helper.
    - Default max group changed from 30 to 15. (performance improvement)
    - Default max group size changed from 200 to 100. (performance improvement)
    - Building on_biter_base_built event should now match race level.
    - Improve translations

    - Replace with buildings from correct race when the enemy base expands.  Autoplace spawned building from other races.
    - Fix remote call fetching incorrect unit tier / level
    - Fix evolution point calculation for gui
Version: 0.2.1
Date: 03. 01. 2021

    - Enable vanilla biter by default
    - Change description in info.json
Version: 0.2.0
Date: 03. 01. 2021

    - Add GUI to view evolution points, sync evolution point or replace enemy
    - Add level support for vanilla biters

    - Changed unit naming convention from '-' to '/'.
    - Tuned Evolution level.
Version: 0.1.0
Date: 26. 12. 2020

    - 2 difficulty levels (normal: 10, advanced: 20)
    - First 5 level is tied to force's evolution factor
    - The next 15 level is tied to force's hidden evolution factors (time, pollution and kill spawner)
    - Manage new race as new enemy force. Each race has its own force statistics
    - New races may have up to 3 tiers of unit-spawners and turrets
    - Artillery-Shell damage bonus now is part of infinite stronger-explosive upgrade.
    - Enemy level processor, handles leveling up enemy
    - Enemy map processor, handles replacing enemy entity with new level
    - Enemy replacement processor, handles replacing existing enemy entity with new race