ExplosiveSprayPaint
Adds a configurable chance for spray paint cans to rupture explosively when shaken.
模組介紹 作者原文
ExplosiveSprayPaint
A BepInEx/Harmony mod for Lethal Company that gives every spray paint shake a host-authoritative chance to rupture the can.
Default behavior:
- 5% chance for a normal rupture when shaking a spray paint can.
- 0.5% chance for a catastrophic rupture, rolled before the normal chance.
- The ruptured can is deleted immediately.
- The blast is small and non-instant-kill by default, but it can finish off already low-health players.
- Nearby enemies and players take modest damage.
- Paint splats are spawned around nearby floors and walls using the current spray can color when it can be resolved.
- Visual particles, vanilla explosion effect/sound, optional camera shake, and a HUD tip are played client-side.
- Only the host/server rolls the explosion chance and applies damage/despawn logic.
Build
Install BepInEx for Lethal Company, then set LETHAL_COMPANY_DIR to your game folder before building:
$env:LETHAL_COMPANY_DIR=""
dotnet build -c Release
If you build from a mod manager profile, point BEPINEX_PROFILE_DIR at that profile so the project uses its installed BepInEx pack:
$env:LETHAL_COMPANY_DIR=""
$env:BEPINEX_PROFILE_DIR=""
dotnet build -c Release
If no local BepInEx core folder is found, the project falls back to NuGet compile references for BepInEx/Harmony.
The compiled mod DLL will be in:
bin\Release\ExplosiveSprayPaint.dll
Copy it into:
BepInEx\plugins\ExplosiveSprayPaint\
Config
The config file is generated at:
BepInEx\config\.cfg
Important entries:
- ExplosionChancePercent: default 5
- CatastrophicExplosionChancePercent: default 0.5
- EnableScreenShake: default true
- EnableHudNotification: default true
- GlowInTheDarkPaint: default true
- EnableFunnyExplosionPhysics: default false
- EnableRuntimeWatcherFallback: default true
- RuntimeWatcherSceneScanIntervalSeconds: default 0.75
- NormalPlayerDamage: default 20
- CatastrophicPlayerDamage: default 45
- NormalBlastRadius: default 4
- CatastrophicBlastRadius: default 8
- NormalPaintSplats: default 28
- CatastrophicPaintSplats: default 90
Compatibility Notes
The shake detector patches SprayPaintItem.ItemInteractLeftRight(bool right) and treats right == false as the shake action, which matches current Lethal Company modding practice. If a future game update changes the control mapping, adjust the condition in src/Patches/SprayPaintItemPatches.cs.
Spray paint color and decal prefab fields are partially private and may differ between game builds or spray-paint overhaul mods. SprayPaintIntrospection probes common field names first and falls back to renderer color/generated decals when needed.
Package Layout
Recommended release package:
ExplosiveSprayPaint.zip
manifest.json
README.md
CHANGELOG.md
icon.png
BepInEx/
plugins/
ExplosiveSprayPaint/
ExplosiveSprayPaint.dll
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: