More Enemies


Simple idea of just having more enemies, and larger enemy attack groups. Comes with five preset difficulties: Easy(0.1), Vanilla(1), Vanilla+(1.75), Hard(4), and Insanity(11). Each added setting can be configured independently of the selected difficulty to personal taste. Engineer beware - they come for you.

Tweaks
5 days ago
2.0
1.44K
Enemies
Owner:
TheEckelmonster
Source:
https://github.com/pje279/more-enemies
Homepage:
N/A
License:
MIT
Created:
4 months ago
Latest Version:
0.6.1 (5 days ago)
Factorio version:
2.0
Downloaded by:
1.44K users

What does this mod do?

Be warned, this is not a light-weight mod; depending on your settings, expect performance degradation.

Comes with five preset difficulties: Easy(0.1), Vanilla(1), Vanilla+(1.75), Hard(4), and Insanity(11). Each setting can be configured independently of the selected difficulty to personal taste.

Makes no changes by default, i.e. you won't notice any changes unless you explicitly change the settings.

Born out of a desire to have increased difficulty by way of simply increasing the amount of enemies.

Adds several settings for both startup and runtime to configure the amount of enemies up (or down).

Enemy entities (biters, spitters, pentapods) will be cloned based on the selected Difficulty (and other configured settings).

Enemy unit groups (the groups that form and attack from pollution or for retaliation) will be cloned based on the Difficulty setting (and other configured settings).

Have successfully "played" on Insanity with max settings, but is NOT RECOMMENDED; your game will lag, but hey, there will be more enemies.


Future Plans

  • Additional, more granular settings
    • Option for custom, specific difficulty - i.e. setting the difficulty to a specific number other than one of the preset difficulties (0.1, 1, 1.75, 4, & 11)
  • Possibly a configurable cloning cooldown timer for entity and unit group cloning
  • Potentially configurable proactive attack groups
    • Would attack of their own accord, independently of pollution or artillery strikes
  • Potentially configurable proactive expansion groups
    • Would be independent of normal enemy expansion
  • Bug fixes/Compatibility
  • Performance optimization
    • Continue to improve compatibility/performance with B.R.E.A.M.
  • Requests
    • Feel free to ask, and I'll see what I can do

Technical details:

Hooks into,

  • on_entity_spawned
  • on_entity_died
  • on_unit_group_created
  • on_unit_group_finished_gathering
  • script_raised_built

Listens to those events to track the creation and death of enemy entities.

Also hooks into on_tick to control the actual cloning of the enemy entities.

When an enemy entity is created, or a unit group is created, they are each added to a list.

This list is iterated over up to a configurable limit per tick cycle (also configurable). While iterating through this list, if a valid entity is found, it will be cloned N amount of times, where N is an aggregate calculated based on the user settings; the overall Difficulty setting has the largest influence.


Startup settings:

Settings exposed for prototypes: "biter-spawner", "spitter-spawner", "gleba-spawner-small", and "gleba-spawner":

  • max_count_of_owned_units
  • max_count_of_owned_defensive_units
  • max_friends_around_to_spawn
  • max_defensive_friends_around_to_spawn
  • max_spawning_cooldown *
  • min_spawning_cooldown **

*Parameter one of property "spawning_cooldown"
**Parameter two of property "spawning_cooldown"

Map and path finding settings exposed:

  • max_gathering_unit_groups
  • clients_to_accept_any_new_request
  • clients_to_accept_short_new_request
  • direct_distance_to_consider_short_request
  • short_request_max_steps

Known Compatibility


Want something to be compatible/actively work with more-enemies?
  • Just let me know, and I'll see what I can do
  • Only real need is for the mod in question to raise the 'script_raised_built' event

    • i.e. add this line when creating an entity that should be detected by more-enemies

    script.raise_event(defines.events.script_raised_built, { entity = --[[entity that was created]], name = defines.events.script_raised_built, tick = game.tick })


Current Development Status

2025-08-06

  • Figured out how to incorporate unit tests with the mod; am working to add tests and fix bugs/logic errors discovered as a result of said testing
  • Currently planning proactive attack groups as the next potential feature

If you've read this far, hello and thank you for doing so! I hope you enjoy the mod, and may your factory ever expand!