From 0afba60ed697fec7f85134f72b1b1d2fd53e75d0 Mon Sep 17 00:00:00 2001 From: kanym Date: Mon, 24 Aug 2026 13:34:30 +0200 Subject: [PATCH 1/2] Remove leftover TrolSync/SkadiSync debug logging These periodic Jotunn.Logger.LogInfo calls were spamming the console for every remote player update; drop them along with their now-unused throttle fields. --- JotunnModStub/Trol/TrolPatches.cs | 20 -------------------- JotunnModStub/ZdoVisualSync.cs | 9 --------- 2 files changed, 29 deletions(-) diff --git a/JotunnModStub/Trol/TrolPatches.cs b/JotunnModStub/Trol/TrolPatches.cs index 4fd11b1..68007df 100644 --- a/JotunnModStub/Trol/TrolPatches.cs +++ b/JotunnModStub/Trol/TrolPatches.cs @@ -95,13 +95,6 @@ namespace RacesOfValheim public const string StateKey = "RacesOfValheim_State"; public const string TrueFormKey = "RacesOfValheim_TrolTrueForm"; - // Remote sync tracing. It used to fire on a 2-second timer for as long as a remote player - // existed, which in the main menu means forever: Player.m_localPlayer is null there, so the - // character-preview player counts as remote and the log never stopped. Keyed on the state - // it reports instead, so it still catches a remote player being sized wrongly - the reason - // it exists - without narrating a menu that is doing nothing. - private static string lastRemoteLogKey = ""; - private static float ScaleForState(int state) { if (state >= 6) return 1.30f; @@ -152,19 +145,6 @@ namespace RacesOfValheim targetScale = state >= 7 ? TrolConfig.TrueFormScaleAdvanced.Value : TrolConfig.TrueFormScaleNormal.Value; } - if (!isLocal) - { - string logKey = $"{__instance.GetPlayerName()}|{race}|{zdoReady}|{state}|{isTrueFormActive}|{targetScale:F2}"; - if (logKey != lastRemoteLogKey) - { - lastRemoteLogKey = logKey; - Jotunn.Logger.LogInfo( - $"[TrolSync] remote '{__instance.GetPlayerName()}' race='{race}' zdoReady={zdoReady} " + - $"state={state} trueForm={isTrueFormActive} target={targetScale:F2} " + - $"currentScale={visual.transform.localScale.x:F2} rootScale={__instance.transform.localScale.x:F2}"); - } - } - if (race == "Trol") { // Local player has a coroutine that smooth-scales during the active transformation, diff --git a/JotunnModStub/ZdoVisualSync.cs b/JotunnModStub/ZdoVisualSync.cs index 4559f86..40061ef 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 float m_lastFlightLog = 0f; private void Awake() { @@ -245,14 +244,6 @@ namespace RacesOfValheim { body.useGravity = !flying; } - - if (Time.time - m_lastFlightLog > 2f) - { - m_lastFlightLog = Time.time; - Jotunn.Logger.LogInfo( - $"[SkadiSync] remote '{m_player.GetPlayerName()}' form='{currentForm}' flying={flying} " + - $"y={m_player.transform.position.y:F1} gravity={(body != null ? body.useGravity.ToString() : "no-body")}"); - } } private void RevertAllVisuals() From 189177b643875cb15a8aa3280df07fd93272006f Mon Sep 17 00:00:00 2001 From: kanym Date: Mon, 24 Aug 2026 13:47:53 +0200 Subject: [PATCH 2/2] Fix Trol compendium: remove bogus consume-on-kill line, correct off-by-one progression gates - Trol has no consume/devour mechanic; that line was copy-pasted from Aswid's entry, which does. - Every boss-gated line was checking state >= N-1 instead of N, so each unlock (Eikthyr XP bonus, Elder's rock throw/regen, Bonemass/Yagluth bonuses, Moder's True Form, Queen's Log Weapon, Fader's Ashlands smash) displayed a full tier early. Aligned all seven gates with BossProgressionManager's state mapping and the actual code gates in TrolSkillPatches, TrolRegenPatches, TrolRace, and TrolFarmingPatches. - Yagluth melee bonus line said +10; TrolConfig.YagluthMeleeBonus defaults to 5, matching the Rock Throwing figure beside it. - Bonemass/Yagluth melee bonus text omitted Axes, though the bonus (TrolDamagePatches) applies to Axes too. --- JotunnModStub/RaceCompendium.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/JotunnModStub/RaceCompendium.cs b/JotunnModStub/RaceCompendium.cs index 886d4ae..6346e01 100644 --- a/JotunnModStub/RaceCompendium.cs +++ b/JotunnModStub/RaceCompendium.cs @@ -332,27 +332,27 @@ namespace RacesOfValheim StringBuilder sb = new StringBuilder(); sb.AppendLine("The Trol's Heritage\n"); - sb.AppendLine($"Base Passive: Physical kills automatically consume enemies (if edible). You are natively 20% larger than a human with immense strength. You have +200 Max Carry Weight, gain +3 Armor per boss defeated, and carry a 4th food slot from your very first meal - no boss required.\n"); - - if (state >= 1) - sb.AppendLine("Eikthyr Defeated: Increased XP gain for physical labor and blunt combat (Clubs, Unarmed, Axes, Pickaxes, WoodCutting).\n"); + sb.AppendLine($"Base Passive: You are natively 20% larger than a human with immense strength. You have +200 Max Carry Weight, gain +3 Armor per boss defeated, and carry a 4th food slot from your very first meal - no boss required.\n"); if (state >= 2) - sb.AppendLine("The Elder Defeated: Unlocked Rock Throwing ability. +10% passive health regeneration.\n"); + sb.AppendLine("Eikthyr Defeated: Increased XP gain for physical labor and blunt combat (Clubs, Unarmed, Axes, Pickaxes, WoodCutting).\n"); if (state >= 3) - sb.AppendLine("Bonemass Defeated: +5% Size, +50 Carry Weight, +10 Damage to Clubs/Unarmed, +10 Rock Throwing Damage.\n"); - + sb.AppendLine("The Elder Defeated: Unlocked Rock Throwing ability. +10% passive health regeneration.\n"); + if (state >= 4) - sb.AppendLine("Moder Defeated: Unlocked True Form (Transformation ability).\n"); - + sb.AppendLine("Bonemass Defeated: +5% Size, +50 Carry Weight, +10 Damage to Clubs/Unarmed/Axes, +10 Rock Throwing Damage.\n"); + if (state >= 5) - sb.AppendLine("Yagluth Defeated: +5% Size, +50 Carry Weight, +10 Damage to Clubs/Unarmed, +5 Rock Throwing Damage. Unlocked 5th Food Slot.\n"); - + sb.AppendLine("Moder Defeated: Unlocked True Form (Transformation ability).\n"); + if (state >= 6) - sb.AppendLine("The Queen Defeated: Unlocked Log Weapon (in True Form, interact with trees to wield them as weapons). True Form size is massively increased.\n"); - + sb.AppendLine("Yagluth Defeated: +5% Size, +50 Carry Weight, +5 Damage to Clubs/Unarmed/Axes, +5 Rock Throwing Damage. Unlocked 5th Food Slot.\n"); + if (state >= 7) + sb.AppendLine("The Queen Defeated: Unlocked Log Weapon (in True Form, interact with trees to wield them as weapons). True Form size is massively increased.\n"); + + if (state >= 8) sb.AppendLine("Fader Defeated: Your wielded trees can now instantly smash through the toughest materials in the Ashlands.\n"); knownTexts["Trol Secrets"] = sb.ToString();