


A small, vanilla-feeling gambling scrap item for Lethal Company (V81).
The Lucky Lottery Ticket spawns rarely as scrap. You can sell it as-is for a few credits, or scratch it for a chance at a much bigger payout. The catch: scratching only reveals the prize and changes the ticket's scrap value — you still have to survive and sell it at the Company building to actually get paid.
Built as a real BepInEx + LethalLib mod with Unity Netcode multiplayer syncing, structured so more custom items can be added later.
No Unity required. By default the ticket is built entirely in code, so the mod works with no asset bundle and no Unity install — the model is just a simple gold "card" placeholder. You can later swap in a custom 3D model via an optional asset bundle (see docs/ASSETS.md).
Scratching never gives you credits directly. An unsold scratched ticket is worth nothing until it's sold.
| Chance | Payout |
|---|---|
| 25% | $25 |
| 25% | $50 |
| 18% | $100 |
| 12% | $250 |
| 8% | $500 |
| 5% | $1,000 |
| 3% | $2,500 |
| 2% | $5,000 |
| 1.5% | $10,000 |
| 0.5% | $25,000 |
An unscratched ticket is worth about $10–15 (configurable; like all scrap, the shown value is scaled by the moon's scrap multiplier).
Install with a mod manager (r2modman / Thunderstore Mod Manager) and these are pulled in automatically.
Use a mod manager and install the package, or manually:
LuckyLotteryTicket.dll and icon.png into BepInEx/plugins/LuckyLotteryTicket/.
(If you built a custom-model lotteryticket bundle, put it there too — it's optional.)Designed to play nice with scrap-management mods. In particular, LethalLevelLoader (and mods like LethalQuantities) can rebuild each moon's scrap pool from their own config, which would otherwise silently exclude any newly-registered scrap. To handle this, the mod re-injects the ticket into the moon's scrap pool right before scrap spawns — running after those mods — so it appears regardless of how the pool was built. On each landing you'll see:
Injected Lucky Lottery Ticket into 'Experimentation' scrap pool (weight 15).
(If the ticket is already in the pool, e.g. on vanilla/non-override setups, it's left alone — no duplicate.)
Config file: BepInEx/config/YourName.LuckyLotteryTicket.cfg (generated on first run).
| Section | Key | Default | What it does |
|---|---|---|---|
| Spawning | SpawnWeight |
15 | Spawn weight relative to other scrap (higher = more common). |
| Unscratched Value | MinValue / MaxValue |
12 / 18 | Raw scrap value range of an unscratched ticket (before moon scaling). |
| Scratch | ScratchDurationSeconds |
2.5 | Delay before the prize is revealed. |
| Polish | EnableSounds |
true | Play the scratch sound (local). |
| Polish | EnableJackpotAnnouncement |
true | Show the big jackpot banner to everyone. |
| Polish | AnnounceWinsToAll |
false | Announce normal wins to all players, or just the scratcher. |
| Polish | JackpotThreshold |
5000 | Prize at/above this triggers the jackpot banner. |
| Prize Table | Tier1..10.Amount |
25/50/100/250/500/1000/2500/5000/10000/25000 | Payout per tier. |
| Prize Table | Tier1..10.Chance |
25/25/18/12/8/5/3/2/1.5/0.5 | Relative weight per tier (don't have to sum to 100). |
See docs/BUILDING.md for the full setup (install the .NET SDK,
drop LethalLib.dll into libs/, then dotnet build). The build auto-runs NetcodePatcher
so the multiplayer RPCs work.
No Unity is needed: the item is built in code. If you later want a nicer custom model,
build an optional asset bundle named lotteryticket (see docs/ASSETS.md)
and the mod uses it automatically instead of the code-built placeholder.
LuckyLotteryTicket/
src/
Plugin.cs # BepInEx entry point (loads config, assets, netcode, items)
PluginInfo.cs # GUID / name / version constants
Config/
LotteryConfig.cs # BepInEx config -> shared settings
Items/
LotterySettings.cs # plain shared settings (also used inside Unity)
LotteryTicketItem.cs # the item behaviour + multiplayer logic (also used inside Unity)
Registry/
ItemRegistry.cs # LethalLib registration (add future items here)
Assets/
Bundles.cs # asset bundle loader
assets/ # OPTIONAL custom-model bundle goes here (not needed by default)
thunderstore/ # Thunderstore packaging (manifest/icon/readme + tcli config)
docs/ # BUILDING.md, ASSETS.md
libs/ # local LethalLib.dll (you download this; not redistributed)
manifest.json # Thunderstore manifest
icon.png # 256x256 package icon (placeholder included)
CHANGELOG.md
README.md
The structure is built to grow. To add e.g. a Security Keycard, Hard Drive, Company Credit Card, Coffee, or Scanner Drone:
Item asset into the same Unity asset bundle.GrabbableObject subclass in src/Items/.Register...() call in src/Registry/ItemRegistry.cs.ItemRegistry.LoadAndPrepare(...) already handles the repetitive wiring
(load → fix mixer → register network prefab).