Hi, I'm writing for those who might encounter the same problem as me. Indirect spoilers ahead, but if you encounter this, you'll probably already know about them. Also, I'm still playing this mod on Factorio v1.1.
Some time after fighting a nest of enemies, my game's UPS dropped from 60 to around 5-15. I spent quite a long time trying to figure out what was causing it, and I found out the problem was that a huge number of enemies had been generated. What helped me was removing all enemy units using a console command (don't worry about gameplay, they will still be spawning):
/c game.forces["protomolecule"].kill_all_units()
More technical info for those interested:
After seeing that this fixed the problem, I returned to a previous save to test how many units there were. I used this script (I'm not well-versed in Factorio scripting, so I'm posting this for more competent people to double-check if they wish):
local enemy_force = game.forces["protomolecule"]
local total_enemy_units = 0
for _, entity_prototype in pairs(game.entity_prototypes) do
if entity_prototype.type == "unit" then
total_enemy_units = total_enemy_units + enemy_force.get_entity_count(entity_prototype.name)
end
end
game.player.print("Total enemy units: " .. total_enemy_units)
There were 27,310 units of the protomolecule force (and 36,130 units of the regular enemy force, but as far as I've heard, they are well optimized not to consume much UPS while not in visible chunks).