You are viewing a potentially older version of this package. View all versions.
Chonkzilla-SimpleOptimize-0.1.2 icon

SimpleOptimize

Per-player FPS optimizer for hoard runs (/opt): item sleeper, shadow killer, culling

Date uploaded 3 weeks ago
Version 0.1.2
Download link Chonkzilla-SimpleOptimize-0.1.2.zip
Downloads 18
Dependency string Chonkzilla-SimpleOptimize-0.1.2

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

SimpleOptimize

Performance work and quality-of-life fixes for Lethal Company v81, built for hoard-scale runs where hundreds of collected items tank the frame rate.

Anyone can install it. Almost everything is local to the machine running it, with no effect on sync or on other players. The exceptions are called out below.

Round docs in docs/SO_ROUND*.md.

Commands

All commands are typed in the in-game chat.

Command What it does
/opt (/optimize) Status: sleeping count, de-shadowed count, culled count, frame time / FPS, and which toggles are on
/opt sleep on|off Item sleeper
/opt snap on|off Instant settle for items dropped aboard
/opt shadows on|off Shadow killer
/opt cull on|off Distance culling of aboard items
/opt yeet on|off Cruiser launch-on-entry fix
/opt spray Spray colour status, and how many colours this prefab has
/opt spray <index> Use one of the game's own spray colours
/opt spray #RRGGBB Tint the spray an arbitrary colour (e.g. /opt spray #20B2AA)
/opt spray off Back to the vanilla seeded colour
/opt dropship Cargo dropship status and the speed table
/opt dropship on|off Fast cargo dropship
/opt dropship speed <1-4> 1 = vanilla (40s), 2 = 20s, 3 = 13s, 4 = 10s to arrive
/opt dropship wait on|off Hold the dropship until someone opens it
/opt transit on|off Fast player-ship landing/takeoff (off by default)

/opt cargo and /opt paint work as aliases for dropship and spray.

Every command also works with ! — !opt, !opt spray #FF69B4, and so on. Use it if /opt replies "unknown command": that message comes from another chat-command mod claiming every / line before SimpleOptimize sees it. Those mods ignore !.

Every toggle persists to local.simpleoptimize.cfg.

Performance

  1. Item sleeper — vanilla rewrites every un-held item's transform every frame, forever. Settled items aboard skip that update entirely and wake instantly when grabbed, moved, or used.
  2. Shadow killer — resting items stop casting shadows, restored when picked up or taken off the ship. Hundreds of shadow casters is the single biggest GPU cost of a hoard.
  3. Instant settle — a falling item can't sleep, so after a big merge or organize hundreds of items animate their descent for seconds. Items dropped aboard fast-forward to their resting spot and sleep the same frame. Items dropped outside fall normally.
  4. Distance culling — while you're farming away from the ship, aboard items stop rendering past CullDistance (45 m) and come back as you approach.

Cargo dropship

Vanilla makes you wait 40 seconds for a terminal order to arrive and leaves after 30 seconds whether or not you opened it — and if it leaves unopened you lose the items and the credits ("Items missed! ... delivery fee cannot be refunded").

SimpleOptimize speeds up the arrival and, by default, holds the ship until someone opens it so a paid order can't be missed. Once opened, it leaves at the chosen speed.

Host only. The countdown is host-authoritative, so only the host needs this installed. Vanilla clients see the early arrival with no desync.

Spray paint colour

Vanilla rolls a can's colour from the map seed. /opt spray overrides it.

Local visual. The colour never travels in vanilla netcode, so players without SimpleOptimize always see the original seeded colour — for the same cans and the same decals. Nothing desyncs; you simply disagree on colour.

Players with SimpleOptimize get the host's colour pushed to them automatically, on connect and whenever it changes. Set [Spray] AcceptHostColor = false to keep your own.

Palette mode always works. A custom hex tint depends on the decal shader exposing a colour property — if it doesn't, the command says so rather than silently doing nothing.

Already-sprayed decals keep the colour they were painted with; only new spray changes.

Vanilla bug fixes

Fix What it does
Cadaver kill lag Vanilla throws an exception per plant killed (logged twice with stack traces) plus ~5 debug lines. A spray spree becomes an exception storm — 2,110 traces and a 24 MB log in one measured session.
Spider web slow RemoveWeb uses the wrong inverse factor and cleans up twice, leaving you permanently slower after every web broken while you're in it. Compounds.
Stuck interact A lost RPC leaves throwingObject true forever, blocking interact, scroll, and item use — the "relog to fix" glitch. Watchdog clears it after 2 s.
Cruiser yeet Arriving inside the cruiser's bounds (teleport, TZP) launches you; you get ghosted instead.
Ship item cap Raises the v81 save cap of 400 items.
Early grab Makes items grabbable before the game starts.
RPC error spam Mutes vanilla's ThrowObjectClientRpc error flood from desynced client drops.
Magnet lag When the cruiser magnets to the ship, vanilla logs three lines for every item within 25 m — ~700 log writes per magnet with a big hoard, measured at 772 ms. Skipped.
Weed killer error flood If the plant or mold you're spraying is destroyed first, vanilla throws an error every frame until you stop — 25,691 in one measured session. Now fails once.

The log floods add up over a session, which is why lag can creep back after a few runs and vanish after a restart.

Fast player-ship transit (off by default)

Speeds the player ship's own landing and takeoff sequences. Off — it exists for completeness and is not what the dropship feature does.

Needs everyone. These sequences run locally on each client, so it only engages when every player in the lobby has SimpleOptimize (or you're solo). The suite handshake detects this automatically and disables itself when someone joins without it.

Install

Drop SimpleOptimize.dll into BepInEx/plugins, or import the package with a mod manager. Requires BepInEx 5.4.2100. Everything is toggleable in local.simpleoptimize.cfg.

CHANGELOG

Changelog

0.1.10

  • Fixed: putting something in a belt bag left a ghost copy behind, on the ship and at the Company. The game animates an item into a bag by writing its target position every frame and letting the item's own update apply it; the ship-item optimizer was skipping exactly that update, so the item went in and the picture stayed put. Items in a bag, or on their way into one, are never slept now.

0.1.9

  • The startup line no longer counts SimpleBuy: its commands are part of SimpleSell now.
  • Spray colours are per player now. Everyone running SimpleOptimize sees each player's own colour on the marks that player sprayed, instead of the host's colour for everything. Vanilla players are untouched: they see the game's seeded colour, as always. Set yours with /opt spray #RRGGBB and it follows you into any lobby where the others run SimpleOptimize.

0.1.8

  • Fixed: cruiser cargo floating next to the ship. Items in a magneted cruiser are kept in place by the game writing their position every frame, and the item sleeper was skipping that, so cargo drifted loose during the flight and hung in the air at the next landing. Cruiser cargo now only sleeps while the truck is unmagneted (driving around on a moon), and items are only snapped into place when they're parented to the ship itself.

0.1.7

  • The fast cargo dropship only works at the Company now. On a moon, deliveries arrive at vanilla speed, so ordering gear mid-run is no faster than the game intends. The "waits until opened" guard follows it, since it exists to protect fast deliveries. /opt dropship says which applies where you are.

0.1.6

  • Tournament mode (SimpleHQ): while a tournament runs, this mod's commands are off and its gameplay extras switch off, so the game plays as close to vanilla as possible. /opt is off, the cargo dropship goes back to vanilla speed and timing, and grabbing items before the game starts is reverted. The performance work and bug fixes stay on.

0.1.5

Fixed: a dead body could cost you frames for the rest of the day. A body's blood effect can be pointed at a mesh with no surface, and the game then warns about it every single frame: 57,398 lines in one measured session, each one written to the log and the console. That emitter is now switched off when it's spotted, which loses nothing, since it could never have drawn anything. Turn it off with [Fixes] FixZeroAreaParticleSpam.

0.1.4

Fixed: late joiners show up as "unknown". Names aren't sent between players; each game looks them up through Steam, and Steam only shares a name with friends or people in the same Steam lobby. Everyone leaves that lobby when the ship first lands, so someone who joins later (SimpleSell's late join) and the players already in the game can't see each other's names. Your game now asks Steam for any missing name and puts it on the player, the pause menu list and the radar. It fixes your own screen only, so every player who wants names needs SimpleOptimize. Turn it off with [Fixes] FixUnknownNames in local.simpleoptimize.cfg.

0.1.3

  • Credit line: written by Claude & Chonk.

0.1.2

Fixed: weed killer error flood. While you spray weed killer on a cadaver plant or mold, the game keeps track of which plant it's hitting. If that plant got destroyed first, by another player or the growth shrinking, the game threw an error every single frame until you stopped spraying. One measured session logged 25,691 of them.

Now the game forgets the destroyed plant right away, so it happens once instead of thousands of times. You can turn this off with [Fixes] FixWeedKillerIndexSpam in local.simpleoptimize.cfg.

These floods build up over a session, which is why lag could come back after a few runs and go away after a restart.

0.1.1

  • Commands now work with !. You can type !opt, !opt spray #FF69B4, and so on. If /opt replies "unknown command", another chat mod is grabbing / first, and those mods ignore !.
  • Fixed: magnet lag with a big hoard. When the cruiser attached to the ship, the game wrote three log lines for every item within 25 m. A few hundred items meant around 700 lines each time, measured at 772 ms. That logging is now skipped.
  • /opt also writes its numbers to the BepInEx log, so you can read them after a lag spike.

0.1.0

First release.

  • Better performance with big hoards: item sleeper, shadow remover, instant settle and distance culling.
  • Fast cargo dropship (/opt dropship) with speed levels, and an option to keep it waiting until it's opened so you can't miss an order.
  • Spray paint colour (/opt spray), shared with other players who have SimpleOptimize.
  • Bug fixes: cadaver kill lag, spider web slow, stuck interact, cruiser yeet, ship item cap, early grab and throw error spam.