chore(release): v1.5.10 - Skeleton body switch for player model mods

New client-side option Skeleton - Visuals -> Body Model Enabled. Off,
a Skeleton takes the human branch of the VisEquipment postfix: vanilla
body on, no bone meshes, eye glow, jaw correction or skull flame, and
the helmet is left alone. Requested by players using EnhancedValheimVRM,
where the bones floated around the replacement model.

README: New in block for v1.5.10, changelog entry (also the Russian
fixes since 1.5.9), and a line under the Skeleton features.
This commit is contained in:
kanym 2026-10-13 20:00:03 +02:00
commit bb1ca57924
10 changed files with 43 additions and 15 deletions

View file

@ -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.9",
"version_number": "1.5.10",
"website_url": "",
"dependencies": [
"denikson-BepInExPack_Valheim-5.4.2333",

View file

@ -15,7 +15,7 @@ namespace RacesOfValheim
{
public const string PluginGUID = "com.nandor.racesofvalheim";
public const string PluginName = "Races Of Valheim";
public const string PluginVersion = "1.5.9";
public const string PluginVersion = "1.5.10";
private readonly Harmony harmony = new Harmony(PluginGUID);

View file

@ -41,6 +41,7 @@ namespace RacesOfValheim
// ─── Visuals ───────────────────────────────────────────────────────────
public static ConfigEntry<bool> HeadFireVFXEnabled;
public static ConfigEntry<bool> BodyModelEnabled;
public static void Bind(ConfigFile config)
{
@ -71,6 +72,8 @@ namespace RacesOfValheim
const string visuals = "Skeleton - Visuals";
HeadFireVFXEnabled = config.Bind(visuals, "Head Fire VFX Enabled", true,
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."));
}
}
}

View file

@ -62,10 +62,11 @@ namespace RacesOfValheim
Transform jaw = ResolveJaw();
if (jaw == null || jaw.parent == null) return;
if (!SkeletonVisuals.IsSkeletonPlayer(m_player))
if (!SkeletonVisuals.ShowsSkeletonBody(m_player))
{
// Nothing rewrites this bone on its own, so a player who stops being a Skeleton
// would otherwise keep wearing the correction on their human face.
// (or switches the skeleton body off) would otherwise keep wearing the correction
// on their human face.
if (m_applied)
{
jaw.localPosition = m_baseLocalPosition;

View file

@ -254,7 +254,9 @@ namespace RacesOfValheim
// before it could find out it was looking at a Skeleton.
string race = SkeletonVisuals.GetPlayerRace(p);
if (race == SkeletonVisuals.RaceId)
// With "Body Model Enabled" off a Skeleton takes the human branch below, the same
// as any other race, so the toggle also works live: the next refresh swaps back.
if (race == SkeletonVisuals.RaceId && SkeletonConfig.BodyModelEnabled.Value)
{
if (__instance.m_bodyModel != null)
{

View file

@ -323,9 +323,13 @@ namespace RacesOfValheim
VisEquipment currentVis = Player.m_localPlayer.GetComponent<VisEquipment>();
if (currentVis != null)
{
// Hide Helmets (Valheim uses singular GameObject for helmet)
var helmetObj = HarmonyLib.Traverse.Create(currentVis).Field<GameObject>("m_helmetItemInstance").Value;
SkeletonVisuals.SetEquipmentPieceHidden(helmetObj, true);
// Hide Helmets (Valheim uses singular GameObject for helmet). Only over a skull:
// a viking body wears its helmet, and the VisEquipment postfix puts it back.
if (SkeletonConfig.BodyModelEnabled.Value)
{
var helmetObj = HarmonyLib.Traverse.Create(currentVis).Field<GameObject>("m_helmetItemInstance").Value;
SkeletonVisuals.SetEquipmentPieceHidden(helmetObj, true);
}
// Scale Body Armor (Chest, Legs, Shoulder) by 5%
string[] armorFields = { "m_chestItemInstances", "m_legItemInstances", "m_shoulderItemInstances" };
@ -440,7 +444,7 @@ namespace RacesOfValheim
}
// Flames on the skull, worn with the fire-tier model and nothing else.
headFlame.Apply(Player.m_localPlayer, SkeletonConfig.HeadFireVFXEnabled.Value && SkeletonVisuals.GetModel(Player.m_localPlayer, state) == SkeletonProgression.FireModel);
headFlame.Apply(Player.m_localPlayer, SkeletonConfig.HeadFireVFXEnabled.Value && SkeletonConfig.BodyModelEnabled.Value && SkeletonVisuals.GetModel(Player.m_localPlayer, state) == SkeletonProgression.FireModel);
if (rules.FireAura)
{

View file

@ -49,6 +49,16 @@ namespace RacesOfValheim
public static bool IsSkeletonPlayer(Player player) => GetPlayerRace(player) == RaceId;
/// <summary>
/// Whether this client draws the skeleton's bones on this player. False for every
/// non-Skeleton, and for every Skeleton when "Body Model Enabled" is off: model-replacement
/// mods (EnhancedValheimVRM and the like) hide the vanilla body and draw their own, so the
/// borrowed bones ended up floating around the replacement model. With the option off the
/// Skeleton keeps every ability and only looks like a plain viking.
/// </summary>
public static bool ShowsSkeletonBody(Player player) =>
SkeletonConfig.BodyModelEnabled.Value && IsSkeletonPlayer(player);
/// <summary>
/// Fully hides (or restores) one equipped item instance - a helmet, typically.
///

View file

@ -128,8 +128,11 @@ namespace RacesOfValheim
vis.SetBeardItem(0);
// Hide Helmet
var helmetObj = HarmonyLib.Traverse.Create(vis).Field<GameObject>("m_helmetItemInstance").Value;
SkeletonVisuals.SetEquipmentPieceHidden(helmetObj, true);
if (SkeletonConfig.BodyModelEnabled.Value)
{
var helmetObj = HarmonyLib.Traverse.Create(vis).Field<GameObject>("m_helmetItemInstance").Value;
SkeletonVisuals.SetEquipmentPieceHidden(helmetObj, true);
}
// Scale Body Armor
string[] armorFields = { "m_chestItemInstances", "m_legItemInstances", "m_shoulderItemInstances" };
@ -165,7 +168,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 && SkeletonVisuals.GetModel(m_player, state) == SkeletonProgression.FireModel);
m_skeletonHeadFlame.Apply(m_player, SkeletonConfig.HeadFireVFXEnabled.Value && SkeletonConfig.BodyModelEnabled.Value && SkeletonVisuals.GetModel(m_player, state) == SkeletonProgression.FireModel);
// Apply Scale
Vector3 targetScale = rules.ScaleMultiplier;