Lethal Company
This package has been deprecated and may no longer be maintained. We recommend looking for an alternative.
Install with App

Details

Latest version
1.0.1
Last Updated
First Uploaded
Downloads
189
Likes
1
Size
47KB
Dependants

LethalOptimizer

Report any issues in the Lethal Company Modding Discord! I will be more than happy to fix any issues you find. Its only one person making this mod and I can't really test all the time.

LethalOptimizer focuses on micro-optimizations not covered by other performance mods. It targets specific bottlenecks that cause stuttering during gameplay.

Features

  • Collision Component Caching - Caches PlayerControllerB lookups in quicksand/water triggers to prevent repeated GetComponent calls
  • String Allocation Optimization - Uses StringBuilder for scrap value formatting and clock strings to reduce GC pressure
  • Component Lookup Caching - Caches NetworkObject lookups during enemy and scrap spawning
  • Ship Item Collection - Uses HashSet instead of List.Contains() for O(1) lookups when collecting scrap

Configuration

A config file is generated at:

<game directory>\BepInEx\config\mrbub.lethaloptimizer.cfg

Available settings:

  • CacheCollisionComponents
    Cache PlayerControllerB lookups in collision handlers.
    Default: true

  • OptimizeStringAllocations
    Use StringBuilder for string formatting to reduce allocations.
    Default: true

  • CacheRepeatedLookups
    Cache NetworkObject lookups during spawning.
    Default: true

Compatibility

Compatible with LethalPerformance and other performance mods. This mod targets different optimizations that complement existing mods.

Installation

Drop the LethalOptimizer.dll into your game's BepInEx plugins folder:

<game directory>\BepInEx\plugins

Credits

Made with love by mrbub.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.