Repo Old Mod Rescue

v1.0.2·Updated 2026-07-13

Revives older mods whose content loads but never registers. Registers enemies, valuables, and levels that current REPOLib skipped, restarts the BlackBox truck monitor, and guards two Xepos-Mutators cr

About this mod Author’s original text

Repo Old Mod Rescue

Revives older mods whose content loads but never registers.

What it does

Older mods often call REPOLib methods that no longer exist. Their startup loads the asset bundle, then crashes before registering anything, so the content sits in memory unused and the mod does nothing in game. This finds that content during REPOLib's registration pass and registers it with the current API. It also restarts the BlackBox truck monitor, which crashes on startup, and fixes two Xepos-Mutators crashes, one of which freezes level loading.

Installation

  • Install BepInEx.
  • Put RepoOldModRescue.dll in BepInEx/plugins. Requires REPOLib. (level_module_map.txt is embedded in the DLL; the loose file is not needed.)
  • Keep the broken mods installed. This contains none of their content and only makes them register.

Confirmed working with

  • PaintedThornStudios-MCZombieMod: MC Zombie and Rotten Flesh spawn again
  • RoemisTeam-BlackBox: truck damage monitor works again
  • AriIcedT-SisyphusStaircaseLevel, Rosayy-Echohold, Rosayy-Woodland_Mansion, MelanieMelicious-Melanie_REPO_Levels: rooms loaded empty, now relinked
  • Xepos-Mutators: fixes the Less Is More infinite load and the Dirt Finder door errors

For developers - detailed breakdown

GUID: themorningstar.repooldmodrescue

Six patches, one per failure.

Prefix on Enemies.RegisterEnemies. This is REPOLib's enemy drain, which runs once after every plugin loads. The prefix scans every loaded AssetBundle for EnemySetup assets that have a non-empty spawnObjects list but are missing from Enemies.RegisteredEnemies and Enemies.AllEnemies. For each one it finds the prefab, a GameObject with an EnemyParent, taking the first in the same bundle or matching by normalized name token in memory. It builds an EnemyContent by reflecting onto the private _setup and _spawnObjects fields, then calls Enemies.RegisterEnemy so the orphan registers with the drain that is about to run.

Prefix on Valuables.RegisterInitialValuables. Scans loaded bundles for GameObjects carrying a ValuableObject whose Valuables/{name} network prefab is not registered, and registers them with Valuables.RegisterValuable. (It also skips enderpearl because my attempts at fixing that mod went really poorly, maybe another time lol.)

Prefix on Levels.RegisterLevel(LevelContent). Old-SDK level bundles deserialize their module lists empty, so the game later does list[0] on an empty StartRooms and the load never finishes. The room prefabs, named Module - - - -, are still in memory through the bundle's preload table. The level_module_map.txt (embedded in the DLL) maps levelName|fieldName|moduleName, baked from each level's real Level ScriptableObject, and the prefix repopulates the private lists by reflection before RegisterLevel reads them. A level with no map entry gets a warning and no relink.

Postfix on RunManager.Awake, one shot. This restarts BlackBox. Its Awake dies at a dead-API NetworkPrefabs.RegisterNetworkPrefab call before it registers anything. The postfix replays that Awake with the current API: it sets the Instance, loads DamageCanvasMultiplayer and DamageCanvasMultiplayerShop from the bundle, registers both as network prefabs, then applies 12 of its 14 Harmony patch classes. The other two, RunManagerPatch and SemiFuncPatch, reference RunManager.levelShop, whose type changed from Level to List. Applying them breaks every level change, so they are skipped and a LevelGenerator.Start postfix calls the stat tracker's resetRunStats instead, which is the only thing those two classes did that still matters.

Prefix on ValuableObject.DollarValueSetLogic. Gives any valuable with no durabilityPreset a cached real one before the method and Less Is More's postfix run. The mutator reads durabilityPreset.fragility with no null check, so a valuable with no preset throws an NRE that stops the spawn coroutine and hangs the level. The mutator's own type cannot be patched, because touching it at load time crashes its static construc

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPackZehs-REPOLib

File & checksum

Filename
Repo_Old_Mod_Rescue-1.0.2.zip
File size
24.0 KiB