ValheimWeaponClasses

版本 v1.1.3·更新於 2026-09-21

Adds a craftable Class Obelisk letting players choose from 10 combat classes, each leveling from combat XP and unlocking passive perks every 10 levels.

模組介紹 作者原文

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

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

ValheimModding-Jotunn

檔案與校驗

檔案名稱
ValheimWeaponClasses-1.1.3.zip
檔案大小
518.1 KiB