Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
DynamicShipDoorHealth
Replaces timed ship door power drain and overheating with a 0-100% door integrity pool that monsters batter down to barge open, plus a solid closed-door NavMesh barrier.
By Zaliteam
| Last updated | a day ago |
| Total downloads | 37 |
| Total rating | 0 |
| Categories | Mods Server-side Tweaks & Quality Of Life AI Generated |
| Dependency string | Zaliteam-DynamicShipDoorHealth-1.0.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
Dynamic Ship Door Health (Door Integrity & Monster Breach)
Replaces the ship hangar door's timed battery drain and overheat lockout with a dynamic structural integrity pool (0%–100%). Keep the door shut as long as you need—until outside monsters start battering it down and force it open.
Player Guide (Simple Overview)
What It Changes
- No More Idle Battery Drain: Closing the ship door no longer drains power over time or overheats the hydraulics. You can keep the door closed indefinitely while no monsters are attacking it.
- Monster Battering & Barge-Ins: When outside enemies get close to the closed ship door, they slam against it, draining the door's integrity percentage (
100%down to0%):- Heavy monsters (Eyeless Dogs, Forest Keepers, Earth Leviathans, Old Birds, Thumpers) break the door down quickly.
- Medium monsters (Masked, Baboon Hawks, Spiders, Nutcrackers, Butlers, Snare Fleas) deal moderate damage.
- Smaller / other outside monsters chip away at it slowly.
- Audio & Screen Shake Warnings: While monsters are hammering the door, you will hear metallic impacts and feel light camera shakes inside the ship.
- Door Breach: If integrity hits
0%, the door is violently forced open with a heavy screen shake and opening sound. - Slow Self-Repair & Instant Reset: When no monsters are near the doorway, integrity slowly recovers (
+5%per second). Opening or re-closing the door restores integrity to100%. - Solid Closed Doorway: Monsters cannot clip or pathfind through the closed doorway while attacking it.
- Orbit Safe by Default: When the ship is in orbit (
inShipPhase), this mod leaves vanilla door lock behavior alone unless paired with OrbitDoorsAndSpacewalk.
Configuration (BepInEx/config/com.khameli0n.dynamicshipdoorhealth.cfg)
| Section | Key | Default | Description |
|---|---|---|---|
ShipDoor |
ShipDoorInfinitePower |
true |
Disables timed door battery drain/overheat and enables dynamic door integrity + monster battering. |
ShipDoor |
EnableDoorwayEnemyBarrier |
true |
Spawns a solid collider and NavMesh carving obstacle across the closed doorway. |
Technical Details (For Developers)
- Plugin GUID:
com.khameli0n.dynamicshipdoorhealth - Target Framework:
netstandard2.1(BepInEx 5 / HarmonyX) - Multiplayer Note:
HangarShipDoor.Updateruns locally on each client; on breach (doorPower <= 0f), the host callsStartOfRound.SetDoorsClosedServerRpc(false)while non-host clients callStartOfRound.SetShipDoorsClosed(false). For identical door integrity numbers across all players, install on all clients.
Harmony Patches (DynamicShipDoorHealth.Patches.ShipDoorPatches)
| Target Method | Type | Behavior |
|---|---|---|
HangarShipDoor.Update |
Prefix |
Yields (return true) during inShipPhase after resetting overheated = false, doorPower = 1f, and deactivating the barrier. When landed (!inShipPhase), replaces vanilla update (return false): invokes SetScreenDisplay, forces overheated = false, buttonsEnabled = true, triggerScript.interactable = true, manages barrier visibility, scans enemies, applies DPS/regen, and updates doorPowerDisplay. |
StartOfRound.SetShipDoorsClosed |
Postfix |
When closed == true, resets doorPower = 1f, lastDisplayedMeter = -1, and sets doorPowerDisplay.text to "100%". |
StartOfRound.SetShipDoorsOverheatServerRpc |
Prefix |
Suppresses overheat server RPC (return false) when ShipDoorInfinitePower is enabled. |
StartOfRound.Start |
Postfix |
Resets cached scan state and creates DynamicShipDoor_EnemyBarrier if EnableDoorwayEnemyBarrier is enabled. |
StartOfRound.ShipLeave |
Postfix |
Resets cached scan timers/counters and deactivates DynamicShipDoor_EnemyBarrier. |
Mechanics & Constants
- Enemy Scan: Runs every
0.15sviaObject.FindObjectsOfType<EnemyAI>(), checking active, alive, outside enemies within6.5fmeters ofStartOfRound.shipDoorNode(fallback:outsideDoorPosition, thenHangarShipDoor.transform). - Damage Tiers (Normalized
doorPowerper second per enemy):- Heavy (
0.12f/s, ~8.3ssolo):enemyNamecontainsmouth,dog,forest,giant,worm,radmech,mech,crawler,thumper. - Medium (
0.07f/s, ~14.3ssolo):enemyNamecontainsmask,baboon,spider,nutcracker,butler,centipede. - Light (
0.04f/s,25.0ssolo): all other outside enemies.
- Heavy (
- Recovery & Feedback:
- Regenerates
doorPowerby+0.05f * Time.deltaTimewhencachedAttackingCount == 0while closed. - Plays a random
StartOfRound.shutDoorMetalclip every0.5swhile attacked, plusHUDManager.ShakeCamera(ScreenShakeType.Small)iflocalPlayerController.isInHangarShipRoom. - On breach (
doorPower <= 0f), callsPlayDoorAnimation(false), opens doors viaStartOfRound, playsopeningHangarDoorAudio, and triggersScreenShakeType.Big.
- Regenerates
- Doorway Barrier (
DynamicShipDoor_EnemyBarrier):- Child of
StartOfRound.elevatorTransformon layer"Room", positioned/rotated atshipDoorNode(oroutsideDoorPosition). - Components:
NavMeshObstacle(NavMeshObstacleShape.Box,carving = true,carveOnlyStationary = false,size = (3.2, 3.5, 0.8),center = (0, 1.5, 0)) and non-triggerBoxColliderwith matching bounds.
- Child of