CE Turret Performance Patch
In vanilla RimWorld, turrets scan for targets every single tick. With Combat Extended, this becomes extremely expensive in colonies with many turrets especially during sieges where turrets track idle mechanoids through
This mod adds a lightweight throttling cache to Building_TurretGunCE.TryFindNewTarget(), reducing CPU load by ~30× when turrets are idle or no valid targets are in
Profiled during a siege with 12+ mechanoids and 20+ CE turrets:
• FindAttackTargetForRangedAttack CPU load: 10.5% → 0.6% (~30× fewer calls)
• TPS at 3× speed: ~100 → ~150–250 (up to 2.5× improvement)
• Turret target scanning: every tick → once per 30 ticks (0.5 sec)
Actual results depend on colony size, turret count and raid intensity.
- Turret Performance Tweaks vanilla-only, does nothing for Combat Extended turrets.
- FPS Stabilizer reduces rendering load, good companion for CPU-bound colonies.
- Performance – Slower Pawn Tick Rate throttles non-player pawns, improves TPS.
- RuntimeGC / RocketMan general-purpose colony optimizers (garbage collection, think nodes, pathing).
• Turrets skip expensive target scans for 30 ticks (0.5 sec at 1× speed) if the last scan found nothing.
• Forced targets are never delayed manual override always works instantly.
• Warmup, cooldown, rotation and shooting logic remain untouched.
• Fully savesafe and can be added / removed mid-game.
• Requires Harmony and Combat Extended.
• Works with all CE turret sub-classes (Building_TurretGunCE, Building_CIWS_CE, etc.).
• Patches the virtual TryFindNewTarget() method, so any mod inheriting from CE turrets also benefits.