Adds DvergarConfigManagement.cs rather than reusing the DvergarConfig
name: that existing class is a different kind of thing - identity
constants that must never change (renaming RaceId would orphan saved
characters), hand-tuned cosmetic placement numbers (eye/hood position),
and per-tier tables (health malus, smithing/trader discounts) left alone
under the same boundary drawn for every other race's progression table.
Only the genuine ability knobs move: Runic Ping and Runic Overcharge
(cost, radius, duration, cooldown, marker light) each get a Configuration
Manager section, plus mining and weapon-affinity percentages under
Passive Combat, plus the two keybinds. DvergarConfig's fields for those
now forward to DvergarConfigManagement (same const-to-property trick used
for Skadi), so all 109 existing call sites across 11 files kept working
unchanged except the two keybind consumers (DvergarAbilities,
RaceCompendium's in-game ability text), which now read the live
configured key so a rebind stays reflected everywhere it's shown.
Weapon-affinity DamagePercent/StaminaPercent are overridden with the live
config value inside DvergarProgression.GetRules rather than baked into
the static WeaponAffinities array, since that array evaluates at
class-load time - before RacesOfValheim.Awake() calls Bind - and would
risk a null-reference on the ConfigEntry.
Config sections stay bound alphabetically by race (Aswid, Draugh,
Dvergar, Skadi) in RacesOfValheim.Awake().
Rename covers the folder, all seven filenames and every identifier, status
effect name and display string. Valheim's own Dverger/dvergr prefab references
are untouched - the names never collided.
The race id is what sits in m_customData and the ZDO, so renaming it alone would
have handed every existing character the selection menu again. DvergarRace
migrates the old id on spawn, before anything else reads it.
Runic Spark is modelled on Skadi's Ice Affinity and deliberately shares its
shape: live from the base tier and growing a flat step per progression state, so
+2 at Base through +16 after Fader. Lightning rather than frost, and like
Skadi's it rides every blow rather than melee only. AddFlat gained the elemental
channels while it was there - lightning would otherwise have landed in generic
damage.
The Trol remote-sync trace fired on a two-second timer for as long as a remote
player existed, which in the main menu is forever: Player.m_localPlayer is null
there, so the character preview counts as remote and it never stopped. Keyed on
the state it reports instead, so it still catches a remote player being sized
wrongly without narrating an idle menu.
2026-08-04 00:22:58 +02:00
Renamed from JotunnModStub/Dvergur/DvergurAbilities.cs (Browse further)