Confirm with your password

Dive In

Diving underwater with configurable controls, Fast Swim, surface/midwater stamina regen, and depth drain. Configured creatures can chase and navigate underwater. Includes water combat/equipment, localized key hints, and improved underwater visuals.

Client & Server

· Website

Stars
5
Downloads
116
Version
1.2.3
Updated
Author
sighsorry
Virus scan
✓ Scan successful
Runs on
Client & Server
Required by
9 mods

Compatibility

Incompatible with 2

Do not run these in the same profile.
  • blacks7ar.VikingsDoSwim ·Not on Hexium
  • Searica.Valheim.UnderTheSea ·Not on Hexium

Description

DiveIn

DiveIn adds configurable diving and swimming for players and configured creatures in Valheim.

Normally, creatures cannot follow a diving player far below the surface. DiveIn lets configured creatures chase, patrol, and attack underwater while adding player depth controls, resource tuning, water combat, key hints, and underwater visuals.

Serpent chase

Underwater serpent chase

Player diving

  • Ascend and descend with configurable keyboard shortcuts or the corresponding gamepad controls.
  • Surface and midwater stamina regeneration are configured separately.
  • Idle underwater stamina drain and moving swim drain can scale with liquid depth.
  • Fast Swim supports press or toggle input, with separate speed and stamina multipliers.
  • Swim skill and encumbrance have independent speed multipliers.
  • Surface swimming retains the vanilla swim depth; DiveIn changes depth only while diving.
  • Attacking, secondary attacking, and guarding temporarily take priority over swim movement.
  • Player-owned underwater projectiles can use synchronized lifetime, speed, and damage multipliers on the initial launch. Child projectiles spawned by Projectile.SpawnOnHit keep the parent spawn logic's values without another DiveIn multiplier, so inherited damage and speed are not repeatedly reduced down the chain.
  • Equipment is usable in water by default; a synchronized prefab blacklist keeps restrictions on listed items without propagating armor or accessory entries to hand equipment. Listed hand items retain vanilla hand-item hiding.
  • Swimming key hints use the active keyboard or gamepad bindings and supported Valheim languages.

Creature diving

  • Configured creature prefabs stop avoiding water and can navigate underwater.
  • Passive creatures patrol within per-group minimum, center, and maximum depths.
  • Alerted creatures follow targets within their active depth limits.
  • Optional spawn-depth preservation prevents underwater spawns from first floating to the surface.
  • Optional shallow-water flee behavior makes a creature retreat until it clears the configured depth buffer.
  • Per-group avoidance steering can be disabled for prefabs that jitter with angled obstacle sampling.
  • Serpent movement retains the vanilla stopping distance and swoop movement while using DiveIn depth navigation.

DiveIn.yaml

The server/source-of-truth instance creates BepInEx/config/DiveIn.yaml when it is missing. Clients use the synchronized server value while connected.

# Unknown or duplicate keys are errors and keep the previous applied settings.
surface_patrol:
  passive_min_depth: 0
  passive_center_depth: 10
  passive_max_depth: 20
  active_min_depth: 0.25
  active_depth_adjust_speed: 2
  shallow_water_flee_depth: 0
  preserve_spawn_depth: false
  avoidance_steering: true
  prefabs:
    - Leech
    - Abomination
    - Serpent
    - BonemawSerpent

# Disable angled avoidance only for prefabs that need it.
mods_surface_nosteering:
  passive_min_depth: 0
  passive_center_depth: 10
  passive_max_depth: 20
  active_min_depth: 0.25
  active_depth_adjust_speed: 2
  shallow_water_flee_depth: 0
  preserve_spawn_depth: false
  avoidance_steering: false
  prefabs:
    - SA_WhiteShark

Rules:

  • A prefab may be assigned only once; the first assignment wins.
  • Missing optional fields use DiveIn defaults.
  • Negative and out-of-range depths are normalized and logged.
  • NaN, infinity, malformed YAML, unknown keys, and duplicate keys are rejected without replacing the last valid configuration.
  • A local YAML change is ignored while remote synchronized values are active.

BepInEx configuration

DiveIn creates BepInEx/config/sighsorry.DiveIn.cfg. That generated file is the source of truth for the complete setting list, descriptions, defaults, ranges, and synchronization markers. The README intentionally does not duplicate the generated configuration block, so code and documentation cannot drift independently.

The configuration is grouped into:

  • General server locking
  • Player controls and water equipment
  • Surface and midwater stamina/eitr regeneration
  • Idle, depth, base, and Fast Swim stamina drain
  • Swim skill, Fast Swim, and encumbered swim speed
  • Underwater projectile lifetime, speed, and damage
  • Underwater darkness and murkiness

The ascend key, descend key, and Fast Swim input mode are client-side. Settings marked [Synced with Server] are controlled by the server when configuration locking is enabled.

Building

dotnet build DiveIn.sln -c Debug

For a non-default Valheim installation, pass the game root explicitly:

dotnet build DiveIn.sln -c Debug -p:GamePath="D:\SteamLibrary\steamapps\common\Valheim"

A normal build writes only to the project output directories. To copy the merged DLL to the BepInEx plugin path derived from GamePath, opt in explicitly:

dotnet build DiveIn.sln -c Debug -p:DeployToGame=true

Change the release version with one explicit command:

dotnet msbuild DiveIn.csproj -t:SetVersion -p:ReleaseVersion=1.2.0

This updates both Plugin.cs ModVersion and the tracked Thunderstore/manifest.json. It does not build the project.

On Windows, dotnet build DiveIn.sln -c Release verifies that the compiled assembly, ModVersion, and the tracked manifest have the same version before creating the Thunderstore and Nexus archives. A mismatch fails the build before either ZIP is written.

Credits

The player diving implementation includes code derived and modified from UnderTheSea.

Original DiveIn repository: sighsorry1029/DiveIn

Changelog

1.2.3 Latest
  • Added compatibility with Valheim 1.0.7 by rebuilding against the original game assemblies and replacing publicized-only member access with cached, explicit Harmony accessors.
  • Fixed DiveIn initialization failing after ZRoutedRpc.Everybody became a constant by updating the embedded ServerSync compatibility build while preserving configuration locking, synchronization, and version policy.
  • Preserved Valheim 1.0 crown-fear movement priority for configured diving creatures, and hid DiveIn key hints while the new achievements panel is open.
  • Updated the packaged BepInExPack dependency to 5.4.2350. Configuration keys, DiveIn.yaml, and public behavior contracts remain unchanged.
1.2.2
  • Repackaged version 1.2.1 as 1.2.2 with synchronized plugin and manifest versions. No gameplay, configuration, or API changes.
1.2.1
  • Fixed additional moving swim stamina drain applying the global stamina-use multiplier twice when it differs from 1, while preserving vanilla stamina-use hooks and regeneration delay.
  • Applied underwater projectile penalties only to the initial launch. Child projectiles created through Projectile.SpawnOnHit keep the parent spawn logic's values without another DiveIn multiplier, preventing repeated damage and speed reductions down the chain.
  • Fixed drawing hidden hand equipment while input is blocked by chat, inventory, menus, or teleporting, and skipped item-name lookups when the water equipment blacklist is empty.
  • Reduced repeated key-hint formatting and underwater surface-material array allocations, and removed duplicate water-state checks within the camera postfix while preserving transition and restoration guards.
  • Avoided unnecessary monster prefab lookups outside water and stopped unrelated player configuration reloads from resetting monster steering memory.
  • Fixed English key-hint fallback for Valheim's unregistered localization-key format.

20 older entries, full version history & downloads →

Manual installation instructions
1

Install BepInExPack Valheim

BepInExPack Valheim is required to run mods in Valheim.

Download BepInExPack Valheim 5.4.2350 · View mod page

Check out the mod page for detailed installation instructions.

2

Install Dive In

This mod must be installed on both the client and the server.

Download Dive In 1.2.3

Extract the ZIP and place the file(s) into the BepInEx/plugins/ folder inside your Valheim game folder.