MenuLibFix
Compatibility fixer for MenuLib 2.5.4 on the current R.E.P.O. build: re-installs the broken UIMouseHover / StateClosing / StateInactive hooks via Harmony prefixes, eliminating the InvalidProgramExcept
模組介紹 作者原文
MenuLibFix
Compatibility fixer for MenuLib 2.5.4 on the current R.E.P.O. build (2026-09). Same companion-plugin approach as BetterMapFix: MenuLib itself is left untouched, a sidecar plugin re-installs the broken hooks via Harmony prefixes.
The problem it fixes
MenuLib rewrites game methods with MonoMod IL hooks + IL pattern matching. After the game update the compiled IL no longer matches, producing invalid IL:
InvalidProgramException: Invalid IL code in (wrapper dynamic-method)
SemiFunc:DMD (...): IL_00e7: stloc.s 13
The exception aborts MenuLib.Entry.Awake, so the MenuPage.StateClosing and ChatManager.StateInactive hooks never get installed either — every mod depending on MenuLib runs crippled (broken in-game settings menus, etc.).
What this plugin does
| Patch | Approach |
|---|---|
| SemiFunc.UIMouseHover | Full port of the current game logic + MenuLib's custom scroll-view check, as a full-replacement Harmony prefix |
| MenuPage.StateClosing | Current game logic ported, with MenuLib's custom-page slide-out positioning and cached-page preservation inline |
| ChatManager.StateInactive | Skips the original while a MenuLib input field holds focus |
All member references are compile-time checked against the current game assembly — a future game update will fail the build loudly instead of corrupting IL at runtime.
Requirements
- BepInExPack 5.4.23+
- MenuLib 2.5.4
中文說明
MenuLib 2.5.4 在 2026-09 版本遊戲上的兼容修復伴生插件:用三個 Harmony prefix 重掛 UIMouseHover / StateClosing / StateInactive 鉤子,消除 InvalidProgramException: SemiFunc.UIMouseHover 報錯及其導致的 MenuLib 初始化中斷,讓依賴 MenuLib 的模組(自繪菜單類)恢復正常。
Source code: cat7street/RepoPlugins (MIT)
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: