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

Details

Date Uploaded
Downloads
1.2K
Size
132KB

SimpleLobby

Written by Claude & Chonk

Your Lethal Company v81 lobby: whitelist, bans, the lobby guard, a host-side firewall against forged game requests, late join, the crew list fix, /lobby, and a scrap guard against client mods that report the interior's scrap to the lobby.

Host only. Only the host needs it. Everyone else can join with no mods at all, and vanilla players never notice it. A whitelisted friend who also has it gets a couple of extras (below).

New in 0.1.0: split out of SimpleSell. All of this used to be part of SimpleSell (up to 0.1.39). It is the same code with the same settings; SimpleSell 0.1.40 is selling, buying and organizing only. Your settings come across by themselves (see Coming from SimpleSell).

Commands

Command What it does
/players Lists players, flagging anyone running networked mods
/kick <name> Kicks a player
/guard warn|kick Whether abuse reports (mass spawns, desk beams) warn you or kick; mods always pass
/guard scrap on|off|log|warn|kick The scrap guard (below)
/ban <name or steam id> Bans permanently by Steam ID, so a name change doesn't get around it. A name works even after they leave (from the join log), and a numeric profile link works too
/unban <name or steam id> Lifts a ban
/bans Lists bans
/whitelist add|remove <name> Lets a trusted friend run some commands too (see below)
/lobby status Tag, visibility, and what Steam reports about whether someone can join
/lobby public|friends|private Changes who can find the lobby
/lobby name <name> Renames the lobby
/lobby hide|show Hides or shows the modded tag in the lobby browser
/lobby late on|off Lets someone join after the game has started, while you're in orbit
/lobby invite Opens Steam's invite window for the lobby (works after the game has started)
/lobby log [name|file] Last notable lobby events (blocks, kicks, bans, joins), one player's, or the log file's path

Whitelisted friends

Whitelisted players can run stock, time, overtime (/ot), gear, organize, merge, buy and credits from normal chat, with no mods on their side. You can change that list with WhitelistedCommands in the config. Those are SimpleSell's commands: the whitelist lives in SimpleLobby and SimpleSell asks it, so one /whitelist covers both (and SimpleHQ's bank). /buy works for them before the game has started too, and spends the ship's credits.

If they also have SimpleLobby installed, whitelisted players can:

  • pull the lever to start the game before you've started it this session. Normally only the host can do that. The host still checks they're at the lever, in the ship, in orbit.
  • move equipment before the game has started: anything that isn't scrap, plus your gear list (e.g. the shotgun). Scrap stays locked until the first landing, as in vanilla.

The host gets the same pre-start equipment allowance. Without SimpleLobby, the friend's own game keeps the lever and pre-start pick-ups locked; their commands still work. /whitelist add|remove applies at once to someone who's connected.

During a SimpleHQ tournament every player may pick things up before the lever (SimpleHQ allows it so teams can stage their kit), and SimpleLobby doesn't refuse those pick-ups. The lever rule is unchanged.

If their / commands don't work, another chat mod on their machine is probably grabbing them. They can type ! instead: !stock, !merge.

Late join

Off by default, and off again every time you start the game. Type /lobby late on and friends can join your running game whenever the ship is in orbit. The lobby closes when you pull the lever and opens again when you're back in orbit. Bans, kicks and version checks still apply. Never while SimpleHQ tournament mode is on.

The game drops its Steam lobby the first time you land. If that has happened, SimpleLobby opens a new Steam lobby for the game you're already hosting: same name, same privacy and same version. Friends can find it in the lobby list (public lobbies), use Join Game on your Steam profile, or be invited with /lobby invite, which opens Steam's invite window. The game's own invite button is greyed out once the game has started. To turn this off, set [Lobby] ReopenSteamLobby = false.

The joiner arrives in the ship, alive, with the current credits, quota, deadline and moon. If they have SimpleLobby installed, they can pick things up and pull the lever right away. Without it, the game won't let them pick up items until the first landing. Joining while landed isn't possible: the joiner's game would have no moon interior. Someone who tries then is told to wait until the ship is back in orbit.

A late joiner can show up as "unknown" to other players, and see them as "unknown" too, unless they're Steam friends. You as the host always see real names. Players who have SimpleOptimize see real names as well.

Safer joins (0.1.37). Two people joining at the same moment can no longer both get the last slot and crash the lobby for everyone. Someone who still gets through with no slot left is turned away with "Lobby is full!", and only them. A joiner whose connection gets stuck (the game can't send them the world, or they take more than 45 s) is disconnected so they can try again, instead of being retried forever. Config [Lobby] ReserveJoinSlots, RefuseJoinWithoutSlot, DropStuckJoiners, StuckJoinSeconds, RepairJoinSync (all on). These protect every join, not only late joins.

The pause menu crew list only shows players who are really in the game. Without SimpleLobby it keeps the names of strangers who tried to join a public lobby and were turned away.

Joining one at a time (new in 0.1.6)

  • One join at a time. When several people join at once, the next one is let in only after the current joiner's game has reported in (its player info, held items and level). Up to [JoinQueue] MaxQueue (3) wait in line; to them it just looks like a slow "Connecting...". A joiner who hasn't reported in after JoinTimeoutSeconds (40) is disconnected so they can retry, unless they already have a player slot. In that case they count as joined.
  • The lever waits for joiners. Pulling the lever while someone is joining or waiting puts it back up and says so in chat. Pull it again once they're in. (BlockLeverWhileJoining)
  • One Steam lobby per session. The game used to leave its Steam lobby at the first landing. Now it is kept and only closed while you're on a moon, so late join reopens the same lobby ([Lobby] KeepSteamLobby).
  • Gap-in-slots fix. If someone in a lower player slot leaves, players in higher slots are now marked as present when the next person joins ([Lobby] FixSlotGaps). That was a vanilla bug.

Warn by default (0.1.8)

Regular modded traffic always passes. Players' own client mods (info mods, mods with their own network messages, big config-sync messages, chat or system lines their mods post) are never blocked, dropped, hidden, kicked, refused or banned, whatever any setting says. At most they get an info line in the log.

Every action setting defaults to Warn: [Lobby] GuardMode, [ScrapGuard] Action, and the new [Firewall] Action (Warn / Refuse / Ban). In Warn mode the firewall still checks everything and logs WOULD REFUSE / FORGED, warn mode, but lets every request through, sends no corrections or whispers and bans nobody. Move [Firewall] Action to Refuse to refuse impossible requests, or to Ban to also auto-ban (per BanForgedRpc, BanLeverlessStart, BeltBagStrikes). GuardMode = Kick only kicks for abuse reports (mass spawns, sell-desk beams, forged requests while auto-ban is off), never for plain modded traffic. Updating to 0.1.8 resets these settings to Warn once ([Migration] WarnDefaults018); after that your changes stay.

Always on, not a setting: your ban list, and the disconnect for malformed (crash) packets.

Firewall

Cheat menus don't need networked mods: they send the game's own requests directly. The host now checks who sent each one. Landing needs a lever pull from that player at the lever. Store items, unlockables, the cruiser and routes must be paid for at the terminal. Furniture moves and chat must come from the player they claim to be. Debug commands from other players are refused.

Default [Firewall] Action = Warn: everything below is only logged. With Refuse it is enforced; with Ban, a request no unmodded game can send (a faked player, a debug command, a landing when nobody pulled the lever) also gets the sender banned automatically by their real Steam ID, the same as /ban. Whitelisted players are never auto-banned. Price mismatches and spam are only refused and logged.

Items too: other players can only drop, place or deposit an item they're actually holding, pick up items within reach, and put them down near themselves, so client sell and teleport mods can't move anything. An item only goes on the sell desk if the desk accepted it. Anything stuck there anyway goes back on the ship by itself ([Firewall] DeskJanitor). Belt bags follow the game's own rule (non-scrap items only, 15 at most, into the bag in your hand); scrap sent into a bag anyway counts as forged, and anything a bag shouldn't hold is dropped back out for everyone ([Firewall] BeltBagVanillaRule). The first forbidden bag attempt only gets a private warning; repeated attempts ban ([Firewall] BeltBagStrikes, default 3). Lobby Guard can message a single player privately, which also works for players without mods. The host's chat box takes up to [Lobby] HostChatLimit characters (default 120), so longer /lobby name names fit. The game's lobby list shows only the first 40.

Look for [RpcFirewall] in the BepInEx log. Settings are under [Firewall] (Action, BanForgedRpc, BanLeverlessStart, LogAllowed, ...).

Join protection (new in 0.1.8)

Every network packet from another player is checked before the game reads it. Only a packet whose sizes don't add up (the kind that crashed a host on join) is dropped and its sender disconnected. What a well-formed packet contains is never judged, so players' own client mods (info mods like AutoScan, mods with their own network messages) are not kicked, refused or banned for that. Over Steam, the ID Steam reports for each connection is used for bans and the whitelist. A join without a Steam ID, or with a claimed ID that differs from Steam's, is only logged by default (warn); turn on the refusals if you want them. Look for [PacketGuard] in the BepInEx log. Settings are under [NetGuard] (PacketGuard, PreJoinMaxBytes, RefuseMissingSteamId, RequireLobbyMembership, both off by default).

Lobby log

Every lobby session is written to BepInEx/config/SimpleLobby/logs/<date>_<time>_<lobby>.jsonl, one event per line: joins and leaves with both Steam IDs, refused joins, kicks, bans, every firewall block, floods, command names (never chat text) and ship events. Only on your PC; nothing is sent anywhere. At most 5,000 lines per session; the newest 30 sessions (or 20 MB) are kept. /lobby log shows the latest events in chat.

Scrap guard

Mods like GeneralImprovements (ScrapLeft monitor), ShipLootPlus, DetailedScan or ScanFix tell their player how much scrap is left inside. The host can't stop those: every player's game already has every scrap item (the vanilla terminal scan counts them too), and those mods only read that and show it on their own screen. Hiding the scrap values isn't an option either: the one message that sends them also decides each item's look and the end-of-day total, so vanilla players would see the wrong grade and wrong models.

0.1.8: the scrap guard only notes, it never hides a line or kicks (players' own info mods are welcome). Its filters are off by default; turned on, they report to you privately. What it can see is a readout that goes through the host:

  • System chat lines from other players are limited to the three a vanilla game sends ("X joined the ship.", "X was left behind.", "[playerNumN] started the ship."). Anything else, like abu's AutoScan posting Inside: 23 ≈1450 to everyone, is noted. ([ScrapGuard] VanillaSystemLinesOnly)
  • Chat that's only a scrap readout (12 1450, what AutoTerminalScanClassic posts in its Everyone mode) is noted. ([ScrapGuard] BlockScrapReadoutChat)
  • Mods that ask the host first, like LCBridgeOverlay, get no answer and stay off; the guard names them.

Each catch is reported to you privately (Action = Warn, default) or only logged (Log). Kick acts as Warn since 0.1.8. Toggle in game with /guard scrap on|off|log|warn|kick. The host's own lines (every suite plugin's, including SimpleSell's /briefing live) are never checked.

Mod (downloads, Oct 2026) How it gets its numbers Stopped?
GeneralImprovements (3.2M) ScrapLeft ship monitor (off by default); counts items on that player's machine, approximate value by default No: own screen only
GoodItemScan (692k) Totals the items its own scan reaches No: own screen only
DetailedScan (675k), ScanFix (488k), Better Terminal Scanner (19k) Terminal command on that player's machine No: own screen only
ShipLootPlus (567k) Moon loot value on its own display No: own screen only
QualityCompany (70k) Scan module on that player's machine; its networked parts need the host to run it Scan: no. Network parts: already dead without the host
BetterTotalScrap (78k) End-of-day screen No (and it's after the day)
abu AutoScan (5.6k) Posts the count to everyone as a system line; off on clients by default (HostOnly) Noted to the host (line shown)
AutoTerminalScanClassic (3.4k) Posts "count value" in chat in Everyone mode (default: only to self) Noted in Everyone mode (line shown)
ScrapCounter (0.9k) HUD on that player's screen No: own screen only
LCBridgeOverlay (1.2k) Asks the host for permission first Already off without the host; the guard names it

Info that a vanilla player can't have (new in 0.1.6)

The terminal's scan tells you the interior's scrap count and value, and which outside enemies are there right now. Sharing that in chat is fine. A chat or system line from another player that carries more than that is noted to you (0.1.8: never dropped; off by default): the interior type (Facility, Mansion, Mineshaft or a modded interior), inside enemy counts or lists, where scrap, exits, the apparatus or keys are, outside enemy counts that match no scan they could have made from the ship, and lines that pose as the system, the host or another player ([Host], [Server], [Briefing], Name:). Only automated-looking lines count (labelled readouts, the same shape repeated, or right after landing). Nobody is kicked for it. Switch: [ScrapGuard] BlockInfoLeakChat (off by default).

Coming from SimpleSell

The first time SimpleLobby runs it copies, from local.simplesell.cfg, every [Lobby] and [Firewall] setting and [General] CommandPrefix into local.simplelobby.cfg: whitelist, bans, guard mode, WhitelistedCommands, the alt prefix, the host chat limit, every firewall switch. Same section and key names. SimpleSell.playerlog.txt (the join log /ban uses for people who already left) is copied to SimpleLobby.playerlog.txt. SimpleSell's own file is only read; its old lines stay there, so going back to SimpleSell 0.1.39 still has them. [Migration] ImportedFromSimpleSell = true marks it done.

DeskGuardRange exists in both: SimpleLobby's item firewall uses its copy; SimpleSell's desk-beam check (used when the item firewall is off) uses [Selling] DeskGuardRange. AutoReturnBeamedItems and /return stayed in SimpleSell.

SimpleSell 0.1.39 or older still contains all of this. If one of those is installed, SimpleLobby does nothing at all (no patches) and says so once in chat, so nothing runs twice. Use SimpleSell 0.1.40+.

Without SimpleSell, SimpleLobby works on its own. The pre-start equipment allowance then covers non-scrap items only (SimpleSell's gear list adds scrap like the shotgun), and desk refusals go back to the ship through the desk janitor instead of /return.

Defaults worth knowing

  • Everything defaults to Warn. Players running networked mods are only logged (info), never flagged or kicked. /guard kick kicks for abuse reports only; [Firewall] Action (Warn / Refuse / Ban) enforces the firewall.
  • The modded tag is hidden by default (HideLobbyModTag = true), so your lobby looks vanilla in the browser. Use /lobby show to turn that off.
  • Late join is off at every launch. /lobby late on when someone needs it.
  • The scrap guard is on, in warn mode.

Everything is configurable in local.simplelobby.cfg.

Install

Drop SimpleLobby.dll into BepInEx/plugins, or install with a mod manager. Requires BepInEx 5.4.2100. Works with or without SimpleSell (0.1.40 or newer).

Optional: with LethalConfig installed, SimpleLobby's settings show up in its in-game config menu. It is not required and not a dependency; without it SimpleLobby loads and works exactly the same.

Credits

Joining one at a time, the lever lock while players join, keeping one Steam lobby for the session and the gap-in-slots fix are ideas from LobbyControl by tinyhoot and mattymatty (https://github.com/mattymatty97/LTC_LobbyControl), used under the MIT License:

Copyright (c) 2023 tinyhoot, mattymatty

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SimpleLobby's versions are written from scratch for SimpleLobby; no LobbyControl code is copied.

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