Enemy AI Enhancement


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

Overhaul
14 hours ago
2.0
929
Combat

b [10.1.0] Significant lag

12 days ago
(updated 12 days ago)

I’m a big fan of the mod (this has become my favourite enemy mod), but as I went out to destroy a nest, my frames dropped significantly, and after finishing destroying the nest, my fps/ups sat at 27, rendering the game unplayable – slowly going up to the 30s and low 40s a bit later.

I’ve had more lag than usual in this playthrough, likely due to this mod, whereas before using it, I had always had 60 fps/ups. I checked show-time-usage in the debug options:
‘mod-smart-enemy-ai: 0.151/0.000/5.933’

I disabled the mod and restarted, loading the same save where I had extreme lag, at the same point where my fps/ups was very low. Disabling the mod caused my fps/ups to go back up to 60 – no lag.

I noticed you fixed some issues after the ‘8.5.5 Lag’ post, but that was some versions ago. Maybe some of the newer changes or features are causing this?

Settings:
Difficulty Preset: easy
Raid Intensity: Low
Research Pressure: Low

Otherwise, default settings.

12 days ago

Thank you, i have a look into it!

12 days ago

Hmm the debug you gave me is not not showing high impact.
5.9ms MAX is limiting if you would play at 160+ fps but not at 60.

1sek/5.9ms=1000ms/5.9ms= 166,6
This means 166 Frames per Second (fps) possible

Anything over 16ms is problematic but ill try to investigate
Can you list your loaded mod file?

12 days ago

The time-usage line suggests Smart Enemy is not spending much sustained Lua time directly. The likely issue is that the mod is causing engine-side unit/pathfinder work after nearby enemy groups react to the nest fight. That kind of cost shows up as UPS loss but not necessarily as high mod script time.

If you can, please send a save made while the UPS is low. I’m preparing diagnostics for 10.1.1 so we can tell whether this is a path-request burst, too many tracked enemy groups, or a command storm around breach/nest combat.

12 days ago

Could you please set Research Pressure → Off and Raid Intensity → Off. If lag at a nest persists → isolates adaptive resistance (#1); then disable just adaptive resistance (startup) and restart to confirm.

12 days ago

I need either your save ar you to test

Research Pressure -> Off Test
Raid Intensity -> Off Test
adaptive resistance -> Off Test

To findout what features causes it

12 days ago

Loaded the same save as before with no settings changed:
show-time-usage - https://i.imgur.com/eEScb2D.jpeg
show-entity-time-usage - https://i.imgur.com/zcI1MJD.png

FPS/UPS went to below 30, then sits at around 34, then going up to 39–40, with major stuttering, as described previously.

After disabling research pressure and raid intensity, it didn’t improve the lag in any noticeable way.
When I turned adaptive resistance off, the lag disappeared – FPS/UPS is now 60 again and gameplay feels smooth.

show-time-usage and show-entity-time-usage with adaptive resistance off:
https://imgur.com/a/GJwFyZj

It does seem as though this is the feature that’s causing the lag.

12 days ago

Thank you very much! Thats what i feared :( back to the workingbech. That means that the whole resistant feature as it is now does not work.

Thank you for the testing and report helps me alot

12 days ago

SHould be fixed. Could you please veryfy

12 days ago

I tested the same save, and there’s still lag. I did see that in the changelog notes, it says ‘No save schema change; existing saves load and behave identically’, so I’m not sure how I could test it.

https://imgur.com/a/Y1fCZg5

11 days ago

Load the save with disabled resitance, then save and reload with them on again.
The problem was the following: I have no option to change values of biters as soon as they spawned. Thats why i destroyed them and replaced them with biter that have resistances. I never gave those a spawner value. so the spawner has a spawn limit of lets say 20. But the mod kept stealing its biters. So the spawner never stopped spawning = lag. And it was Engine lag thats why we did not saw in in the mods compute time. we have to destroy the old biters to stop the lag.

11 days ago

1.Save a backup first.
2. Disable Smart Enemy AI.
3. Load the save.
4. Save the game once without Smart Enemy AI enabled.
5. Re-enable Smart Enemy AI 10.1.2.
6. Load that newly saved game.

10 days ago
(updated 10 days ago)

After doing this, my fps/ups was 60. If I notice any more lag I will let you know, but currently it seems to have been fixed. Thank you!

This thread has been locked.