From 53f6fb71a2dee8427da8f8e96accd2b765e34be3 Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 24 Oct 2026 15:28:04 +0200 Subject: [PATCH 1/6] fix(skeleton): Auto-Resurrect on the real deathblow; Summon on Kill toggle Auto-Resurrect was decided in the Character.Damage prefix on the raw hit: before armour, blocking and resistances, with poison and fire counted in full. With good armour it fired on almost any hit. Damage also runs on the attacker's owner, so on a dedicated server a mob owned by the server or another player skipped the check entirely. It now runs in an ApplyDamage prefix, on the victim's own client, against the damage that is about to land. The rising-from-the-ground immunity is checked there too. Summon on Kill gets a toggle key (G, Skeleton - Keybinds) and a gamepad radial entry. The choice is saved on the character, on by default. A "Raise the Dead" status icon with the Dead Raiser's picture shows while it is on. Texts in English, Italian and Russian. --- JotunnModStub/RaceRadial.cs | 3 + JotunnModStub/Skeleton/SkeletonConfig.cs | 9 ++ JotunnModStub/Skeleton/SkeletonPatches.cs | 84 ++++++++++++------- JotunnModStub/Skeleton/SkeletonRace.cs | 70 ++++++++++++++++ .../Translations/English/messages.json | 5 +- .../Translations/English/status_effects.json | 4 +- .../Translations/Italian/messages.json | 5 +- .../Translations/Italian/status_effects.json | 4 +- .../Translations/Russian/messages.json | 5 +- .../Translations/Russian/status_effects.json | 4 +- 10 files changed, 158 insertions(+), 35 deletions(-) diff --git a/JotunnModStub/RaceRadial.cs b/JotunnModStub/RaceRadial.cs index 3e4e0da..a3dfc6b 100644 --- a/JotunnModStub/RaceRadial.cs +++ b/JotunnModStub/RaceRadial.cs @@ -72,6 +72,9 @@ namespace RacesOfValheim new Entry { Race = "Sverm", Label = "Ravager Strain", Key = () => SvermConfigManagement.RavagerKey, Icon = "TrophySeekerBrute" }, + new Entry { Race = "Skeleton", Label = "Summon on Kill", Key = () => SkeletonConfig.SummonToggleKey, Icon = "StaffSkeleton", + Available = player => SkeletonProgression.GetRules(BossProgressionManager.GetCurrentProgressionState()).SummonOnKill }, + // Any race: shown to whoever RaceClawSet has claws for. new Entry { Race = null, Label = "Grow Claws", Key = () => RaceClawsConfig.ActivateKey, Icon = "TrophyWolf", Available = player => RaceClawSet.For(player) != null }, diff --git a/JotunnModStub/Skeleton/SkeletonConfig.cs b/JotunnModStub/Skeleton/SkeletonConfig.cs index c6b8ba6..c5a9abf 100644 --- a/JotunnModStub/Skeleton/SkeletonConfig.cs +++ b/JotunnModStub/Skeleton/SkeletonConfig.cs @@ -1,4 +1,5 @@ using BepInEx.Configuration; +using UnityEngine; namespace RacesOfValheim { @@ -39,6 +40,9 @@ namespace RacesOfValheim // ─── Resurrection (tier 6+) ──────────────────────────────────────────── public static ConfigEntry ResurrectionCooldown; + // ─── Keybinds ────────────────────────────────────────────────────────── + public static ConfigEntry SummonToggleKey; + // ─── Visuals ─────────────────────────────────────────────────────────── public static ConfigEntry HeadFireVFXEnabled; public static ConfigEntry BodyModelEnabled; @@ -65,6 +69,11 @@ namespace RacesOfValheim FireAuraTickInterval = config.Bind(aura, "Tick Interval", 1f, new ConfigDescription("Seconds between aura damage ticks.", new AcceptableValueRange(0.1f, 5f))); + // G is the first ability key of every race that has one; the Skeleton had none. + const string keybinds = "Skeleton - Keybinds"; + SummonToggleKey = config.Bind(keybinds, "Toggle Summon on Kill", new KeyboardShortcut(KeyCode.G), + "Turns raising a skeleton from each kill on and off (The Queen and later). The Dead Raiser icon shows while it is on."); + const string resurrection = "Skeleton - Resurrection"; ResurrectionCooldown = config.Bind(resurrection, "Cooldown", 300f, new ConfigDescription("Seconds between auto-resurrections, tier 6+.", new AcceptableValueRange(0f, 3600f))); diff --git a/JotunnModStub/Skeleton/SkeletonPatches.cs b/JotunnModStub/Skeleton/SkeletonPatches.cs index 461fa75..8bfab05 100644 --- a/JotunnModStub/Skeleton/SkeletonPatches.cs +++ b/JotunnModStub/Skeleton/SkeletonPatches.cs @@ -597,6 +597,58 @@ namespace RacesOfValheim } } + /// + /// Auto-Resurrect, decided on the hit that would actually kill. + /// + /// It used to be decided in the Character.Damage prefix below, on hit.GetTotalDamage(), + /// and that number is the raw hit: before armour, blocking and resistances, and with the + /// hit's poison and fire counted in full although vanilla splits those off and lands them + /// over time. Any hit whose raw size beat the current health raised the Skeleton, so with + /// good armour it fired on "just about any damage" (akira's report). Damage also runs on + /// whoever owns the attacker, so on a dedicated server a mob owned by the server or by + /// another player never reached this check at all, and a real deathblow went through. + /// + /// ApplyDamage is what RPC_Damage calls on the victim's owner, after armour, blocking and + /// resistances, with poison, fire and spirit already moved out into their status effects. + /// Those effects come back through here on each tick, so a lethal tick still counts. The + /// one scaling left inside ApplyDamage for a player is the damage-taken rate. + /// + [HarmonyPatch(typeof(Character), nameof(Character.ApplyDamage))] + public static class Skeleton_ApplyDamage_Patch + { + private static readonly int CooldownHash = "SE_SkeletonResurrectCooldown".GetStableHashCode(); + + public static bool Prefix(Character __instance, HitData hit) + { + Player player = Player.m_localPlayer; + if (player == null || __instance != player) return true; + + // Here as well as in the Damage prefix, which only sees hits thrown from this client. + if (SkeletonRise.IsRising(player)) return false; + + if (!SkeletonRace.IsSkeleton() || player.IsDead()) return true; + if (!SkeletonProgression.GetRules(BossProgressionManager.GetCurrentProgressionState()).AutoResurrect) return true; + + float damage = hit.GetTotalDamage() * Game.m_localDamgeTakenRate; + if (damage < player.GetHealth()) return true; + if (player.GetSEMan().HaveStatusEffect(CooldownHash)) return true; + + player.Heal(player.GetMaxHealth(), true); + player.GetSEMan().AddStatusEffect(CooldownHash, true); + + // Confirmed real via 'listprefabs'; see SummonOnKill below. + GameObject vfx = PrefabManager.Cache.GetPrefab("fx_summon_skeleton_spawn") ?? + PrefabManager.Cache.GetPrefab("fx_summon_skeleton"); + if (vfx != null) UnityEngine.Object.Instantiate(vfx, player.transform.position, Quaternion.identity); + + // The body climbs out of the ground the way a crypt skeleton does. + SkeletonRise.Begin(player); + + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_have_been_resurrected_by_dark")); + return false; // the lethal hit never lands + } + } + [HarmonyPatch(typeof(Character), "Damage")] public static class Character_Damage_Patch { @@ -624,34 +676,8 @@ namespace RacesOfValheim // Half in the ground: nothing lands on a Skeleton while it climbs back out. if (__instance == Player.m_localPlayer && SkeletonRise.IsRising(Player.m_localPlayer)) return false; - // Auto-Resurrect check - if (__instance == Player.m_localPlayer && SkeletonRace.IsSkeleton() && rules.AutoResurrect) - { - if (hit.GetTotalDamage() >= __instance.GetHealth()) - { - if (!Player.m_localPlayer.GetSEMan().HaveStatusEffect("SE_SkeletonResurrectCooldown".GetStableHashCode())) - { - // Cancel death! - Player.m_localPlayer.Heal(Player.m_localPlayer.GetMaxHealth(), true); - Player.m_localPlayer.GetSEMan().AddStatusEffect("SE_SkeletonResurrectCooldown".GetStableHashCode(), true); - - // Spawn VFX - confirmed real via 'listprefabs'; see SummonOnKill below - // for how the previous two guesses here were caught and replaced. - GameObject vfx = PrefabManager.Cache.GetPrefab("fx_summon_skeleton_spawn") ?? - PrefabManager.Cache.GetPrefab("fx_summon_skeleton"); - if (vfx != null) - { - UnityEngine.Object.Instantiate(vfx, Player.m_localPlayer.transform.position, Quaternion.identity); - } - - // The body climbs out of the ground the way a crypt skeleton does. - SkeletonRise.Begin(Player.m_localPlayer); - - Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_have_been_resurrected_by_dark")); - return false; // Skip applying this lethal damage - } - } - } + // The Auto-Resurrect check used to live here and is now in + // Skeleton_ApplyDamage_Patch below; see there for why. // Outgoing damage (Lifesteal, Poison, Stun) Character attacker = hit.GetAttacker(); @@ -740,7 +766,7 @@ namespace RacesOfValheim int state = BossProgressionManager.GetCurrentProgressionState(); var rules = SkeletonProgression.GetRules(state); - if (rules.SummonOnKill && !string.IsNullOrEmpty(rules.SummonPrefab)) + if (rules.SummonOnKill && SkeletonRace.SummonOnKillEnabled && !string.IsNullOrEmpty(rules.SummonPrefab)) { // Clean up dead minions activeMinions.RemoveAll(m => m == null || m.IsDead()); diff --git a/JotunnModStub/Skeleton/SkeletonRace.cs b/JotunnModStub/Skeleton/SkeletonRace.cs index 1895ed5..8a80c7e 100644 --- a/JotunnModStub/Skeleton/SkeletonRace.cs +++ b/JotunnModStub/Skeleton/SkeletonRace.cs @@ -48,6 +48,73 @@ namespace RacesOfValheim resurrectSE.name = "SE_SkeletonResurrectCooldown"; CustomStatusEffect customResurrectSE = new CustomStatusEffect(resurrectSE, fixReference: false); ItemManager.Instance.AddStatusEffect(customResurrectSE); + + // The "Summon on Kill is on" icon. The Dead Raiser's, since the Skeleton trophy is + // already Undead Fortitude's and this is the staff that raises skeletons in vanilla. + var raiseSE = ScriptableObject.CreateInstance(); + raiseSE.name = RaiseDeadEffectName; + raiseSE.m_name = "$rov_se_skeleton_raisedead_name"; + raiseSE.m_tooltip = "$rov_se_skeleton_raisedead_tooltip"; + raiseSE.m_icon = PrefabManager.Cache.GetPrefab("StaffSkeleton")?.m_itemData.GetIcon() + ?? PrefabManager.Cache.GetPrefab("TrophySkeleton")?.m_itemData.GetIcon(); + ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(raiseSE, fixReference: false)); + } + + // ─── Summon on Kill switch ────────────────────────────────────────── + + private const string RaiseDeadEffectName = "SE_SkeletonRaiseDead"; + private static readonly int RaiseDeadEffectHash = RaiseDeadEffectName.GetStableHashCode(); + + // Stored as "off" on the character, so a character that never pressed the key - every + // existing one - keeps the perk on. + private const string SummonOffKey = "RacesOfValheim_SkeletonSummonOff"; + + /// Whether this character wants a skeleton raised from each kill. Per character, saved with it. + public static bool SummonOnKillEnabled + { + get + { + Player player = Player.m_localPlayer; + return player == null || player.m_customData == null || !player.m_customData.ContainsKey(SummonOffKey); + } + set + { + Player player = Player.m_localPlayer; + if (player == null || player.m_customData == null) return; + if (value) player.m_customData.Remove(SummonOffKey); + else player.m_customData[SummonOffKey] = "1"; + } + } + + /// + /// The toggle key, and the icon that says the perk is on. The icon is put back whenever it + /// is missing, because status effects do not survive death or a relog. + /// + private static void TickSummonToggle(Player player, SkeletonProgression.SkeletonRules rules) + { + if (RaceInput.Allowed && SkeletonConfig.SummonToggleKey.Value.IsDownIgnoringHeldKeys()) + { + if (!rules.SummonOnKill) + { + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_summon_locked")); + } + else + { + SummonOnKillEnabled = !SummonOnKillEnabled; + player.Message(MessageHud.MessageType.Center, + ModText.Get(SummonOnKillEnabled ? "rov_msg_skeleton_summon_on" : "rov_msg_skeleton_summon_off")); + } + } + + SetRaiseDeadIcon(player, rules.SummonOnKill && SummonOnKillEnabled); + } + + private static void SetRaiseDeadIcon(Player player, bool on) + { + SEMan seman = player.GetSEMan(); + bool has = seman.HaveStatusEffect(RaiseDeadEffectHash); + if (on && !has) seman.AddStatusEffect(RaiseDeadEffectHash, true); + else if (!on && has) seman.RemoveStatusEffect(RaiseDeadEffectHash, true); } public static bool IsSkeleton() @@ -272,6 +339,7 @@ namespace RacesOfValheim SkeletonVisuals.EnsureFireAura(Player.m_localPlayer, false, ref fireAuraVFX); headFlame.Apply(Player.m_localPlayer, false); RestoreJawBone(); + SetRaiseDeadIcon(Player.m_localPlayer, false); if (Player.m_localPlayer.transform.localScale != Vector3.one) { @@ -319,6 +387,8 @@ namespace RacesOfValheim int state = BossProgressionManager.GetCurrentProgressionState(); var rules = SkeletonProgression.GetRules(state); + TickSummonToggle(Player.m_localPlayer, rules); + // Continuously adjust equipment VisEquipment currentVis = Player.m_localPlayer.GetComponent(); if (currentVis != null) diff --git a/JotunnModStub/Translations/English/messages.json b/JotunnModStub/Translations/English/messages.json index 8f7c7fa..92fd052 100644 --- a/JotunnModStub/Translations/English/messages.json +++ b/JotunnModStub/Translations/English/messages.json @@ -202,5 +202,8 @@ "rov_msg_warvulture_vulture_settles_into_glide": "The vulture settles into a glide.", "rov_msg_warvulture_vulture_spirals_down": "The vulture spirals down.", "rov_msg_boneship_no_shore": "No shore in reach. They stay at the oars.", - "rov_msg_boneship_sunk": "The ship goes down, and $1 go with it." + "rov_msg_boneship_sunk": "The ship goes down, and $1 go with it.", + "rov_msg_skeleton_summon_on": "Summon on Kill: on. The dead will rise for you.", + "rov_msg_skeleton_summon_off": "Summon on Kill: off. The dead stay down.", + "rov_msg_skeleton_summon_locked": "Summon on Kill awakens once The Queen falls." } diff --git a/JotunnModStub/Translations/English/status_effects.json b/JotunnModStub/Translations/English/status_effects.json index ba0b959..dd86c98 100644 --- a/JotunnModStub/Translations/English/status_effects.json +++ b/JotunnModStub/Translations/English/status_effects.json @@ -58,5 +58,7 @@ "rov_se_trol_trueform_name": "True Form", "rov_se_trol_trueform_tooltip": "You have unleashed your inner troll!", "rov_se_trol_trueformcd_name": "True Form Cooldown", - "rov_se_trol_trueformcd_tooltip": "You are exhausted from your True Form." + "rov_se_trol_trueformcd_tooltip": "You are exhausted from your True Form.", + "rov_se_skeleton_raisedead_name": "Raise the Dead", + "rov_se_skeleton_raisedead_tooltip": "Each kill raises a skeleton to fight for you. Press the Summon on Kill key to turn it off." } diff --git a/JotunnModStub/Translations/Italian/messages.json b/JotunnModStub/Translations/Italian/messages.json index f0e20bb..1e1ee27 100644 --- a/JotunnModStub/Translations/Italian/messages.json +++ b/JotunnModStub/Translations/Italian/messages.json @@ -202,5 +202,8 @@ "rov_msg_warvulture_vulture_settles_into_glide": "L'avvoltoio si mette a planare.", "rov_msg_warvulture_vulture_spirals_down": "L'avvoltoio scende a spirale.", "rov_msg_boneship_no_shore": "Nessuna riva a portata. Restano ai remi.", - "rov_msg_boneship_sunk": "La nave affonda, e con lei $1." + "rov_msg_boneship_sunk": "La nave affonda, e con lei $1.", + "rov_msg_skeleton_summon_on": "Evoca all'uccisione: attiva. I morti si alzeranno per te.", + "rov_msg_skeleton_summon_off": "Evoca all'uccisione: disattiva. I morti restano a terra.", + "rov_msg_skeleton_summon_locked": "Evoca all'uccisione si risveglia quando cade la Regina." } diff --git a/JotunnModStub/Translations/Italian/status_effects.json b/JotunnModStub/Translations/Italian/status_effects.json index e4e391c..ed8a813 100644 --- a/JotunnModStub/Translations/Italian/status_effects.json +++ b/JotunnModStub/Translations/Italian/status_effects.json @@ -58,5 +58,7 @@ "rov_se_trol_trueform_name": "Vera forma", "rov_se_trol_trueform_tooltip": "Hai scatenato il troll che è in te!", "rov_se_trol_trueformcd_name": "Ricarica vera forma", - "rov_se_trol_trueformcd_tooltip": "Sei esausto dopo la tua vera forma." + "rov_se_trol_trueformcd_tooltip": "Sei esausto dopo la tua vera forma.", + "rov_se_skeleton_raisedead_name": "Risveglio dei morti", + "rov_se_skeleton_raisedead_tooltip": "Ogni uccisione fa risorgere uno scheletro che combatte per te. Premi il tasto di Evoca all'uccisione per disattivarlo." } diff --git a/JotunnModStub/Translations/Russian/messages.json b/JotunnModStub/Translations/Russian/messages.json index 3ef6918..128bd9a 100644 --- a/JotunnModStub/Translations/Russian/messages.json +++ b/JotunnModStub/Translations/Russian/messages.json @@ -202,5 +202,8 @@ "rov_msg_warvulture_vulture_settles_into_glide": "Стервятник переходит в планирующий полет.", "rov_msg_warvulture_vulture_spirals_down": "Стервятник кружит, спускаясь по спирали.", "rov_msg_boneship_no_shore": "Берега не видно. Они остаются на веслах.", - "rov_msg_boneship_sunk": "Корабль идет ко дну, и $1 вместе с ним." + "rov_msg_boneship_sunk": "Корабль идет ко дну, и $1 вместе с ним.", + "rov_msg_skeleton_summon_on": "Призыв при убийстве: включён. Мёртвые восстанут ради тебя.", + "rov_msg_skeleton_summon_off": "Призыв при убийстве: выключен. Мёртвые остаются лежать.", + "rov_msg_skeleton_summon_locked": "Призыв при убийстве пробудится, когда падёт Королева." } diff --git a/JotunnModStub/Translations/Russian/status_effects.json b/JotunnModStub/Translations/Russian/status_effects.json index f1f2d58..d38df6e 100644 --- a/JotunnModStub/Translations/Russian/status_effects.json +++ b/JotunnModStub/Translations/Russian/status_effects.json @@ -58,5 +58,7 @@ "rov_se_trol_trueform_name": "Истинный облик", "rov_se_trol_trueform_tooltip": "Вы выпустили своего внутреннего тролля на свободу!", "rov_se_trol_trueformcd_name": "Перезарядка истинного облика", - "rov_se_trol_trueformcd_tooltip": "Вы истощены после пребывания в Истинном облике." + "rov_se_trol_trueformcd_tooltip": "Вы истощены после пребывания в Истинном облике.", + "rov_se_skeleton_raisedead_name": "Восстание мёртвых", + "rov_se_skeleton_raisedead_tooltip": "Каждое убийство поднимает скелета, который сражается за тебя. Нажми клавишу призыва при убийстве, чтобы выключить." } From 98b1a1b5f3318ca78289d3fd05b5a89335e5f5c9 Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 24 Oct 2026 15:38:42 +0200 Subject: [PATCH 2/6] feat(skeleton): dark aura while Summon on Kill is on, archaic toggle messages Beside the Raise the Dead icon, a faint near-black smoke now rises off the whole body while Summon on Kill is on: the Draugr's looping smoke, borrowed like the Draugh aura, emitted from a body-sized box in world space. The owner writes the switch to the ZDO, so other players see it. "Raise the Dead Icon" and "Raise the Dead Aura" under Skeleton - Visuals let each player keep either or both, for a community vote. The toggle now says "Thy dead shall rise again." / "Raising... nevermore.", in English, Italian and Russian. --- JotunnModStub/Skeleton/SkeletonConfig.cs | 8 +- JotunnModStub/Skeleton/SkeletonRace.cs | 19 ++- JotunnModStub/Skeleton/SkeletonVisuals.cs | 109 ++++++++++++++++++ .../Translations/English/messages.json | 4 +- .../Translations/Italian/messages.json | 4 +- .../Translations/Russian/messages.json | 4 +- JotunnModStub/ZdoVisualSync.cs | 3 + 7 files changed, 143 insertions(+), 8 deletions(-) diff --git a/JotunnModStub/Skeleton/SkeletonConfig.cs b/JotunnModStub/Skeleton/SkeletonConfig.cs index c5a9abf..7b4a2b9 100644 --- a/JotunnModStub/Skeleton/SkeletonConfig.cs +++ b/JotunnModStub/Skeleton/SkeletonConfig.cs @@ -46,6 +46,8 @@ namespace RacesOfValheim // ─── Visuals ─────────────────────────────────────────────────────────── public static ConfigEntry HeadFireVFXEnabled; public static ConfigEntry BodyModelEnabled; + public static ConfigEntry RaiseDeadIcon; + public static ConfigEntry RaiseDeadAura; public static void Bind(ConfigFile config) { @@ -72,7 +74,7 @@ namespace RacesOfValheim // G is the first ability key of every race that has one; the Skeleton had none. const string keybinds = "Skeleton - Keybinds"; SummonToggleKey = config.Bind(keybinds, "Toggle Summon on Kill", new KeyboardShortcut(KeyCode.G), - "Turns raising a skeleton from each kill on and off (The Queen and later). The Dead Raiser icon shows while it is on."); + "Turns raising a skeleton from each kill on and off (The Queen and later). While it is on, the Raise the Dead icon and a faint dark aura show it (see Skeleton - Visuals)."); const string resurrection = "Skeleton - Resurrection"; ResurrectionCooldown = config.Bind(resurrection, "Cooldown", 300f, @@ -83,6 +85,10 @@ namespace RacesOfValheim 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.")); BodyModelEnabled = config.Bind(visuals, "Body Model Enabled", true, new ConfigDescription("Whether Skeleton players wear the skeleton body. Turn it off if you use a player model mod (EnhancedValheimVRM and the like): Skeletons then keep the vanilla viking body, so the replacement model shows without bones clipping through it. Abilities are unchanged. Client-side, like the option above: it applies to every Skeleton you see, yourself included, and changes nothing for other players.")); + RaiseDeadIcon = config.Bind(visuals, "Raise the Dead Icon", true, + new ConfigDescription("Shows the Raise the Dead status icon while your Summon on Kill is on.")); + RaiseDeadAura = config.Bind(visuals, "Raise the Dead Aura", true, + new ConfigDescription("A faint dark smoke rises off a Skeleton whose Summon on Kill is on. Client-side: turning it off hides it on yourself and on every other Skeleton you see.")); } } } diff --git a/JotunnModStub/Skeleton/SkeletonRace.cs b/JotunnModStub/Skeleton/SkeletonRace.cs index 8a80c7e..b5fb170 100644 --- a/JotunnModStub/Skeleton/SkeletonRace.cs +++ b/JotunnModStub/Skeleton/SkeletonRace.cs @@ -106,7 +106,22 @@ namespace RacesOfValheim } } - SetRaiseDeadIcon(player, rules.SummonOnKill && SummonOnKillEnabled); + bool on = rules.SummonOnKill && SummonOnKillEnabled; + SetRaiseDeadIcon(player, on && SkeletonConfig.RaiseDeadIcon.Value); + Instance?.raisingAura.Apply(player, on && SkeletonConfig.RaiseDeadAura.Value); + SetRaisingFlag(player, on); + } + + private readonly SkeletonVisuals.RaisingAura raisingAura = new SkeletonVisuals.RaisingAura(); + + /// Owner only, and only on a change, so other clients can draw the aura. + private static void SetRaisingFlag(Player player, bool on) + { + ZNetView nview = player.GetComponent(); + if (nview == null || !nview.IsValid() || !nview.IsOwner()) return; + + ZDO zdo = nview.GetZDO(); + if (zdo.GetBool(SkeletonVisuals.RaisingZdoKey, false) != on) zdo.Set(SkeletonVisuals.RaisingZdoKey, on); } private static void SetRaiseDeadIcon(Player player, bool on) @@ -340,6 +355,8 @@ namespace RacesOfValheim headFlame.Apply(Player.m_localPlayer, false); RestoreJawBone(); SetRaiseDeadIcon(Player.m_localPlayer, false); + raisingAura.Apply(Player.m_localPlayer, false); + SetRaisingFlag(Player.m_localPlayer, false); if (Player.m_localPlayer.transform.localScale != Vector3.one) { diff --git a/JotunnModStub/Skeleton/SkeletonVisuals.cs b/JotunnModStub/Skeleton/SkeletonVisuals.cs index e91963c..aa22629 100644 --- a/JotunnModStub/Skeleton/SkeletonVisuals.cs +++ b/JotunnModStub/Skeleton/SkeletonVisuals.cs @@ -434,6 +434,115 @@ namespace RacesOfValheim aura = null; } + /// The owner's Summon on Kill switch, for every other client to read. + public const string RaisingZdoKey = "RacesOfValheim_SkeletonRaising"; + + /// + /// A faint dark smoke rising off the whole body while Summon on Kill is on: the other half + /// of the indicator, beside the Raise the Dead icon, so the community can pick either or + /// both. Cosmetic only. + /// + /// The smoke is the Draugr's own looping one, the same particle DraughVisuals.BuildAura + /// borrows, cloned through BorrowEffect and tinted near-black. It emits from a box the + /// size of the body rather than from one point, so it comes off the arms and legs too. + /// A mesh-shaped emitter would hug the body closer, but only works on a readable mesh. + /// + /// Held per player, like HeadFlame. Call Apply every frame; it builds once. + /// + public class RaisingAura + { + private static readonly Color Smoke = new Color(0.06f, 0.06f, 0.07f, 0.35f); + private static readonly Vector3 BodyBox = new Vector3(0.55f, 1.7f, 0.35f); + private const float BodyCentre = 0.95f; + + private GameObject m_instance; + + public void Apply(Player player, bool enable) + { + if (!enable || player == null) + { + if (m_instance != null && m_instance.activeSelf) m_instance.SetActive(false); + return; + } + + if (m_instance == null && !Build(player)) return; + if (!m_instance.activeSelf) m_instance.SetActive(true); + } + + private static bool warned; + + private bool Build(Player player) + { + GameObject draugr = PrefabManager.Cache.GetPrefab("Draugr"); + ParticleSystem source = null; + if (draugr != null) + { + foreach (ParticleSystem ps in draugr.GetComponentsInChildren(true)) + { + string name = ps.gameObject.name.ToLower(); + if (!ps.main.loop || name.Contains("flies") || name.Contains("drip") || name.Contains("drop") || + name.Contains("rain") || name.Contains("splash")) continue; + source = ps; + break; + } + } + + if (source == null) + { + if (!warned) + { + warned = true; + Jotunn.Logger.LogWarning("[Skeleton] No looping smoke found on 'Draugr'; the Summon on Kill aura stays off."); + } + return false; + } + + m_instance = BorrowEffect(source.gameObject, player.transform, "SkeletonRaisingAura", false, "Skeleton"); + if (m_instance == null) return false; + + m_instance.transform.localPosition = new Vector3(0f, BodyCentre, 0f); + m_instance.transform.localRotation = Quaternion.identity; + m_instance.transform.localScale = Vector3.one; + + foreach (ParticleSystem ps in m_instance.GetComponentsInChildren(true)) + { + ParticleSystem.MainModule main = ps.main; + main.startColor = new ParticleSystem.MinMaxGradient(Smoke); + // World space, so the smoke stays behind as the body moves, like a trail. + main.simulationSpace = ParticleSystemSimulationSpace.World; + main.scalingMode = ParticleSystemScalingMode.Hierarchy; + + ParticleSystem.ShapeModule shape = ps.shape; + shape.enabled = true; + shape.shapeType = ParticleSystemShapeType.Box; + shape.scale = BodyBox; + shape.position = Vector3.zero; + shape.rotation = Vector3.zero; + + // The Draugr's tint over a particle's life would put its green back; keep the + // fade (alpha) and drop the colour. + ParticleSystem.ColorOverLifetimeModule col = ps.colorOverLifetime; + if (col.enabled) + { + Gradient faded = new Gradient(); + faded.SetKeys(new[] { new GradientColorKey(Color.white, 0f), new GradientColorKey(Color.white, 1f) }, + col.color.gradient != null ? col.color.gradient.alphaKeys + : new[] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0f, 1f) }); + col.color = new ParticleSystem.MinMaxGradient(faded); + } + } + + // The shader decides whether a dark tint can show at all: an additive one adds + // nothing for black. If the aura is invisible in game, this line says why. + Renderer smokeRenderer = m_instance.GetComponentInChildren(true); + Material smokeMaterial = smokeRenderer != null ? smokeRenderer.sharedMaterial : null; + Jotunn.Logger.LogInfo($"[Skeleton] Summon on Kill aura built from 'Draugr/{source.gameObject.name}', " + + $"material '{(smokeMaterial != null ? smokeMaterial.name : "none")}', " + + $"shader '{(smokeMaterial != null && smokeMaterial.shader != null ? smokeMaterial.shader.name : "none")}'."); + return true; + } + } + /// /// One player's burning skull. Cosmetic only - it deals nothing and blocks nothing. /// diff --git a/JotunnModStub/Translations/English/messages.json b/JotunnModStub/Translations/English/messages.json index 92fd052..1edf32c 100644 --- a/JotunnModStub/Translations/English/messages.json +++ b/JotunnModStub/Translations/English/messages.json @@ -203,7 +203,7 @@ "rov_msg_warvulture_vulture_spirals_down": "The vulture spirals down.", "rov_msg_boneship_no_shore": "No shore in reach. They stay at the oars.", "rov_msg_boneship_sunk": "The ship goes down, and $1 go with it.", - "rov_msg_skeleton_summon_on": "Summon on Kill: on. The dead will rise for you.", - "rov_msg_skeleton_summon_off": "Summon on Kill: off. The dead stay down.", + "rov_msg_skeleton_summon_on": "Thy dead shall rise again.", + "rov_msg_skeleton_summon_off": "Raising... nevermore.", "rov_msg_skeleton_summon_locked": "Summon on Kill awakens once The Queen falls." } diff --git a/JotunnModStub/Translations/Italian/messages.json b/JotunnModStub/Translations/Italian/messages.json index 1e1ee27..20caf0b 100644 --- a/JotunnModStub/Translations/Italian/messages.json +++ b/JotunnModStub/Translations/Italian/messages.json @@ -203,7 +203,7 @@ "rov_msg_warvulture_vulture_spirals_down": "L'avvoltoio scende a spirale.", "rov_msg_boneship_no_shore": "Nessuna riva a portata. Restano ai remi.", "rov_msg_boneship_sunk": "La nave affonda, e con lei $1.", - "rov_msg_skeleton_summon_on": "Evoca all'uccisione: attiva. I morti si alzeranno per te.", - "rov_msg_skeleton_summon_off": "Evoca all'uccisione: disattiva. I morti restano a terra.", + "rov_msg_skeleton_summon_on": "I tuoi morti risorgeranno ancora.", + "rov_msg_skeleton_summon_off": "Risorgere... mai più.", "rov_msg_skeleton_summon_locked": "Evoca all'uccisione si risveglia quando cade la Regina." } diff --git a/JotunnModStub/Translations/Russian/messages.json b/JotunnModStub/Translations/Russian/messages.json index 128bd9a..5b0f03e 100644 --- a/JotunnModStub/Translations/Russian/messages.json +++ b/JotunnModStub/Translations/Russian/messages.json @@ -203,7 +203,7 @@ "rov_msg_warvulture_vulture_spirals_down": "Стервятник кружит, спускаясь по спирали.", "rov_msg_boneship_no_shore": "Берега не видно. Они остаются на веслах.", "rov_msg_boneship_sunk": "Корабль идет ко дну, и $1 вместе с ним.", - "rov_msg_skeleton_summon_on": "Призыв при убийстве: включён. Мёртвые восстанут ради тебя.", - "rov_msg_skeleton_summon_off": "Призыв при убийстве: выключен. Мёртвые остаются лежать.", + "rov_msg_skeleton_summon_on": "Твои мёртвые вновь восстанут.", + "rov_msg_skeleton_summon_off": "Восстание... никогда более.", "rov_msg_skeleton_summon_locked": "Призыв при убийстве пробудится, когда падёт Королева." } diff --git a/JotunnModStub/ZdoVisualSync.cs b/JotunnModStub/ZdoVisualSync.cs index 4f1326f..241de90 100644 --- a/JotunnModStub/ZdoVisualSync.cs +++ b/JotunnModStub/ZdoVisualSync.cs @@ -41,6 +41,7 @@ namespace RacesOfValheim private GameObject m_fireAuraVFX = null; private GameObject m_draughAuraVFX = null; private readonly SkeletonVisuals.HeadFlame m_skeletonHeadFlame = new SkeletonVisuals.HeadFlame(); + private readonly SkeletonVisuals.RaisingAura m_skeletonRaisingAura = new SkeletonVisuals.RaisingAura(); private void Awake() { @@ -169,6 +170,7 @@ namespace RacesOfValheim // The burning skull, grown locally for whoever we are looking at. The tier is on the // ZDO, so this client can work out for itself whether they should be alight. m_skeletonHeadFlame.Apply(m_player, SkeletonConfig.HeadFireVFXEnabled.Value && SkeletonConfig.BodyModelEnabled.Value && SkeletonVisuals.GetModel(m_player, state) == SkeletonProgression.FireModel); + m_skeletonRaisingAura.Apply(m_player, SkeletonConfig.RaiseDeadAura.Value && nview.GetZDO().GetBool(SkeletonVisuals.RaisingZdoKey, false)); // Apply Scale Vector3 targetScale = rules.ScaleMultiplier; @@ -273,6 +275,7 @@ namespace RacesOfValheim SkeletonVisuals.EnsureFireAura(m_player, false, ref m_fireAuraVFX); DraughVisuals.EnsureAura(m_player, false, ref m_draughAuraVFX); m_skeletonHeadFlame.Apply(m_player, false); + m_skeletonRaisingAura.Apply(m_player, false); // Takes the crown off a Trenta who has died or changed race; a no-op for everyone else. TrentaVisuals.ApplyCrown(m_player); From 3591b7e375d071654a40e1de5c63572dca02e2e3 Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 24 Oct 2026 15:44:16 +0200 Subject: [PATCH 3/6] fix(skeleton): the Summon on Kill aura borrows the torch smoke The Draugr's evil_smoke is on 'Lux Lit Particles/ Bumped' and showed nothing in game once tinted dark. The torch's own Smoke, from the prefab the head flame burns from, is the grey everyone sees above a torch; darkened to (0.08, 0.08, 0.09) at 0.45 alpha. --- JotunnModStub/Skeleton/SkeletonVisuals.cs | 32 ++++++++++++----------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/JotunnModStub/Skeleton/SkeletonVisuals.cs b/JotunnModStub/Skeleton/SkeletonVisuals.cs index aa22629..ba7faee 100644 --- a/JotunnModStub/Skeleton/SkeletonVisuals.cs +++ b/JotunnModStub/Skeleton/SkeletonVisuals.cs @@ -442,8 +442,8 @@ namespace RacesOfValheim /// of the indicator, beside the Raise the Dead icon, so the community can pick either or /// both. Cosmetic only. /// - /// The smoke is the Draugr's own looping one, the same particle DraughVisuals.BuildAura - /// borrows, cloned through BorrowEffect and tinted near-black. It emits from a box the + /// The smoke is the torch's own (see Build for why not the Draugr's), cloned through + /// BorrowEffect and tinted near-black. It emits from a box the /// size of the body rather than from one point, so it comes off the arms and legs too. /// A mesh-shaped emitter would hug the body closer, but only works on a readable mesh. /// @@ -451,7 +451,8 @@ namespace RacesOfValheim /// public class RaisingAura { - private static readonly Color Smoke = new Color(0.06f, 0.06f, 0.07f, 0.35f); + // The torch smoke is (0.35, 0.35, 0.35, 0.21); darker and a little thicker than that. + private static readonly Color Smoke = new Color(0.08f, 0.08f, 0.09f, 0.45f); private static readonly Vector3 BodyBox = new Vector3(0.55f, 1.7f, 0.35f); private const float BodyCentre = 0.95f; @@ -473,17 +474,18 @@ namespace RacesOfValheim private bool Build(Player player) { - GameObject draugr = PrefabManager.Cache.GetPrefab("Draugr"); + // The torch's own 'Smoke', from the same prefab the head flame burns from. The + // Draugr's evil_smoke was tried first: its material is on 'Lux Lit Particles/ + // Bumped', which takes its look from the material and the scene light, so a dark + // tint on it showed nothing in game. The torch smoke is the grey everyone sees + // above a torch, so darkening it has something to darken. + GameObject torch = ResolveFlameSource(); ParticleSystem source = null; - if (draugr != null) + if (torch != null) { - foreach (ParticleSystem ps in draugr.GetComponentsInChildren(true)) + foreach (ParticleSystem ps in torch.GetComponentsInChildren(true)) { - string name = ps.gameObject.name.ToLower(); - if (!ps.main.loop || name.Contains("flies") || name.Contains("drip") || name.Contains("drop") || - name.Contains("rain") || name.Contains("splash")) continue; - source = ps; - break; + if (ps.gameObject.name.ToLower().Contains("smoke")) { source = ps; break; } } } @@ -492,7 +494,7 @@ namespace RacesOfValheim if (!warned) { warned = true; - Jotunn.Logger.LogWarning("[Skeleton] No looping smoke found on 'Draugr'; the Summon on Kill aura stays off."); + Jotunn.Logger.LogWarning("[Skeleton] No 'Smoke' particle on the torch; the Summon on Kill aura stays off."); } return false; } @@ -519,8 +521,8 @@ namespace RacesOfValheim shape.position = Vector3.zero; shape.rotation = Vector3.zero; - // The Draugr's tint over a particle's life would put its green back; keep the - // fade (alpha) and drop the colour. + // A tint over the particle's life would put the source's own colour back; keep + // the fade (alpha) and drop the colour. ParticleSystem.ColorOverLifetimeModule col = ps.colorOverLifetime; if (col.enabled) { @@ -536,7 +538,7 @@ namespace RacesOfValheim // nothing for black. If the aura is invisible in game, this line says why. Renderer smokeRenderer = m_instance.GetComponentInChildren(true); Material smokeMaterial = smokeRenderer != null ? smokeRenderer.sharedMaterial : null; - Jotunn.Logger.LogInfo($"[Skeleton] Summon on Kill aura built from 'Draugr/{source.gameObject.name}', " + + Jotunn.Logger.LogInfo($"[Skeleton] Summon on Kill aura built from '{torch.name}/{source.gameObject.name}', " + $"material '{(smokeMaterial != null ? smokeMaterial.name : "none")}', " + $"shader '{(smokeMaterial != null && smokeMaterial.shader != null ? smokeMaterial.shader.name : "none")}'."); return true; From e41f7b610e2dbe0789204620f2fa12f3bbd8ba56 Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 24 Oct 2026 15:50:05 +0200 Subject: [PATCH 4/6] revert(skeleton): drop the Summon on Kill aura, keep the icon Neither the Draugr's evil_smoke nor the torch smoke showed in game once tinted dark. The Raise the Dead icon stays, with its per-player switch. --- JotunnModStub/Skeleton/SkeletonConfig.cs | 5 +- JotunnModStub/Skeleton/SkeletonRace.cs | 16 ---- JotunnModStub/Skeleton/SkeletonVisuals.cs | 111 ---------------------- JotunnModStub/ZdoVisualSync.cs | 3 - 4 files changed, 1 insertion(+), 134 deletions(-) diff --git a/JotunnModStub/Skeleton/SkeletonConfig.cs b/JotunnModStub/Skeleton/SkeletonConfig.cs index 7b4a2b9..62c01fc 100644 --- a/JotunnModStub/Skeleton/SkeletonConfig.cs +++ b/JotunnModStub/Skeleton/SkeletonConfig.cs @@ -47,7 +47,6 @@ namespace RacesOfValheim public static ConfigEntry HeadFireVFXEnabled; public static ConfigEntry BodyModelEnabled; public static ConfigEntry RaiseDeadIcon; - public static ConfigEntry RaiseDeadAura; public static void Bind(ConfigFile config) { @@ -74,7 +73,7 @@ namespace RacesOfValheim // G is the first ability key of every race that has one; the Skeleton had none. const string keybinds = "Skeleton - Keybinds"; SummonToggleKey = config.Bind(keybinds, "Toggle Summon on Kill", new KeyboardShortcut(KeyCode.G), - "Turns raising a skeleton from each kill on and off (The Queen and later). While it is on, the Raise the Dead icon and a faint dark aura show it (see Skeleton - Visuals)."); + "Turns raising a skeleton from each kill on and off (The Queen and later). The Raise the Dead icon shows while it is on."); const string resurrection = "Skeleton - Resurrection"; ResurrectionCooldown = config.Bind(resurrection, "Cooldown", 300f, @@ -87,8 +86,6 @@ namespace RacesOfValheim new ConfigDescription("Whether Skeleton players wear the skeleton body. Turn it off if you use a player model mod (EnhancedValheimVRM and the like): Skeletons then keep the vanilla viking body, so the replacement model shows without bones clipping through it. Abilities are unchanged. Client-side, like the option above: it applies to every Skeleton you see, yourself included, and changes nothing for other players.")); RaiseDeadIcon = config.Bind(visuals, "Raise the Dead Icon", true, new ConfigDescription("Shows the Raise the Dead status icon while your Summon on Kill is on.")); - RaiseDeadAura = config.Bind(visuals, "Raise the Dead Aura", true, - new ConfigDescription("A faint dark smoke rises off a Skeleton whose Summon on Kill is on. Client-side: turning it off hides it on yourself and on every other Skeleton you see.")); } } } diff --git a/JotunnModStub/Skeleton/SkeletonRace.cs b/JotunnModStub/Skeleton/SkeletonRace.cs index b5fb170..69e8712 100644 --- a/JotunnModStub/Skeleton/SkeletonRace.cs +++ b/JotunnModStub/Skeleton/SkeletonRace.cs @@ -108,20 +108,6 @@ namespace RacesOfValheim bool on = rules.SummonOnKill && SummonOnKillEnabled; SetRaiseDeadIcon(player, on && SkeletonConfig.RaiseDeadIcon.Value); - Instance?.raisingAura.Apply(player, on && SkeletonConfig.RaiseDeadAura.Value); - SetRaisingFlag(player, on); - } - - private readonly SkeletonVisuals.RaisingAura raisingAura = new SkeletonVisuals.RaisingAura(); - - /// Owner only, and only on a change, so other clients can draw the aura. - private static void SetRaisingFlag(Player player, bool on) - { - ZNetView nview = player.GetComponent(); - if (nview == null || !nview.IsValid() || !nview.IsOwner()) return; - - ZDO zdo = nview.GetZDO(); - if (zdo.GetBool(SkeletonVisuals.RaisingZdoKey, false) != on) zdo.Set(SkeletonVisuals.RaisingZdoKey, on); } private static void SetRaiseDeadIcon(Player player, bool on) @@ -355,8 +341,6 @@ namespace RacesOfValheim headFlame.Apply(Player.m_localPlayer, false); RestoreJawBone(); SetRaiseDeadIcon(Player.m_localPlayer, false); - raisingAura.Apply(Player.m_localPlayer, false); - SetRaisingFlag(Player.m_localPlayer, false); if (Player.m_localPlayer.transform.localScale != Vector3.one) { diff --git a/JotunnModStub/Skeleton/SkeletonVisuals.cs b/JotunnModStub/Skeleton/SkeletonVisuals.cs index ba7faee..e91963c 100644 --- a/JotunnModStub/Skeleton/SkeletonVisuals.cs +++ b/JotunnModStub/Skeleton/SkeletonVisuals.cs @@ -434,117 +434,6 @@ namespace RacesOfValheim aura = null; } - /// The owner's Summon on Kill switch, for every other client to read. - public const string RaisingZdoKey = "RacesOfValheim_SkeletonRaising"; - - /// - /// A faint dark smoke rising off the whole body while Summon on Kill is on: the other half - /// of the indicator, beside the Raise the Dead icon, so the community can pick either or - /// both. Cosmetic only. - /// - /// The smoke is the torch's own (see Build for why not the Draugr's), cloned through - /// BorrowEffect and tinted near-black. It emits from a box the - /// size of the body rather than from one point, so it comes off the arms and legs too. - /// A mesh-shaped emitter would hug the body closer, but only works on a readable mesh. - /// - /// Held per player, like HeadFlame. Call Apply every frame; it builds once. - /// - public class RaisingAura - { - // The torch smoke is (0.35, 0.35, 0.35, 0.21); darker and a little thicker than that. - private static readonly Color Smoke = new Color(0.08f, 0.08f, 0.09f, 0.45f); - private static readonly Vector3 BodyBox = new Vector3(0.55f, 1.7f, 0.35f); - private const float BodyCentre = 0.95f; - - private GameObject m_instance; - - public void Apply(Player player, bool enable) - { - if (!enable || player == null) - { - if (m_instance != null && m_instance.activeSelf) m_instance.SetActive(false); - return; - } - - if (m_instance == null && !Build(player)) return; - if (!m_instance.activeSelf) m_instance.SetActive(true); - } - - private static bool warned; - - private bool Build(Player player) - { - // The torch's own 'Smoke', from the same prefab the head flame burns from. The - // Draugr's evil_smoke was tried first: its material is on 'Lux Lit Particles/ - // Bumped', which takes its look from the material and the scene light, so a dark - // tint on it showed nothing in game. The torch smoke is the grey everyone sees - // above a torch, so darkening it has something to darken. - GameObject torch = ResolveFlameSource(); - ParticleSystem source = null; - if (torch != null) - { - foreach (ParticleSystem ps in torch.GetComponentsInChildren(true)) - { - if (ps.gameObject.name.ToLower().Contains("smoke")) { source = ps; break; } - } - } - - if (source == null) - { - if (!warned) - { - warned = true; - Jotunn.Logger.LogWarning("[Skeleton] No 'Smoke' particle on the torch; the Summon on Kill aura stays off."); - } - return false; - } - - m_instance = BorrowEffect(source.gameObject, player.transform, "SkeletonRaisingAura", false, "Skeleton"); - if (m_instance == null) return false; - - m_instance.transform.localPosition = new Vector3(0f, BodyCentre, 0f); - m_instance.transform.localRotation = Quaternion.identity; - m_instance.transform.localScale = Vector3.one; - - foreach (ParticleSystem ps in m_instance.GetComponentsInChildren(true)) - { - ParticleSystem.MainModule main = ps.main; - main.startColor = new ParticleSystem.MinMaxGradient(Smoke); - // World space, so the smoke stays behind as the body moves, like a trail. - main.simulationSpace = ParticleSystemSimulationSpace.World; - main.scalingMode = ParticleSystemScalingMode.Hierarchy; - - ParticleSystem.ShapeModule shape = ps.shape; - shape.enabled = true; - shape.shapeType = ParticleSystemShapeType.Box; - shape.scale = BodyBox; - shape.position = Vector3.zero; - shape.rotation = Vector3.zero; - - // A tint over the particle's life would put the source's own colour back; keep - // the fade (alpha) and drop the colour. - ParticleSystem.ColorOverLifetimeModule col = ps.colorOverLifetime; - if (col.enabled) - { - Gradient faded = new Gradient(); - faded.SetKeys(new[] { new GradientColorKey(Color.white, 0f), new GradientColorKey(Color.white, 1f) }, - col.color.gradient != null ? col.color.gradient.alphaKeys - : new[] { new GradientAlphaKey(1f, 0f), new GradientAlphaKey(0f, 1f) }); - col.color = new ParticleSystem.MinMaxGradient(faded); - } - } - - // The shader decides whether a dark tint can show at all: an additive one adds - // nothing for black. If the aura is invisible in game, this line says why. - Renderer smokeRenderer = m_instance.GetComponentInChildren(true); - Material smokeMaterial = smokeRenderer != null ? smokeRenderer.sharedMaterial : null; - Jotunn.Logger.LogInfo($"[Skeleton] Summon on Kill aura built from '{torch.name}/{source.gameObject.name}', " + - $"material '{(smokeMaterial != null ? smokeMaterial.name : "none")}', " + - $"shader '{(smokeMaterial != null && smokeMaterial.shader != null ? smokeMaterial.shader.name : "none")}'."); - return true; - } - } - /// /// One player's burning skull. Cosmetic only - it deals nothing and blocks nothing. /// diff --git a/JotunnModStub/ZdoVisualSync.cs b/JotunnModStub/ZdoVisualSync.cs index 241de90..4f1326f 100644 --- a/JotunnModStub/ZdoVisualSync.cs +++ b/JotunnModStub/ZdoVisualSync.cs @@ -41,7 +41,6 @@ namespace RacesOfValheim private GameObject m_fireAuraVFX = null; private GameObject m_draughAuraVFX = null; private readonly SkeletonVisuals.HeadFlame m_skeletonHeadFlame = new SkeletonVisuals.HeadFlame(); - private readonly SkeletonVisuals.RaisingAura m_skeletonRaisingAura = new SkeletonVisuals.RaisingAura(); private void Awake() { @@ -170,7 +169,6 @@ namespace RacesOfValheim // The burning skull, grown locally for whoever we are looking at. The tier is on the // ZDO, so this client can work out for itself whether they should be alight. m_skeletonHeadFlame.Apply(m_player, SkeletonConfig.HeadFireVFXEnabled.Value && SkeletonConfig.BodyModelEnabled.Value && SkeletonVisuals.GetModel(m_player, state) == SkeletonProgression.FireModel); - m_skeletonRaisingAura.Apply(m_player, SkeletonConfig.RaiseDeadAura.Value && nview.GetZDO().GetBool(SkeletonVisuals.RaisingZdoKey, false)); // Apply Scale Vector3 targetScale = rules.ScaleMultiplier; @@ -275,7 +273,6 @@ namespace RacesOfValheim SkeletonVisuals.EnsureFireAura(m_player, false, ref m_fireAuraVFX); DraughVisuals.EnsureAura(m_player, false, ref m_draughAuraVFX); m_skeletonHeadFlame.Apply(m_player, false); - m_skeletonRaisingAura.Apply(m_player, false); // Takes the crown off a Trenta who has died or changed race; a no-op for everyone else. TrentaVisuals.ApplyCrown(m_player); From 18593ae1d365af7e88434032b27870b80470e994 Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 24 Oct 2026 16:36:52 +0200 Subject: [PATCH 5/6] balance(skeleton): lower max-health bonus in the early and middle game +25/+45/+65/+90/+125/+165/+215/+275 from no bosses to Fader, was +50/+80/+110/+140/+170/+200/+230/+275. A fresh Skeleton starts at 50 max health instead of 75; Fader stays at 300. Asked for by several players over three months, last by Jondar Korric. A Skeleton never eats and never spends stamina, so it ran well ahead of a fed viking. The hidden foods that carry its regeneration are picked to match the new totals, so early-tier regen drops with them. README progression updated; the compendium reads the value from code. --- JotunnModStub/Skeleton/SkeletonProgression.cs | 16 ++++++++-------- README.md | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/JotunnModStub/Skeleton/SkeletonProgression.cs b/JotunnModStub/Skeleton/SkeletonProgression.cs index 0045033..8d9b11f 100644 --- a/JotunnModStub/Skeleton/SkeletonProgression.cs +++ b/JotunnModStub/Skeleton/SkeletonProgression.cs @@ -7,15 +7,15 @@ namespace RacesOfValheim public static float GetMaxHealthBonus(int state) { if (state == 0) return 0f; - if (state == 1) return 50f; - if (state == 2) return 80f; - if (state == 3) return 110f; - if (state == 4) return 140f; - if (state == 5) return 170f; - if (state == 6) return 200f; - if (state == 7) return 230f; + if (state == 1) return 25f; + if (state == 2) return 45f; + if (state == 3) return 65f; + if (state == 4) return 90f; + if (state == 5) return 125f; + if (state == 6) return 165f; + if (state == 7) return 215f; if (state >= 8) return 275f; - return 50f; + return 25f; } public struct SkeletonRules diff --git a/README.md b/README.md index 9e09880..9332cc9 100644 --- a/README.md +++ b/README.md @@ -235,13 +235,13 @@ Right Mouse toggles flight. Glide towards aim, W = forward/climb, Shift+W = use
Skeleton Progression -- **Base:** +50 Max Health. Undead Diet (cannot eat normal food, no stamina bar). Lit eye sockets, in the colour of whichever skeleton your tier wears. -- **Eikthyr:** Poison Skeleton model, poison immunity, 5% lifesteal, +80 Max Health. -- **Elder:** 10% lifesteal, auto-stun first hit, +110 Max Health. -- **Bonemass:** 15% lifesteal, poison attacks, +140 Max Health. -- **Moder:** Fire Skeleton model, 20% lifesteal, fire aura, enhanced regen, +170 Max Health. -- **Yagluth:** 25% lifesteal, auto-resurrect, +200 Max Health. -- **Queen:** 30% lifesteal, summon on kill (max 3 skeletons), +230 Max Health. +- **Base:** +25 Max Health. Undead Diet (cannot eat normal food, no stamina bar). Lit eye sockets, in the colour of whichever skeleton your tier wears. +- **Eikthyr:** Poison Skeleton model, poison immunity, 5% lifesteal, +45 Max Health. +- **Elder:** 10% lifesteal, auto-stun first hit, +65 Max Health. +- **Bonemass:** 15% lifesteal, poison attacks, +90 Max Health. +- **Moder:** Fire Skeleton model, 20% lifesteal, fire aura, enhanced regen, +125 Max Health. +- **Yagluth:** 25% lifesteal, auto-resurrect, +165 Max Health. +- **Queen:** 30% lifesteal, summon on kill (max 3 skeletons), +215 Max Health. - **Fader:** 35% lifesteal, max 5 summons, +275 Max Health.
From 20dec64fa01cabecce1446156efdfe5a1db47a6e Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 24 Oct 2026 18:28:17 +0200 Subject: [PATCH 6/6] chore(release): v1.5.15 - Skeleton health rebalance, Auto-Resurrect fix, Summon on Kill toggle Skeleton max health is lower in the early and middle game, from 75 to 50 at the start and unchanged at Fader. Auto-Resurrect triggers only on a hit that would really kill, dedicated servers included. Summon on Kill toggles with G and shows a Raise the Dead icon while on. README: New in block, Queen line, changelog entry. --- JotunnModStub/Package/manifest.json | 2 +- JotunnModStub/RacesOfValheim.cs | 2 +- README.md | 11 ++++++++--- manifest.json | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/JotunnModStub/Package/manifest.json b/JotunnModStub/Package/manifest.json index 6c5a7ef..7418483 100644 --- a/JotunnModStub/Package/manifest.json +++ b/JotunnModStub/Package/manifest.json @@ -1,7 +1,7 @@ { "name": "RacesOfValheim", "description": "A Valheim mod that adds ten custom playable races (Aswid, Draugh, Dvergar, Fenrir, Furling, Skadi, Skeleton, Sverm, Trenta, Trol) each with unique abilities, traits, race stations and a deep boss-driven progression system.", - "version_number": "1.5.14", + "version_number": "1.5.15", "website_url": "", "dependencies": [ "denikson-BepInExPack_Valheim-5.4.2333", diff --git a/JotunnModStub/RacesOfValheim.cs b/JotunnModStub/RacesOfValheim.cs index 4ff8ec9..122655b 100644 --- a/JotunnModStub/RacesOfValheim.cs +++ b/JotunnModStub/RacesOfValheim.cs @@ -16,7 +16,7 @@ namespace RacesOfValheim { public const string PluginGUID = "com.nandor.racesofvalheim"; public const string PluginName = "Races Of Valheim"; - public const string PluginVersion = "1.5.14"; + public const string PluginVersion = "1.5.15"; private readonly Harmony harmony = new Harmony(PluginGUID); diff --git a/README.md b/README.md index 9332cc9..cb169ae 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ Support the mod: [Patreon — NandorTheModder](https://www.patreon.com/c/NandorT --- -## New in v1.5.14 +## New in v1.5.15 -A Fenrir's eyes now glow at night, brighter when a form is ready and yellow when the Cultist is back. Fenrir forms build adrenaline on every hit, Trenta can eat seeds with a full stomach, and the stamina bar comes back after leaving Aswid or Draugh. Full details in the [changelog](#v1514). +Skeleton round: max health is lower in the early and middle game (a fresh Skeleton starts at 50, Fader is unchanged), Auto-Resurrect fires only on a hit that would really kill you, and Summon on Kill can be switched on and off with G. Full details in the [changelog](#v1515). --- @@ -241,7 +241,7 @@ Right Mouse toggles flight. Glide towards aim, W = forward/climb, Shift+W = use - **Bonemass:** 15% lifesteal, poison attacks, +90 Max Health. - **Moder:** Fire Skeleton model, 20% lifesteal, fire aura, enhanced regen, +125 Max Health. - **Yagluth:** 25% lifesteal, auto-resurrect, +165 Max Health. -- **Queen:** 30% lifesteal, summon on kill (max 3 skeletons), +215 Max Health. +- **Queen:** 30% lifesteal, summon on kill (max 3 skeletons, toggle with G), +215 Max Health. - **Fader:** 35% lifesteal, max 5 summons, +275 Max Health. @@ -451,6 +451,11 @@ Both halves have an off switch under `Factions` in Configuration Manager: **Fact ## Changelog +### v1.5.15 +- **Balance - Skeleton max health:** lower in the early and middle game. The bonus over the base 25 is now +25 / +45 / +65 / +90 / +125 / +165 / +215 / +275, from no bosses to Fader (it was +50 / +80 / +110 / +140 / +170 / +200 / +230 / +275). A fresh Skeleton starts at 50 instead of 75; from Yagluth on the gap closes, and Fader is unchanged at 300. A Skeleton never needs food and never spends stamina, so it was well ahead of a fed viking at every tier. Thanks to Jondar Korric and everyone else who asked for this. +- **Fix - Auto-Resurrect on any hit:** a Skeleton's Auto-Resurrect now triggers only on a hit that would actually kill you. It used to compare the raw hit, before armour and blocking, with its poison and fire counted all at once, so with good armour it fired on almost any hit. On dedicated servers it could also miss a real deathblow when the server or another player controlled the attacker. Thanks to akira for the report. +- **New - Summon on Kill toggle:** turn Summon on Kill on and off with G (`Skeleton - Keybinds`), or from the gamepad radial: *"Thy dead shall rise again."* / *"Raising... nevermore."* While it's on, a "Raise the Dead" icon with the Dead Raiser's picture shows in the status bar; hide it with `Raise the Dead Icon` under `Skeleton - Visuals`. Your choice is saved with your character. Thanks to akira for the idea. + ### v1.5.14 - **New - Fenrir night eyes:** at night a Fenrir's eyes glow in the Fenring's orange, the way a wolf's eyes catch the light. Faint while no form is ready, bright when one is, and yellow when the Cultist is back from its cooldown. Other players see it too. Under `Fenrir - Appearance` each player can turn off the glow or the "Ready!" message for themselves. Thanks to lexsonn for the idea. - **Fix - Fenrir forms and adrenaline:** in Wolf, Ulv, Fenring and Cultist form, hits now build adrenaline the way a weapon does. Before, only staggering an enemy did, so Lox, Tar, Brutes and Furlings gave almost none. The Cultist's fire breath builds it too, about one hit's worth per second. Thanks to lexsonn for the report. diff --git a/manifest.json b/manifest.json index 6c5a7ef..7418483 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "RacesOfValheim", "description": "A Valheim mod that adds ten custom playable races (Aswid, Draugh, Dvergar, Fenrir, Furling, Skadi, Skeleton, Sverm, Trenta, Trol) each with unique abilities, traits, race stations and a deep boss-driven progression system.", - "version_number": "1.5.14", + "version_number": "1.5.15", "website_url": "", "dependencies": [ "denikson-BepInExPack_Valheim-5.4.2333",