About AiFree
From ThunderstoreMonsters never abandon their targets when you move away, and Trolls no longer get blocked by walls for damage they should have landed.
AiFree
> Monsters don't stop just because you left.
In vanilla Valheim, monster AI freezes the moment you move too far away — enemy factions stop fighting each other, tamed wolves stand idle while your base burns, and the world around you silently pauses the instant you step through a portal.
AiFree removes that limitation.
What It Does
AI 타겟 포기 타이머 제거
원래 발헤임 몬스터는 타겟을 30초 동안 감지하지 못하면 그대로 포기해버립니다. AiFree는 이걸 막습니다 — 타겟이 살아있는 한 몬스터는 절대 포기하지 않습니다.
- 서로 맞붙어 싸우던 두 적대 세력이 있다면, 끝까지 싸웁니다.
- 사슴을 쫓던 트롤은 숲 속까지 따라 들어갑니다.
- 그레이링에게 둘러싸인 길들인 늑대도 끝까지 맞서 싸웁니다.
타겟이 죽으면 AI는 정상적으로 초기화됩니다 — 죽은 타겟을 계속 쫓거나 무한히 어그로가 풀리지 않는 문제는 없습니다.
구역 로딩 유지 (포탈 이동 대응)
포탈로 다른 지역으로 이동하면 발헤임은 원래 있던 구역을 언로드하면서 그 안의 AI를 전부 멈춰버립니다. AiFree는 전투 중인 몬스터가 있는 구역을 메모리에 고정시켜, 플레이어가 지구 반대편으로 이동해도 그 전투가 계속 진행되게 합니다.
- 습격 도중 포탈로 피신해도, 습격은 실제로 계속 진행됩니다.
- 집에 남겨둔 길들인 동물들이 실제로 싸워서 방어해 줍니다.
- 다시 돌아왔을 때 멈춰있던 장면이 아니라 실제 전투 결과를 보게 됩니다.
트롤 벽 관통 데미지 보정
기본 근접 공격 판정은 스윙이 처음 닿는 콜라이더에서 판정을 멈춥니다. 그래서 트롤과 플레이어 사이에 벽이 끼어 있으면, 플레이어가 사거리 안에 있어도 벽이 데미지를 조용히 흡수해버리고 정작 맞아야 할 플레이어는 아무 피해도 입지 않습니다.
AiFree는 여기에 보정 로직을 추가합니다. 벽에 가로막혀 원래 판정에서 빠진 플레이어가 사거리 안에 있으면, 트롤의 무기 데미지를 그 플레이어에게 그대로 적용합니다. 벽 자체에 대한 기존 파괴 데미지 판정은 그대로 유지되며, 원본 판정이 놓치는 경우만 추가로 보완하는 방식입니다.
- 고정 동작이며 별도 설정 옵션은 없습니다.
- 현재는 트롤에만 적용되며, 이후 다른 대형 몬스터로 확장하기 쉬운 구조입니다.
Configuration
Located in BepInEx/config/captain.aifree.cfg
| Key | Default | Description | |-----|---------|-------------| | SenseTimeout | 0 | Seconds before a monster gives up on a living target. 0 = never. Original game value: 30 | | KeepZonesLoaded | true | Keep combat zones loaded when the player is far away. Covers portal travel in singleplayer. |
Compatibility
- BepInEx 5.4.x required
- No known conflicts with other AI mods
- Works in singleplayer and dedicated servers
- Safe to add/remove mid-save
How It Works (Technical)
MonsterAI patch — UpdateTarget() Prefix Resets m_timeSinceSensedTargetCreature to 0 before the 30-second check fires, as long as the target character is alive. Uses AccessTools.Field for private field access.
ZNetScene patch — RemoveObjects() Prefix Before the engine destroys out-of-range GameObjects, adds any actively-fighting monster's ZDO (and its target's ZDO) to the currentNearObjects list. This earmarks them as "near" — preventing destruction and keeping the AI update loop running.
Attack 패치 — OnAttackTrigger() Postfix (트롤 전용) 원본 근접 히트 판정은 그대로 두고(벽에 대한 데미지도 기존과 동일하게 발생), 트롤에 한해서만 판정이 끝난 직후 후처리를 하나 더 붙였습니다. 공격 원점에서 플레이어까지의 거리가 사거리 이내이면서 벽에 가로막혀 원본 판정이 놓친 경우에만, 그 플레이어에게도 데미지가 들어가도록 보완합니다. 게임 원본 dll의 비공개 멤버에 접근할 때는 전부 리플렉션(AccessTools)을 거치기 때문에 원본 dll과 충돌 없이 안전하게 동작합니다.
Changelog
v1.1.1
- Thunderstore 업로드용 버전 번호만 갱신 (1.1.0 태그가 이미 사용되어 재사용 불가). 기능 변경 없음.
v1.1.0
- 트롤 — 근접 공격이 벽에 막혀 조용히 흡수되던 문제를 수정했습니다. 이제 벽 뒤 사거리 안에 있는 플레이어에게도 데미지가 정상적으로 들어갑니다. (벽 자체도 기존과 동일하게 파괴 데미지를 받습니다.)
v1.0.0
- 최초 릴리스: AI 타겟 포기 타이머 제거, 구역 로딩 유지(포탈 이동 대응) 기능 추가.
Source
Author: Captain GitHub: https://github.com/KorCaptain
Highlights
From source dataLoaders
Runs on BepInEx.
Footprint
Rated a light load on a server.
Last update
Its author last shipped an update 3 mo ago.
AiFree 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 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.1.1, released 2026-08-08
Game versions by loader
| Loader | Game versions | Newest |
|---|---|---|
| BepInEx |
From 3 recorded builds of AiFree.
Recent builds
| Build | Released | Game versions | Loaders |
|---|---|---|---|
| 1.1.1 | 2026-08-08 | n/a | BepInEx |
| 1.1.0 | 2026-08-08 | n/a | BepInEx |
| 1.0.0 | 2026-06-27 | n/a | BepInEx |
Dependencies
- Required: BepInExPack Valheim
Declared by the newest build that lists any. Required ones are installed with it on one-click installs.
Run AiFree 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 catalogQuality of life & UI
Small conveniences, tweaks and interface improvements players notice straight away.
Compatibility
- Game
- Valheim
- Loaders
- BepInEx
- Requires
- One-click install needs a BepInEx server.
Verified at the source
- ✓ThunderstoreOfficial listing, checked 2026-10-02Open ↗
- ✓AuthorLJS, as published on Thunderstore
- ✓LicenseNot published by the sourceFree




