// Management · RimWorld Mod

Milira: Wings of Democracy - Float Menu Fix

Milira: Wings of Democracy - Float Menu Fix mod preview for RimWorld

Milira: Wings of Democracy - Float Menu Fix About the General Float Menu Optimizer Float-menu slowdown may be caused by multiple mods at the same time.

Milira: Wings of Democracy - Float Menu Fix

About the General Float Menu Optimizer

Float-menu slowdown may be caused by multiple mods at the same time. Installing one targeted fix may therefore not resolve every related performance problem in a large mod list. As of August 24, 2026, I have confirmed that the tested versions of the following mods may cause sustained FPS loss while a map float menu remains open:
  • MoeLotl: Rigor Mortis
  • Milira Race
  • Milira: Wings of Democracy
Float Menu Performance Optimizer includes these targeted fixes and provides Frame, Time, and Manual modes to reduce repeated menu-generation costs. New users are encouraged to use the general optimizer: https://steamcommunity.com/sharedfiles/filedetails/?id=3784467506 The standalone fix remains available for users who only need the Wings of Democracy fix. If both are enabled, the standalone fix will not load duplicate patches. The integrated version will be handled by the general optimizer. Collection of related fixes and the general optimizer: https://steamcommunity.com/sharedfiles/filedetails/?id=3784994455 Float-menu performance monitoring tool: https://steamcommunity.com/sharedfiles/filedetails/?id=3783963046

The Problem

Testing found that solar-crystal WorkGivers from Milira: Wings of Democracy could perform expensive checks on ordinary items, cells, storage buildings, and other unrelated targets during map float-menu generation and revalidation. The mod also contained a duplicated WorkGiver configuration and duplicate refueling options, adding further menu-generation cost.

Let the Game Run Before Testing

The general optimizer and targeted fixes take effect immediately after loading and do not write any additional fix state into the save. However, the original float-menu performance problem may not appear immediately after loading a save while the game is still paused. Some related work checks are activated only after game ticks advance and pawn jobs, reservations, building comps, or map components update their state. Before comparing performance, let the game run unpaused for a while, then compare the menu-closed and menu-open states. A lack of slowdown immediately after loading a save while paused does not prove that the problem is absent or that the fix has no effect.

Main Fixes

1. Prefilter unrelated solar-crystal targets PLAMilira_EmptySolarCrystalContainer could scan the map and search for storage when right-clicking ordinary items, cells, storage buildings, or other unrelated buildings. The fix allows only the actual Radiation Catalyzer to enter this logic. 2. Skip the duplicated PLAMilira_PoisonFood check In the current 1.6 Defs, PLAMilira_PoisonFood uses the same worker, label, and extraction action as the solar-crystal container entry. This causes the same float-menu check to be processed twice. The patch skips this duplicate only during float-menu generation. Original Defs and normal AI work scanning are not modified. 3. Cache the Radiation Catalyzer menu result When a Radiation Catalyzer contains output, its menu checks may repeatedly search for storage. The final menu result is briefly cached while the building and output states continue to be checked. Solar Crystal extraction remains unchanged. 4. Remove the duplicate undrafted refueling option Undrafted pawns may receive both rearming and normal refueling options, even though both use the same refueling JobDriver for the Radiation Catalyzer. The duplicate rearming option is hidden while the pawn is undrafted. It remains available while drafted so that the original drafted-refueling capability is preserved.

Current Test Results

The comparison was measured with Float Menu Performance Monitor. The general optimization mode was Disabled, while other fix settings remained unchanged. During one complete float-menu generation in the same test scenario:
  • Without the Wings of Democracy fix: PLAMilira_EmptySolarCrystalContainer and PLAMilira_PoisonFood used approximately 32.9 ms combined.
  • With the fix: neither WorkGiver appeared among the main performance hotspots.
  • Total menu-generation time: approximately 37.5 ms → approximately 3.76–3.98 ms.
In this test environment, total time for one complete menu generation was reduced by approximately 89%, to roughly one-tenth of the original value. These values measure execution time inside the float-menu code path, not FPS directly. They demonstrate the mechanism of the fix and do not guarantee the same improvement on every device, save, or mod list.

Compatibility and Saves

This Harmony patch adds target prefiltering, duplicate-entry filtering, and brief result caching. It does not modify Wings of Democracy files, normal AI work scanning, or save data. It should be safe in theory to add or remove from an existing save. Fully restart RimWorld after changing the mod list and keep normal backups of important saves. This patch targets Milira: Wings of Democracy only. Milira Race and Milira Imperium require separate fixes. When used with Float Menu Performance Optimizer, the general optimizer handles its integrated version while the standalone fix stops loading its own DLL. The patches are not applied twice.

Monitoring and Reports

To profile the original unoptimized behavior, open the general optimizer settings and: 1. Set the general optimization mode to Disabled. 2. Disable the relevant entry under the integrated fix settings. Disabling only the general optimization mode does not disable the integrated targeted fixes. You may send the monitoring results and Player.log to an AI for analysis, or send them to me. I may review and respond to reports from time to time.

Development Notes

OpenAI Codex assisted with investigating the call chain, diagnosing the problems, and writing the patches. In-game functionality and performance results were verified through actual A/B testing by the author.