Lethal Company
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
Downloads
997
Size
120KB

LocalDeposit

V81 host-only QoL mod inspired by HQoL that reduces ship lag due to Dine being a big fat meanie lag machine

HQoL remains the recommended choice because it's recognized by the HighQuotaHQ community. LocalDeposit is an alternative for hosts who want similar deposit functionality without requiring other players to install the same modpack. If HQoL is installed, LocalDeposit's commands are disabled and HQoL takes precedence.

WARNING

Crashing or Alt+F4 removes all saved scrap into nothingness so keep a spare savefile when using this mod

How It Works

  • Physically deletes all scrap and convert them into stored value in terminal
  • Shows the total deposited value in blue in the terminal
  • Preserves item values
  • /undeposit happens at the end of the day or when quitting normally so the savefile saves the values

Commands

  • /deposit — Deposit scrap.

  • /deposit -b — Deposit with blacklisted items.

  • /deposit -a or /deposit --all — Deposit everything, ignoring the blacklist (Gift Boxes are still never touched).

  • /deposit --list or /deposit -l — List deposited items.

  • /deposit -t or /deposit --tools — Deposit extra tools (see Tool Deposit below).

  • /deposit --help or /deposit -h — Show command help.

  • /undeposit — Restore all deposited scrap (big amounts are restored in batches so the game does not freeze).

  • /undeposit -t or /undeposit --tools — Bring deposited tools back.

  • /undeposit -r (or --recover) — After a crash: review deposits found in the crash journal, then c to import them or d to cancel. --discard forgets them. See Safety features.

  • /save — Force a save. Orbit only.

  • /save -1 to /save -9 — Save into that slot (LCSaveFile1 ... LCSaveFile9). A slot that already has a save asks /c or /d first.

  • /save -9 -n:"Dine Save" — Same, with a name: creates LCSaveFile9 Dine Save in the save folder.

  • /broadcast (or /announce) — Turn short chat broadcasts on or off. Default off.

All commands are typed in the ship terminal. Chat commands are not used, so LocalDeposit never clashes with chat mods like QuickSell.

Confirming (c / d)

/sell, /merge, /undeposit -r and /save onto a slot that already exists never act straight away. They show a preview, like:

preview - nothing would be merged yet
Would merge 83 items into 1 Heartcontainer worth $50000.
confirm or deny type /c or /d in terminal

Type /c (or just c) to confirm, /d (or d) to deny, in the terminal. Any start of the word works: c, co, conf, d, de, deny. A waiting preview expires after 60 seconds and any new command replaces it. On confirm the command runs again against the ship as it is at that moment.

/deposit, a plain /undeposit, the tool commands and Merge Always run immediately.

Tool Deposit

/deposit -t keeps only a set amount of each tool on the ship and deposits the rest. /undeposit -t brings them back.

  • The list is in its own file, Crispy_Depression.LocalDeposit.ToolDeposit.cfg, one number per tool.
  • The ship keeps that number x 2. Example: Weed killer = 30 keeps 60. With 100 on the ship, 40 are deposited.
  • -1 skips a tool. Tools in hands, in pockets, on ship furniture, or with an empty battery are never deposited (a respawned tool would come back charged).
  • Nothing is deposited when a tool is at or under its limit.
  • Auto Undeposit Tools: deposited tools come back at the end of the day, so they are in the save while you are in orbit, even if the game closes. No setting for this.
  • /deposit -t -l lists deposited tools. Tools are never sold or merged.

Saving

/save forces a save the way LobbyControl's save does. It only works in orbit. Deposited items are put back on the ship first, like every normal save.

Merging

Combine lots of scrap into ONE item worth the total (great for Dine). Host only, terminal only, always available.

  • /merge — Merge all ship scrap and deposited scrap into one item.
  • /merge -o (--outside) — Also include loose scrap outside the ship.
  • /merge -a (--all) — Also merge blacklisted items.

Merge Item decides what everything becomes:

  • An item name like Heartcontainer (the default) or Zeddog: always that item, even if it isn't lootable on the moon. A wrong name uses Random.
  • Random: a random scrap from the ship. Never a blacklisted item, so 100 merged items never become a Gift Box, knife or shotgun.
  • TrueRandom: ANY scrap in the game, even blacklisted ones.

Gift Boxes are never merged away. /sell can also sell part of an item: with one item worth 50k, /sell 1000 puts a 1k item on the counter and the original drops to 49k (shown in the scan, or in the blue terminal total if it was deposited).

Merge Always = true merges automatically right before the end of every day (just before the game's autosave), with no confirmation.

Don't run TooMuchScrap's /merge alongside this one; both use the same command.

Selling (terminal only)

Sell at the Company, host only. Deposited scrap is included: anything deposited that gets chosen for a sale is undeposited first, then sold.

  • /sell quota — Sell just enough scrap to fulfil the remaining quota (exact if possible, otherwise the smallest overshoot).
  • /sell all — Sell all scrap.
  • /sell <amount> — Sell scrap worth at least <amount> (1500, 2k, 1k+500). You can do maths: + - * / and brackets, like 400+300-200 or (1k+500)*2. Amounts are what you receive after the Company's buying rate.
  • /sell item <name> — Sell every item whose name contains <name>.
  • Add -a or --all to ignore the blacklist (e.g. /sell quota -a).
  • /sell <amount> -o (or --overtime) — Sell LESS, because overtime makes up the rest. Example: quota 130, you want 1500: /sell 1500 -o sells about 1270 and the estimated overtime (about 230) brings you to 1500, or 1501 if exactly 1500 is not possible. Add -e to count the credits you already have. Overtime is an estimate ((fulfilled - quota) / 5 + 15 per day left); the game only pays it when the quota period ends, so do not sell more after this.
  • /sell bl / /sell pr — Show the blacklist / priority list.
  • /sell bl + [name], /sell bl - [name] — Add/remove a blacklisted item (no name = the item in your hands).
  • /sell pr + [name], /sell pr - [name] — Same for the priority list. Priority items are preferred when several combinations fit the amount.

/sell only exists in the terminal, so it works alongside QuickSell (which uses chat /sell). Scrap inside the Company Cruiser counts as ship scrap for /sell and /merge. Clients don't need the mod; they just see the items go to the desk and their credits update.

Config

Config files (in BepInEx/config): Crispy_Depression.LocalDeposit.cfg and Crispy_Depression.LocalDeposit.ToolDeposit.cfg

[Blacklist]
Items = ShotgunItem, KnifeItem, GiftBox

[Sell]
Blacklist = ShotgunItem, KnifeItem, GiftBox
Priority = FancyLamp, LungApparatusTurnedOff, Clock, EasterEgg, ComedyMask, Tragedy, Heartcontainer

[Merge]
Merge Item = Heartcontainer
Merge Always = false

[Chat]
Broadcast = false

[Debug]
LogItemIdentifiers = false

Crispy_Depression.LocalDeposit.ToolDeposit.cfg:

[Tool Deposit]
Boombox = 5
Flashlight = 5
Jetpack = 1
Key = 5
Lockpicker = 5
Pro-flashlight = 20
Shovel = 10
Stun grenade = 15
Extension ladder = 5
TZP-Inhalant = 15
Walkie-talkie = 10
Zap gun = 5
Radar-booster = 1
Shotgun = 5
Ammo = 5
Spray paint = 10
Kitchen knife = 3
Weed killer = 30
Belt bag = 5
  • Blacklist Items: /deposit skips these (-a ignores the list).
  • Sell Blacklist: /sell skips these (-a ignores the list). Defaults match QuickSell's.
  • Sell Priority: /sell prefers these when several combinations fit.
  • Merge Item: What /merge makes: an item name (default Heartcontainer), Random (random ship scrap, never blacklisted) or TrueRandom (any scrap, even blacklisted).
  • Merge Always: Merge automatically before the end of each day.
  • Broadcast: true = post short yellow results in everyone's chat, like Deposited 40 items worth 5200, Sold 12 items worth 1000 (overtime 231), Merged 100 items into 1 Heartcontainer worth 3000, Undeposited 131 items (toggle with /broadcast).
  • LogItemIdentifiers: Log every item name when a lobby loads, to find names for the lists.

Names are comma-separated and partial matches count. Use the prefab/object name of the item (KnifeItem, ShotgunItem, Clock, ...), the same names QuickSell uses; the asset name, display name and scan name also match. Everything else is fixed: saves always restore deposited items first, and a save that would miss deposited items is skipped.

Item identifiers were found using ShipSort alongside Unity Explorer.

Requirements

  • BepInEx 5.
  • Recommended: TooManyItems (vanilla only saves 45 ship items).

Safety features

  • Crash journal: deposits are mirrored to a small file next to the config (never in the save), together with a checklist of the tools on the ship (flashlights, shovels, ...). After a crash, /undeposit -r shows the checklist (journal vs ship now) so you can see whether the ship loaded back the way it was. Recovery only works when the ship has ZERO scrap: if there is even one scrap item on the ship, the items are probably already in your save, so it refuses rather than risk duplicates.
  • Version check: a warning appears if the game version is not the one this mod was built for (v81), and the log has a startup self-test of the game members it needs.

Known Issues

  • Undepositing thousands of items is done in batches, but can still cause some lag.
  • Avoid Alt+F4: Use ESC → Leave Game whenever possible.
  • Crashing while items are deposited does not restore them (see the warning above).
  • Do not use HQoL's deposit/storage feature alongside LocalDeposit. If HQoL is installed, LocalDeposit's commands are disabled.

For developers

  • tests/GuardTests — logic tests (planning, splitting, overtime, journal, config matching). dotnet run --project tests/GuardTests works without the game.
  • tools/compat-check.sh "<game folder>" — after a game update, compiles against a publicized copy of Assembly-CSharp.dll and tells you if a game member this mod relies on has changed.
  • .github/workflows/ci.yml runs the tests on every push. The mod DLL is built locally with ./build.sh "<game folder>".
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.