Skip to content

UI mod compatibility - #623

Open
Manaether wants to merge 15 commits into
rwmt:masterfrom
Manaether:ui-overhaul-compat
Open

Manaether wants to merge 15 commits into
rwmt:masterfrom
Manaether:ui-overhaul-compat

Conversation

@Manaether

@Manaether Manaether commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request introduces comprehensive multiplayer compatibility for Astryl's UI overhaul series (Radius UI & Modern UI), Adaptive Work Priorities, Nice Bill Tab, True RPG Inventory, and Flourish.


🎨 New Mod Compatibilities

1. Astryl's Radius UI Suite

  • Radius UI - Colonist Bar (astryl.RadiusUI.ColonistBar):
    • Patched kit/apparel preview graphic caching (KitPreview:GraphicFor) to avoid off-tick rendering desyncs.
  • Radius UI - Health Tab (astryl.RadiusUI.HealthTab):
    • Disabled client-local autonomous TriagePanel.Enforce() in multiplayer to avoid desynchronizing doctor assignments, while synchronizing manual "Tend" and "Rescue" actions.
    • Synchronized GameComp_TendRules care rules and preferred medicine settings.
    • Watched SyncMedCare and SyncSelfTend during inspector drawer and dropdown interactions with defensive null-checks for non-colony / enemy pawns.
  • Radius UI - Mission Control (astryl.RadiusUI.MissionControl):
    • Synchronized time control speed buttons and pause toggle (SendVote / SendPauseToggle).
    • Transpiled OccasionsTracker.CheckReminders to use simulation ticks (Find.TickManager.TicksGame) instead of Time.realtimeSinceStartup for deterministic reminder evaluation.
  • Radius UI - Inspector (astryl.RadiusUI.Inspector): Synchronized inspector actions, pin toggles, and target switching.
  • Radius UI - Faction Menu (astryl.RadiusUI.FactionMenu): Synchronized faction interactions and settlement actions.
  • Radius UI - Quest Menu (astryl.RadiusUI.QuestMenu): Synchronized quest acceptance, dismissal, and reward selections.

2. Astryl's Modern UI Suite

  • Modern Social Tab (astryl.modernsocialtab): Synchronized prisoner interactions, slave suppression, and relations drawer. Deferral handling added for UI thread safety (SocialTex).
  • Modern CC (astryl.moderncc):
    • Disabled mid-game Character Editor in multiplayer to prevent raw in-memory pawn mutations from causing desyncs.
  • Modern History Menu (astryl.modernhistorymenu): Synchronized statistics graph viewing and tab switching.
  • Modern Faction Menu (astryl.modernfactionmenu): Synchronized goodwill gifting and settlement interaction buttons.
  • Modern Quest Menu (astryl.modernquestmenu): Synchronized quest operations and reward choice radio options.

3. Adaptive Work Priorities (kathanon.AdaptiveWorkPriorities)

  • Synchronized global automation mode, master switch, and per-pawn profile toggles.
  • Synchronized manual priority overrides (ApplyManual), emergency priority interventions (ApplyEmergency), and cohort applications (ApplyAllVisible).
  • Synchronized emergency priority chain modifications (learningStore.SetChain).
  • Throttled learning and suggest toast notifications deterministically with safe enum unboxing (Convert.ToInt32 on SignalKind).

4. Nice Bill Tab (Vesper.NiceBillTab)

  • Synchronized recipe dragging, reordering, and priority adjustments.
  • Synchronized bill suspension, target counts, ingredient ranges, and bill copy/paste operations.

5. True RPG Inventory (Vesper.TrueRPGInventory)

  • Synchronized grid slot drag-and-drop actions, auto-equip logic, and inventory layouts.
  • Mitigated recursive layout calculation sync loops and ensured immediate remote grid invalidation.

6. Flourish (Flourish.Mod)

  • Synchronized cosmetic UI state and animation triggers.

📄 Documentation

  • Updated README.md to list all newly supported mods.

✅ Testing & Verification

  • Tested in active multiplayer sessions across host and multiple clients.
  • Verified that opening inspection tabs, pawn previews, quest menus, and colonist bars produces zero desyncs.
  • Verified zero InvalidCastException when forcing pawns to work with Adaptive Work Priorities enabled.
  • Verified inspecting enemy pawns and raiders with Radius UI Health Tab no longer throws NullReferenceException.
  • Built in Release mode: dotnet build -c Release completes with 0 errors and 0 warnings.

…, Nice Bill Tab, True RPG Inventory, and Flourish

- Add multiplayer compatibility for Radius UI suite:
  - Radius UI - Faction Menu (Dialog_Comms synchronization)
  - Radius UI - Health Tab (deterministic multi-map pagination & safe rendering)
  - Radius UI - Inspector (safe UI inspect drawer)
  - Radius UI - Mission Control (command / alert click safe handling)
  - Radius UI - Quest Menu (quest accept/reject/dismiss command sync)
- Add multiplayer compatibility for Modern UI suite:
  - Modern Character Creation (block in-game editor in MP, sync teleportation)
  - Modern Faction Menu (Dialog_Comms synchronization)
  - Modern History Menu (time graph timeline scrub protection)
  - Modern Quest Menu (quest action synchronization)
  - Modern Social Tab (safe UI interactions)
- Add multiplayer compatibility for Adaptive Work Priorities:
  - Full synchronization of global modes (Observe, Suggest, Semi, Auto) and master toggle
  - Synchronized per-pawn mode cycling and priority locking
  - Multi-map deterministic LearningStore evaluation and emergency coverage
  - Safe UI hooks for header, cohort tabs, and pawn cards
- Add multiplayer compatibility for Sleek Work Priorities:
  - Integration with built-in MultiplayerBridge
  - Synchronized toggle for manual numeric priorities vs checkmark mode
- Add multiplayer compatibility for Nice Bill Tab & Nice Bill Tab Expansion:
  - Synchronized bill creation for standard and x4 recipes
  - Synchronized recipe quantities with Shift (10x) and Ctrl (100x) modifier support
  - Synchronized +/- count adjustment with network multiplier passing
  - Drag-and-drop bill reordering and hidden recipe synchronization
- Add multiplayer compatibility for True RPG Inventory:
  - Synchronized gear wear, equip, unequip, drop, sidearm toggle, and stripping
  - Prevent direct trade window redirection in multiplayer
  - Synchronized pawn-to-pawn item exchange dialog
- Add multiplayer compatibility for Flourish:
  - RNG state protection (Rand.PushState / Rand.PopState) for idle visual flourishes
- Update README.md with newly supported mods and .gitignore for scratch files
…zation

- Defer patching and reflection to LongEventHandler.ExecuteWhenFinished to avoid background thread asset loading during mod construction
- Add fallback type initializer check to ensure AWTex textures are loaded on main thread
- Defer all patching and sync registration to LongEventHandler.ExecuteWhenFinished(LatePatch)
- Fix thread-affinity errors for Modern Social Tab (SocialTex) and other UI overhauls
- Ensure 100% architectural coherence across all MpCompat patches
When stack frames have nameHash == 0 (dynamic wrappers or inlined frames),
the frame counter was not incremented while the raw array index was,
causing traceIn[num4] to overrun the 32-element buffer.
- Added transpiler bounds check in DeferredStackTracingImpl.TraceImpl
- Added finalizer exception guards on TraceImpl and DeferredStackTracing.Postfix
…ing, and safe cast work signals

- Optimize UniqueIDsManagerGuard with precompiled expression delegates (zero allocations) and single Finalizer cleanup
- Restore DeferredStackTracingFix with bounds check transpiler and RNG finalizer guards
- Fix InvalidCastException in AdaptiveWorkPriorities PrefixNotifySignal using Convert.ToInt32
- Fix NullReferenceException in RadiusUIHealthTab when inspecting enemy pawns without playerSettings
- Add HarmonyPrepare defensive check and XML documentation to CompShuttleFix
@Manaether
Manaether marked this pull request as ready for review September 12, 2026 05:53
@notfood

notfood commented Sep 12, 2026

Copy link
Copy Markdown
Member

Core & Engine Fixes cannot be here. They belong to Multiplayer.

@Manaether

Copy link
Copy Markdown
Contributor Author

Core & Engine Fixes cannot be here. They belong to Multiplayer.

thanks, i'll remove and make a pr on the MP project for those

Removed CompShuttleFix, DeferredStackTracingFix, and UniqueIDsManagerGuard as core fixes now live directly in rwmt/Multiplayer.
@Manaether Manaether changed the title WIP : UI mod compatibility UI mod compatibility Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants