LethalLibPrefabGuard

v1.1.0·Updated 2026-08-13

Prevents landing soft-locks by cleaning null prefabs/items from LethalLib registrations before StartOfRound.Start, and names the broken mod in the log.

About this mod Author’s original text

LethalLib Prefab Guard

Prevents the "ship stuck in the landing state" soft-lock caused by mods registering

broken (null) items or enemies through LethalLib.

The problem

LethalLib's StartOfRound.Start hook iterates its registered-prefab list before

running the game's own round-start logic. If any mod registered a null prefab

(common after game updates break old asset bundles), that loop throws and the

vanilla StartOfRound.Start never runs. Symptoms:

  • Ship stuck in the "landing" state forever — HUD works, nothing else does
  • Dark screen / unresponsive controls when loading in
  • Ship interior mods (e.g. wider/two-story ships) present but not applying,

with flickering or white-streak textures

What this does

Right before StartOfRound.Start, this guard:

  • Removes null entries from LethalLib's prefabsToFix list
  • Removes null entries from StartOfRound.allItemsList
  • Logs a CULPRIT: warning naming the mod that registered each broken

item/enemy (using LethalLib's own registration metadata), so you know what to

update or remove

If nothing is broken, it does nothing. Works with or without LethalLib installed.

Technical note

A Harmony prefix cannot guard against this: HarmonyX patches the original method

(innermost layer) while MonoMod On. hooks wrap outside it, so LethalLib's hook

throws before any prefix runs. This guard installs its own MonoMod hook after

LethalLib's, making it the outer layer.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
LethalLibPrefabGuard-1.1.0.zip
File size
8.4 KiB
SHA-256
fd1ea1fb8602793b753772cf3fad0f76ae864272d16b1de03e33f457573af13f
Stored at
2026-10-10 00:12