feat(skeleton): make ability numbers BepInEx-configurable, add fire VFX toggle

Adds SkeletonConfig.cs, following the established per-race pattern: one
Configuration Manager section per topic (Passive Combat, Fire Aura,
Resurrection). No keybinds section - every Skeleton ability is passive,
triggered by tier and combat events rather than a key press. Defaults
match the previous hardcoded constants exactly.

The per-tier progression table itself (max health bonus, lifesteal
percent, max summons) stays untouched, same boundary drawn for every
other race's progression table.

Also adds a client-side "Head Fire VFX Enabled" toggle under a new
Skeleton - Visuals section, gating both places the burning-skull effect
is triggered (SkeletonRace for the local player, ZdoVisualSync for every
other skeleton-race player this client renders) - disabling it stops the
flame rendering for this client only, without changing what other
players see.

Config sections stay bound alphabetically by race (Aswid, Draugh,
Dvergar, Fenrir, Furling, Skadi, Skeleton) in RacesOfValheim.Awake().
This commit is contained in:
kanym 2026-08-06 15:11:39 +02:00
commit 0a3f82e955
6 changed files with 90 additions and 14 deletions

View file

@ -431,18 +431,17 @@ namespace RacesOfValheim
// rate, which is the player's own field.
if (rules.EnhancedRegen)
{
// Speed up regen ticks by 20% (1.25x faster timer accumulation)
float currentTimer = HarmonyLib.Traverse.Create(Player.m_localPlayer).Field<float>("m_foodRegenTimer").Value;
HarmonyLib.Traverse.Create(Player.m_localPlayer).Field("m_foodRegenTimer").SetValue(currentTimer + Time.deltaTime * 0.25f);
HarmonyLib.Traverse.Create(Player.m_localPlayer).Field("m_foodRegenTimer").SetValue(currentTimer + Time.deltaTime * SkeletonConfig.EnhancedRegenTickSpeedBonus.Value);
}
// Flames on the skull, worn with the fire-tier model and nothing else.
headFlame.Apply(Player.m_localPlayer, rules.ModelPrefab == SkeletonProgression.FireModel);
headFlame.Apply(Player.m_localPlayer, SkeletonConfig.HeadFireVFXEnabled.Value && rules.ModelPrefab == SkeletonProgression.FireModel);
if (rules.FireAura)
{
EnsureFireAuraVFX(true);
if (Time.time - lastAuraTime >= 1f)
if (Time.time - lastAuraTime >= SkeletonConfig.FireAuraTickInterval.Value)
{
ApplyFireAura();
lastAuraTime = Time.time;
@ -551,10 +550,10 @@ namespace RacesOfValheim
if (Player.m_localPlayer == null) return;
Vector3 center = Player.m_localPlayer.transform.position;
float radius = 5f;
float radius = SkeletonConfig.FireAuraRadius.Value;
HitData hitData = new HitData();
hitData.m_damage.m_fire = 30f; // 30 fire damage per second
hitData.m_damage.m_fire = SkeletonConfig.FireAuraDamagePerTick.Value;
hitData.SetAttacker(Player.m_localPlayer);
hitData.m_dir = Vector3.zero;