EnemyLeash

v1.0.0·Updated 2026-07-24

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

About this mod Author’s original text

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.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
EnemyLeash-1.0.0.zip
File size
16.8 KiB