Dyson Sphere Program
You are viewing a potentially older version of this package. View Latest Version
Install

Details

Date Uploaded
4 days ago
Downloads
21
Size
23KB
Dependency string
IlldariFairlight-FogParity-1.0.0

FogParity

Dark Fog ground bases no longer save up a full magazine and dump it the moment you leave. That is the "farm is fine while I'm here, structures die when I fly away" effect.

The problem

If you run a Dark Fog farm, you have probably learned this the hard way: a line that you can stand next to for hours can lose several turrets in one unattended session — so you massively overdefend, or you just stay home.

The cause is a vanilla CPU optimization. Dark Fog replicators only spawn free-roaming units on the planet the player currently has loaded (or while base hatred is non-empty). On any other planet, after a skirmish dies down, the base's formation magazine (72 raider + 108 ranger ports) silently fills with nothing to drain it — and the next time one of your turrets acquires any target near the pit, the entire magazine activates in one tick. 150+ simultaneous attackers overwhelm turret target-selection (all lasers lock the same closest raider while the rest fire freely), producing damage spikes several times anything you see while present.

While you are on the planet, the same replicators keep a live trickle of wanderers flowing, your turrets always have a lock, and the magazine drains as fast as it fills — which is why the effect only ever happens in your absence.

What this mod does

A single Harmony prefix forces the replicator's live-spawn gate to treat every planet as loaded (DFGReplicatorComponent.LogicTick, isLocal = true). Unattended planets then run the exact attended trickle dynamics — same code, no tuning constants, no config.

Measured on a 9-base max-level farm (radius-280 planet), same scene with the patch on vs off:

  • CPU: 447% of one core before, 447% after. No extra cost on that farm. Not a full profiler sweep of every save.
  • Worst-case dump size: ~180 simultaneous attackers (the 72 raider + 108 ranger magazine) down to ~47. About a quarter of the unmodded absent-mode peak.
  • Unattended structure losses dropped from several per session to rare; leftover ~40–60-unit pulses can still happen (see below).

Honest limitations

This damps the mega-dump mechanism rather than deleting it: units that dock and idle can still bank their formation ports, so partial releases of ~40–60 units remain possible on unattended planets — reduced well below typical kill thresholds, but a heavily farmed base still deserves real defenses. The mod touches no save data and is safe to add or remove at any time; if a game update changes the patched method, it logs a warning and lapses to vanilla behavior instead of breaking.

Works with or without GalacticScale — the mechanism is pure vanilla.

Source

https://github.com/AndrewLuebke/DSP_FogParity

Building

Single-file BepInEx plugin; any C# compiler works. With Mono's mcs and a refs/ directory containing the game's Assembly-CSharp.dll, UnityEngine.dll, UnityEngine.CoreModule.dll, plus BepInEx's BepInEx.dll and 0Harmony.dll:

mcs -target:library -out:FogParity.dll FogParity.cs \
    -r:refs/BepInEx.dll -r:refs/0Harmony.dll -r:refs/Assembly-CSharp.dll \
    -r:refs/UnityEngine.dll -r:refs/UnityEngine.CoreModule.dll -r:refs/netstandard.dll

Credits

Mechanism reverse-engineered from the game IL during a multi-day "why do my bases only die when I leave" investigation — instrumentation and patch by Claude (Anthropic) with IL recon by Grok (xAI), driven by IlldariFairlight.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.