You are viewing a potentially older version of this package. View all versions.
DEADTROL-REPO_Compatibility_Patch-1.0.0 icon

REPO Compatibility Patch

Comprehensive compatibility patch for R.E.P.O: fixes MissingMethodException loops (PlayerHealth.Hurt, ChatManager, Sound), PhotonView lag, weapon hold offsets, grenades, REPOLib duplicate items, and multiplayer item loading.

Date uploaded 2 weeks ago
Version 1.0.0
Download link DEADTROL-REPO_Compatibility_Patch-1.0.0.zip
Downloads 34
Dependency string DEADTROL-REPO_Compatibility_Patch-1.0.0

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

README

REPO Compatibility Patch (v1.0.0)

A comprehensive compatibility patch and bug fix framework for R.E.P.O and community mods.


🚀 Features & Fixes

1. Game Update Compatibility & MissingMethodException Loop Fix

When R.E.P.O updated, several core methods changed their parameter signatures. Older mods calling the deprecated signatures flooded the console and log files with tens of thousands of exceptions every second:

  • MissingMethodException: Method not found: void .PlayerHealth.Hurt(int,bool,int):
    • The game updated PlayerHealth.Hurt to take 4 parameters (bool hurtByHeal). Legacy mods threw exceptions every frame (over 35,000+ times).
    • This mod includes a BepInEx Preloader Patcher that injects backward-compatible bridge overloads directly into Assembly-CSharp.dll in memory.
  • Additional Method Bridges:
    • PlayerHealth.HurtOther (4 params → 5 params)
    • ChatManager.PossessChat (8 params → 9 params with _localeCode)
    • PlayerController.OverrideSpeed (2 params → 3 params with _sprintCap)
    • Sound.PlayLoop (4 params → 5 params with volumeMultiplier)
    • ParticleScriptExplosion.Spawn (8 params → 9 params with investigateRadius)
    • PhysGrabObjectImpactDetector.DestroyObject (1 param → 2 params with forced)
    • PhysGrabber.ReleaseObjectRPC (2 params → ReleaseObject)
    • PrefabRef.get_Prefab() (Non-generic base class → generic PrefabRef<GameObject>)
    • VisualScripting GhostMeshVisualizerBridge, PathsVisualizerBridge, etc.

2. REPOLib Duplicate Valuable Collision & Null Fix

  • "Failed to register valuable 'Valuable Banana' - A valuable prefab is already registered with the same name":
    • When multiple mods register a valuable with the same name, REPOLib previously rejected the second one with an error. This mod automatically disambiguates colliding IDs so both items load and spawn properly.
  • "Failed to register valuable. ValuableObject is null.":
    • Safely ignores unassigned ScriptableObjects in bundles without throwing log errors.

3. Multiplayer Item Spawning (DefaultPool / MultiplayerPool)

  • MultiplayerPool failed to load "Items/Item Meoffin". Make sure it's in a "Resources" folder.:
    • When mods spawn custom shop items into levels in multiplayer, Photon's default pool failed to find them in Unity's internal Resources folder.
    • This mod provides an automatic fallback to REPOLib's NetworkPrefabs dictionary, enabling custom shop items to spawn cleanly in multiplayer without console errors.

4. Network Lag & Console Spam (PhotonView IPunObservable)

  • Safely removes non-IPunObservable components (ItemMelee, Module) from Photon's observation list to stop log spam and multiplayer network stutter.

5. Weapon Hold Distance Fix

  • Custom guns no longer snap into the player's head when held (distanceKeep = 0.8f).

6. Grenades Audio, Trajectory & Physics

  • Replaces broken audio calls with native 3D audio emitters matching the game's mine warning sound.
  • Fully restores grenade pin animation, throw trajectory, and impact explosion.

📦 Installation

Via Thunderstore / r2modman (Recommended)

  1. Install this mod directly through the mod manager.
  2. Ensure BepInEx is installed.

Manual Installation

Extract the zip archive into your game's root directory:

  • BepInEx/patchers/REPOCompatibilityPatch/REPOCompatibilityPatcher.dll
  • BepInEx/plugins/REPOCompatibilityPatch/REPOCompatibilityPatch.dll

🛠️ License

Licensed under the MIT License.

CHANGELOG

Changelog

1.1.2

  • Restored LevelScaling & Custom Content Integration:
    • Fully restored SAD Model Fix processing so that custom valuables, enemies, and items have their correct 3D bounds, volumeType, and RoomVolumeCheck properly assigned.
    • Resolved the issue where Swaggies-LevelScaling HUD, EXP bar, and stats UI failed to appear on screen.
  • Universal Harmony Ambiguity Resolver:
    • Added an in-memory Harmony resolver intercepting AccessTools.DeclaredMethod and AccessTools.Method.
    • Automatically resolves any ambiguous method overloads (such as PlayerHealth.Hurt and PhysGrabObjectImpactDetector.DestroyObject) by cleanly directing patches to the primary game method.
    • Completely fixes Harmony errors in Illagers (PatchTotemExitDelay) and LevelScaling (PlayerHealthPatch).
  • Retained High-Performance Loading Pipeline:
    • Preserved engine background loading optimizations (backgroundLoadingPriority = High, asyncUploadTimeSlice = 16ms, asyncUploadBufferSize = 64MB, uncapped splash framerate, and audio mixer log spam suppression) for maximized loading speeds without breaking any mods.

1.1.1

  • Startup Optimizations & Profiling:
    • Identified bottlenecks during initial AssetBundle ingestion and refined threading configurations.

1.1.0

  • High-Performance Loading Optimizations:
    • Configured Unity's background asset loading threads to high priority (Application.backgroundLoadingPriority = High), drastically reducing startup and AssetBundle loading wait times.
    • Temporarily uncapped splash screen framerate and disabled VSync during AssetBundle loading (vSyncCount = 0, targetFrameRate = 500), allowing REPOLib coroutines to advance at maximum CPU speed without 16.6ms frame idle stalls. Standard VSync and framerates are restored immediately upon reaching the Main Menu.
    • Increased GPU async upload buffer to 64 MB and frame timeslice to 16 ms (QualitySettings.asyncUploadTimeSlice, QualitySettings.asyncUploadBufferSize), speeding up texture and mesh streaming.
    • Suppressed over 2,200 redundant Fixed AudioMixerGroup debug logs, eliminating thousands of disk writes and SQLite transaction bottlenecks during startup.
    • Accelerated Unity's async prefab instantiation integration time (AsyncInstantiateOperation.SetIntegrationTimeMS) from 4 ms to 16 ms for up to 4x faster dungeon and spare prop generation.
  • Level Preparation Timeout Fix:
    • Intercepted LevelGenerator.PrefabLoadCheck to prevent the vanilla 120-second TimeoutException ("prefab preparation took too long...") from aborting games back to the main menu when using large custom map packs.
  • Illagers Totem Delay Compatibility:
    • Resolved Harmony reflection AmbiguousMatchException on PhysGrabObjectImpactDetector.DestroyObject.

1.0.1

  • Totem Exit Delay Guard: Added explicit method resolution for multi-mod Harmony patches targeting destructible objects.
  • SADmodelfix Directory Guard: Automated safe preloader directory verification to prevent DirectoryNotFoundException.

1.0.0

  • Initial Release.
  • Added in-memory compatibility overloads for PlayerController.OverrideSpeed, PlayerHealth.Hurt, PostProcessing.VignetteOverride, ParticleScriptExplosion.Spawn, PhysGrabObjectImpactDetector.DestroyObject, PlayerVoiceChat.OverridePitch, ChatManager.PossessChat, and PlayerAvatar.Spawn.
  • Added dynamic name resolution in REPOLib for duplicate valuable prefabs to prevent registration collisions.
  • Protected StatsManager.LoadGame with a recovery finalizer to ensure clean save loading and private lobby hosting.