Source-checkedQuality of life & UI

BetterEnemyAI

by aetuss · for Valheim

Enemies stop circling around you after attacking and give up long chases sooner. All values configurable.

174Downloads
todayLast updated
BepInExLoaders
ThunderstoreSource

About BetterEnemyAI

From Thunderstore

Enemies stop circling around you after attacking and give up long chases sooner. All values configurable.

BetterEnemyAI

Stops enemies from circling around you after they attack, and makes them give up long chases sooner.

What changes?

  • No circling after attacks: After an attack, enemies no longer run circles around you while waiting for their next attack. If they are in range they stand still and face you; otherwise they move toward you. Enemies that end up beside or behind you first walk back around to your front (GroundFrontArc), so they don't wait out of sight. Chargers like boars, whose attack needs a run-up, instead back off to run-up distance, turn to face you and charge again.
  • Softer circling for flyers: Flying enemies (deathsquitos, bats, drakes, etc.) still circle you while their attack recharges, like in vanilla, but slower and smoother. They back off about 6 meters, drift around you with changing speed and direction, stay in front of you or at your sides instead of flanking behind you, and dive again once their attack is ready. Walking toward them closes the distance instead of pushing them away. FlyingWander sets how much they move and FlyingFrontArc how far around you they may go. You can switch them back to vanilla circling or make them hover in place instead.
  • No periodic circling: Some enemies stop attacking every now and then to circle around their target. This is turned off.
  • Shorter chases:
  • An enemy gives up if it can't see or hear you for 10 seconds (vanilla: 30 seconds).
  • An enemy gives up if 20 seconds pass without it hitting you or taking damage from you (vanilla: 60 seconds).
  • An enemy gives up once it gets 60 meters away from where the chase started, unless you're in the middle of a fight.
  • A ground enemy gives up if it has no path to you for 6 seconds (say, you're up on a rock), unless you're in the middle of a fight. Near your buildings, enemies that attack buildings keep their vanilla behavior, so your base can still be raided.
  • An enemy that gave up won't look for a new target for 8 seconds. If you hit it, it fights back right away.
  • An enemy that gave up walks straight back to where the chase started, instead of slowly wandering around where it stopped (vanilla).
  • Sleep while taming: An animal you're taming (fed, with taming started) no longer stops you from sleeping with "enemies nearby". Wild creatures still do. (TamingDoesntBlockSleep)

Sea creatures like serpents keep their vanilla circling (it's how they fight boats), and land creatures keep it while swimming. Tamed animals, friendly creatures and bosses are not affected (bosses can be enabled in the config). Chases by raid monsters stay vanilla by default. Creatures added by other mods are affected too.

Configuration

All values can be changed in game with F1 (Configuration Manager) or in your mod manager's config editor. To exclude specific creatures, list their prefab names in ExcludedCreatures, separated by commas. Example: Wolf,Deathsquito

Per-creature settings

CreatureOverrides gives specific creatures their own values. Write the creature's name, a colon, then Setting=Value pairs separated by commas; separate creatures with semicolons:

Troll: GiveUpWhenNoCombatSeconds=30, MaxChaseDistance=80; Greydwarf: GiveUpWhenNoCombatSeconds=15

Any setting name from the config works. There are also three shortcuts:

  • Chase=Vanilla keeps that creature's normal chasing (e.g. Deathsquito: Chase=Vanilla)
  • Circling=Vanilla keeps its normal circling
  • Enabled=false turns the mod off for it

Use a dot for decimals (1.5). Mistakes are skipped and reported in the BepInEx log.

To find creature names, stand near them, open the console (F5) and type bea_creatures. It lists every creature within 40 m (or bea_creatures 100 for 100 m) and whether the mod affects it.

Reporting problems

Turn on DebugLog (in 1 - General) and the BepInEx log (BepInEx/LogOutput.log) will record what enemies decide, e.g. Wolf gave up the chase: no path to the target. Report problems and ideas on GitHub Issues, and include those lines.

Multiplayer

Note: Multiplayer and dedicated servers haven't been tested yet. It's built to work there, but if something seems off, please report it on GitHub Issues.

Enemy AI in an area is run by the player who "owns" that area, so every player should install the mod. If you run a dedicated server, install it there too.

  • Settings sync: When you join a server that has the mod, the server's settings are used for everyone, so enemies behave the same no matter who is nearby. Your own config file isn't changed; your settings come back when you leave. If the host changes a setting in game, it's sent to everyone right away. On a dedicated server, edit the server's config file and restart it.
  • Missing mod warning: If someone joins without the mod, the server log (and the host, in a player-hosted game) gets a message about it. A version mismatch between server and client is reported the same way.

Highlights

From source data

Loaders

Runs on BepInEx.

Footprint

Rated a light load on a server.

Last update

Its author last shipped an update today.

BetterEnemyAI on Nxeon

From our catalogue
One-click install
Supported on Nxeon Valheim servers, for BepInEx servers. We download it from Thunderstore, place it, and restart the server.
Server side
Optional on the server
Server type needed
BepInEx
Server load
light
Smallest plan we suggest
Valheim — 4 GB (4 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
1.5.2, released 2026-11-03

Game versions by loader

LoaderGame versionsNewest
BepInEx

From 6 recorded builds of BetterEnemyAI.

Recent builds

BuildReleasedGame versionsLoaders
1.5.22026-11-03n/aBepInEx
1.5.12026-11-02n/aBepInEx
1.5.02026-11-01n/aBepInEx
1.4.42026-11-01n/aBepInEx
1.4.32026-11-01n/aBepInEx
1.0.02026-11-01n/aBepInEx

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run BetterEnemyAI on a Valheim server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Thunderstore as “Tweaks”

Quality of life & UI

Small conveniences, tweaks and interface improvements players notice straight away.

Works on a server

From source side support

Thunderstore lists server-side support for BetterEnemyAI as optional: it can run on a server, but isn’t required there.

Compatibility

Game
Valheim
Loaders
BepInEx
Runs on
Serveroptional on the server
Requires
One-click install needs a BepInEx server.

Verified at the source

  • ✓ThunderstoreOfficial listing, checked 2026-11-03Open ↗
  • ✓Authoraetuss, as published on Thunderstore
  • ✓LicenseNot published by the sourceFree

BetterEnemyAI, answered

Generated from the mod’s own source data.

Do my players need to install BetterEnemyAI?

Thunderstore lists server-side support for BetterEnemyAI as optional: it can run on a server, but isn’t required there.

Which loaders does it support?

BepInEx.

Is it free?

Yes. BetterEnemyAI is free to download from Thunderstore.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run BetterEnemyAI on a Valheim server.

Deploy in about a minute from $9.99 a month, then add BetterEnemyAI in one click.