0.4.15 preview
Pre-releasePreview of Late Game Performance for Timberborn 1.1.2.4. Not yet played. The latest release is still 0.4.14. Two fixes found in a Performance Log recording of a 354-beaver colony on 0.4.14.
Multiplayer: every player installs this same version. Both changes give the game's exact results. (In one session a friend was still on 0.4.13 while the host had 0.4.14; please update together.)
District resource counts now work with MixedStorage installed
Before sending a count to worker threads, the district count feature checks whether another mod patches something the workers call. If one does, the feature stands down and the game counts on the main thread. MixedStorage patches SingleGoodAllower.AllowedAmount for its multi-good warehouses and piles, so with MixedStorage installed the feature never ran. That is about 1 ms per tick of counting on the main thread in the recorded colony.
MixedStorage 0.5.7's patch (LimitPatch.Prefix) was read. It answers from the allocation the player set and the storage's capacity. The only thing it writes is its own per-storage cache of limits, rebuilt from those same values, and each storage is counted by exactly one worker. So it is accepted.
- The check is exact: mod id, patch method and target method together. Any other patch, including a new one from a later MixedStorage version, still hands counting to the game.
- The log says:
DistrictCounts: another mod patches SingleGoodAllower.AllowedAmount (kyler.mixedstorage, MixedStorage.LimitPatch.Prefix); that patch was read and is safe to run on worker threads, so counting stays on them.
The water map copy no longer hides the map from other mods' postfixes
0.4.14 made the water map copy on a worker thread and swapped it in by skipping ThreadSafeWaterMap.Tick. That also skipped ThreadSafeWaterMap.Update and every mod patch on it. BeaverBuddies has one: with its Debug setting on, its desync trace hashes the water map after Update, and under 0.4.14 that hash was missing on almost every tick. From 0.4.15 the mod hooks Update itself. Harmony still runs other mods' postfixes on a method whose prefix skipped it, so those postfixes now see the swapped map, the same bytes the game's own copy would be. Without BeaverBuddies' Debug setting nothing changes.
What was tested
All tests pass against the installed game's assemblies (73 patch targets).
- The water map copy: the same byte-for-byte comparison with the game's own copy as in 0.4.14, now through the
Updatehook. - The district count check: MixedStorage's patch is accepted and logged. A different MixedStorage patch, the same patch name under another mod's id, and the reviewed patch on a different method are all refused.
- Not tested: MixedStorage's patch itself running on worker threads. The test harness cannot apply patches.
DistrictCountsVerify = truemakes the game count as well and compare;verify mismatches 0in theDistrictCounts:line is the check.
Install
- Close Timberborn. Delete any older
LateGamePerformancefolder, then extractLateGamePerformance-0.4.15.zipintoDocuments/Timberborn/Mods. - Requires the Harmony (2.4.1+) and Mod Settings Workshop mods.
SHA-256 of the zip: 80094c9c20d011d06c2a0a2eef2e9a5a1349e93b79c2e320cae6386dd4ed853b