AnimalFeedGuard

版本 v2.0.3·更新於 2026-10-06

Keep animal feed on the ground: prevent automatic pickup near tamed animals that can eat it. Configurable radius, manual pickup preserved, and compatible with AutoPicker's normal pickup path.

模組介紹 作者原文

Animal Feed Guard

2.0.3 targets Valheim 1.0, built and checked against 1.0.16. Use the 1.x releases for Ashlands.

Animal Feed Guard keeps dropped food on the ground when a living, tamed animal that can eat it is nearby. Manual pickup remains available.

Features

  • Configurable protection radius: 0-50 metres; default 25 metres.
  • Uses each animal's live food list, including Asksvin Smokepuffs, Deep North feeds, seeds, barley, and modded feed.
  • Measures distance to the animal's body, so a large animal's origin does not leave nearby feed unprotected.
  • Reads synchronized tameness through ownership changes.
  • Protects food even when the animal is already fed.
  • Applies only to automatic pickup; manual pickup is unchanged.
  • Client-side settings; install it on every player's client who wants protection.
  • Compatible with AutoPicker's normal pickup path.

Creature and food coverage

The audit read all 150 MonsterAI components in the installed 1.0.16 asset bundle. Fourteen have nonempty diets, totaling 48 creature/food combinations (including juvenile and summoned variants). Protection uses live consume lists, with no species or biome whitelist. See the audit.

| Creature | Feed found in installed assets |

| --- | --- |

| Asksvin | Smokepuffs, vineberries, fiddleheads |

| Asksvin hatchling | Cloudberries, barley, flax; only qualifies if tamed |

| Hen | Dandelions, barley, beech/birch/carrot/onion/turnip seeds |

| Boar and summoned boar | Carrots, turnips, onions, mushrooms, raspberries, blueberries |

| Wolf and summoned wolf | Neck tails, boar/lox/deer/chicken meat, sausages, raw fish |

| Lox | Cloudberries, barley, flax |

| Deep North moose and summoned moose | Lingonberries |

| Deep North bear variants | Blueberries; only qualifies if tamed (including the summoned bear) |

These are audited game defaults, not hardcoded lists. Modded additions to an animal's consume list are also recognized. Creatures without any feeding behavior do not protect arbitrary items.

Testing and diagnostics

For regression tests, import the ZIP into a separate Gale profile, replacing the old AnimalFeedGuard DLL. Confirm an empty inventory slot is available when testing; otherwise failure to collect does not prove protection. Compare matching and nonmatching food inside/outside the radius, then repeat with the mod disabled and with AutoPicker enabled.

For the Asksvin test, drop Smokepuffs beside adult tamed Asksvin and run over them. Enable Diagnostics → Log Pickup Decisions in ConfigurationManager (or the config file) to log the protection decision, body/origin distances, and synchronized tame state in BepInEx/LogOutput.log. Turn logging off after the test. Logging is rate-limited per food and outcome and does not write to saves.

Automated coverage passed. The reported Smokepuff was 7.67 metres from the Asksvin's body, outside the former 5-metre radius. The maintainer has tested the current build and confirmed it works as intended. Manual pickup is deliberately allowed. Another player's unmodified client, or a mod that directly inserts items into an inventory, can still collect the feed.

Configuration

The config file is BepInEx/config/com.ziluck.valheim.animalfeedguard.cfg.

Enabled controls the feature. Protection Radius controls the distance from the dropped item to the nearest point on an eligible tamed animal's body collider. This handles large animals such as Asksvin, lox, and moose. A radius of 0 disables protection.

The default is 25 metres. Existing configs retain their saved radius when upgrading; set Protection Radius = 25 to adopt the new default.

Recommended optional mods

  • ConfigurationManager - edit the settings in game instead of opening the config file. It is optional.
  • AutoPicker - optional compatibility; Animal Feed Guard does not require it.

Links

  • Source, documentation, and issue tracker

Check out my other mods

  • HenEggPickup - automatically collects chicken eggs once enough adult hens are nearby.
  • RanchingAddon - adds skil

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
AnimalFeedGuard-2.0.3.zip
檔案大小
50.9 KiB