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.
VikingAI
Foundational 2.5D navigation graph, flow-field steering, tactical pack coordination, smart-object affordances, and virtual NPC simulation framework for Valheim.
| Date uploaded | 3 days ago |
| Version | 0.1.0 |
| Download link | DigitalVikings-VikingAI-0.1.0.zip |
| Downloads | 31 |
| Dependency string | DigitalVikings-VikingAI-0.1.0 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.
Preferred version: 5.4.2202ValheimModding-Jotunn
Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.
Preferred version: 2.20.1README
VikingAI
A foundational navigation, context-steering, sensory perception, tactical pack coordination, smart-object affordance, and unloaded-zone NPC simulation framework for Valheim.
Core Architecture
-
Unified 2.5D Clearance Navigation Graph (
NavGraphManager)- Normalizes vanilla
Pathfinding's $10\times$ tile-border link penalty (10.0 -> 1.2) to eliminate $32,\text{m}$ tile-seam zig-zagging. - Replaces multi-agent-type NavMesh rebuild stalls with a 2.5D clearance-annotated span graph (
TrueClearanceRadius,CeilingClearance,StructuralHp) and pluggableINavTraversalRulecontracts (GroundWalkRule,WaterSwimRule,DoorTraversalRule,LedgeJumpRule,SiegeBreachRule).
- Normalizes vanilla
-
Player-Centric Tactical Flow Fields (
TacticalFlowField)- Maintains a $64 \times 64,\text{m}$ ($2,\text{m}$ cell) Dijkstra integration and gradient vector field around combat anchors at $5,\text{Hz}$, stamping crowd density and fire hazards so large packs route around congestion.
-
16-Ray Context Steering & Polar Follower Formations (
SteeringPipeline)- Evaluates 16-slot radial
InterestandDangermaps across modularISteeringContributorstages (PathAndFlow,NeighborSeparation,ObstacleWhisker,HazardAvoidance,PlayerYield). - Decouples
SetLookDirfromSetMoveDironCharacterto unlock native $360^\circ$ humanoid combat strafing and backstepping. - Assigns tamed followers and companions into polar V-wedge formation slots behind the player and automatically steps aside when approached in corridors or doorways.
- Automatically opens and re-closes unlocked doors (
DoorTraversalController) for profiles withCanOpenDoorsenabled.
- Evaluates 16-slot radial
-
Layered Brain Pipeline, 4-Stage Sensory Engine & Pack Coordinator (
BrainPipeline)- Sensory Perception Engine (
SensoryMemoryController): GeneralizedCharacter-to-Character4-stage detection ramp (Unaware -> Suspicious -> Alerted -> Engaged), directional sunlight/shadow raycasting viaRenderSettings.sun, time-sliced foliage concealment, mathematical equipment-weight acoustic profiles, and a 32-slotAllyCallring buffer. - Tactical Pack Coordinator (
CombatPackCoordinator): Enforces simultaneous melee Attack Token budgets per target and distributes waiting attackers onto a $45^\circ$ flanking ring with anti-perch fallback.
- Sensory Perception Engine (
-
Smart Object Settlement Affordances & ZDO NPC Equipment (
AffordanceRegistry)- Slot-reserved settlement work providers (
SmelterAffordanceProvider,FireplaceAffordanceProvider,RepairPieceAffordanceProvider,HarvestPickableAffordanceProvider,LeisureChairAffordanceProvider) driven bySmartAffordanceBrainModule. - ZDO-backed NPC inventory persistence (
"VAI_v1_Inv") and fullVisEquipmentpaperdoll synchronization (hair, beard, and holstered back items) on non-playerHumanoids.
- Slot-reserved settlement work providers (
-
1 Hz Macro-ZDO Virtual Agent Director (
VirtualAgentDirector)- Simulates unloaded settlement NPCs and patrols at $1,\text{Hz}$ in
ZDOspace, applies deterministic time-delta catch-up when zones reload, and transports active party companions across portals and dungeon transitions.
- Simulates unloaded settlement NPCs and patrols at $1,\text{Hz}$ in
Vanilla-Faithful Baseline & Configuration
Unopinionated engine improvements (tile-seam cost normalization, context steering, crowd separation, follower formations, and friendly yield-on-approach) are enabled by default. Opinionated changes to wild vanilla enemy tactics (VanillaEnemiesUsePackTokens, VanillaHumanoidsStrafeInCombat, VanillaEnemiesJumpLedges, VanillaEnemiesBreachWeakWalls, VanillaEnemiesUseSensoryEngine) default to false so vanilla enemies retain their familiar feel unless opted in via configuration or a downstream mod's AgentBehaviorProfile.
Developer Console Commands
vikingai debug [grid|flow|steering|tokens|affordances|senses|all|off]— Toggles real-time 3D GL and HUD telemetry overlays.vikingai stats— Prints live tracked piece and affordance counts fromPieceRegistry.
CHANGELOG
Changelog
All notable changes to VikingAI will be documented in this file.
[0.1.1] - 2026-10-27
Fixed
- Line-of-Sight Raycast Stability: Hardened sensory perception layer mask resolution across custom creature prefabs to prevent null reference interruptions during vision checks.
[0.1.0] - 2026-10-25
Added
- 2.5D Clearance Navigation Graph: Unified spatial navigation overcoming vanilla pathfinding tile seam boundaries and ledge drops.
- Tactical Context Steering & Locomotion: 16-ray obstacle avoidance, 360-degree combat strafing, polar follower formations, and friendly door traversal.
- Sensory Perception & Cover Sampling: Line-of-sight awareness cones, hearing attenuation through structures, and dynamic environmental cover evaluation.
- Pack Combat Coordination: Dynamic attack token distribution preventing unnatural enemy swarming and synchronizing tactical flanking.
- Settlement Affordances & Smart Objects: Shared reservation system for workstations, doors, chests, and beds preventing NPC interaction deadlocks.
- Humanoid NPC Factory & Unloaded Simulation: Standalone Norse NPC builder with custom appearance options, persistent equipment, and unloaded-zone virtual agent simulation.