Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
ModpackFixes
Lightweight modular compatibility and bugfix patches for Lethal Company v81 modpacks, with soft-dependency detection so profile exports never force optional mods.
| Last updated | 17 minutes ago |
| Total downloads | 0 |
| Total rating | 0 |
| Categories | Bug Fixes AI Generated |
| Dependency string | Aqlow-ModpackFixes-0.1.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2304README
ModpackFixes
Lightweight, modular compatibility and bugfix patches for Lethal Company (v81) modpacks.
ModpackFixes is designed for players who share and maintain multiple r2modman / Gale / Thunderstore modpack profiles:
- Zero forced mod dependencies: Third-party mods are detected dynamically at runtime via
BepInEx.Bootstrap.Chainloaderand patched via reflection + Harmony. AddingAqlow-ModpackFixesto an exported profile will never force-install mods you removed in another profile. - Per-fix toggles: Every compatibility module has its own
[Fixes]toggle inBepInEx/config/dev.aqlow.modpackfixes.cfg(enabled by default). - Safe when target mods are absent: Modules whose target mods aren't installed automatically skip startup cleanly with a single log line.
Included Fixes (0.1.0)
1. DawnLib + Mirage Cloned EnemyType DawnEnemyInfo Repair
- Config key:
[Fixes] CopyDawnInfoToClonedEnemyTypes = true - Activates when:
TeamXiaolan-DawnLib(com.github.teamxiaolan.dawnlib) is loaded - Problem:
DawnLibinjectsIDawnObject.DawnInfo(DawnEnemyInfo) onto canonicalEnemyTypeassets during registry freeze. WhenMirage(qwbarch-Mirage) has masked enemy spawn control enabled on the host, it callsUnityEngine.Object.Instantiate<EnemyType>(maskedPrefab.enemyType)insideOn.TimeOfDay.Startto injectMaskedPlayerEnemy(Clone)across moons. Unity'sObject.Instantiateleaves the injected managedDawnInfobacking fieldnullon the clone, causingNullReferenceExceptionin mods that inspectSelectableLevel.EnemiesviaEnemyType.GetDawnInfo(). - Fix: Automatically copies
DawnEnemyInfoonto any clonedEnemyTypewhoseDawnInfoisnull(resolving the canonical donor viaenemyPrefab -> EnemyAI.enemyType, with a fallback lookup across loadedEnemyTypeassets) afterTimeOfDay.Start, beforeRoundManager.LoadNewLevel, and beforeRoundManager.BeginEnemySpawning.
2. FacilityMeltdown Host Ship Auto-Takeoff Desync Guard
- Config key:
[Fixes] GuardFacilityMeltdownHandleEnemies = true - Activates when:
loaforc-FacilityMeltdown(me.loaforc.facilitymeltdown) is loaded - Problem: In
FacilityMeltdown,MeltdownHandler.StartMeltdownClientRpc()callsHandleEnemies()on the server before settingmeltdownStarted = true. WhenHandleEnemies()encounters anEnemyTypemissingDawnEnemyInfo(such as Mirage'sMaskedPlayerEnemy(Clone)), it logs a warning without continuing and throwsNullReferenceExceptionon the host beforemeltdownStarted = true. Non-host clients tick downmeltdownTimerand see the ship take off automatically, while the host'sMeltdownHandler.Update()returns early forever until the ship lever is pulled manually. - Fix: Runs
DawnEnemyInfoclone repair immediately beforeMeltdownHandler.HandleEnemies()executes and wrapsHandleEnemies()with a HarmonyFinalizersafety net so an enemy-spawning error can never abortStartMeltdownClientRpc()beforemeltdownStarted = trueon the host.
Requirements & Installation
- Lethal Company: Tested on v81
- Mod Loader:
BepInEx-BepInExPack-5.4.2304 - Multiplayer Compatibility: Safe on both host and clients (recommended on at least the host; installs cleanly for everyone in shared
r2modmanprofile codes).
Install
Install Aqlow-ModpackFixes via r2modman, Gale, or the Thunderstore Mod Manager, or extract plugins/ModpackFixes.dll into BepInEx/plugins/Aqlow-ModpackFixes/.
Uninstall & Troubleshooting
Remove the package in your mod manager (or delete BepInEx/plugins/Aqlow-ModpackFixes/). Startup activation and skip logs are written to BepInEx/LogOutput.log under [Info :ModpackFixes].
Credits & Disclosure
- Built for Lethal Company using BepInEx 5 and HarmonyX.
- Compatibility research against
TeamXiaolan-DawnLib,qwbarch-Mirage, andloaforc-FacilityMeltdown. - AI Disclosure: Code, automated tests, and procedural package icon authored with GitHub Copilot (Gemini 4 Carbon).
- License: MIT.