Rampant

by Veden

Improves the enemies tactics by using potential fields (pheromones) allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, raids, rallying death cry, and player hunting. Uses blockable biter projectiles. Adds new Enemies which can be disabled in mod settings. Difficulty setting in mod options menu.

Content
1 year, 1 month ago
0.13 - 1.1
123K
Enemies

b [3.1.2] Huge lag when using Rampant

2 years ago
(updated 2 years ago)

Hello,

I fired up a K2 with SE and Rampant. As soon as I started building electric poles the game suddenly started to lag like crazy.

I managed to reproduce this with only your mod loaded.

My guess is your function "getEntityOverlapChunks" is doing things that could be simplifed.

The culprit event is:
script.on_event({defines.events.on_built_entity, defines.events.on_robot_built_entity, defines.events.script_raised_built, defines.events.script_raised_revive}, onBuild)

Demo:
https://forums.factorio.com/download/file.php?id=74538

/Gerkiz

2 years ago
(updated 2 years ago)

This seems to be caused by the number of entities registered with the base game.

If I enable new enemies and set the variations to 20 the lag spike is significant. If I disable the new enemies altogether then the lag spikes disappear. This was tested when all Rampant hooks were disabled included the one you mention.

The only remedy here seems to be:

  • Remove the variation setting and leave it always at 1

  • Reduce the number of tiers of units and spawners to something like 6 or 7 maybe less

New response