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:
parent
4b382e7fad
commit
0a3f82e955
6 changed files with 90 additions and 14 deletions
76
JotunnModStub/Skeleton/SkeletonConfig.cs
Normal file
76
JotunnModStub/Skeleton/SkeletonConfig.cs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
using BepInEx.Configuration;
|
||||
|
||||
namespace RacesOfValheim
|
||||
{
|
||||
/// <summary>
|
||||
/// Every tunable number behind the Skeleton's abilities, bound as BepInEx ConfigEntry so they
|
||||
/// show up in Configuration Manager without touching code - see
|
||||
/// CONFIGURATION-MANAGER-HOWTO.md. Bound once, from RacesOfValheim.Awake(). One section per
|
||||
/// topic (matches the other races' layout).
|
||||
///
|
||||
/// No keybinds section: every Skeleton ability is passive, triggered by tier and combat events
|
||||
/// rather than a key press.
|
||||
///
|
||||
/// The per-tier progression table itself (SkeletonProgression.GetRules: max health bonus,
|
||||
/// lifesteal percent per tier, max summons) is left as-is, same boundary drawn for every other
|
||||
/// race's progression table - not exposed here. Only the flat ability numbers a tier's boolean
|
||||
/// flag switches on are configurable.
|
||||
///
|
||||
/// One caveat: Enhanced Regen Health Multiplier is read into SE_SkeletonStats.RebuildForState,
|
||||
/// which only re-reads it when the player's progression state changes (it short-circuits if
|
||||
/// the state matches what it last built for). Retuning that one value mid-session at an
|
||||
/// already-reached tier needs a relog (or reaching a new tier) to take effect. Everything else
|
||||
/// here reads live on every use.
|
||||
/// </summary>
|
||||
public static class SkeletonConfig
|
||||
{
|
||||
// ─── Passive combat ──────────────────────────────────────────────────
|
||||
public static ConfigEntry<float> AutoStunCooldown;
|
||||
public static ConfigEntry<float> AutoStunStaggerMultiplier;
|
||||
public static ConfigEntry<float> PoisonAttackBonus;
|
||||
public static ConfigEntry<float> EnhancedRegenHealthMultiplier;
|
||||
public static ConfigEntry<float> EnhancedRegenTickSpeedBonus;
|
||||
|
||||
// ─── Fire Aura (tier 5+) ───────────────────────────────────────────────
|
||||
public static ConfigEntry<float> FireAuraRadius;
|
||||
public static ConfigEntry<float> FireAuraDamagePerTick;
|
||||
public static ConfigEntry<float> FireAuraTickInterval;
|
||||
|
||||
// ─── Resurrection (tier 6+) ────────────────────────────────────────────
|
||||
public static ConfigEntry<float> ResurrectionCooldown;
|
||||
|
||||
// ─── Visuals ───────────────────────────────────────────────────────────
|
||||
public static ConfigEntry<bool> HeadFireVFXEnabled;
|
||||
|
||||
public static void Bind(ConfigFile config)
|
||||
{
|
||||
const string combat = "Skeleton - Passive Combat";
|
||||
AutoStunCooldown = config.Bind(combat, "Auto Stun Cooldown", 5f,
|
||||
new ConfigDescription("Seconds between forced staggers on the enemy hit, tier 3+.", new AcceptableValueRange<float>(0f, 60f)));
|
||||
AutoStunStaggerMultiplier = config.Bind(combat, "Auto Stun Stagger Multiplier", 100f,
|
||||
new ConfigDescription("Stagger multiplier applied to force the stagger through.", new AcceptableValueRange<float>(1f, 500f)));
|
||||
PoisonAttackBonus = config.Bind(combat, "Poison Attack Bonus", 20f,
|
||||
new ConfigDescription("Flat poison damage added to every hit the player lands, tier 4+.", new AcceptableValueRange<float>(0f, 100f)));
|
||||
EnhancedRegenHealthMultiplier = config.Bind(combat, "Enhanced Regen Health Multiplier", 1.5f,
|
||||
new ConfigDescription("Health regeneration multiplier, tier 5+.", new AcceptableValueRange<float>(1f, 5f)));
|
||||
EnhancedRegenTickSpeedBonus = config.Bind(combat, "Enhanced Regen Tick Speed Bonus", 0.25f,
|
||||
new ConfigDescription("Extra speed at which the regen timer accumulates, tier 5+ (0.25 = 25% faster ticks).", new AcceptableValueRange<float>(0f, 2f)));
|
||||
|
||||
const string aura = "Skeleton - Fire Aura";
|
||||
FireAuraRadius = config.Bind(aura, "Radius", 5f,
|
||||
new ConfigDescription("Meters from the player that the tier 5+ aura damages.", new AcceptableValueRange<float>(1f, 20f)));
|
||||
FireAuraDamagePerTick = config.Bind(aura, "Damage Per Tick", 30f,
|
||||
new ConfigDescription("Fire damage dealt to every enemy in range, once per tick.", new AcceptableValueRange<float>(0f, 100f)));
|
||||
FireAuraTickInterval = config.Bind(aura, "Tick Interval", 1f,
|
||||
new ConfigDescription("Seconds between aura damage ticks.", new AcceptableValueRange<float>(0.1f, 5f)));
|
||||
|
||||
const string resurrection = "Skeleton - Resurrection";
|
||||
ResurrectionCooldown = config.Bind(resurrection, "Cooldown", 300f,
|
||||
new ConfigDescription("Seconds between auto-resurrections, tier 6+.", new AcceptableValueRange<float>(0f, 3600f)));
|
||||
|
||||
const string visuals = "Skeleton - Visuals";
|
||||
HeadFireVFXEnabled = config.Bind(visuals, "Head Fire VFX Enabled", true,
|
||||
new ConfigDescription("Whether the burning-skull effect (worn from tier 5+) renders at all. A client-side preference: disabling it stops you from seeing it on yourself and on every other skeleton you look at, but does not change what other players see."));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue