EnemyLeash

版本 v1.0.0·更新於 2026-07-24

Monsters give up the chase instead of following you across the entire map.

模組介紹 作者原文

EnemyLeash

Monsters give up instead of following you across the whole map.

Built and compiled against game build v0.4.4 (Cosmetics Update line).

What it does

When a chase begins, the mod drops an invisible anchor at the enemy's

position. If that enemy travels further than LeashRadius from the anchor,

it gives up, turns around, and can't start a new chase for GiveUpCooldown

seconds.

The give-up uses Enemy.DisableChase() — the game's own "stop chasing" call —

so the state machine unwinds naturally rather than being forced into a state

by hand. Optionally it also blinds the enemy for the cooldown, otherwise it

will just hear you and start investigating again immediately.

Hooks EnemyStateChase.Update, the per-frame tick every chasing enemy runs,

so it covers all vanilla monsters and most modded ones built on the same

Enemy component.

Host only

Chase state is authoritative on the master client and the result propagates

through the game's own sync. Nothing is patched client-side, so there's no

desync risk and clients don't need the mod.

Config

BepInEx/config/benjamin.enemyleash.cfg

| Key | Default | Notes |

|---|---|---|

| Enabled | true | Master switch |

| LeashRadius | 30 | Metres from where the chase started. 0 disables distance leashing |

| MaxChaseSeconds | 0 | Hard cap on chase duration. 0 disables. Only ever shortens vanilla's own per-type timers |

| GiveUpCooldown | 8 | Seconds before the enemy can chase again |

| BlindOnGiveUp | true | Also blind it for the cooldown, so it doesn't just re-investigate |

| Verbose | false | Logs each leash with the distance and duration that triggered it |

Tuning notes

30m is roughly two or three rooms — enough that a chase still feels dangerous,

short enough that you can actually break line of sight and reset. Drop to 15

for a much softer game; push to 60+ if you only want to stop the truly absurd

cross-map pursuits.

GiveUpCooldown matters more than it looks. At 0 the enemy often re-acquires

you within a second and the leash appears to do nothing. 8 seconds is enough

to actually get away.

The anchor is where the chase started, not where the enemy spawned, so a

monster that has roamed halfway across the level still gets a full leash

length from that point.

Building

Requires.NET SDK 8.0+. Add the NuGet feeds in nuget.config, then:

dotnet build -c Release

Output lands in bin/Release/netstandard2.1/EnemyLeash.dll. Drop it in

BepInEx/plugins.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
EnemyLeash-1.0.0.zip
檔案大小
16.8 KiB