diff --git a/JotunnModStub/RaceCompendium.cs b/JotunnModStub/RaceCompendium.cs index 92707d6..58f907e 100644 --- a/JotunnModStub/RaceCompendium.cs +++ b/JotunnModStub/RaceCompendium.cs @@ -347,8 +347,8 @@ namespace RacesOfValheim if (state >= 5) { - sb.AppendLine("[Moder Unlock] Charred Bones:"); - sb.AppendLine("Your frame blackens and burns, and the fire clings to you: everything near enough to feel it is scorched. Your wounds also close faster than bone has any right to.\n"); + sb.AppendLine("[Moder Unlock] Bones Alight:"); + sb.AppendLine("Your frame is remade in a harder cast, and fire clings to it: everything near enough to feel it is scorched. Your wounds also close faster than bone has any right to.\n"); } if (state >= 6) diff --git a/JotunnModStub/Skeleton/SkeletonPatches.cs b/JotunnModStub/Skeleton/SkeletonPatches.cs index 92a9c87..4767e6c 100644 --- a/JotunnModStub/Skeleton/SkeletonPatches.cs +++ b/JotunnModStub/Skeleton/SkeletonPatches.cs @@ -10,6 +10,20 @@ namespace RacesOfValheim private static Mesh skeletonMesh = null; private static Material[] skeletonMaterials = null; + // Model names already reported as missing. The body swap runs from a visual refresh, so + // without this a mistyped prefab id would log every time equipment changes. + private static readonly System.Collections.Generic.HashSet warnedMissingModels = + new System.Collections.Generic.HashSet(); + + private static void WarnMissingModelOnce(string prefabName) + { + if (!warnedMissingModels.Add(prefabName)) return; + + Jotunn.Logger.LogWarning( + $"[Skeleton] Body model prefab '{prefabName}' not found - the race has no mesh at this tier. " + + "Check the id in SkeletonProgression."); + } + /// /// Makes the Skeleton's max health exactly what its progression promises. /// @@ -260,6 +274,13 @@ namespace RacesOfValheim if (skeletonBodyTransform == null) { GameObject skelPrefab = PrefabManager.Cache.GetPrefab(rules.ModelPrefab); + if (skelPrefab == null) + { + // The human body was switched off two lines up, so an unresolved + // model leaves an invisible player rather than an obvious error. + // Say so once per tier instead of failing silently. + WarnMissingModelOnce(rules.ModelPrefab); + } if (skelPrefab != null) { GameObject skelObj = new GameObject(targetBodyName); diff --git a/JotunnModStub/Skeleton/SkeletonProgression.cs b/JotunnModStub/Skeleton/SkeletonProgression.cs index 66d297b..1225a90 100644 --- a/JotunnModStub/Skeleton/SkeletonProgression.cs +++ b/JotunnModStub/Skeleton/SkeletonProgression.cs @@ -37,15 +37,15 @@ namespace RacesOfValheim public const string BaseModel = "Skeleton"; public const string PoisonModel = "Skeleton_Poison"; - // The published progression calls for a fire skeleton from Moder on, and the charred - // twitcher is the only burnt skeleton the game ships. It used to arrive at Fader; if that - // is preferred, move the model and its scale back to the state >= 8 block - nothing else - // in this file depends on where they sit. - public const string FireModel = "Charred_Twitcher"; + // The model worn from Moder on. It used to arrive at Fader; if that is preferred, move it + // and its scale back to the state >= 8 block - nothing else in this file depends on where + // they sit. + public const string FireModel = "Skeleton_Hildir"; - // The charred rig is broader and shorter than a plain skeleton, so it needs squeezing to - // read as a player. Tied to the model, not to a tier. - public static readonly UnityEngine.Vector3 FireModelScale = new UnityEngine.Vector3(0.85f, 1.20f, 0.85f); + // Hildir's skeleton is built on the same rig as the plain one, so it needs no reshaping to + // read as a player - unlike the charred twitcher this replaced, which is broader and + // shorter and wore a 0.85/1.20/0.85 squeeze to compensate. Tied to the model, not a tier. + public static readonly UnityEngine.Vector3 FireModelScale = UnityEngine.Vector3.one; public const string SummonPrefabName = "Skeleton_friendly";