From 760ddffc27f835df3e75a459a56c2979f92f2c3c Mon Sep 17 00:00:00 2001 From: kanym Date: Wed, 5 Aug 2026 19:42:38 +0200 Subject: [PATCH] feat(dvergar): give two stars a stone tone instead of deriving one Deriving it from the creature's own two-star offset put the tier a shade away from ordinary human skin, and no amount of clamping fixes that, because the derivation is asking for something a multiplier cannot do. Those offsets brighten and desaturate a dverger's own texture. Ours multiplies the human skin map, where less saturation means less tint, and less tint means more flesh - the opposite direction from the one intended. A multiplier can darken and it can bias. It cannot desaturate: the pink lives in the texture and survives being multiplied by grey, only dimmer. So two stars now states a colour outright - dark, and cold enough to sit on top of the flesh tone rather than under it. One star keeps deriving from the prefab, since that tier reads correctly. --- JotunnModStub/Dvergar/DvergarConfig.cs | 10 ++++++++++ JotunnModStub/Dvergar/DvergarVisuals.cs | 11 ++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/JotunnModStub/Dvergar/DvergarConfig.cs b/JotunnModStub/Dvergar/DvergarConfig.cs index bed7c3d..7fbeb82 100644 --- a/JotunnModStub/Dvergar/DvergarConfig.cs +++ b/JotunnModStub/Dvergar/DvergarConfig.cs @@ -71,6 +71,16 @@ namespace RacesOfValheim public const float StarMinValue = 0.20f; public const float StarMaxValue = 0.85f; + // Two stars is hand-picked rather than derived, because the derivation cannot express + // what it is asking for. A multiplier can darken a texture and it can bias a texture, but + // it cannot desaturate one: the pink is in the human skin map, and multiplying by grey + // keeps every bit of it, only dimmer. So the two-star tier says "stone" the only way this + // channel can - dark, and cold enough to sit on top of the pink rather than under it. + // + // To tune: raise all three together for a lighter dvergr, and widen the gap between R and + // B for a colder one. Keeping R below B is what holds the flesh tone down. + public static readonly Color TwoStarSkinColor = new Color(0.34f, 0.37f, 0.44f, 1f); + // ─── Cosmetic hood ─────────────────────────────────────────────────── // The helmet slot itself stays free — whatever the player equips keeps all of its stats, // only the mesh is swapped. diff --git a/JotunnModStub/Dvergar/DvergarVisuals.cs b/JotunnModStub/Dvergar/DvergarVisuals.cs index 4247a81..5647fef 100644 --- a/JotunnModStub/Dvergar/DvergarVisuals.cs +++ b/JotunnModStub/Dvergar/DvergarVisuals.cs @@ -74,7 +74,16 @@ namespace RacesOfValheim /// public static Color GetSkinColor(Player player) { - LevelEffects.LevelSetup setup = GetStarSetup(GetStarTier(GetProgressionState(player))); + int tier = GetStarTier(GetProgressionState(player)); + + // Two stars stops deriving and states a colour outright. The creature's own two-star + // offset brightens and desaturates, which through a multiplier over the human skin + // texture means "tint it less" - and landed the tier a shade away from ordinary + // flesh, which is the opposite of what two stars should read as. Stone grey says it + // in the one language a multiplier speaks. + if (tier >= 2) return DvergarConfig.TwoStarSkinColor; + + LevelEffects.LevelSetup setup = GetStarSetup(tier); if (setup == null) return DvergarConfig.SkinColor; return ShiftHsv(DvergarConfig.SkinColor, setup.m_hue, setup.m_saturation, setup.m_value);