


Adds diving and swimming for players and configured creatures.
Normally mobs can't follow you underwater. So players with diving mod players can just attack mobs from above or below without getting hit.
This mod changes that.
Also added a diving mechanic for players with configurable stamina drain according to depth
Configured mobs can attack you! No more hiding under their bellies.
Idle mobs would swim within the configured range
Recommend to use with RtDOcean. There is configured sample for it.
This file defines which monsters can dive and what passive depth band each monster uses.
# Monster dive configuration for DiveIn.
# Unknown keys and duplicate keys are treated as errors and keep the previous applied settings.
surface_patrol: # You can use any group name. Add your own groups
passive_min_depth: 0 # Shallowest passive dive depth used while the monster has no target and is not alerted.
passive_center_depth: 10 # Center depth used by the passive sine-wave swimming pattern.
passive_max_depth: 20 # Deepest passive dive depth used while the monster has no target and is not alerted.
active_depth_adjust_speed: 2 # How quickly this group adjusts swim depth while alerted or chasing a target.
prefabs: # Monster prefab names assigned to this passive profile group.
- Leech
- Abomination
- Serpent
- BonemawSerpent
mid_water:
passive_min_depth: 0
passive_center_depth: 15
passive_max_depth: 30
active_depth_adjust_speed: 2
prefabs: []
deep_patrol:
passive_min_depth: 10
passive_center_depth: 20
passive_max_depth: 30
active_depth_adjust_speed: 2
prefabs: []
## Mod prefabs sample
mods_surface:
passive_min_depth: 0
passive_center_depth: 10
passive_max_depth: 20
active_depth_adjust_speed: 2
prefabs:
- Neck_RtD
- Animal_Dolphin_RtD
- Animal_Cod_RtD
...
Notes:
[1 - General]
## If on, the configuration is locked and can be changed by server admins only. [Synced with Server]
# Setting type: Toggle
# Default value: On
# Acceptable values: Off, On
Lock Configuration = On
[2 - Player Diving]
## Client-side key used to ascend while swimming underwater. [Not Synced with Server]
# Setting type: KeyboardShortcut
# Default value: Space
Dive Ascend Key = Space
## Client-side key used to descend while swimming. [Not Synced with Server]
# Setting type: KeyboardShortcut
# Default value: LeftControl
Dive Descend Key = LeftControl
## Comma-separated item prefab names that remain restricted in water. Everything not listed is allowed in water by default. Example: BowFineWood,ShieldBronzeBuckler. [Synced with Server]
# Setting type: String
# Default value:
Water Equipment Blacklist =
## Underwater darkness added per meter of swim depth. 1 means 1% per meter, so 30m gives 30%. [Synced with Server]
# Setting type: Single
# Default value: 0.5
# Acceptable value range: From 0 to 3
Darkness Factor = 0.5
## Underwater fog density added per meter of swim depth. 1 means 1% per meter, so 30m adds 30%. [Synced with Server]
# Setting type: Single
# Default value: 0.25
# Acceptable value range: From 0 to 3
Murkiness Factor = 0.25
[3 - Swim Stamina]
## Multiplier applied to vanilla stamina regeneration while swimming on the surface with your head above water. 0 matches vanilla swimming behavior, 1 matches normal non-swimming stamina regeneration timing and rate. [Synced with Server]
# Setting type: Single
# Default value: 0.5
# Acceptable value range: From 0 to 1
Surface Stamina Regen Rate = 0.5
## Multiplier applied to vanilla stamina regeneration while your head is underwater. 0 makes stamina recover only after surfacing. [Synced with Server]
# Setting type: Single
# Default value: 0
# Acceptable value range: From 0 to 1
Midwater Stamina Regen Rate = 0
## Idle stamina drained per second per 1m of current liquid depth while your head is underwater. 0 disables idle underwater stamina drain. Example: 0.1 drains 3 stamina per second at 30m depth. [Synced with Server]
# Setting type: Single
# Default value: 0.02
# Acceptable value range: From 0 to 1
Midwater Idle Stamina Drain Per Depth = 0.02
## Additional moving swim stamina drain percent per 1m of current liquid depth. 1 means 30% extra at 30m; 2.5 means 75% extra at 30m. Applied multiplicatively with Fast Swim stamina drain. [Synced with Server]
# Setting type: Single
# Default value: 2.5
# Acceptable value range: From 0 to 5
Swim Stamina Drain Multiplier Per Depth = 2.5
[4 - Swim Speed]
## Base swim speed multiplier at Swim skill 100. 1.5 means +50%. [Synced with Server]
# Setting type: Single
# Default value: 1.5
# Acceptable value range: From 1 to 3
Swim Skill Speed Multiplier = 1.5
## Swim speed multiplier while Fast Swim is toggled on with the vanilla run key. Swim skill separately increases base swim speed. [Synced with Server]
# Setting type: Single
# Default value: 2
# Acceptable value range: From 1 to 3
Fast Swim Speed Multiplier = 2
## Moving swim stamina drain multiplier while Fast Swim is toggled on. Applied multiplicatively with Swim Stamina Drain Multiplier Per Depth. [Synced with Server]
# Setting type: Single
# Default value: 2
# Acceptable value range: From 1 to 5
Fast Swim Stamina Drain Multiplier = 2
The player diving implementation includes code derived and modified from UnderTheSea
https://github.com/searica/UnderTheSea
https://github.com/sighsorry1029/DiveIn