LuckyLotteryTicket
A rare, scratchable lottery ticket scrap item. Scratch it for a chance at a payout, then survive and sell it at the Company building.
模組介紹 作者原文
Lucky Lottery Ticket
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).
How it plays
- Find a Lucky Lottery Ticket in the scrap on a moon.
- (Optional) While holding it, press Use to scratch it.
- Any player can scratch.
- There's a short delay (default 2.5s), then the prize is revealed.
- The host decides the prize, once. The result is synced to everyone.
- The ticket's scrap value becomes the prize amount. It can't be scratched again.
- Carry the ticket back and sell it at the Company to collect the credits.
Scratching never gives you credits directly. An unsold scratched ticket is worth
nothing until it's sold.
Default prize table
| 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).
Requirements
- BepInExPack (5.4.2305)
- LethalLib (1.2.0)
Install with a mod manager (r2modman Mod Manager) and these are pulled in
automatically.
Installation (players)
Use a mod manager and install the package, or manually:
- Install BepInEx + LethalLib.
- Copy LuckyLotteryTicket.dll and icon.png into BepInEx/plugins/LuckyLotteryTicket.
(If you built a custom-model lotteryticket bundle, put it there too — it's optional.)
- Launch the game. All players in a lobby should have the mod installed.
Multiplayer
- Any player can scratch a ticket.
- Only the host/server rolls the result (using the host's config), so the prize
can't be tampered with by clients and payouts can't be duplicated.
- The result and the new scrap value are synced to all clients via NetworkVariables, so
they also reach players who join after a ticket was scratched.
- A scratched ticket keeps its result/value if it's dropped, picked up by someone else,
or carried between rounds.
- Client config only affects that player's local display (sounds, whether they see
other players' results). Spawn weight, value, odds and payouts come from the host.
Compatibility
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.)
Configuration
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. |
| Poli
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: