-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Note: We are planning to migrate the wiki page to here.
Current Version: 0.7.2
Authors: Kanisuko / QinShenYu
BepInEx GUID: com.kanisuko.scavlib
ScavLib is a foundational developer-focused API and utility library for Scav Prototype (a.k.a. Casualties Unknown). It provides safe, well-documented wrappers around the game's core systems so mod authors can focus on their features rather than boilerplate and null-checking.
Note for players: This is a dependency library. It adds no content on its own and is only needed if another mod requires it.
- BepInEx 5.x (64-bit recommended)
- Scav Prototype (Steam)
- Optional: KrokoshaCasualtiesMP — if present, ScavLib's compatibility bridge activates automatically. See Multiplayer Compatibility.
| Page | Description |
|---|---|
| Getting Started | Installation and your first mod |
| PlayerUtil | Player vitals, state queries, drugs, last-stand, writes, and inventory |
| LimbUtil | Per-limb health, bleeding, infection, and bone state |
| SkillUtil | Skill levels, XP, global multiplier |
| ItemUtil | World-space item scanning and manipulation |
| CustomItemRegistry | Register custom items with CustomItemBuilder
|
| RecipeBuilder | Register custom crafting recipes |
| CustomLiquidBuilder | Register custom liquid types |
| i18n | JSON-driven localization for custom items, buildings, moodles, and free-form strings |
| SaveCompanionFile | Per-instance persistence for custom items without touching the vanilla save format |
| Multiplayer Compatibility | KrokoshaCasualtiesMP bridge: spawn, sync, validation, save dir |
| EventBus | Event-driven mod patterns + GetHandlerCount diagnostics |
| CommandRegistry | Custom developer console commands + scavlib check
|
| GUI | uGUI + IMGUI menus |
| ConfigManager | BepInEx config wrappers |
| ModRegistry | Mod metadata, ModSession, and VersionedDependency
|
| Lifecycle System | IModLifecycle, world events, and mod callbacks |
| Changelog | Version history |
-
Multiplayer compatibility (Krokosha MP). New
compat/krokmp/bridge fixes custom-item sync, dedicated-server/spawn, and the validation-loop spawn bug. Companion save files automatically follow the active MP save directory. See Multiplayer Compatibility. -
JSON-driven localization. The
ScavLib.i18n.LocaleManagerAPI replaces the oldScavLib.locale.LocaleRegistry. Drop alang/EN.jsonnext to your DLL, callLocaleManager.AutoRegister(...)once inAwake(), and language switches at runtime stay in sync. ATranslationTemplateGeneratorproduces and incrementally merges template files. See i18n. -
Save companion files. New
ScavLib.savenamespace lets custom items persist per-instance state in a JSON sidecar — no risk of corrupting the vanilla save format. See SaveCompanionFile. -
Spawn / registry hotfixes. Deferred-Awake clone path in
UtilsCreatePatch(custom liquid containers no longer lose their default contents); ledger-first collision check inCustomItemRegistryfixes cross-run re-registration;SetTags()invoked on every customItemInfosoItem.Startno longer NREs onStats.HasTag(...). -
Build / tooling. Target framework upgraded to .NET Framework 4.8
with
<LangVersion>latest</LangVersion>.
See the Changelog for the full list and migration notes.
After placing ScavLib.dll in BepInEx/plugins/ and launching the game,
open the developer console and run:
scavlib status
You should see ScavLib's version, authors, and all registered mods. Mods
registered with a lifecycle object are annotated with [F].
For a deeper diagnostic — Harmony patch status, registered command ownership, conflict detection — run:
scavlib check