ToolLockWhenEnemyNearby

v1.1.0·Updated 2026-10-06

Blocks hammer, hoe, and cultivator use while an enemy is nearby. Each tool can be configured separately.

About this mod Author’s original text

ToolLockWhenEnemyNearby

Prevents certain build tools from being used while an enemy is nearby.

By default, all three tools are restricted.

Tools

  • Hammer
  • Hoe
  • Cultivator

Each tool can be enabled or disabled separately.

Config

Each tool has:

  • Enabled – turns the restriction on or off
  • BlockedMessage – custom message shown when use is blocked

DetectionDistance – distance at which enemies will prevent tool use.

The default detection distance is 20 metres.

1.1.0 Update

  • Added customizable blocked messages for each tool.
  • Added configurable enemy detection distance.
  • Changed the default detection distance from 40 metres to 20 metres.
  • Hammer, hoe, and cultivator are enabled by default.

Feedback

For suggestions or issues, Discord: NxDimi

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. In multiplayer, the host and every client need the same mods installed.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_Valheim

File & checksum

Filename
ToolLockWhenEnemyNearby-1.1.0.zip
File size
123.7 KiB