Commit graph

2 commits

Author SHA1 Message Date
2e31f98380 feat(dvergar): add Fire Construct base-defense piece (Mountain faction feature)
Stationary Hammer piece cloned from DvergerMageFire: scans a configurable
radius for hostile, non-Mountain-faction, non-player Characters and fires its
own fireball (real attack data pulled off Humanoid.m_defaultItems, grounded in
an in-game dumpelder dump, not guessed).

Fire-only for this first pass; Ice/Support are a later append to the same
pattern. Several in-game fixes along the way: a missing piece icon (Jotunn
silently drops any piece without one), a missing known-piece teach on spawn
(same fix RaceMenuWard already needed), a kinematic Rigidbody fighting
Character's own velocity writes, and MonsterAI needing to be disabled rather
than destroyed - several vanilla systems (EnemyHud, most likely damage
registration too) assume any combat-relevant Character has one.

FactionHostilityPatch gains a public IsMountainFactionMob accessor so the
construct's target filter shares the same Mountain roster as the rest of
Factions instead of a second hand-maintained list.
2026-08-07 08:23:04 +02:00
3607d7323d feat(dvergar): make ability numbers and keybinds BepInEx-configurable
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().
2026-08-06 13:56:00 +02:00