feat(fenrir): eyes glow at night, bright when a form is ready

A community suggestion: an indicator on the character instead of the
"<form> is Ready!" text. FenrirVisuals borrows the Skeleton's eye_l and
eye_r the way AswidVisuals does, with the Aswid's playtested placement,
and tints them with the Fenring's own emission colour (2.0, 0.372, 0),
read from bundle c4210710.

Dark by day and in a beast form. At night they glow faintly, and
brightly while one of the three keys would transform. That uses the
same gates as TryTransformWithRules: tier, night, sun sickness,
cooldown. The owner writes it to the ZDO only on a change, so remote
players see the same.

New local section "Fenrir - Appearance": Ready Message (on by
default), Eye Glow, and the night and ready strengths.
This commit is contained in:
kanym 2026-10-23 19:33:00 +02:00
commit d1f328a496
5 changed files with 304 additions and 1 deletions

View file

@ -85,6 +85,12 @@ namespace RacesOfValheim
// ─── Debug ─────────────────────────────────────────────────────────────
public static ConfigEntry<bool> DebugFormHits;
// ─── Appearance (per player, never synced) ──────────────────────────────
public static ConfigEntry<bool> ReadyMessage;
public static ConfigEntry<bool> EyeGlow;
public static ConfigEntry<float> EyeNightStrength;
public static ConfigEntry<float> EyeReadyStrength;
public static void Bind(ConfigFile config)
{
const string keybinds = "Fenrir - Keybinds";
@ -188,6 +194,17 @@ namespace RacesOfValheim
UlvPushForce = config.Bind(ulv, "Push Force", 25f,
new ConfigDescription("Knockback applied on a hit.", new AcceptableValueRange<float>(0f, 100f)));
// The whole section stays local - see ConfigSync.LocalSections.
const string appearance = "Fenrir - Appearance";
ReadyMessage = config.Bind(appearance, "Ready Message", true,
new ConfigDescription("Shows \"<form> is Ready!\" when a form's cooldown ends. The eyes say the same thing; turn this off if they are enough."));
EyeGlow = config.Bind(appearance, "Eye Glow", true,
new ConfigDescription("Fenrir eyes glow at night in the Fenring's own orange: faint while no form can be taken, bright when one can. Off hides them on every Fenrir you see."));
EyeNightStrength = config.Bind(appearance, "Eye Night Strength", 0.35f,
new ConfigDescription("Glow at night while no form is ready.", new AcceptableValueRange<float>(0f, 3f)));
EyeReadyStrength = config.Bind(appearance, "Eye Ready Strength", 1.2f,
new ConfigDescription("Glow at night while a form is ready.", new AcceptableValueRange<float>(0f, 3f)));
// "debug" in the key keeps it local - see ConfigSync.
DebugFormHits = config.Bind("Fenrir - Debug", "Debug: Log Form Hits", false,
new ConfigDescription("Writes one log line per claw or bite: what was in reach, what it hit, and why anything was skipped. For bug reports about attacks that do no damage."));