You are viewing a potentially older version of this package. View all versions.
ReJ0-POV_LMTY_BeastAI_Adapter-0.3.2 icon

POV LMTY BeastAI Adapter

Compatibility layer for PathOfValheiman and LetMeTameYou that auto-repairs POV BeastAI taming/breeding conflicts without replacing POV AI.

Date uploaded 4 days ago
Version 0.3.2
Download link ReJ0-POV_LMTY_BeastAI_Adapter-0.3.2.zip
Downloads 17
Dependency string ReJ0-POV_LMTY_BeastAI_Adapter-0.3.2

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 icon
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.2351
treextr-PathOfValheiman-4.13.10 icon
treextr-PathOfValheiman

Build your specialization in a Path of Exile-inspired passive tree: 2,600+ nodes, focused weapon and crafting clusters, shared masteries and keystones. Replaces vanilla skill progression. English, Russian, French, Spanish, Portuguese.

Preferred version: 4.13.10
Meldurson-LetMeTameYou-0.1.0 icon
Meldurson-LetMeTameYou

Rewrite of the taming portion of AllTameable. Overhauls the taming system and allows you to tame and modify taming for almost any creature.

Preferred version: 0.1.0

README

POV LMTY BeastAI Adapter

A compatibility layer for PathOfValheiman (POV) and LetMeTameYou (LMTY) on Valheim.

The adapter fixes a specific interoperability problem where POV converts some normally passive AnimalAI creatures into its custom PassiveTree.BeastAI, while LMTY expects a different component layout when adding taming and breeding support.

Current stable version: 0.3.1

What problem does this solve?

In the tested combination of POV 4.13.10 and LMTY 0.1.0, Deer/Hare-style creatures can reach LMTY with this runtime shape:

AI         = PassiveTree.BeastAI
MonsterAI  = true
AnimalAI   = false
Character  = true
Humanoid   = false
Tameable   = true

LMTY sees MonsterAI and therefore does not take its normal AnimalAI conversion path. In the affected path it later expects data associated with a Humanoid, but POV's converted creature does not have one. The original result was a NullReferenceException in LetMeTameYou.TameManager.AddTame().

This adapter does not replace POV's AI. Instead, it intercepts only the confirmed incompatible structure and applies the LMTY creature settings directly.

Generic auto-repair in 0.3.1

There is no prefab-name allowlist.

A creature is automatically repaired only when all of these are true:

  • MonsterAI exists
  • Character exists
  • Humanoid is missing
  • AnimalAI is missing
  • the runtime AI is identified with high confidence as POV (PassiveTree.BeastAI, another PassiveTree.* type, or a type from a PathOfValheiman assembly)

Normal LMTY targets such as MonsterAI + Humanoid creatures are passed through untouched.

If the component layout looks suspicious but the AI cannot be confidently attributed to POV, the adapter logs a warning and does not modify the creature.

What the repair applies

For a confirmed POV/LMTY incompatible target, the adapter reuses LMTY's already-parsed creature configuration and applies:

  • Tameable creation when missing
  • LMTY commandable, tamingTime, and fedDuration
  • food list and consume ranges
  • a BeastAIConsumeBridge for ground-food consumption
  • adaptive taming-progress fallback
  • Procreation when enabled
  • existing offspring when available
  • explicit offspringPrefab when configured (for example Seal -> Seal_Pup)
  • otherwise LMTY's SpawnMini() offspring path

Adaptive taming fallback

The adapter does not immediately force its own taming countdown.

After a successful meal it observes the native TameTimeLeft for six seconds of calm, non-alerted time:

  1. If the native timer moves, the fallback remains disabled.
  2. If the timer does not move, the fallback activates automatically.
  3. Alerted time does not count toward the observation window.
  4. Once the timer reaches zero, the adapter completes taming through the game's Tameable path.

This was added because POV BeastAI creatures could eat successfully while the native taming countdown remained frozen.

Performance

An earlier development build scanned all ItemDrop objects every ~0.35 seconds per compatible creature and caused noticeable periodic hitches.

The current bridge instead:

  • searches only while a compatible creature is hungry and needs a target;
  • uses FindObjectsByType<ItemDrop>(FindObjectsSortMode.None);
  • throttles searches using the creature's consumeSearchInterval;
  • caches the selected food target while moving toward it.

The observed hitch disappeared after this change.

Tested environment

The current release was validated with:

  • Valheim 1.0.20
  • BepInEx 5.4.23.5 / BepInExPack Valheim 5.4.2351
  • PathOfValheiman 4.13.10
  • LetMeTameYou 0.1.0
  • BetterTames 0.9.0 present in the test profile (optional, not a hard dependency)

Validated behavior includes:

Creature/path Result
Deer / POV PassiveTree.BeastAI Auto-repair triggered; feeding works; stalled native timer detected; fallback completed taming
High-star Deer 4-star Deer successfully tamed in live testing
Deer breeding Feeding, pregnancy and birth observed in live testing
Hare Generic incompatible structure detected and auto-repair configured
Seal Generic incompatible structure detected; Seal_Pup offspring prefab assigned
Hatchling / Drake Not auto-repaired; passed through to original LMTY; taming, breeding and egg laying observed
High-star Hatchling 3-star Hatchling successfully tamed in live testing

No NullReferenceException, general Exception, or [Error entry was present in the final 0.3.1 validation log.

Special egg path limitation

LMTY's custom egg: reproduction path is intentionally not reimplemented for a POV creature that also matches the incompatible auto-repair structure.

If that combination is detected, the adapter logs the situation and defers to original LMTY rather than silently converting an egg layer to a mini-offspring path.

Current tested Hatchling/Drake behavior does not hit this limitation because Hatchling has a normal MonsterAI + Humanoid structure and is handled by original LMTY.

Installation

Thunderstore / Gale / r2modman

Install the package through your Thunderstore-compatible mod manager. Required dependencies should be installed automatically when declared by the package.

Manual

Install BepInEx, PathOfValheiman and LetMeTameYou, then place:

POVLMTYBeastAIAdapter.dll

under:

Valheim/BepInEx/plugins/POVLMTYBeastAIAdapter/

Do not load older versions of this adapter at the same time. They share the same BepInEx plugin GUID:

com.rehyun.povlmtybeastaiadapter

Also remove/disable the old experimental POVLMTYDeerAdapter and POVDeerBreedingFix while using this adapter.

Building from source

Requirements:

  • .NET SDK capable of building netstandard2.1
  • local Valheim installation
  • BepInEx core files from your local Valheim/Gale profile

The project deliberately references your local Valheim/BepInEx assemblies. Game files and third-party mod binaries are not included in this repository.

On the original Windows/Gale test setup, run:

build_and_install_gale_default.bat

Or build manually and override the paths if needed:

dotnet build -c Release `
  -p:ValheimDir="C:\Program Files (x86)\Steam\steamapps\common\Valheim" `
  -p:BepInExCoreDir="$env:APPDATA\com.kesomannen.gale\valheim\profiles\default\BepInEx\core"

Logs / troubleshooting

Useful adapter log prefixes:

[LMTY Trace]
[Generic Compatibility]
[BeastAI Adapter]
[BeastAI Feed]
[Adaptive Taming]

A repaired Deer-style creature should normally show:

[Generic Compatibility] AUTO-REPAIR triggered
[Adaptive Taming] Observing native timer before fallback

If its native taming countdown is broken:

[Adaptive Taming] Native timer did not advance; fallback activated
[BeastAI Feed] Fallback taming tick

A normal LMTY creature should not show AUTO-REPAIR.

Compatibility scope

This project is intentionally conservative. It is a POV/LMTY compatibility adapter, not a general replacement taming system.

The adapter modifies only the high-confidence POV component shape that was reproduced and diagnosed during development. Unknown custom-AI mods are not automatically patched.

Dedicated-server and broad multiplayer behavior have not been exhaustively validated; please report logs for those environments before assuming full support.

Credits

  • PathOfValheiman by treextr
  • LetMeTameYou by Meldurson
  • BepInEx / BepInExPack Valheim and the Valheim modding ecosystem

This repository contains the adapter code only. It does not redistribute PathOfValheiman, LetMeTameYou, Valheim game assemblies, or BepInEx binaries.

Development history

See CHANGELOG.md for release-by-release changes and docs/DEVELOPMENT_HISTORY.md for the full debugging trail and root-cause analysis.

CHANGELOG

Changelog

0.3.3 - Fed-state timer initialization fix

Current stable release.

  • Fixed an adaptive-fallback dead state where a creature could be hungry=False while TameTimeLeft was still missing (-1).
  • If a valid TameLastFeeding timestamp exists but TameTimeLeft does not, the adapter now safely initializes the countdown from the configured taming time and starts the normal native-observation/fallback flow.
  • Never-fed creatures are not initialized: the repair requires a real feeding timestamp.
  • No changes to the generic POV structure detection, food list parsing, breeding configuration, or offspring logic.
  • Live validation confirmed a 4-star Deer progressed from the repaired 120-second countdown to tamed=True; the final log contained no NullReferenceException, general Exception, or [Error entry.

0.3.2

  • Updated the project and Thunderstore icon with a new custom emblem.
  • Bumped package/plugin version to 0.3.2.
  • No gameplay or compatibility logic changes from 0.3.1.

0.3.1 - Generic compatibility + adaptive taming fallback

  • Removed prefab-name dependency from the compatibility decision.
  • Retained high-confidence POV structural detection introduced in 0.3.0.
  • Added adaptive taming fallback:
    • observes the native timer for six calm seconds after feeding;
    • keeps fallback disabled if native progress is detected;
    • enables fallback only when the timer is confirmed stalled;
    • ignores alerted time during the observation window.
  • Stopped periodic taming-progress diagnostics for already-tamed creatures while keeping the food bridge active for breeding.
  • Validated 4-star Deer taming through fallback completion.
  • Validated 3-star Hatchling taming through untouched original LMTY path.
  • Final validation log contained no NullReferenceException, general Exception, or [Error entry.

0.3.0 - Generic structural auto-repair

  • Removed the Deer/Hare/Hatchling prefab allowlist.
  • Inspects every creature passed to LetMeTameYou.TameManager.AddTame().
  • Auto-repairs only the confirmed POV incompatible shape:
    • MonsterAI != null
    • Character != null
    • Humanoid == null
    • AnimalAI == null
    • high-confidence POV AI identification.
  • Unknown/non-POV custom AI with a similar shape is logged but not modified.
  • Added generic offspringPrefab support, validated with Seal -> Seal_Pup configuration.
  • Kept normal LMTY creatures on the original LMTY path.
  • Intentionally did not reimplement LMTY's special egg: path for incompatible POV targets.

0.2.7 - Stable pre-generic repair

  • Replaced unsupported ItemDrop.s_instances approach with FindObjectsByType<ItemDrop>(FindObjectsSortMode.None).
  • Removed the frequent all-scene ItemDrop scan that caused periodic hitches.
  • Added target caching and throttled searches based on consumeSearchInterval.
  • Added taming-progress fallback using Tameable.DecreaseRemainingTime() / Tame() when native progress was absent.
  • Preserved POV PassiveTree.BeastAI while restoring LMTY feeding/taming/breeding behavior.
  • Deer end-to-end feeding, taming, breeding and offspring behavior became functional.

0.2.6 - Development-only / build failed

  • Attempted to replace scene-wide food searches with ItemDrop.s_instances.
  • Did not compile against Valheim 1.0.20 because ItemDrop.s_instances does not exist in that game assembly.
  • The design was corrected in 0.2.7.

0.2.5 - Runtime bridge diagnostics

  • Prevented repeated resetting of TameTimeLeft.
  • Added detailed taming-progress logs.
  • Confirmed food consumption and hungry=False state.
  • Revealed that TameTimeLeft itself remained frozen.
  • Exposed a periodic hitch caused by frequent scene-wide item scans.

0.2.4 - Feeding-state bridge

  • Replaced the unavailable Tameable.ResetFeedingTimer() call with direct feeding-state/ZDO updates.
  • Added runtime food-consumption bridge for POV BeastAI creatures.

0.2.3 - Development-only / build failed

  • First runtime BeastAI consume-bridge attempt.
  • Did not compile against Valheim 1.0.20 because Tameable.ResetFeedingTimer() was not available.

0.2.2 - Food parsing and diagnostics

  • Added flexible food parsing for comma/colon/semicolon separators.
  • Added resolved/missing-food diagnostics.
  • Confirmed Deer food prefabs resolved correctly, ruling out the YML parser as the cause of non-feeding behavior.

0.2.0 - Multi-target adapter branch

  • Expanded beyond Deer to Deer/Hare/Drake/Hatchling test targets.
  • Introduced structural interception of POV's incompatible MonsterAI/no-Humanoid/no-AnimalAI shape.
  • Preserved compatible LMTY targets on the original code path.

0.1.1 - Diagnostic expansion

  • Added tracing that confirmed Hare exhibited the same POV/LMTY component mismatch as Deer.

0.1.0 - Deer proof of concept

  • Added a Harmony Prefix around LetMeTameYou.TameManager.AddTame().
  • Bypassed LMTY only for the known POV-incompatible Deer structure.
  • Preserved POV BeastAI.
  • Applied LMTY Tameable, food, Procreation, and mini-offspring settings directly.