Jubaroo-TruffleBoars icon

TruffleBoars

Tamed boars forage mushrooms and eat all thrown foods (fish, raw fish, meats, meals). Features audio/visual effects, star scaling, pen clutter limits, and full multiplayer sync โ€” by Jubaroo

By Jubaroo
Last updated 3 days ago
Total downloads 114
Total rating 0 
Categories Server-side Client-side Mods Misc
Dependency string Jubaroo-TruffleBoars-1.1.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2202 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2202

README

TruffleBoars

TruffleBoars gives your tamed boars a delightful and rewarding new domestic purpose: rooting in natural soil to dig up wild mushrooms!

In real-world folklore and tradition, swine are celebrated for sniffing out and uncovering truffles and forest fungi buried beneath fertile earth. TruffleBoars brings this classic pastoral mechanic directly into Valheim with rich audio/visual effects, star-tier breeding incentives, pen lag prevention, and complete multiplayer synchronization.


Features

  • ๐Ÿ„ Mushroom Foraging: Tamed adult boars periodically root into natural soil, grassy meadows, and cultivated farm plots to unearth mushrooms.
  • ๐Ÿฅ“ Omnivore Boar Diet (Pigs Eat Everything):
    • Just like real-world pigs, your boars will now eat any food items thrown to them!
    • Whole Fish: Boars happily devour caught fish thrown to them (Perch, Pike, Tuna, Tetra, etc.).
    • Raw / Chopped Fish: Boars will gladly eat raw fish slices (FishRaw, FishAnglerRaw).
    • Raw Meats: Boars will eat raw meats (RawMeat, DeerMeat, WolfMeat, LoxMeat, NeckTail, SerpentMeat, HareMeat, etc.).
    • Prepared Viking Feats & Leftovers: Boars will consume cooked meals, stews, soups, pies, breads, sausages, jerkies, salads, honey, and eggs!
    • Farming Safety: Agricultural seeds and grains are kept safe by default (EatSeeds = false), preventing boars from snacking on your precious crop seeds unless configured.
    • Sharp Senses: Enhanced food detection radius (10m vs vanilla 5m) and scan frequency (5s vs vanilla 10s) ensure boars notice thrown food promptly.
  • ๐ŸŽฌ Living Animations & Effects: Boars pause their idle wandering, lower their snouts to root into the ground with authentic eating/rooting animations, kick up dirt particle clouds, and play earthy digging sound effects before the mushroom pops free!
  • โญ Star-Tier Breeding Rewards:
    • 0-Star Boar: Steady, standard mushroom foraging.
    • 1-Star Boar: 20% faster forage cooldowns and a 30% bonus chance to dig up extra yield.
    • 2-Star Boar: 40% faster forage cooldowns, 60% bonus chance for extra yield, and a chance to dig up rare subterranean treats like Yellow Mushrooms!
  • ๐ŸŒฟ Ground & Structure Detection: Boars only dig when standing directly on natural terrain (grass, forest dirt, or cultivated ground). They will never dig through wooden floors, cobblestone slabs, marble structures, or player-built buildings.
    • ๐Ÿงน Pen Clutter & Lag Protection: If an enclosure or pen already has several uncollected mushrooms lying around (configurable, default: 5 items within an 8-meter radius), boars pause foraging until the player gathers them. This protects your frame rate and avoids runaway item clutter when you're away on long voyages!
  • ๐ŸŽ Contented & Fed Requirement: By default, boars only forage when they are well-fed and happy (RequireFed = true), rewarding you for keeping feeding troughs stocked with berries, carrots, turnips, or onions.
  • ๐ŸŒ Multiplayer & ServerSync:
    • Fully authoritative ZNetView synchronization: only the network owner of the boar manages the timer and drops the item, preventing duplicate spawns.
    • Built-in ServerSync allows dedicated server administrators to lock and enforce configs for all connected players.

Configuration

The configuration file is created automatically at BepInEx/config/com.jubaroo.truffleboars.cfg upon first run. All settings can be adjusted in-game via configuration managers (e.g. BepInEx Configuration Manager) or directly edited:

General

Setting Default Description
Lock Configuration true If on, the configuration is locked and can only be changed by server admins.
Enabled true Master toggle for the TruffleBoars mod.
RequireTamed true Whether boars must be fully tamed to forage.
RequireFed true When true, boars only forage when well-fed and happy.
PigletsCanForage false Whether baby piglets can forage or only mature adult boars.
AllowOnStructures false Allow boars to forage on top of player buildings (wood/stone floors).
AllowOnPavedRoads false Allow boars to forage on hoe-paved cobblestone surfaces.
ExtraBoarPrefabs "" Comma-separated list of additional creature prefab names to treat as boars (for modded boars).

Timers & Cooldowns

Setting Default Description
MinForageInterval 240 Minimum seconds between forage attempts (e.g., 4 minutes).
MaxForageInterval 480 Maximum seconds between forage attempts (e.g., 8 minutes).
StarCooldownReductionPercent 20 Percent reduction applied to cooldown per star (e.g., 20% for 1-star, 40% for 2-star).

Drops & Loot

Setting Default Description
DefaultDropPrefab Mushroom The default item prefab dropped (Red Mushroom).
RareDropPrefab MushroomYellow The rare item prefab dropped by high-tier boars (Yellow Mushroom).
OneStarRareChance 10 Percent chance (0-100) for a 1-star boar to dig up the rare item instead.
TwoStarRareChance 30 Percent chance (0-100) for a 2-star boar to dig up the rare item instead.
BonusDropChancePerStar 30 Percent chance per star level to produce an extra +1 mushroom item.

Limits & Lag Prevention

Setting Default Description
MaxNearbyItems 5 Maximum number of uncollected mushrooms in an area before boars pause digging. Set to 0 to disable.
NearbyScanRadius 8.0 Radius in meters to scan for uncollected mushrooms around the boar.

Audio & Visuals

Setting Default Description
SpawnDirtParticles true Spawn dirt puffs when rooting.
PlayDigSound true Play earthy digging sound effects when rooting.
ShowHeartEffect false Display a gentle heart/contentment puff when a mushroom is uncovered.

Feeding & Diet

Setting Default Description
EatAllFood true Allow boars to eat any player food item (all cooked meals, stews, soups, breads, pies, fruits, veggies, berries, honey, etc.).
EatFish true Allow boars to eat caught fish (all whole fish varieties like perch, pike, tuna, etc.).
EatRawFish true Allow boars to eat raw / chopped fish (FishRaw, FishAnglerRaw).
EatRawMeat true Allow boars to eat raw meats (deer meat, wolf meat, lox meat, neck tails, serpent meat, hare meat, etc.).
AllowCannibalism true Allow boars to eat boar meat (RawMeat) and boar jerky. Disable if you prefer they don't eat their own species.
EatSeeds false Allow boars to eat farming seeds, grains, and tree nuts (barley, flax, carrot/turnip/onion seeds, acorns). Disabled by default to protect your farm seeds.
ExtraFoodPrefabs "" Comma-separated list of additional item prefab names or item IDs that boars are allowed to eat (for modded or custom items).
FoodSearchRange 10.0 Detection radius in meters around the boar to find thrown food on the ground. Vanilla is 5m. Set to 0 to keep vanilla.
FoodSearchInterval 5.0 How often in seconds boars search for nearby food when hungry. Vanilla is 10s. Set to 0 to keep vanilla.

Installation

Manual Installation

  1. Ensure BepInExPack Valheim is installed.
  2. Download the latest TruffleBoars-x.x.x.zip release.
  3. Extract the contents and move TruffleBoars.dll into your Valheim/BepInEx/plugins/ directory.

Mod Manager Installation

Install via r2modman or Thunderstore Mod Manager with one click.


Compatibility

  • 100% compatible with Ashlands and Bog Witch updates.
  • Fully compatible with other tame and animal mods (AllTameable, PetBoars, Farmyard, etc.).
  • Safe to add or remove mid-playthrough.

Author & Support

Crafted with love by Jubaroo. Enjoy your pastoral Viking truffle-hunting adventures!