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.
TruffleBoars
Tamed boars periodically forage and root in natural soil to dig up wild mushrooms with audio/visual effects, star scaling, pen clutter limits, and full multiplayer sync โ by Jubaroo
By Jubaroo
| Date uploaded | 3 weeks ago |
| Version | 1.0.0 |
| Download link | Jubaroo-TruffleBoars-1.0.0.zip |
| Downloads | 70 |
| Dependency string | Jubaroo-TruffleBoars-1.0.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.2202README
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.
- ๐ฌ 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. |
Installation
Manual Installation
- Ensure BepInExPack Valheim is installed.
- Download the latest
TruffleBoars-x.x.x.ziprelease. - Extract the contents and move
TruffleBoars.dllinto yourValheim/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!
CHANGELOG
Changelog
1.1.0
- Omnivore Boar Diet: Boars now eat any food items thrown to them (just like real pigs)!
- Whole Fish: Boars will now eat caught fish varieties (Perch, Pike, Trout, Tuna, etc.).
- Raw / Chopped Fish: Boars will now eat raw chopped fish (
FishRaw,FishAnglerRaw). - Raw Meats: Boars will eat raw meats (
RawMeat,DeerMeat,WolfMeat,LoxMeat,NeckTail,SerpentMeat, etc.). - All Player Foods: Boars will eat cooked meals, stews, soups, pies, breads, jerkies, sausages, salads, fruits, vegetables, and honey.
- Optional Cannibalism Toggle: Configurable setting (
AllowCannibalism, defaulttrue) allowing boars to eat boar meat, or disabling it if you prefer they don't eat their own species. - Optional Farm Seed Protection:
EatSeeds(defaultfalse) allows boars to eat seeds/grains/nuts, disabled by default to keep your agricultural seeds safe. - Custom Food Prefabs:
ExtraFoodPrefabsoption allows specifying comma-separated custom modded foods or item IDs. - Enhanced Food Senses: Added
FoodSearchRange(default: 10m, vanilla 5m) andFoodSearchInterval(default: 5s, vanilla 10s) so boars detect thrown food quickly and reliably.
- Full multiplayer ServerSync support for all new feeding options.
1.0.0
- Initial release of TruffleBoars!
- Tamed boars periodically forage and root in natural soil (grass, dirt, cultivated ground) to dig up wild mushrooms.
- Fully animated rooting sequence: lowers snout, plays dirt particles and digging audio effects.
- Rewards breeding with Star Scaling: 1-star and 2-star boars forage faster and have higher chances for bonus yields and rare mushrooms (Yellow Mushrooms).
- Pen clutter & lag protection: stops digging if uncollected mushrooms in the pen exceed the configured threshold.
- Surface validation: Boars will not dig through wood floors, stone floors, or constructed buildings.
- ServerSync support: Dedicated server admins can lock and enforce mod settings across all connected clients.
- Fully configurable timers, drop chances, item prefabs, and ground rules.