Version: RampantFixed 2.03.08, Factorio 2.1.20+, new enemies OFF
What happens: A settler squad of only small biters built medium worms next to my base at about 0.01% evolution, roughly 25 minutes in.
Cause (I think): In libs/AIAttackWave.lua, in processBuilders(), vanilla and Rampant units build "medium-worm-turret" on a 40% roll with no evolution check:
if (roll < 0.4) then
entityName = "medium-worm-turret"
Checked: A console count of enemy units near my base showed {"small-biter" = 126} and nothing else, so the medium worms couldn't have come from medium units. The vanilla buildable_entities lists look correct in 2.1.20 (small biters can only build small worms). The comment in SquadAttack.lua:141 mentions a vanilla bug from 2.1.9, which FFF #445 says was fixed in 2.1.14.
Suggested fix: Pick the worm tier from evolution. This is what I'm running locally:
lua
local evo = game.forces.enemy.get_evolution_factor(surface)
if evo < 0.3 then entityName = "small-worm-turret"
elseif evo < 0.5 then entityName = "medium-worm-turret"
elseif evo < 0.9 then entityName = "big-worm-turret"
else entityName = "behemoth-worm-turret" end
Is the fixed medium worm intended for difficulty? If so, a setting to control it would be great.
Ran the game for about an hour with that kind of fix implemented and that spawned only small worms