Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
Downloads
868
Size
98KB
ADDatHost Valheim hosting
30% off

Arcane Attunement

Client-side Valheim mod. A player who has leveled Elemental Magic and Blood Magic keeps a baseline Eitr pool from those skills, so joining a new or less-progressed world does not leave them with an empty pool when Mistlands Eitr food is not available.

This is a gameplay advantage. It is not a cosmetic. Servers that enforce a mod list can refuse the connection. The mod does not run on Xbox or other consoles.

Author: Snook. Version 1.0.0. Nexus page: valheim/mods/4528.

What it changes

Only the local player (Player.m_localPlayer) is affected. It works in single player, on a self-hosted game, and on a dedicated vanilla server, because the client already owns that player's stats. There is no server plugin, no ServerSync, no version check, no network messages of its own, no new items, and no new save fields.

  • Max Eitr = (Elemental Magic level + Blood Magic level) × Eitr per level, added on top of food Eitr. Fractional skill levels are kept. There is no cap. The bonus applies when no Eitr food is active, which is what makes the Eitr bar show up.
  • Eitr regen = (floor(Elemental Magic / 5) + floor(Blood Magic / 5)) × regen percent per 5 levels. That percent is added in the same regen multiplier as armor's "+X% Eitr regen" and status effects, so it stacks with gear.
  • The current skill level is read every time, including the fractional part stored after a death. Death skill loss lowers the bonus on its own. Removing the mod returns those stats to vanilla on the next food update (about a second). The character file's existing max-Eitr number may still hold the boosted value until that update. Nothing is written to custom save data.

The Eitr bar uses the game's own visibility. It shows while current Eitr is below the maximum, including when the only Eitr is this bonus, and hides about a second after the pool is full, the same way the stamina bar does. There is no new tooltip or HUD element.

Presets are fixed. There is no custom preset.

Preset Eitr per level Regen per 5 levels
Attuned 0.5 +1.5%
Balanced (default) 1.0 +2%
Power Overwhelming 1.5 +5%

Example, Balanced, Elemental Magic 40 and Blood Magic 25: 65 bonus Eitr, and floor(40/5) + floor(25/5) = 13 steps × 2% = +26% Eitr regen.

Install

PC only (the Steam or native Linux/Windows client with BepInEx). This does not load on Xbox, PlayStation, or Switch.

  1. Install BepInExPack for Valheim (this package depends on denikson-BepInExPack_Valheim 5.4.2351).
  2. Thunderstore / r2modman: install Snook-ArcaneAttunement.
  3. Nexus, or a manual install: unpack the Nexus zip into the Valheim folder so the DLL lands at BepInEx/plugins/ArcaneAttunement/ArcaneAttunement.dll. BepInEx also loads a DLL placed directly in BepInEx/plugins/.

Start the game once. Config is created at BepInEx/config/snook.arcaneattunement.cfg. Edits apply on the next launch. There is no live reload.

[General]
Enabled = true
Preset = Balanced

Preset accepts Attuned, Balanced, or Power Overwhelming.

Uninstall

Delete ArcaneAttunement.dll. The next food tick writes vanilla max Eitr again. Other players do not need the mod installed for you to keep yours, and a vanilla dedicated server does not need it either.

A server that checks client mods (mod managers with server-side enforcement, or a community mod pack that rejects unknown plugins) may still disconnect you. This mod does not hide itself from those checks.

Other Eitr mods

There is no compatibility check. Another mod that also changes max Eitr or Eitr regen can stack with this one, overwrite it, or fight the same methods. That has not been tested.

Build

Game assemblies are not in this repo. dotnet build restores publicized Valheim 1.0.20 references and the BepInEx/Harmony references from NuGet. Those NuGet game DLLs are publicized, so private members look public at compile time. The game's Mono runtime still enforces the real visibility. The mod never reads or calls a game member from its own IL: patches take Harmony ___ arguments, and every other read goes through AccessTools. GameMemberAccessTests reads the built DLL and fails if that rule is broken. Building the solution, or the test project, builds the plugin first.

dotnet test -c Release

GitHub Actions builds on pushes and pull requests. A tag named v* (for example v1.0.0) also uploads two zip artifacts on that workflow run. Nothing is published to Thunderstore, Nexus, or GitHub Releases by the workflow.

  • Thunderstore zip: manifest.json, README.md, icon.png, CHANGELOG.md, plugins/ArcaneAttunement.dll
  • Nexus zip: BepInEx/plugins/ArcaneAttunement/ArcaneAttunement.dll

Building from source

On Fedora or Nobara, install Git, the .NET 8 SDK, and the GitHub CLI:

sudo dnf install -y git dotnet-sdk-8.0 gh
dotnet --list-sdks

dotnet --list-sdks should list an 8.0 SDK. If a newer SDK is already installed, keep 8 alongside it.

The repository is private. Sign in, clone it, and enter the directory:

gh auth login
gh repo clone wittmer85/ArcaneAttunement
cd ArcaneAttunement

Restore, build, and test:

dotnet restore
dotnet build -c Release
dotnet test -c Release

The mod targets net48 through the Microsoft.NETFramework.ReferenceAssemblies NuGet package, so Mono isn't needed.

Find the plugin DLL:

find . -path '*bin/Release*' -name ArcaneAttunement.dll

Copy that DLL into an r2modman profile at BepInEx/plugins/ArcaneAttunement/. In r2modman, open Settings and choose Browse profile folder, then put the file in that plugins directory.

Windows and other distros use the same dotnet commands with the .NET 8 SDK.

Tagging v* (for example v1.0.0) runs GitHub Actions, which builds the Thunderstore and Nexus zips and uploads them as artifacts on that workflow run. The workflow does not publish the zips.

Before you publish

  • [x] Nexus is published at https://www.nexusmods.com/valheim/mods/4528. website_url in thunderstore/manifest.json is that page.
  • [x] art/icon_full.jpg is the Nexus page image. thunderstore/icon.png is the 256×256 Thunderstore icon, resized from that file.
  • The Thunderstore package id becomes Snook-ArcaneAttunement only when it is uploaded by the Snook team.
  • Hooks were checked against the Valheim 1.0.20 method list and a decompile of the Eitr methods. The first in-game test on 1.0.20 (Linux, BepInEx 5.4.23.5) broke character previews and player updates, because the mod read private fields directly. That access is gone. Run the game again before publishing.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.