Source-checkedLibraries & compatibility

VikingLib

by DigitalVikings · for Valheim

Modular combat mechanics, canonical status effects, and damage calculation framework for Valheim.

640Downloads
1d agoLast updated
BepInExLoaders
ThunderstoreSource

About VikingLib

From Thunderstore

Modular combat mechanics, canonical status effects, and damage calculation framework for Valheim.

VikingLib

VikingLib is a modular combat mechanics, character statistic, and damage calculation framework for Valheim. It decouples Valheim's combat and stat systems from monolithic vanilla methods, providing a deterministic foundation for custom combat overhauls, RPG progression, weapon packs, and perk mods.

Combat Dossier Staggered Target Combat

> ⚠️ Work in Progress (Pre-Release v0.2.1): This framework is in active development and has not been tested extensively across all game configurations. Features, internal APIs, and mechanics may change, and unintended edge cases may occur. Backup your character and world saves before testing.


How It Works

VikingLib intercepts and standardizes all combat math, stat mutations, and stamina drains through deterministic pipelines:

  • 6-Phase Prioritized Damage Pipeline: Every melee hit, projectile, and environmental impact executes sequentially across 6 distinct phases (PreCheck, AttackerModifiers, TargetDefenses, Mitigation, Execution, PostHitProcs), with full support for multi-target cleave decay, armor penetration, and continuous resistances.
  • Dual-Space 3-Tier Mathematical Engine: Evaluates character stats across 90+ tokens using strict mathematical tiers: Tier 1 (Flat base values), Tier 2 (Additive percentages), and Tier 3 (Compounding multipliers).
  • Asymptotic Action Efficiency: Stamina, eitr, and health costs scale smoothly in the denominator, ensuring efficiency buffs never reduce action drains to zero or exploit negative numbers (+100% efficiency halves action costs; +200% divides costs by three).
  • Combat Dossier & Hugin's Compendium: Inspect full weapon combo chains, cleave ratings, and live stamina costs by holding [Shift] over weapon tooltips, and view active character statistics cleanly categorized inside Hugin's Compendium (TextsDialog).
Click to expand Combat Stat Taxonomy (90+ Declarative Tokens)

| Category | Representative Tokens | Description | | :--- | :--- | :--- | | Vitals & Units | MaxHealth, MaxStamina, MaxEitr, HealthRegen, BodyArmor, JumpHeight | Physical vitals supporting Flat additions, Additive percentages, and Multipliers. | | Delivery & Stance | DamagePhysical, DamageElemental, DamageMelee, DamageRanged, DamageMagic, DamageOneHanded, DamageTwoHanded | Umbrella damage multipliers across combat stances and delivery methods. | | Action Efficiencies | MeleeStaminaEfficiency, OneHandedStaminaEfficiency, TwoHandedStaminaEfficiency, RangedStaminaEfficiency, SecondaryAttackStaminaEfficiency | Asymptotic stamina efficiency ratings scaling attack costs per grip and step. | | Techniques | AttackSpeed, CriticalStrikeChance, CriticalStrikeMultiplier, DamageSecondaryAttack, DamageComboFinisher, DamageSneak, CleaveEfficiency, StaggerDamage, BowDrawSpeed, CrossbowReloadSpeed | Modifiers altering attack tempo, critical hits, stealth ambushes, and ranged handling. | | Situational Contexts | DamageAgainstBosses, DamageAgainstStaggered, DamageAgainstAirborne, DamageExecute, DamageFirstStrike, DamageBerserk, DamageFlawless | Dynamic combat context modifiers evaluated in Phase 1 based on live creature states. | | Weapon Families | DamageSwords, DamageKnives, DamageClubs, DamagePolearms, DamageSpears, DamageAxes, DamageBows, DamageCrossbows, DamageUnarmed | Per-weapon-family mastery multipliers. | | Continuous Resistances| ResistancePhysical, ResistanceElemental, ResistanceSlashing ... ResistanceSpirit (10 types) | Multiplicative damage-taken factors ($\text{Taken} = \text{Base} \times \prod \text{Multipliers}$). Tier 3 only. | | Yields & Agriculture | MiningYield, WoodcuttingYield, MonsterDropYield, CraftingYield, CookingYield, ForagingYield, HarvestRadius | Multi-drop roll budgets on resources and agricultural tool interaction radiuses. |

Click to expand Developer Console Commands & Diagnostics

VikingLib includes developer commands accessible in the Valheim console (F5):

| Command | Usage | Description | | :--- | :--- | :--- | | vl_buff | vl_buff [on \| off \| clear] | Toggles or clears a suite of synthetic test buffs across all taxonomy categories on the local player. | | vl_trace | vl_trace | Prints a formatted diagnostic breakdown of the most recent combat hit (damage rolls, modifiers, armor, and resistances). | | vl_log | vl_log [off \| player \| all] | Configures live combat telemetry logging to the BepInEx console. | | vl_dump_attacks | vl_dump_attacks | Exports all weapon attack configurations from ObjectDB to VanillaWeaponAttacks.json. |

Click to expand Downstream Mod Integration Guide

Reference VikingLib.dll in your mod project and declare the BepInDependency:

[BepInPlugin("com.author.mymod", "MyCombatMod", "1.0.0")]
[BepInDependency("com.digitalvikings.vikinglib", BepInDependency.DependencyFlags.HardDependency)]
public class MyModPlugin : BaseUnityPlugin
{
    private void Awake()
    {
        // Add declarative character stat modifier (+20% sword damage)
        CharacterStats.DamageSwords.AddIncreased(Player.m_localPlayer, 0.20f, "Swordmaster");

        // Add type-safe resistance modifier (Tier 3 Multiplier ONLY, -20% fire damage taken)
        CharacterStats.ResistanceFire.AddMultiplier(Player.m_localPlayer, 0.80f, "Fire Ward");

        // Add asymptotic efficiency modifier (+25% melee stamina efficiency)
        CharacterStats.MeleeStaminaEfficiency.AddIncreased(Player.m_localPlayer, 0.25f, "Iron Stamina");
    }
}

Highlights

From source data

Loaders

Runs on BepInEx.

Footprint

Rated a light load on a server.

Last update

Its author last shipped an update 1d ago.

VikingLib on Nxeon

From our catalogue
One-click install
Supported on Nxeon Valheim servers, for BepInEx servers. We download it from Thunderstore, place it, and restart the server.
Server type needed
BepInEx
Server load
light
Smallest plan we suggest
Valheim — 4 GB (4 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
0.3.0, released 2026-11-03

Game versions by loader

LoaderGame versionsNewest
BepInEx

From 6 recorded builds of VikingLib.

Recent builds

BuildReleasedGame versionsLoaders
0.3.02026-11-03n/aBepInEx
0.2.32026-10-29n/aBepInEx
0.2.22026-10-27n/aBepInEx
0.2.12026-10-25n/aBepInEx
0.2.02026-10-25n/aBepInEx
0.1.02026-10-22n/aBepInEx

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run VikingLib on a Valheim server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Thunderstore as “Core”

Libraries & compatibility

Foundations and fixes other mods build on. Usually installed because something else needs it.

Compatibility

Game
Valheim
Loaders
BepInEx
Requires
One-click install needs a BepInEx server.

Verified at the source

  • ✓ThunderstoreOfficial listing, checked 2026-11-04Open ↗
  • ✓AuthorDigitalVikings, as published on Thunderstore
  • ✓LicenseNot published by the sourceFree

VikingLib, answered

Generated from the mod’s own source data.

Which loaders does it support?

BepInEx.

Is it free?

Yes. VikingLib is free to download from Thunderstore.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run VikingLib on a Valheim server.

Deploy in about a minute from $9.99 a month, then add VikingLib in one click.