/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.