Omniscye-BlackBox_Fixer icon

BlackBox Fixer

This mod makes BlackBox work for the current version of REPO. Fixes the crash caused by outdated REPOLib references.

Last updated an hour ago
Total downloads 17
Total rating 1 
Categories Mods Misc Valuables Server-side
Dependency string Omniscye-BlackBox_Fixer-1.0.1
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
RoemisTeam-BlackBox-1.0.3 icon
RoemisTeam-BlackBox

Adds a monitor in the truck that displays extraction stats and and tracks how much value each player destroyed by damaging items, and shows the remaining extractable value while in the truck.

Preferred version: 1.0.3
Zehs-REPOLib-3.0.3 icon
Zehs-REPOLib

Library for adding content to R.E.P.O.

Preferred version: 3.0.3

README

BlackBox Fixer v1.0.1

This mod makes BlackBox work for the current version of REPO. The original BlackBox mod adds a monitor in the truck that displays extraction stats, tracks how much value each player destroyed by damaging items, and shows the remaining extractable value while in the truck. Because the original mod has not been updated in a while, it breaks itself immediately upon loading due to changes in REPOLib. This fixer resolves that crash so you can use the mod again.

Important Note

This mod does not contain any assets, code files, or logic owned by the original BlackBox developer. It is strictly a runtime patcher that acts as a bridge to help the original file register itself properly with the new game version. You must have the original RoemisTeam BlackBox mod installed for this to work.

Technical Details for the Nerds

So basically the mod was cooked cause it was compiled against an old version of REPOLib. It was trying to call RegisterNetworkPrefab expecting a void return, but the new REPOLib returns something else, so it was crashing instantly with a MissingMethodException. Since the crash happened inside Awake, I couldnt just patch it normally cause the compiler would choke on the broken code before my patch even ran. So I made a "quarantine" fix. I hooked into GameObject.AddComponent to catch the mod the exact millisecond it tries to load. I instantly disable the object so the broken Awake never runs. Then I just manually loaded the assets and registered them using the new method myself, and force started the mod logic. I basically just bypassed the broken startup code.

Credits

  • Omniscye/Empress - Patch/Fix logic
  • RoemisTeam - Original BlackBox Mod