You are viewing a potentially older version of this package. View all versions.
Aueser-Error_Fix-0.0.4 icon

Error Fix

Defensive compatibility guards for common Lethal Company V81 runtime errors and modpack log spam.

Date uploaded 5 days ago
Version 0.0.4
Download link Aueser-Error_Fix-0.0.4.zip
Downloads 838
Dependency string Aueser-Error_Fix-0.0.4

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

Error Fix

Error Fix is a defensive compatibility plugin for Lethal Company. It is designed for modded profiles and modpacks where known runtime errors or repeated Unity warnings make logs difficult to read or interfere with narrow client-side flows.

The plugin adds targeted Harmony guards around specific failure paths. It does not rebalance enemies, change spawn tables, replace game systems, or intentionally alter normal AI behavior.

Current version: 0.0.4

Scope

Error Fix targets known stack traces, known exception types, and exact warning prefixes. In most cases it validates a reference or index before the original method uses it, skips one unsafe frame, or handles a known exception after the target method has already failed.

Unknown exceptions are left visible. This plugin is not intended to hide every error in a modpack.

Covered issue groups

  • Exact Unity warning spam for missing audio spatializer setup, BoxCollider negative scale/size messages, SteamValve empty AudioSource warnings, and duplicate Static Lighting Sky warnings.
  • Audio failures from disabled audio sources or null AudioClip playback.
  • Particle system warnings from unreadable or zero-area mesh shape sources.
  • Runtime NavMesh source errors from unreadable meshes.
  • Enemy AI movement attempts while a NavMeshAgent is off the NavMesh.
  • Selected Netcode edge cases involving ragdolls, object reparenting, despawn flow, and known RPC null/index failures.
  • Undefined PlayerRagdoll4+ tag lookups in high-player-count or heavily modded sessions.
  • Known item, suit, quicksand, entrance teleport, terminal, chat, ambience, jetpack, soccer ball, and enemy update exceptions.
  • Optional compatibility guards for selected third-party mods when the expected runtime types and method signatures are present.

Handled warnings are limited so recurring issues remain visible without filling the log.

0.0.4 focus

Version 0.0.4 keeps the same defensive scope as 0.0.3 while reducing avoidable runtime overhead and making warning handling easier to audit.

  • Known Unity warning filtering remains exact-prefix only and now reports a compact scene-transition summary of suppressed warning counts.
  • Netcode lifecycle warnings are not filtered.
  • ClientRpc exception suppression remains limited to generated Execute-stage handling, so send-stage RPC send errors continue to surface normally.
  • The experimental SteamValve damageTrigger spawn guard is disabled by default and only installs when explicitly set to Enabled.
  • Optional compatibility target discovery and hot exception finalizers do less work on normal paths.
  • Terminal object fallback initialization now has a retry cooldown for persistent missing dependencies.

Configuration notes

  • Sensitive guards use PatchEnableMode: Auto, Enabled, or Disabled.
  • Performance-sensitive global hooks, including global AudioSource.Play*, player-ragdoll tag lookup/setter hooks, the global UnityEngine.Object.Destroy hook, and particle mesh scene scans, require explicit Enabled.
  • KnownUnityWarningFilterMode=Enabled is the default. It filters only the documented exact Unity warning prefixes and does not repair the underlying audio, collider, AudioSource, or lighting setup.
  • SteamValveDamageTriggerSpawnGuardMode=Disabled is the default. Enable it only after confirming a SteamValve damageTrigger gameplay issue.
  • EnemyAI warp recovery is disabled by default; enable it only after testing the target profile.

Optional compatibility targets

These guards only activate when the relevant mod is installed and the expected runtime target exists. Error Fix does not include, redistribute, or modify third-party mod files.

Project Compatibility case
EnemyHealthBars Known health bar LateUpdate null-reference failures.
ShipLootPlus Known loot UI null-reference failures during ship unlockable sync and grab refresh.
ToggleableNightVision Known outdoor lighting null-reference failures during lighting updates.
ChatCommands Known host-start null-reference failure in ChatCommandAPI.

Installation

Use a Thunderstore-compatible mod manager, or install manually by placing the package contents in your profile's plugin folder.

For manual installation, the runtime file must be located at:

<profile>/BepInEx/plugins/V81ErrorFix.dll

Compatibility notes

  • Requires BepInEx 5.
  • Built for Lethal Company V81-era assemblies.
  • Best tested in heavily modded profiles where the listed errors are already present.
  • Large modpacks should test new releases in a separate profile before distribution.

Because this plugin uses Harmony patches, compatibility depends on game version, mod versions, and load order. If another mod rewrites the same method, behavior may depend on patch order.

Reporting issues

Please include enough information to identify the exact failing path:

  • Lethal Company version.
  • Error Fix version.
  • Full stack trace.
  • Mod list and mod loader version.
  • Whether the issue happened as host, client, or single-player.
  • Reproduction steps, if known.

Source

Source and documentation are available on GitHub:

https://github.com/Auuueser/Error-Fix

Attribution and redistribution

Error Fix is not affiliated with, endorsed by, or maintained by Zeekerss, Unity Technologies, BepInEx, Harmony, Thunderstore, or the authors of optional compatibility targets.

Third-party compatibility is implemented through runtime reflection guards only. This package does not include third-party source code, third-party DLLs, game assemblies, decompiled game source, or external mod package contents.

CHANGELOG

Changelog

0.0.4

Maintenance release focused on lower runtime overhead, clearer Unity warning handling, and stricter RPC safety boundaries.

Changed

  • Added exact-prefix Unity warning filtering for missing audio spatializer setup, BoxCollider negative scale/size messages, SteamValve empty AudioSource warnings, and duplicate Static Lighting Sky warnings.
  • Added a scene-transition summary for filtered Unity warnings so suppressed log volume remains visible without logging each repeated warning.
  • Kept Netcode lifecycle warnings outside the known-warning filter.
  • Changed the experimental SteamValve damageTrigger spawn guard to default Disabled; it now requires explicit Enabled.
  • Preserved ClientRpc exception suppression as Execute-stage only, so send-stage RPC send errors continue to surface normally.
  • Reduced optional compatibility startup and exception-path overhead through earlier target gating and cached target/signature data.
  • Reduced normal-frame overhead in hot finalizers by returning before known-safe classifiers are created when no exception was thrown.
  • Added retry cooldown for terminal object fallback initialization when dependencies remain unavailable.
  • Cleared cached entrance lookup state on scene lifecycle changes.

0.0.3

Maintenance release focused on safer high-risk guard behavior.

Changed

  • Hardened throw-object RPC recovery so partial state changes do not fall through into vanilla execution.
  • Added guarded owner cleanup for throw-object failure paths.
  • Added configurable lifecycle destroy window handling for scene transitions.
  • Narrowed player ragdoll body startup suppression to known ragdoll/player index contexts.
  • Improved terminal object initialization warning keys for unknown exception types.
  • Kept high-risk patch defaults conservative through verified-assembly Auto gating.
  • Kept EnemyAI warp recovery disabled by default.

0.0.2

A limited test release emphasizing safer runtime protections.

Changed

  • Player ragdoll tag handling now falls back only after Unity reports an undefined numeric PlayerRagdoll tag.
  • Null-reference suppression now requires each patch to identify a known safe failure path.
  • Voice playback refresh now prefers vanilla behavior and only uses fallback handling for known missing voice components or null-reference failures.
  • Suit update handling now lets vanilla run when synchronized suit data is valid.
  • Entrance teleport update guarding now uses verified game assembly defaults and preserves the existing hover tip instead of hardcoding replacement text.
  • EnemyAI NavMesh recovery now has config limits for enabling, warp behavior, warp radius, and host/server-only recovery.
  • Client-side ragdoll destroy protection now allows expected lifecycle destruction during shutdown, scene unload, and lobby transitions.
  • Particle mesh and warning caches are cleared during scene lifecycle changes.

0.0.1

Initial Thunderstore release.

Added

  • Defensive runtime guards for known Lethal Company V81-era null-reference and index errors.
  • Audio guards for disabled audio sources and null AudioClip playback.
  • Particle mesh shape guards for unreadable and zero-area meshes.
  • Runtime NavMesh source filtering for unreadable mesh sources.
  • General EnemyAI NavMesh fallback for agents that are off the NavMesh.
  • Netcode guards for selected ragdoll, reparenting, despawn, and RPC edge cases.
  • Player ragdoll tag guards for undefined PlayerRagdoll4+ lookups.
  • Optional compatibility guards for EnemyHealthBars, ShipLootPlus, ToggleableNightVision, and ChatCommands.
  • Warning limiting for recurring handled issues.

Notes

  • This release is defensive only and targets known stack traces.
  • Unknown exceptions are intentionally left visible.
  • Third-party compatibility guards use runtime reflection and do not include third-party mod files.