MM94-MonsterFallDamage icon

MonsterFallDamage

Monsters and players take fall damage with a shared configurable formula. Set fall height threshold, damage per interval, and damage cap freely.

By MM94
Last updated 2 hours ago
Total downloads 1204
Total rating 0 
Categories Mods Tweaks Enemies AI Generated Deep North Update
Dependency string MM94-MonsterFallDamage-1.1.1
Dependants 1 other package depends on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2202 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2202

README

MonsterFallDamage

MonsterFallDamage

Monsters — and optionally the player — now take fall damage with a fully configurable formula.
By default the settings match Valheim's vanilla player values, but you can freely tune or remove the damage cap.


Features

  • All monsters take fall damage on landing
  • Player fall damage now uses the same configurable formula (toggle via Apply To Player)
  • Same formula as vanilla player by default
  • Dead monsters are safely ignored
  • Multiplayer-safe (only the network owner calculates damage)
  • Compatible with BepInEx Configuration Manager for in-game adjustments
  • Natural movement is not punished: height gained from a creature's own jump is ignored, and flying creatures (e.g. Moder) take no damage when landing
  • Slimes (all Blob variants) are immune to fall damage
  • Optional debug log for checking each landing (off by default)

Configuration

Located at: BepInEx/config/com.mods.monsterfallDamage.cfg

Setting Default Description
Apply To Player true Apply this formula to the player as well (overrides Valheim default)
Min Fall Height (m) 4 Falls below this height deal no damage
Damage Interval (m) 16 Damage added for every X meters fallen above the minimum
Damage Per Interval 100 Damage dealt per interval
Max Damage (0 for unlimited) 100 Cap on fall damage. 0 means no limit

Default formula (same as player):

damage = (fallHeight - 4) / 16 × 100, capped at 100

Example — harsher setting (100 dmg per 6.5m, no cap):

Min Fall Height: 4 / Damage Interval: 6.5 / Damage Per Interval: 100 / Max Damage: 0

Fall Exemption

Setting Default Description
IgnoreJumpAscent true Height gained by a creature's own jump is not counted. Hopping on flat ground deals no damage; jumping off a cliff counts only the drop below the take-off point
IgnoreFlyingLandings true Flying creatures take no fall damage from their flight altitude, including a short grace period after they land
FlyingLandingGraceSeconds 3 Grace period (seconds) after a flying creature lands
ExemptPrefabPrefixes Blob Creatures whose prefab name starts with one of these prefixes (comma-separated, case-insensitive) never take fall damage

Debug

Setting Default Description
EnableDebugLog false Logs every landing (height, exemption reason, damage) to the BepInEx log
Debug Log Toggle Key LeftAlt + F8 Turns the debug log on/off in game. The current state is shown on screen

Installation

  1. Install BepInExPack Valheim
  2. Drop MonsterFallDamagePlugin.dll into BepInEx/plugins/
  3. Launch the game — config file is auto-generated on first run

Compatibility

  • Valheim (latest)
  • Works alongside other mods that add custom monsters
  • No known conflicts

Reporting a Problem

If a monster takes fall damage when it shouldn't (or doesn't when it should), a log helps a lot:

  1. In game, press LeftAlt + F8 — the message MonsterFallDamage log: ON appears
  2. Reproduce the problem (let the monster jump, fly or fall the same way as before)
  3. Press LeftAlt + F8 again to turn the log off
  4. Close the game and find BepInEx/LogOutput.log in your mod manager profile folder
    • Gale / r2modman: Settings → Browse profile folder → BepInEx/LogOutput.log
  5. Email the log file to [email protected], with a short note on which monster it was and what happened

The log is off by default and has no effect on gameplay. Leaving it on for a long session makes the log file large, so turn it off after reproducing.


Changelog

1.1.1

  • New: Debug Log Toggle Key (default: LeftAlt + F8) — turn the debug log on/off in game without restarting
  • New: "Reporting a Problem" guide in this README
  • Changed: Code cleanup — no gameplay or formula changes
  • Existing settings are unchanged

1.1.0

  • New: Natural landings are no longer punished
    • Jumps: height gained by a creature's own jump is not counted — hopping on flat ground (e.g. Blobs) deals no damage, and jumping off a cliff only counts the drop below the take-off point
    • Flying creatures (e.g. Moder): no fall damage from flight altitude, plus a short grace period after landing
  • New: Slimes (all Blob variants) are now immune to fall damage — configurable via ExemptPrefabPrefixes
  • Changed: Landing is now detected only at the moment a creature goes from airborne to grounded
  • New: EnableDebugLog option (default: false)
  • Existing settings and the damage formula are unchanged

1.0.5

  • New: Apply To Player config option (default: true) — the player now uses the same configurable fall damage formula instead of the hardcoded Valheim default. Set to false to restore vanilla player behavior.

1.0.4

  • Bug Fix: The plugin was completely non-functional since release. The config key Max Damage (0 = unlimited) contained an illegal character (=), which caused BepInEx to throw an ArgumentException on startup and abort plugin initialization. As a result, no fall damage was ever applied to monsters. Fixed by renaming the key to Max Damage (0 for unlimited).

1.0.1

  • Config descriptions changed to English
  • Manifest description updated to English
  • Package structure improved (plugin subfolder)

1.0.0

  • Initial release