The dump settled both.
Skin: UpdateColors writes m_bodyModel.materials[0] _SkinColor, which is what
the postfix already targeted, so the patch was never wrong - the colour was.
_SkinColor multiplies the human skin texture rather than replacing it, and
(0.72, 0.74, 0.82) is close enough to white to change nothing anyone can see.
Every race that reads clearly commits to a channel, so the Dvergur now does too.
Hood: the dvergr mesh reports zero triangles because it ships with Read/Write
disabled, so its vertices and indices are unreachable at runtime and no submesh
carving could ever have produced geometry. The rig does carry a hat1/hat2/hat3
chain that nothing but the hood is skinned to, so the hood is isolated without
touching the mesh at all: instantiate the whole body, detach the hat chain from
the skull, and collapse the armature root to zero scale, which pulls every
vertex weighted to it into a single point and leaves only the hood standing.
Alignment is computed rather than measured - the object is shifted by the gap
between the hat bone and the player head bone - so there are no hand-tuned
offsets, only optional nudges. Animator and LODGroup are stripped alongside the
MonoBehaviours since neither is one and both would keep driving or hiding the
rig, and the renderers are set to update when offscreen because the collapsed
bones leave the skinned bounds meaningless.
The log settled it: the Dverger prefab holds a single renderer, dvergr, with
the hood, body and clothes baked into one mesh. There was never a separate
object to lift out, so the whole-object search could only ever fail.
Resolution now falls through three steps - a separate renderer object, a
submesh picked out by its material name, and an index pinned by hand in
DvergurConfig - and the submesh path rebuilds the chosen triangles as a
standalone skinned renderer. Vertices, bone weights and bindposes are all
carried over untouched and only the triangle list is narrowed, so the skinning
still lines up and the player rig places the hood without any offsets.
The candidate list also covers the mage variants, which wear a different hood
and may keep it as its own object.
dumpdverger now reports submesh count, per-submesh material and triangle count,
which is the part that actually identifies the hood.
The tint was applied the way the race-selection menu appears to do it, with
VisEquipment.SetSkinColor followed by UpdateColors, and had no visible effect.
That pair is not what colours a player: UpdateColors rebuilds the body material
from Valheim own state each refresh, so a tint only survives if it is written
after it runs. Every race here that visibly changes colour already has a
postfix on UpdateColors setting _SkinColor on the material, and the SetSkinColor
calls in the menu are decorative on their own. The Dvergur now follows the Trol.
Reading the race from the ZDO with a m_customData fallback and no local-player
check covers the main-menu preview and the first spawn frame, where
Player.m_localPlayer is still null. Nothing needs saving or restoring either,
since the tint stops being applied the moment the race changes.
Beard and hair go pale to match; the hood hides most of the hair but the beard
shows.
Height goes from 0.70 to 0.78. The spec asked for at least -30% but that read as
too small beside a human on screen.
Health: the malus was taken off Character.GetMaxHealth, which only made the
getter lie. Character.SetMaxHealth is the one thing that clamps current health
to the new maximum and it never saw a lower number, so the bar shrank while the
value stayed where it was. Player.SetMaxHealth also flashes the bar whenever the
new maximum is above GetMaxHealth(), so against a getter that always read low
every food tick looked like an increase and re-triggered the flash. Taking the
malus off Player.GetTotalFoodValue instead puts it upstream of both, and leaves
Valheim to do its own clamping on an honest number.
Scale: applied from the plugin MonoBehaviour, it was overwritten on the same
frame by Trol's Player.Update postfix, which forced every non-Trol player back
to scale 1. Sizing now happens in a postfix on that same method, the way the
Trol does it, and RaceScale records which races size themselves so they stop
undoing each other. This also fixes the Furling, which was losing the same race.
Hood: the Dverger Circlet is a metal band, not the hood, and instantiating a
skinned mesh leaves its bones pointing at the source prefab so it renders
nowhere. The headgear is now lifted off the Dvergr NPC and rebound to the
player's own bones by name, as the Skeleton does for whole bodies.
Skin is tinted to a dvergr grey, saved and restored through the same
OriginalSkinColor keys the other tinted races use.
Adds a dumpdverger console command: prefab contents live in the asset bundles
and cannot be read outside a running game, so this is how the hood mesh and the
per-star LevelEffects colours get identified.
An eighth race built on the existing per-race pattern: a MonoBehaviour driver
registered from Awake, a progression table keyed on the boss state, an SE_Stats
carrier, and Harmony patches for the individual perks.
The helmet slot stays free. Whatever the player equips keeps every one of its
stats and only its mesh is swapped for the dvergr hood, which is the Skeleton's
helmet handling turned into a replacement rather than a plain hide.
Every percentage the spec left open lives in DvergurConfig as a named value and
is marked TODO there, so tuning the race never means touching the logic. The
knobs are static readonly rather than const so that switching a perk off with a
zero does not fold its guard into dead code.