You are viewing a potentially older version of this package. View all versions.
Wubarrk-DvergrAllies-1.0.9 icon

DvergrAllies

Tame, breed, and lead an army of custom Dvergr Allies! Features 4 custom classes (Warrior, Cleric, Spellsword, Elemental Mage), breeding genetics, star-level weapon scaling, and native combat AI.

Date uploaded 2 weeks ago
Version 1.0.9
Download link Wubarrk-DvergrAllies-1.0.9.zip
Downloads 214
Dependency string Wubarrk-DvergrAllies-1.0.9

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 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.2350
ValheimModding-Jotunn-2.30.0 icon
ValheimModding-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.30.0
ValheimModding-JsonDotNET-13.0.4 icon
ValheimModding-JsonDotNET

Shared version 13.0.3 of Json.NET from Newtonsoft, net45 package for use in Valheim mods. Maintained by the ValheimModding team.

Preferred version: 13.0.4

README

⚒️ Dvergr Allies

Tame, breed, and lead an army of custom Dwarven warriors.

Valheim BepInEx Jotunn

[!NOTE] Dvergr Allies is a massive overhaul to the Valheim taming system, allowing you to tame vanilla Dvergrs, breed them, and genetically evolve them into four distinct custom combat classes. Featuring dynamic weapon scaling, complex genetics, and custom-built Native Monster AI, your Dvergrs are no longer just passive NPCs—they are an elite fighting force.


🛡️ Features

[!TIP] Mercenary Contracts: Don't want to tame? Buy Dvergr Contracts from Haldor the Trader! Consuming a contract will instantly summon a fully-tamed, randomized Dvergr class (including rare elites like Spellswords or Berserkers!).

  • Taming & Breeding: Tame wild vanilla Dvergrs using Coins, Cooked Meat, Sausages, or Yggdrasil Wood.
  • Genetic Class System: Breed your Dvergrs to discover specialized classes. Cross-breed existing classes to unlock powerful elite hybrids.
  • Dynamic Equipment Scaling: Your allies don't just get more health when they level up. Their physical gear dynamically upgrades! A 0-star Warrior wields a Bronze Sword. A 1-star upgrades to Iron. A 2-star wields a devastating Blackmetal Battleaxe.
  • Native Combat AI: Weapons and magic have been flawlessly integrated into the native Valheim monster physics engine, ensuring perfect hit registration, aggression, and particle effects.
  • Cleric AoE Healing: Clerics pulse massive Area-of-Effect Heal-over-Time spells to keep your army alive during raids.
  • Discord Stats via BarrkBOT: Your server tracks your empire and reports it to Discord — who commands the largest warband, whose bloodlines have taken the heaviest losses, and who got lucky pulling elites out of Haldor's contracts. Deaths and births are recorded as they happen and survive server restarts.

🧬 The Classes & Prefabs

Class Icon Role Abilities & Upgrades
Base Dvergr
AllyDvergr
⛏️ Foundation The genetic baseline. Wields simple weapons.
The Warrior
AllyDvergrWarrior
⚔️ Tank / Aggro 0★: Bronze Sword & Buckler
1★: Iron Sword & Silver Shield
2★ (Berserker): Blackmetal Battleaxe (+50% Slash Damage buff)
The Cleric
AllyDvergrCleric
🌿 Support / Healer Ability: Pulses 15 HP/s AoE Heal-over-Time.
Defense: Wields an Iron Mace.
The Spellsword
AllyDvergrSpellswordFire / Ice
🔥 / ❄️ Elite Hybrid Ability: Casts native Fireball or Icebolt, then rushes in for melee.
Gear: Bronze (0★) → Iron (1★) → Blackmetal (2★)
The Elemental Mage
AllyDvergrMageElemental
🌌 Arcane Artillery Ability: Cycles elements every 10s (Fireball, Icebolt, Goblin Shaman Fire).

🌳 The Breeding Tree

[!IMPORTANT] You can't just find an elite unit in the wild—you have to breed one. When two Dvergrs mate, their offspring has a chance to mutate into a higher-tier class based on their parents' genetics.

🧬 Tier 1 Mutations (From Vanilla Tames)

Combining two base Dvergr tames has a chance to produce a specialized unit.

  • ⛏️ Rogue + ⛏️ Rogue ➞ ⚔️ Warrior (Pure Melee)
  • ⛏️ Support Mage + ⛏️ Support Mage ➞ 🌿 Cleric (Pure Healing)
  • ⛏️ Fire Mage + ⛏️ Ice Mage ➞ 🌌 Elemental Mage (Dual Magic)

🧬 Tier 2 Mutations (Hybrids & Elites)

Combining different classes passes down their traits into an Elite Hybrid.

  • ⛏️ Rogue + ⛏️ Fire Mage ➞ 🔥 Fire Spellsword (Melee + Fire)
  • ⛏️ Rogue + ⛏️ Ice Mage ➞ ❄️ Ice Spellsword (Melee + Ice)
  • ⚔️ Warrior + ⚔️ Warrior ➞ 🪓 Berserker (Ultimate Melee)

[!NOTE] (Note: In the code, offspring that don't trigger the "Special Combo Chance" simply inherit the exact class of one of their parents, maintaining your bloodlines!).


⚙️ Configuration Options

Dvergr Allies is highly customizable via the BepInEx/config/DvergrAllies.cfg file. You can adjust almost every aspect of the mod in real-time.

🥩 Taming
  • Taming Time: Time required to tame a wild Dvergr. (Default: 1800s)
  • Taming Items: The prefabs they will eat. (Default: CookedMeat, Coins, Sausages, YggdrasilWood)
  • Fed Duration / Consume Range: Fine-tune their hunger mechanics and eating distance.
🧬 Breeding
  • Pregnancy Duration: How long it takes for offspring to spawn. (Default: 600s)
  • Breeding Limit: Max Dvergrs allowed in a 10m radius before they stop breeding. (Default: 4)
  • Pregnancy Chance: Likelihood of successful mating per interval. (Default: 33%)
  • Special Combo Chance: The chance that a valid genetic pair produces the Hybrid Mutation instead of a normal child. (Default: 25%)
  • Level Up Chance: The chance an offspring is born with +1 Star. (Default: 10%)
  • Max Breeding Level: Cap the maximum stars they can achieve. (Default: 2 Stars / Level 3)
📈 Stats
  • Health Multiplier: Global multiplier for your Dvergrs' base health pools.
  • Damage Multiplier: Global multiplier applied directly to the physical slash/blunt/pierce damage of all custom Dvergr weapons, and the elemental damage of all Mage staves.
📊 BarrkBOT Export
  • Enable Stats Export: Writes your Dvergr empire's stats to BepInEx/config/DvergrAllies/ as JSON, so BarrkBOT can answer questions about them in Discord. (Default: On)
  • Export Interval: Seconds between writes. (Default: 60s) BarrkBOT only checks every 20 minutes, so lowering this buys nothing.
  • Force Census Unavailable: (Testing only — leave Off) Makes the export deliberately report that it couldn't count your Dvergrs, so you can verify the failure path works without breaking anything. Counts are reported as "not measured" rather than zero, your lifetime history keeps recording, and the export says outright that it was forced.
  • Server-side only — clients do no work and write no files.
🧠 AI & Economy
  • Max Follow Leash: The maximum distance (in meters) a Dvergr will chase an enemy before dropping aggro and returning to the player they are following. (Default: 40m)
  • Contract Cost: Cost in coins to purchase a Mercenary Contract from Haldor. (Default: 999)

[!WARNING] Debugging: Toggle robust AI, Equipment, and Breeding logs to see exactly what your Dvergrs are thinking, who they are mating with, and what weapons they are equipping.


🤝 Compatibility

  • Valkyrie's Cargo — Ingvar, the travelling merchant, is a vanilla Dverger under the hood. Dvergr Allies recognises him by that mod's own tag on his save data and strips every taming, breeding and genetics component from him the moment he appears, so [E] trades with him as intended - he can never be tamed, petted, renamed, commanded, bred, or counted among your Dvergr. Wild Dvergr are unaffected.
  • Shadows of Midgard — your allies carry the SoMStealthExempt flag so SoM's stealth AI leaves them to their combat AI; wild, untamed Dvergr are explicitly not exempt, so sneaking past them still works.
  • BalrondIdleActors — Balrond's actor scripts are stripped from the custom Ally prefabs so your allies fight and follow instead of idling, and the wild-Dvergr AI adjustments are switched off entirely when Balrond is detected so wild NPCs keep their idle behaviours.

🛠️ Installation

  1. Install BepInEx for Valheim.
  2. Install Jotunn (The Valheim Library).
  3. Install JsonDotNET — required for the stats export.
  4. Drop DvergrAllies.dll into your BepInEx/plugins/ folder.
  5. Tame a Dvergr and begin your empire!

[!IMPORTANT] Server and every client must run the exact same DvergrAllies version. Since 1.0.8 a mismatched client is refused at connection with a screen showing both versions - update everyone together.



License: MIT — use, modify, and redistribute freely, including commercially; just keep the copyright notice. See LICENSE.md for the full text.

CHANGELOG

Changelog

1.0.9

  • Rebuilt against Valheim 1.0.16 and re-verified (static reference check on client and dedicated server, headless 1.0.16 dedicated-server boot).
  • Fixed: buying a Dvergr Contract from Haldor failed part-way through the purchase. Valheim 1.0 added a field to the game's trade-entry type that is not a piece of text, and the safety net this mod puts under its own entry only fills in the text ones. The game uses that field unconditionally the instant a purchase succeeds, so buying a contract threw an error immediately after the coins were taken and the contract handed over. Nothing was lost or double-charged - you kept the contract and paid exactly the listed price - but the purchase flourish and the store's own list refresh never happened, so the shop sat showing stale coin-affordability until it was closed and reopened. The field is now supplied and the purchase finishes cleanly.
  • Whether the contract reached Haldor is now in the log. It never was. If the contract was in his stock, nothing said so; if it was missing, nothing said why - and there are four separate reasons it can be missing, all of which looked identical from outside. Each now writes one line:
    • At startup: [Contract] Dvergr Contract registered at 999 coins., or an error naming exactly what stopped it being created.
    • When Haldor wakes: [Contract] Added to Haldor's stock at 999 coins (9 entries before, 10 after).
    • Plus their own lines for "already in his stock, not added twice" and "Haldor woke but the contract item is missing".
    • If Haldor wakes and there is no [Contract] line at all, that is itself the answer. The game applies every mod's addition to a trader as one chain, so an error thrown by any mod ahead of this one cancels every addition queued behind it, this one included. Haldor's counter is a busy place - Yggdrasil's Reckoning sells its Tear there, Valheim Runestone sells its trader cards there - and that failure leaves no trace in LogOutput.log on its own. A missing line is now evidence, not silence.
  • Everyone must update together, as with any patch release. Server and every client must run 1.0.9; a 1.0.8 client is refused at the door with a screen showing both versions.
  • No gameplay, balance or save-data changes. Still 8 Harmony patches; a healthy log still reads [Patches] 8 applied, none failed.

1.0.8

  • Valkyrie's Cargo compatibility: Ingvar is never tamed. Valkyrie's Cargo's travelling merchant, Ingvar, is not a prefab of his own - he is a plain vanilla Dverger that the mod tags on its save data (VCargo_ingvar) and dresses up at runtime. Dvergr Allies makes every Dverger tameable at load time, so he was inheriting the taming, breeding and genetics components too. The visible symptom: with both mods installed, pressing [E] on Ingvar petted him (Shift+E offered to rename him) instead of opening the trade, because the taming component sat ahead of the merchant script in his interaction lookup. Less visibly, Valkyrie's Cargo marks him tamed for its own reasons, so he could have bred with your Dvergr, been given a gender and an owner tag on data that mod owns, and been counted as one of your tamed Dvergr in the BarrkBOT export.
    • He is now recognised by that tag the moment he appears on your machine, and every Dvergr Allies component is removed from him before you can look at him: no taming, no petting, no renaming, no follow/stay commands, no breeding, no gender, no stealth flag, no owner tag, no place in the census. The per-frame wild-Dvergr AI adjustments leave him alone as well - his behaviour is the merchant script's to drive.
    • Wild Dvergr are untouched: the prefab-level taming injection is exactly as before, and the check costs a wild Dvergr one integer read as it spawns.
    • Recognition is by the save-data tag, not by whether Valkyrie's Cargo is installed. A merchant left behind in a world after that mod is removed still keeps his hands off your taming pens.
    • Startup logs [Compat] Valkyrie's Cargo detected when it is present, and one [Compat] Valkyrie's Cargo merchant ... woke on this machine line each time Ingvar lands, so the exclusion can be seen working.
    • One more Harmony patch (Tameable.Awake), so a healthy log now reads [Patches] 8 applied, none failed.
  • Everyone must now run the exact same version. Network compatibility is tightened from "major.minor must match" to "the whole version must match". Before, a 1.0.7 client could join a 1.0.8 server, and that client's copy of the mod would still treat Ingvar as tameable - it could pet, rename or command him on its own screen and write those onto his save data, and nothing the 1.0.8 side does can stop a client that has not updated. Now a mismatched client is turned away at the door by Jotunn's version screen, which shows both versions, so a server upgrade is a coordinated "everyone update" rather than a silent split. Patch releases of this mod change game patches and save-data writes, so this is the honest contract going forward.

1.0.7

  • Valheim 1.0.7 compatibility. Rebuilt for Valheim 1.0.7 (client build 25185596 / dedicated server build 25185644, network version 39) against BepInExPack 5.4.2350 and Jotunn 2.30.0 - the first Jotunn release for Valheim 1.0, which is now the minimum required version. The Jotunn build reference is pinned to exactly 2.30.0 so a rebuild cannot silently pick up a pre-1.0 Jotunn and produce a DLL that only fails once it is in the game.
  • Fixed: the mod could not be loaded on Valheim 1.0. Valheim 1.0 added a member to the game's Hoverable interface - GetHoverOffset, an extra reach the player's cursor allows for that object. DvergrTameable, which puts the pregnancy / hunger lines on a Dvergr's hover text, implements that interface, and a class that is missing an interface member cannot be loaded by the runtime at all ("VTable setup failed"), so on 1.0 everything that touches it - the taming setup for the ally prefabs and for wild Dvergr - would have thrown. It now provides the member, forwarding to the creature's own value, so a Dvergr's interact reach is exactly what its prefab declares (zero, for every vanilla creature) and nothing about hovering or interacting changes.
  • Nothing else needed to change. All seven Harmony patches (Character.SetTamed x2, Character.OnDeath, MonsterAI.UpdateAI, ZNetScene.Awake, ZNet.Shutdown, Trader.Start) resolve on 1.0.7 unchanged, and the 1.0 engine changes that broke other mods (sector ids, equipment visuals, save paths, Inventory.Load) are all in code this mod never touches. Verified on a 1.0.7 dedicated server: [Patches] 7 applied, none failed, 21 prefabs / 10 items / 1 status effect registered through Jotunn, Taming/Breeding components injected into 8 wild Dvergr prefabs, BarrkBOT export armed.

1.0.6

  • Critical fix: the stats export never started, and the Haldor contract quietly disappeared. In 1.0.4 and 1.0.5 one Harmony patch aimed at a method that does not exist where the code claimed it did. Harmony refuses to guess, so it threw — and because the game applies patches in one all-or-nothing pass, that single mistake took down everything after it: the BarrkBOT stats exporter was never even created, and the Dvergr Contract stopped appearing in Haldor's stock. Both are fixed and working again.
    • If you ran 1.0.4 or 1.0.5 on a server, the contract has been missing from Haldor since you installed it, and BepInEx/config/DvergrAllies/ was never created. No save data was harmed and nothing was lost — the features simply never switched on.
    • The failure left no trace in LogOutput.log, because Unity's own error log is not written to disk by default. That is the real reason it went unnoticed, and it is what the rest of this release addresses.
  • A broken patch can no longer take the mod down with it. Patches are now applied one at a time. If a future game update moves or renames something, that one feature switches off, says so by name in the log, and everything else keeps working — instead of the whole mod silently going quiet.
    • The log now always reports the tally: [Patches] N applied, none failed.
  • The export says what it is doing. It now logs one line when it arms at startup, and one more whenever the answer to "is it writing?" changes — waiting for the world, idle because the setting is off, or running. A healthy export and an export that never started can no longer look identical.
  • The export loop can no longer die in silence. A hiccup reading the world database costs that single cycle and is reported; previously it could stop the export for the rest of the session with nothing to show for it.

1.0.5

  • Failure-Path Test Switch (Force Census Unavailable): A new testing-only setting under 6 - BarrkBOT Export that makes the export report census_unavailable on purpose, so server owners can confirm the failure path behaves correctly on a live server without having to break anything to see it.
    • Population counts are written as null rather than 0 — "we couldn't count" never masquerades as "nothing is alive".
    • Lifetime history is untouched and keeps recording normally while the switch is on.
    • The export states plainly that the condition was forced, so a drill can never be mistaken for a real fault — and anyone who leaves the switch on by accident can see exactly why their numbers disappeared.
    • Leave it off in normal play.

1.0.4

  • BarrkBOT Stats Export (New): The server now writes your Dvergr empire's stats to JSON so BarrkBOT can answer questions about it in Discord — who has the biggest warband, who's lost the most, who got lucky on contracts.
    • Full-world census. Reads the save database directly rather than only what's loaded, so Dvergrs standing in zones nobody has visited for weeks are still counted.
    • History that survives restarts. Births, deaths, contracts and gacha pulls are banked to a per-world counter file as they happen. Deaths especially — a dead Dvergr leaves nothing behind to count later, so it has to be recorded at the moment it dies.
    • Per-player attribution. Dvergrs are tagged with whoever tamed or summoned them, and offspring inherit the tag from their parent, so bloodlines stay credited to the right player. A player whose entire warband died still appears, with their losses intact.
    • Written to BepInEx/config/DvergrAllies/. Off-by-default settings live under 6 - BarrkBOT Export; the export is server-side only and costs clients nothing.
    • Now requires JsonDotNET (added to dependencies).
  • Honest failure reporting. If the exporter runs but cannot scan the world, it still writes the files, marks them census_unavailable with the reason, and reports population counts as null instead of 0 — so "nothing is alive" can never be confused with "we couldn't count". A missing file now means one thing only: the exporter never ran.

1.0.3

  • Shadows of Midgard Compatibility: Added a SoMStealthExempt ZDO flag to Dvergr Allies. This ensures Shadows of Midgard's stealth AI correctly ignores them, allowing them to follow their designated combat AI without interference.
    • The flag is applied only to your allies — custom Ally prefabs, tamed wild Dvergrs, and their offspring. Wild, untamed Dvergrs are explicitly left alone so Shadows of Midgard's stealth system keeps working on them and you can still sneak past them.
    • The flag is now applied at the moment a wild Dvergr is tamed, not just when it spawns, so Dvergrs you recruit mid-session are covered immediately.
    • Wild Dvergrs are actively stamped as not exempt, which clears the flag from any that were incorrectly marked in an existing world.

1.0.2

  • Deep Compatibility Overhaul for BalrondIdleActors:
    • Added aggressive script-stripping to prevent Balrond's mod from hijacking our custom tamed Dvergr Allies.
    • Strips BalrondActor, BalrondActorTalker, and BalrondActorNamePicker directly from all custom Ally prefabs (AllyDvergrWarrior, AllyDvergrCleric, etc.) at load time.
    • Added a runtime failsafe (DvergrCombatAI) that scans and dynamically destroys Balrond components if they are forcibly injected into active Ally game objects after spawning.
    • Completely disabled our MonsterAI prefix patch on wild Dvergrs when Balrond's mod is detected, ensuring wild NPCs retain their custom idle behaviors without interference.
    • Ensures your tamed Allies will properly fight and follow you instead of standing idle or breaking their custom AI.
  • Manifest Correction: Updated manifest.json to correctly list required dependencies and the accurate Discord website URL.

1.0.1

  • Compatibility Patch: Added an explicit compatibility check for BalrondIdleActors. If detected, DvergrAllies will automatically skip modifying wild Dvergrs to prevent conflicts with Idle NPCs. Dvergr allies purchased from Haldor or spawned by command will still function properly.

1.0.0

  • Initial Release!
  • Tame vanilla Dvergrs and recruit them as an Ally base-class.
  • Mercenary Contracts (Gacha): Buy Dvergr Contracts from Haldor to instantly summon randomized tamed allies!
  • Custom Genetic Class System:
    • Warrior (Aggressive melee tank)
    • Berserker (The ultimate 2-star melee evolution, wielding a Blackmetal Battleaxe)
    • Cleric (AoE heal-over-time support)
    • Spellsword (Fire & Ice) (Hybrid magic + melee combat, inherits specific magic based on parents)
    • Elemental Mage (Dynamically rotates between Fire, Ice, and Goblin Fire magic)
  • Full Elementalist breeding tree system: Combine different traits to discover powerful hybrids.
  • Star-level dynamic weapon scaling (Gear visually and statistically upgrades from Bronze -> Iron -> Blackmetal as they level up).
  • Aggressive Combat AI: Forced behavioral overrides ensure tamed Dvergrs fight aggressively, hold their ground, and don't panic around fire or destroy player structures.
  • Follow Leash System: Configurable MaxFollowLeash (default 40m) ensures your Dvergrs never chase enemies too far away while following you.