ValheimWeaponClasses
Adds a craftable Class Obelisk letting players choose from 10 combat classes, each leveling from combat XP and unlocking passive perks every 10 levels.
About this mod Author’s original text
ValheimClassObelisk - Developer README
- Overview
Class Obelisk is a Valheim mod (BepInEx plugin, built on the Jotunn modding library) that adds a craftable "Class Obelisk" piece. A player interacts with the Obelisk to choose from 10 combat classes:
SwordMaster, Archer, Crusher, Assassin, Brawler, Wizard, Lancer, Bulwark, Executioner, Warlock
Each class deals bonus damage with its associated weapon type and gains XP from combat. Classes level from 1 to 50, unlocking a passive perk every 10 levels (10 / 20 / 30 / 40 / 50).
Plugin identity (BepInEx):
| Field | Value |
|---|---|
| GUID | com.bunzboi.valheimweaponclass |
| Name | ValheimWeaponClasses |
| Version | 1.1.0 |
- Requirements / Dependencies
-.NET Framework 4.7.2
- BepInEx + 0Harmony (referenced from the local Steam Valheim install)
- Jotunn (declared as a hard dependency via [BepInDependency(Jotunn.Main.ModGuid)]) — used for prefab cloning, the piece/build system, and all custom GUI (the class-selection window)
The.csproj references game/BepInEx/Jotunn DLLs via HintPaths pointing at a local Steam install (Program Files (x86)\Steam\steamapps\common\Valheim\...). If you're setting this up on a new machine, update those HintPaths (or your Steam install path) if the build fails to find references.
A Newtonsoft.Json.dll is vendored under Libs/ but is not currently used for anything - all save data goes through Unity's own JsonUtility instead.
- Project Layout
ClassObeliskMod.cs Plugin entry point (BaseUnityPlugin). Creates the
Obelisk piece and contains the entire class-
selection GUI (built with Jotunn's GUIManager).
Utilities/
PlayerClass.cs The PlayerClass enum + PlayerClassHelper
(display names, internal names, weapon-type
lookups).
PlayerClassManager.cs Per-player class data (PlayerClassData) and
the static registry (PlayerClassManager).
Also contains the Save/Load Harmony patches.
ClassCombatManager.cs Weapon-type detection (is this a sword? a
bow? etc.) and class damage multipliers.
ClassDamageBonusSystem.cs Generic per-level damage bonus (separate
from ClassCombatManager - see section 5).
XPSystemManager.cs XP awarding, leveling curve, and the Harmony
patches that hook combat events for XP.
AnimationSpeedManager.cs Reusable stacking multiplier utility for
attack/animation speed (used by some perks).
SEUtils.cs Helpers for inspecting vanilla StatusEffects
(poison/burning/frost stacks, timers, etc.)
PerkManagers/ One file per class, each implementing that
class's level 10/20/30/40/50 passive perks
(SwordMasterPerkManager.cs, ArcherPerkManager.cs,
CrusherPerkManager.cs, AssassinPerkManager.cs,
BrawlerPerkManager.cs, WizardPerkManager.cs,
LancerPerkManager.cs, BulwarkPerkManager.cs).
This is where you go to add or tune a specific
class's abilities.
TestingResources/ Debug-only console commands (API discovery,
bow testing, general debug utilities). Not part
of the intended production feature set.
Resources/Icons/ Embedded.rgba icon assets used by some perk
status effects.
Libs/ Vendored third-party DLLs (Newtonsoft.Json,
AnimationSpeedManager).
- How Class Selection Works
- The player crafts the Class Obelisk with a Hammer. It's built by cloning the vanilla piece_workbench prefab and stripping its CraftingStation component, so it's purely an interactable piece, not a crafting station (see ClassObeliskMod.AddClassObelisk / CreateClassObeliskPrefab).
- Interacting with it (E) calls ClassObeliskInteract.Interact, which opens a class-selection window built entirely with Jotunn's GUIManager (no Unity prefab/asset UI) - a grid of class buttons, a description panel populated from the hardcoded ClassDescriptions dictionary in ClassObeliskMod.cs, and a "Select Class" button.
- Clicking "Select Class" calls:
PlayerClassManager.SetPlayerActiveClass(player, className)
which resolves the class and calls PlayerClassData.SetActiveClass, replacing any currently active class - by default only one class can be active at a time.
No
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: