diff --git a/JotunnModStub/Skeleton/SkeletonPatches.cs b/JotunnModStub/Skeleton/SkeletonPatches.cs index fef3b6a..61a92a5 100644 --- a/JotunnModStub/Skeleton/SkeletonPatches.cs +++ b/JotunnModStub/Skeleton/SkeletonPatches.cs @@ -402,11 +402,10 @@ namespace RacesOfValheim catch (System.Exception e) { } } - // Parts of a skull that must ride the head as one piece. A creature's jaw is authored - // against its own skull, so binding it to a same-named bone on the player - or letting - // it fall through to the root - puts the mandible somewhere near the face rather than - // on it. Pinning the whole group to the head keeps the skull in one piece; the jaw - // stops being able to open, which is a fair trade for it being attached. + // Bones worth reporting on. Not remapped - the player rig has a real 'Jaw' bone and the + // name match lands on it correctly, which is exactly why the plain and poison skeletons + // always looked right. An earlier attempt pinned this group to the head instead and + // deformed all three models; the log is what settled it. private static readonly string[] SkullParts = { "jaw", "teeth", "tooth", "tongue", "chin", "mandible" }; /// @@ -416,16 +415,6 @@ namespace RacesOfValheim { if (sourceBone == null) return playerBones[0]; - string name = sourceBone.name.ToLower(); - foreach (string part in SkullParts) - { - if (!name.Contains(part)) continue; - - Transform head = FindBoneByName(playerBones, "Head"); - if (head != null) return head; - break; - } - Transform direct = FindBoneByName(playerBones, sourceBone.name); if (direct != null) return direct; @@ -470,10 +459,30 @@ namespace RacesOfValheim if (!interesting && !isRootFallback) continue; + // The rest pose comes with it. Three models share this rig bone for bone, yet + // only one of them wears its jaw wrongly - so the difference is in how that + // jaw is posed or bound, not in where it is mapped. Printing the source + // transform next to the player's own gives the exact correction to apply + // rather than another guess at it. + Transform playerEquivalent = FindBoneByName(playerBones, bone.name); + Jotunn.Logger.LogInfo( $"[Skeleton] '{bone.name}' -> '{(resolved != null ? resolved.name : "null")}'" + (isRootFallback ? " (ROOT FALLBACK)" : "") + (interesting ? " (skull part)" : "")); + + if (!interesting) continue; + + Jotunn.Logger.LogInfo( + $"[Skeleton] source rest: pos={bone.localPosition:F4} " + + $"rot={bone.localRotation.eulerAngles:F2} scale={bone.localScale:F3}"); + + if (playerEquivalent != null) + { + Jotunn.Logger.LogInfo( + $"[Skeleton] player rest: pos={playerEquivalent.localPosition:F4} " + + $"rot={playerEquivalent.localRotation.eulerAngles:F2} scale={playerEquivalent.localScale:F3}"); + } } } diff --git a/JotunnModStub/Skeleton/SkeletonRace.cs b/JotunnModStub/Skeleton/SkeletonRace.cs index 9ba8679..8f7438c 100644 --- a/JotunnModStub/Skeleton/SkeletonRace.cs +++ b/JotunnModStub/Skeleton/SkeletonRace.cs @@ -63,9 +63,10 @@ namespace RacesOfValheim // Above the head bone's own origin, which sits at the base of the skull. private const float HeadFlameHeight = 0.18f; - // Torch flames are authored for a fist-sized fire on a stick. This is the two knobs to - // turn if the skull ends up wearing a bonfire or a birthday candle. - private const float HeadFlameScale = 1.8f; + // Torch flames are authored for a fist-sized fire on a stick. 1.8 turned the head into a + // white-hot bloom that washed out the whole screen - and, more to the point, hid the skull + // underneath it. This is the knob to turn if it still burns too bright or too small. + private const float HeadFlameScale = 1.1f; // Fire sources in preference order. The torch is an item every world has; the ground // torch and the fire pit are the building pieces to fall back on. @@ -476,8 +477,8 @@ namespace RacesOfValheim // blows out the whole face. Keep the glow, lose the floodlight. foreach (Light light in headFlameVFX.GetComponentsInChildren(true)) { - light.range *= 0.5f; - light.intensity *= 0.6f; + light.range *= 0.35f; + light.intensity *= 0.4f; } // Anything that made the source a torch rather than a fire.