TruePassiveMobs
Lox, Asksvin, Boar, Neck & more stay peaceful until attacked. Other enemies flee from players whose gear outclasses them.
模組介紹 作者原文
PassiveMobs
A BepInEx mod for Valheim 1.0 with three independent features (all on by default):
- Passive creatures: By default Lox, Asksvin, Moose, Boar, Hen, Neck, and Bjorn leave players alone until a player damages them. After that they fight back as normal for ProvokedDuration seconds after the last hit, then calm down again.
- SkittishCreatures run away from a player who stays within SkittishRange for SkittishTime seconds.
- TerritorialCreatures attack a player who stays within TerritorialRange for TerritorialTime seconds, then run away for TerritorialRetreatTime seconds.
- Enemies fear strong players: non-passive enemies run away from players whose gear outclasses it, instead of attacking.
An enemy you attack stops running and fights back until FightBackDuration seconds after your last hit.
Raid creatures never run away.
- Neutral creatures: the Dvergr and other creatures that are friendly until angered only turn hostile after
HitsToAnger (default 2) hits from a player within AngerWindow seconds, instead of on the first stray hit.
Once angry, they make peace again CalmDownTime seconds (default 5 minutes) after the fighting stops.
Requires Jötunn.
How "outclassed" is decided
The mod uses two checks, each can be turned on or off:
| Check | Passes when |
|---|---|
| UseEnemyDamageCheck | The enemy's strongest attack, after your armor and resistances, deals at most MaxEnemyHitPercent (default 10%) of your max health. |
| UsePlayerDamageCheck | Your equipped weapon kills the enemy in at most MaxHitsToKill (default 3) average hits. This includes your skill, active buffs and the enemy's resistances. |
The math uses the game's own formulas, including star level, world difficulty settings, player-count scaling and world level.
These are rough outcomes with the defaults, using 3★ gear and typical food:
| Your gear | Runs away | Still fights |
|---|---|---|
| Iron | Greydwarves, greydwarf brutes, skeletons | Trolls, draugr, wolves |
| Padded + Blackmetal | Everything above, plus draugr and wolves | Fenrings, goblins, trolls |
| Carapace + Mistwalker | Everything above, plus fenrings and goblins | Goblin brutes, seeker soldiers |
Config
The config file is BepInEx/config/com.lhoffl.TruePassiveMobs.cfg. It reloads automatically when you save
it, so you can tune it while the game runs.
Multiplayer
Required on the server and every client.
Settings are synced from the server to the clients. Config changes are synced live.
Building
dotnet build -c Release
The game path comes from the Steam registry keys. The build copies TruePassiveMobs.dll to
BepInEx/plugins/TruePassiveMobs; pass -p:DeployToGame=false to skip that step.
To override the paths, create a gitignored Environment.props next to the csproj. With a mod manager, point
BepInExPath at the profile's BepInEx folder and DeployDir at the mod's folder in it:
$(APPDATA)\r2modmanPlus-local\Valheim\profiles\MyProfile\BepInEx
$(BepInExPath)\plugins\lhoffl-TruePassiveMobs
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: