Enemy AI Enhancement


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

Overhaul
5 days ago
2.0
1.35K
Combat Enemies

b Same force battles

6 days ago

It seems to only happen sometimes.

I've driven out in my tank before and I've seen enemies fighting each other in a big group, which causes a huge amount of UPS Stutter

When this major stutter occurs, it also takes them a long time to actually attack me (sometimes it never happens)

My guess is that this is related to the Explosive Biters and other biter mods.

Something about factions seem to be wrong.

6 days ago

/c
local f = {}
for , force in pairs(game.forces) do
local n = 0
for
, s in pairs(game.surfaces) do
n = n + s.count_entities_filtered{force = force, type = {"unit","unit-spawner","turret"}}
end
if n > 0 then f[#f+1] = force.name end
end
local out = {"Forces with enemy entities: " .. table.concat(f, ", ")}
for i = 1, #f do for j = 1, #f do if i ~= j then
local a = game.forces[f[i]]
out[#out+1] = f[i] .. " -> " .. f[j] ..
" cease_fire=" .. tostring(a.get_cease_fire(f[j])) ..
" friend=" .. tostring(a.get_friend(f[j]))
end end end
game.print(table.concat(out, "\n")); log(table.concat(out, "\n"))

Try this command. Warning do not save afterwards because the command will disable archivemnts. The outcome wil tell what is happening.

6 days ago

What i can tell is that it is not my mod. Because i do not touch forces

6 days ago
(updated 6 days ago)

I think I found the issue.

When moving past an existing nest, they will stop and fight the creatures from that nest, rather than continuing on, which causes a lot of infighting and slows UPS to a crawl.

It seems to mostly happen with Frost Biters.

I think maybe the Frost Biters mod are using a custom force or something and it's causing an incompatibility?

6 days ago

After driving out to meet the frost biter wave, here is what I witnessed....

https://i.imgur.com/LQ2G3hJ.jpeg

They were beating up one of their own nests

6 days ago
(updated 6 days ago)

I will try that command next time I get the UPS slowdown

6 days ago

You can run the command when ever you want. it wil list all current forces and if one force is not enemy then we know what is is and can then see what causes it

5 days ago

Cannot execute command. Error: [string "local f = {} for , force in pairs(game.forces...] 1: <name> expected near ','

5 days ago

sorry
/c
local f = {}
for fi, force in pairs(game.forces) do
local n = 0
for si, s in pairs(game.surfaces) do
n = n + s.count_entities_filtered{force = force, type = {"unit","unit-spawner","turret"}}
end
if n > 0 then f[#f+1] = force.name end
end
local out = {"Forces with enemy entities: " .. table.concat(f, ", ")}
for i = 1, #f do for j = 1, #f do if i ~= j then
local a = game.forces[f[i]]
out[#out+1] = f[i].." -> "..f[j].." cease_fire="..tostring(a.get_cease_fire(f[j])).." friend="..tostring(a.get_friend(f[j]))
end end end
game.print(table.concat(out, "\n")); log(table.concat(out, "\n"))

Try again please

4 days ago

Forces with enemy entities: enemy

4 days ago

Are you able to list all your mods? I am unsure how this happens if all forces are enemy.
Could you try: /c game.print("enemy.friendly_fire = " .. tostring(game.forces.enemy.friendly_fire))

a day ago

enemy.friendly_fire = true

a day ago

Mods:

Base Mod
Elevated Rails
Quality
Space Age
Corrundum
Secretas&Frozeta
AAI Signal Transmission
Alternate Science Packs
Apia-Carnova System
Armoured Biters
Asteroid Belt
Better StarMap Background
Bio pricessing group
Biter Cleanup
Bottleneck Lite
Castra
Challenging pack logistic
Combinator Toggle
Dark Night
Disco Science
Discovery Tree
Enable When
Even Distribution Lite
Explosive Biters
Factorio Library
Factory Planner
Frost Biters
Fulgora Orbital Defense
Graphite & Diamonds
Hard Planetary Logistics
Heat-resistant Pipes
Just Another Improved Greenhouse Mod (aka Wooden Economy)
Lead
Logistics Research Removed
Milestones
Mission Tasks
Planets require landing first
PlanetsLib
Quickbar Templates
Rate Calculator
Realistic Decoration Cleanup
Shortcuts
Show missing bottles for current research
Silica & Silicon
Smart Enemies
Stats GUI
Survival Gear
Terra Palus
Text Plates
Tidy Menus
Tin
Titanium
Toxic Biters
Toxic Resistance
turret-activation-delay
Vehicle Corpses
Visible Planets in Space
Zirconium

Of these, the ones I suspect could be potentially causing the problem are:
Armoured Biters
Explosive Biters
Toxic Biters
Frost Biters
Fulgora Orbital Defense

But it could be literally anything causing it.

New response