Enemy AI Enhancement


Smarter biter AI with adaptive resistance, breach reinforcement, scheduled raids, wall regen, and overhaul-mod compatibility.

Overhaul
7 days ago
2.0 - 2.1
2.17K
Combat Enemies

g Question about performance and after-uninstall-performance-drawbacks of this mods

a month ago

Hello,

Short:
With all respect for your good and hard work i would like to ask whether this mod could possibly cause after-uninstall-performance-hits. I have severe savegame UPS performance implications since a few weeks and not sure about the cause.

Longer:
thank you for your work and this mod.
I had this mod installed since a few weeks before and after 2.1 and it was fun.

Intentionally the mod sent big waves of enemies which was fun.
Later Factorio 2.1 official changed some balance and features about enemy AI too.

After the weeks i removed the smart enemy AI mod because the performance hit every few minutes was too hard for me to be playable.
Now my savegame as recurring UPS performance hits every few seconds/minutes which is annoying.
I'm not sure about the cause.

Do you think this mod can have unexpected after-uninstall-performance-drawbacks?

Thank you.

[deleted message]
a month ago

Ok so there the Expansion settings keeps persistant if the mod is deleted with expansion active. But that shouldnt have any impact besides more biters. In general shouldnt there be any noticable UPS impacts from this mod at all. Could you please check the F4 readouts?

a month ago

You can check the bitercount with this:
/c local n,s=0,0 for _,su in pairs(game.surfaces) do n=n+su.count_entities_filtered{force="enemy",type="unit"} s=s+su.count_entities_filtered{force="enemy",type="unit-spawner"} end game.print("biters "..n.." nests "..s)

DO not save after using as it will disable qrchievments. ->Load safe->Command-> leave without save

a month ago
(updated a month ago)

hello,

thank you for your response.
you can read the values screenshots and savegames in the history of the steam discussion:
https://steamcommunity.com/app/427520/discussions/5/590687538416543656/
A member of the steam forum said my biters count a very increased.
When i remove all biters by command the performance gets better but this doesnt stay for long.

if you cant access them i'll provide you the data as soon as i can (tomorrow or so).

Tell me if you mean or need something else.

Thank you.

a month ago

Hi!
The old Biter Expansion feature wrote into your map settings: it switched expansion on, shortened the cooldown, and made settler groups larger. Those values stay in the save after you delete the mod, because no mod code runs any more to put them back. More nests means more units, so the units come back after you kill them.

Research Pressure also spawned extra biters that carry vanilla names, so they survive the uninstall too.

I removed the expansion feature in 10.9.4 for exactly this reason.

Check your map first (read-only):

/c local e=game.map_settings.enemy_expansion game.print(serpent.line{enabled=e.enabled,min_cd=e.min_expansion_cooldown,max_cd=e.max_expansion_cooldown,min_grp=e.settler_group_min_size,max_grp=e.settler_group_max_size,dist=e.max_expansion_distance})

Vanilla is min_cd=14400, max_cd=216000, min_grp=5, max_grp=20, dist=7. If your numbers differ, copy your save, then run:

/c local e=game.map_settings.enemy_expansion e.min_expansion_cooldown=14400 e.max_expansion_cooldown=216000 e.settler_group_min_size=5 e.settler_group_max_size=20 e.max_expansion_distance=7 game.forces.enemy.kill_all_units()

Set e.enabled=false as well if your map started with expansion off.

a month ago

Also you created a unique edge case:
Game started in 2.0 ->2.1.
Dev changed how Expansion worked in 2.1 that could introduce unknown effect using it with a 2.0 expansion change.

a month ago
(updated a month ago)

hello,
thank you for your help.

i'll look into your suggestions.

do you think i could write a mod by AI to execute the commands to reset the problematic values once to prevent this save from cheat-command-mode ?

Edit:
thank you.
much better with the commands. I ask the github copilot to write the commands to a mod and create a package so i can roll back to non-cheatmode save.

Edit:
i generated a mod using github copilot to fix the savegame expansion values on my savegame without rendering it cheatmode.
https://github.com/perahoky/FactorioFixEnemyExpansionSave
its much text but i reviewed it and i think its ok. Wouldnt write it this verbose on my own.
it has killed over 70.000 enemy units and reseted the values to my liking.

https://mods.factorio.com/mod/fix-enemy-expansion-save

a month ago

Perfekt!
Sorry for the inconvinience!

This thread has been locked.