Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
BetterEnemyAI
Enemies stop circling around you after attacking and give up long chases sooner. All values configurable.
By aetuss
| Date uploaded | a week ago |
| Version | 1.0.0 |
| Download link | aetuss-BetterEnemyAI-1.0.0.zip |
| Downloads | 51 |
| Dependency string | aetuss-BetterEnemyAI-1.0.0 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2360README
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.
- 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.
FlyingWandersets how much they move andFlyingFrontArchow 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.
- An enemy that gave up won't look for a new target for 8 seconds. If you hit it, it fights back right away.
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
Multiplayer
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.
CHANGELOG
Changelog
1.5.3
- README: says that the mod was made with AI (Claude by Anthropic), as Thunderstore asks. The DLL carries the same note in its metadata. No gameplay changes.
1.5.2
- README: notes that multiplayer and dedicated servers haven't been tested yet. No code changes.
1.5.1
- Added a link for feedback and bug reports: GitHub Issues.
1.5.0
- An animal you're taming (fed, taming started) no longer counts as an enemy nearby when you try to sleep (
TamingDoesntBlockSleep, on by default).
1.4.4
- New icon.
1.4.3
- Sea creatures (serpents) keep their vanilla circling, and land creatures keep it while swimming, instead of trying to walk to your front or back off for a run-up in the water. Their chases are still shortened.
1.4.2
- Fixed enemies giving up mid-fight (they then re-alerted moments later, which made wolves howl again): the distance and no-path rules now wait until neither side has attacked for 5 seconds.
- Boars and other chargers no longer walk around you after backing off for a run-up, which looked like circling; they wait at run-up distance facing you and charge as soon as their attack is usable again.
- New
DebugLogsetting writes enemy decisions to the BepInEx log.
1.4.1
- Fixed boars (and other enemies whose attack needs a run-up) taking a long time to attack again: they now wait outside their attack's minimum range, backing off first if they're too close.
1.4.0
- Ground enemies that end up beside or behind you after attacking (e.g. boars charging past) walk back around to your front before waiting, instead of standing behind you (
GroundFrontArc, also per creature).
1.3.0
- Ground enemies give up after 6 seconds without a path to you, unless you're hitting them or they're at your base and can attack buildings (
GiveUpWhenUnreachableSeconds, also per creature;Chase=Vanillaturns it off too).
1.2.0
- Enemies that give up a chase now walk straight back to where the chase started (
ReturnAfterGiveUp, on by default, also per creature).
1.1.0
- Per-creature settings:
CreatureOverridesgives specific creatures their own values, withChase=Vanilla,Circling=VanillaandEnabled=falseshortcuts. - New console command
bea_creatureslists nearby creatures by the names the settings use.
1.0.0
- First release: no circling after attacks, softer circling for flyers, shorter chases, server settings sync.