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
About this mod Machine translation
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
Chinese description
MenuLib 2.5.4's compatibility repair companion plug-in for the 2026-09 version of the game: Use three Harmony prefixes to rehang the UIMouseHover / StateClosing / StateInactive hooks, eliminate the InvalidProgramException: SemiFunc.UIMouseHover error and the resulting MenuLib initialization interruption, and allow the modules that rely on MenuLib (self-drawn menu classes) to return to normal.
Source code: cat7street/RepoPlugins (MIT)
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: