
SoundAPI DunGen Fix
Fixes SoundAPI errors that can stop some Lethal Resonance sounds from playing. Tested on Lethal Company v81.SoundAPI DunGen Fix
Experimental compatibility patch for Lethal Company's separate DunGen assembly and loaforcsSoundAPI_LethalCompany 1.0.2.
The official SoundAPI extension references three DunGen types in Assembly-CSharp. In the installed v81 game those types live in DunGen.dll. This can cause TypeLoadException in dungeon reporting and interior-dependent sound replacement, including Lethal Resonance ambience.
This BepInEx 5 preloader patch adds three type forwarders to Assembly-CSharp in memory. It changes no game or mod files on disk and replaces no sounds. The original SoundAPI extension stays installed. Other old code referencing the same three types may also use these forwarders; this is not a general compatibility fix for other mods.
Status
Version 0.1.0 has passed metadata resolution, an executable .NET Framework forwarding test, and a solo in-game March test on v81 with the official, unmodified SoundAPI 1.0.2 DLL. In the comparison run with this patch disabled, both dungeon-reporting and audio-condition TypeLoadExceptions returned. With the standalone patch enabled, three type forwarders were applied, audio loading completed and neither error recurred. Other interiors and multiplayer have not yet been verified.
Installation
After publication, install through Thunderstore/r2modman and include this package in the shared profile. Until published, a normal share code will not distribute this local package.
For local testing, close the game and extract the archive's BepInEx folder into the chosen profile. The DLL belongs under BepInEx/patchers/SoundAPIDunGenFix. Keep all existing SoundAPI dependencies installed. Restore the official SoundAPI 1.0.2 DLL if you previously installed the direct DLL fix; otherwise a successful test cannot establish that this standalone patch is responsible.
Expected startup message: Added 3 DunGen type forwarders for legacy SoundAPI references (in memory only).
Land on March, enter the interior, spend several minutes listening to ambience, return to orbit and quit. Check that neither RoundManagerPatch.Reporting nor the audio condition evaluation throws TypeLoadException. Also test a different interior before broad distribution.
This is a local audio compatibility fix. Players need it for their own affected sound setup; installing it on the host does not repair other clients' audio. It is not a joining requirement.
Removal
Remove this package through the manager after publication, or remove its SoundAPIDunGenFix folder from BepInEx/patchers for a manual installation. No original files need restoring when removing this standalone patch.
Scope and safeguards
Only DunGen.RuntimeDungeon, DunGen.DungeonGenerator and DunGen.Graph.DungeonFlow are forwarded. Existing types and matching forwarders are left alone. Missing or incompatible target types/fields are rejected before modification. No separate DunGen.dll means the patch is skipped. No error messages are suppressed.
This does not fix Roomba networking, ChatCommands, item saving, every audio conflict, or unrelated missing dependencies.
Credits
SoundAPI is by loaforc: https://github.com/loaforcsSoundAPI/loaforcsSoundAPI.LethalCompany
This is an independent compatibility patch, not an official SoundAPI release or endorsement. Source for the patch is included under source/. No SoundAPI or game binaries are redistributed.