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.
Scratching never gives you credits directly. An unsold scratched ticket is worth nothing until it's sold.
| Chance | Payout |
|---|---|
| 50% | $0 |
| 20% | $25 |
| 10% | $50 |
| 7% | $100 |
| 5% | $250 |
| 4% | $500 |
| 3% | $1000 |
| 1% | $5000 |
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 the lotteryticket asset bundle into
BepInEx/plugins/ (a subfolder is fine).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..8.Amount |
0/25/50/100/250/500/1000/5000 | Payout per tier. |
| Prize Table | Tier1..8.Chance |
50/20/10/7/5/4/3/1 | 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 mod needs a Unity asset bundle (the ticket's model + Item asset) that can't be generated from C# alone. See docs/ASSETS.md for the step-by-step Unity guide. Until the bundle exists the plugin still loads and logs — it just won't register the item.
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/ # put the built `lotteryticket` bundle here (+ deployed)
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).