The head-flame VFX clones only the source torch's ParticleSystem subtree,
then stripped components with a blocklist (every MonoBehaviour, every
Collider) to leave a bare flame. The blocklist missed Rigidbody - not a
MonoBehaviour in Unity - so a torch whose fire-particle node carried one kept
being acted on by physics independently of the parent GameObject that tracks
the head each frame, and visibly fell away from the skull.
Switched to an allowlist: keep only Transform/ParticleSystem/
ParticleSystemRenderer/Light, destroy everything else on the clone. Can't
miss a component type this way, whatever it turns out to be next.
The hair/beard hide called into m_hairItemInstances/m_beardItemInstances
(plural), fields that don't exist on VisEquipment - every other race uses
the real singular m_hairItemInstance/m_beardItemInstance, so the beard was
never actually hidden. Fixed the field names and made the helper handle
both a GameObject and a List<GameObject> defensively.
Helmet hiding only scaled the wrapper to zero, which does nothing for a
skinned-mesh piece bound to the player's own bones - it ignores its
wrapper's transform. Added SkeletonVisuals.SetEquipmentPieceHidden, which
scales to zero and disables every child renderer, and used it everywhere
the helmet is hidden (local player, remote players, main-menu preview).
Also added an F8 debug dump of the hair/beard/helmet instance state
(active, renderer enabled, scale) for diagnosing any future visibility
regressions in-game.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The body swap read the race off the ZDO and gave up when there was none, which
is exactly the situation on the menu preview - FejdStartup instantiates a Player
and calls PlayerProfile.LoadPlayerData on it, so the preview knows its own custom
data and therefore its race, but it has no business owning a network view. It now
falls back to m_customData the way every other race in the mod already does, so a
Skeleton character looks like one before you press Start.
The tier falls back the same way. In the menu there is no world loaded to have
killed anything, so the preview is the base skeleton whatever the character has
done elsewhere.
feat(dvergar): age into a starred dverger's colours
One star at Bonemass, two at Fader.
Nothing is picked by eye. A starred creature in Valheim is not a second model: it
is the same one recoloured by LevelEffects, whose LevelSetup list holds a
hue/saturation/value offset per star. Those offsets are read off the Dverger
prefab at runtime and applied to the race's own slate blue-grey, so the tiers land
on the tints the game itself uses and keep following them if the prefab changes.
The tier comes from the ZDO key DvergarRace already publishes, so a remote Dvergar
is coloured at their own standing rather than the observer's - which matters as
soon as anyone runs personal progression.
Crossing a tier pushes a colour refresh through immediately, since the tint is
only written from the UpdateColors postfix and Valheim runs that on its own
schedule. Same treatment the health malus already gets a few lines above.
The hood is deliberately untouched.
The head flame was built inside SkeletonRace, a single MonoBehaviour that only
ever looks at Player.m_localPlayer, so the fire existed on one client and on one
player. Everyone else saw a bare skull. Same shape as the Draugh aura, same fix:
the build moves to SkeletonVisuals.HeadFlame, which takes a Player, and
RacesVisualController grows one for every remote skeleton it can see. Held per
player rather than statically - a static would hand the second skeleton in view
the first one is fire. Nothing is networked and nothing needs to be: the tier is
already on the ZDO, so each client works out for itself who should be alight.
The remote path also still collapsed the jaw at Fader, the charred-twitcher
leftover that was removed from the local path two commits ago - so other players
would have gone on seeing a Fader with no mandible. It is a restore there now
too.