Commit graph

514 commits

Author SHA1 Message Date
aee34caafd style(dvergar): shrink the cap from most of a face to an eye
The buried-ball idea is right and the first sizing of it was not: a 30mm radius clearing the face by 9mm showed a 43mm cap.

Radius halved to 15mm and the centre pulled out to keep about 4mm of clearance, which gives roughly a 20mm eye. Halving the radius also halves how hard the cap reacts to a millimetre of depth, which matters more than the size itself - the big ball made every adjustment an overshoot.
2026-08-05 21:40:22 +02:00
fc608d677a feat(dvergar): make the eye a buried ball showing only its cap
Your idea, and a better shape for the problem than balancing a small sphere on the surface. A large ball centred well inside the skull breaks the face with a slice of itself, so the face bounds the glow, it cannot float off the cheek, and the visible size is set by how deep the centre sits rather than by the sphere alone.

Sized from the two depths already measured: visible at a centre of 82mm with an 8mm radius, gone at 74mm with the same, which puts the face surface around 85-90mm from the head bone. A 30mm radius centred at 65mm clears that by about a centimetre.
2026-08-05 21:37:43 +02:00
38ba444f64 style(dvergar): make the eyes bigger and round again
0.014 was 11mm across on a Dvergar, which buried enough of the sphere that the visible cap read as a flat decal rather than an eye. Up to 0.026, past the 0.020 it started at, so more of the ball stands clear of the skull and gets its roundness back.
2026-08-05 21:35:58 +02:00
db482ede87 style(dvergar): back to the deepest depth that still shows, and smaller eyes
0.067 buried them, so the floor at the eye line is now measured too: the usable band runs from just under 0.105 to about 0.140, and 0.105 is the far end of what reads as inset.

Depth being spent, the remaining lever is size. What reads as protruding in profile is mostly the bloom halo rather than the ball, and both scale together - so EyeSize drops from 0.020 to 0.014, which pulls the halo in and leaves less cap standing out without moving the centre back onto the cheek.
2026-08-05 21:31:09 +02:00
f4f575b181 style(dvergar): sink the eyes three centimetres
EyeForward 0.105 to 0.067, which is 3cm on a Dvergar.

This goes well past the depth that buried them before, but that reading was taken with the eyes 10cm lower and on tilted axes, so it does not necessarily describe the face at the eye line. If they vanish, the real floor at this height is now known and 0.105 is the way back.
2026-08-05 21:29:28 +02:00
8c004e3d7f style(dvergar): sink the eyes another centimetre
EyeForward 0.115 to 0.105, about a centimetre on a Dvergar. Agreed on the profile - they were still reading as sitting on the face rather than in it.

Also records the usable range, which is narrow: 0.095 buried them completely and 0.140 stood them off the skull, so the whole band is four centimetres and the eye is a two-centimetre ball. Most of it is meant to be inside.
2026-08-05 21:09:02 +02:00
376000da49 style(dvergar): sink the eyes into the sockets
EyeForward 0.140 to 0.115 - the axis is depth into the face, and 0.025 before the race scale is about the 2cm asked for on a Dvergar. In profile the glow was sitting off the front of the skull rather than in it.
2026-08-05 21:06:13 +02:00
e323530a58 style(dvergar): raise the eyes again, onto the painted ones
0.140 to 0.200 before the race scale - about five centimetres on a Dvergar, half again as much as the last nudge, since the glow was still sitting a full eye below the ones on the skin.
2026-08-05 21:04:06 +02:00
d752dba10d style(dvergar): raise the eyes to the eye line
They were sitting at cheekbone height. Up from 0.100 to 0.140 before the race scale, which is about three centimetres on a Dvergar.
2026-08-05 21:02:00 +02:00
7c9c1ca630 fix(dvergar): square the skull's axes so the eyes sit on the eye line
The trace showed the offsets arriving tilted: 0.109m of forward and 0.078m of up came out as 0.124 forward and 0.059 up, which is the jaw rather than the eyes. towardFace read 0.99, so the direction was never wrong - only leaning.

The axes are measured from whatever pose the head is in on the frame the eyes are built, and a head pitched a few degrees hands back a forward that leans down and an up that leans back. A bone's real axes are square, so the measurement is now rounded to the nearest one. The tilt was the pose at the moment of asking and nothing else.
2026-08-05 20:59:01 +02:00
196e413573 fix(dvergar): measure the skull's axes once, so the eyes turn with the head
The eyes were parented to the head bone and still ignored every head animation,
which should have been impossible - a child cannot refuse its parent's rotation.
It was not refusing it. It was being handed the exact opposite every frame.

The offsets were built from directions computed as
headBone.InverseTransformDirection(playerRoot.forward), and that was recomputed
on every placement. As the head turns, the same world direction expressed in the
head's local space rotates by exactly the negative of the head's rotation - so
the local offset counter-rotated and cancelled the animation out. The eyes rode
the head's position perfectly and its rotation not at all, which is exactly what
it looked like from the first screenshot onwards.

The axes are now measured once, at build time, while the head is still looking
where the body is, and kept on the eye holder. Fixed in the skull's frame, they
ride every animation for free - which was the whole point of parenting to the
bone in the first place.
2026-08-05 20:54:30 +02:00
e512dcfb93 fix(dvergar): push the eyes out to the surface of the face
Placement is right and the trace proves it - 0.095m from the head bone, exactly the offsets after the race scale, parented to Head and following it. They were simply still inside the skull, and the shader that resolved is depth-tested, so the head hid them completely.

The bone sits at the base of the skull and a face is further forward than it looks. Offsets raised to land about 0.109m out on a Dvergar. The trace now also reports how far up the eye ended up and whether it is on the face side of the head at all, so the next look distinguishes too shallow from the wrong direction entirely.
2026-08-05 20:51:11 +02:00
f93b57ceff fix(dvergar): stop measuring the eyes from the camera anchor
The trace found it. An eye sat at local (0, 0.0066, 0) on a bone with a scale of
78, which is 0.513m straight up - exactly the distance being reported from the
head. The offsets in play are 0.0007 local units, three orders of magnitude too
small to account for that, so the drift was never in them.

It was the origin. The previous version started from Character.m_eye on the
reasoning that it is the game's own answer to where a player's eyes are, and it
is not: it is where the camera goes, half a metre above the head bone. Everything
after that was correct arithmetic applied to the wrong point, which is why five
rounds of adjusting the offsets changed nothing.

Placement now starts at the head bone and nowhere else. The offsets return to
real distances for a face - forward to the surface of the skull, up from its base
- and the frame conversion is left alone, since the same trace proved it right:
0.0002 local units on a bone scaled 78 rendered as a 0.016m eye, exactly as
asked.
2026-08-05 20:47:17 +02:00
7651a07279 chore(dvergar): trace where the eyes actually are, not where they should be
The arithmetic puts them 7cm from the head bone and the screen puts them metres away, so the offsets are not the thing to keep adjusting. Traces position, parent, local and world transforms and the distance from the head, six times over the first few seconds - enough to tell a bad offset from an object that is not parented, or one that is parented and then moved.
2026-08-05 20:43:24 +02:00
c974977f64 fix(dvergar): hang the eyes on the bone the mesh is actually skinned to
A child transform cannot ignore its parent's rotation, so eyes that followed the
body but sat out every idle bob of the head were never parented to the head that
was moving. They were parented to the Animator avatar's HumanBodyBones.Head,
which on this rig is a transform that travels with the player and is not the one
the animation drives.

The rest of the mod has never used the avatar for this. The hood, the Skeleton's
body swap and the Furling's head all take the bone off
VisEquipment.m_bodyModel.bones - the array the skinned mesh deforms with, which
is by definition the rig that moves. The eyes do too now, with the avatar left as
a fallback only for the case where the body model is not up yet.

The one-shot log prints both candidates side by side and says whether they are
the same transform, so the next report confirms or kills this outright rather
than leaving it to inference.
2026-08-05 20:37:45 +02:00
e7d60f61ba fix(dvergar): measure where the eyes go instead of guessing at it
Three attempts have now placed these by picking a distance from a bone and hoping,
and all three landed somewhere wrong - above the head, on the camera, and inside
the skull. The distance was never the thing to fix.

Character.m_eye is the game's own answer to where a player's eyes are. Asking the
head bone to express that point in its local space gives an offset that is
correct by construction: no working out which way the bone points, no hand-picked
distance from the base of the skull, and because the result is local it rides
every head animation without being recomputed. The config offsets stay as small
nudges in metres on top of that, with EyeForward pushing out of the skull to the
surface of the face.

Also logs the bone name, its scale and the measured eye point once per session,
so the next round starts from numbers rather than from another guess.
2026-08-05 20:33:13 +02:00
8014986f0a fix(dvergar): socket the eyes into the head bone instead of following it
They were placed from the player root's axes every frame, which follows where the
body faces and knows nothing about where the head is looking - so an idle
animation turned the head and left the eyes behind, reading as attached to the
camera rather than to the face.

They are children of the head bone now, so position and rotation are inherited
and no longer computed. The reason that was avoided in the first place was not
knowing which way a rig bone points, and the answer turned out to be to stop
guessing: the body's forward and up, expressed in the head bone's local space,
are exactly the directions wanted, and because they are local they go on meaning
the same thing as the head turns. Measured once at build time, while the head is
still looking where the body is.

Scale is the only thing still asserted each frame, because it can change under
us. The bone carries the armature's hundredfold scale multiplied by whatever the
race renders at; dividing it out leaves the holder standing at exactly the race's
scale, which keeps the offsets underneath honest metres and keeps the eyes
shrinking with a Dvergar.
2026-08-05 20:28:01 +02:00
bb952ac4c2 fix(dvergar): make the eyes solid, so the camera angle stops deciding whether they exist
Two symptoms, one cause each, and both were choices from the first version.

Vanishing from certain angles: the eyes were quads. A quad has no thickness, so
seen edge-on it is a line and there is nothing to draw. Now spheres, which read
the same from every direction.

Drawing in front of the face, and visible from behind: the shader resolver was
asked for Sprites/Default first and got it. That is a transparent shader with
depth writing off and backface culling off - so the eyes drew over whatever was
in front of them and stayed visible through the back of the head. The resolver
now asks for an unlit opaque shader first, which the skull occludes like any
other solid thing.

Between them, an eye is now a small solid glowing ball in a face rather than a
sticker that only exists at some angles.
2026-08-05 20:20:53 +02:00
76b89a8e5a fix(dvergar): put the eyes on the head instead of on the camera
Both faults reported came from the same wrong anchor. Character.m_eye is the
camera's eye point, not the model's: it lives outside the scaled rig, so on a
Dvergar - who renders at 78% - the quads hung where a full-height human's face
would have been, a foot above the head. And it turns with the look direction
rather than with the face, so they pointed wherever the player was looking rather
than wherever the head was.

They now hang off the player root, unscaled, and are placed onto the head bone in
world space every frame: position from the bone, orientation from the player's
own facing, and every offset multiplied by the race's visual scale so they shrink
with the body. That also means the placement constants are honest metres measured
from the base of the skull, which is what makes them tunable at all.

Driven per frame from the two places that already tick a Dvergar - the race
script for the local player, the visual controller for remote ones - because
world-space placement has to be re-applied rather than inherited.
2026-08-05 20:14:08 +02:00
9dc072f0a5 feat(dvergar): give the eyes a glow, and take the colour from the stars
A player's eyes are painted into the skin texture, and Custom/Player has no
emission channel to light them with - the shader survey in the last commit is
what established that. So a Dvergar wears two small emissive quads over them
instead. There was no working example to copy: the Aswid's red eyes were never
built, only cleaned up, which is why they never glowed.

Colour comes from the same LevelSetup list the skin tint does. One star is
RGBA(0, 4, 3.3), two stars RGBA(12, 0, 8.8) - both far past 1, which is what
makes them bloom rather than merely look bright. Only the base tier's colour is
ours to choose.

The quads hang off Character.m_eye, which already sits at eye height and already
faces the look direction, so the offsets are plain metres in an obvious frame:
no working out which way a rig bone points, and no fighting the 100x scale the
player armature is authored at. Everything about the placement is a named
constant, since none of it can be judged without seeing it.

Applied from the UpdateColors postfix rather than UpdateVisuals so that the
refresh DvergarRace already forces when a boss falls recolours the eyes in the
same frame it recolours the skin. It runs before the race check so it also takes
them off again.

The glow shader is resolved from a list and the winner is logged, because Unity
strips shaders nothing references and assuming one would be a silent failure.
2026-08-05 20:05:52 +02:00
0b6a61a852 chore(dvergar): survey the body shader, and record why pale is out of reach
Custom/Player carries 13 properties and exactly one colour among them,
_SkinColor. No _Hue, no _Saturation, no _Value, no _Brightness, no _Grayscale.

That closes the question the last three commits kept circling. A real dverger
turns pale at two stars through saturation -1 on the creature shader, which
genuinely desaturates its texture. The player body has no equivalent control:
_SkinColor multiplies the human skin map, and a multiply can darken or bias but
never desaturate, because the pink lives in the texture and survives being
multiplied by grey. White is the multiplier's identity, so "paler" and "more
human" are the same direction - which is exactly what every attempt walked into.

Reaching it would mean swapping _MainTex for a desaturated copy of the skin
texture, a per-player blit through a custom shader. Disproportionate for a
cosmetic tier.

The survey stays as a check rather than being deleted, in case a game update ever
changes the player shader, and the finding is written where the next person will
look for it.

The star offsets read off the prefab, for the record:
  Star 1: hue +0.100, saturation +0.200, value 0, emissive RGBA(0, 4, 3.294)
  Star 2: hue 0, saturation -1.000, value 0, emissive RGBA(11.984, 0, 8.784)

Both emissive colours are HDR and are what a starred dverger's eyes glow with.
2026-08-05 20:00:15 +02:00
760ddffc27 feat(dvergar): give two stars a stone tone instead of deriving one
Deriving it from the creature's own two-star offset put the tier a shade away
from ordinary human skin, and no amount of clamping fixes that, because the
derivation is asking for something a multiplier cannot do. Those offsets
brighten and desaturate a dverger's own texture. Ours multiplies the human skin
map, where less saturation means less tint, and less tint means more flesh - the
opposite direction from the one intended.

A multiplier can darken and it can bias. It cannot desaturate: the pink lives in
the texture and survives being multiplied by grey, only dimmer. So two stars now
states a colour outright - dark, and cold enough to sit on top of the flesh tone
rather than under it.

One star keeps deriving from the prefab, since that tier reads correctly.
2026-08-05 19:42:38 +02:00
9f6308ec94 fix(skeleton): hide the helmet on the menu preview too
SkeletonRace hides it every frame, but that script only ever runs for the local
player in a loaded world - so the moment the body swap started working in the
menu, the helmet came back with it. Hiding it from the visuals postfix instead
covers the preview, remote players and the first frame after a race change, none
of which reach SkeletonRace. Scaled to zero rather than deactivated, since
Valheim re-enables the instance on every refresh, and restored only from zero so
another race scaling the same helmet is left alone.

Armour is untouched, as asked.

fix(dvergar): stop the two-star tier turning back into a pink human

The star offsets are authored against a dverger's own texture, where a brightened,
desaturated result is a pale dverger. Ours multiplies the human skin texture,
where the same result is white - and a white multiplier is no tint at all, which
is exactly what two stars produced: an ordinary human. One star survived only
because its offset was smaller.

Saturation now has a floor and value a ceiling, so a tier can shift the colour but
never wash it out. The resolved offsets and the colour each one lands on are
logged once per session, so if a tier still reads wrong it can be tuned against
the real numbers rather than by eye.
2026-08-05 19:34:41 +02:00
eabc1c54bf feat(skeleton): show the race on the main-menu character preview
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.
2026-08-05 19:27:34 +02:00
93157632a4 Merge pull request 'fix-skeleton-bugs' (#13) from fix-skeleton-bugs into main
Reviewed-on: #13
2026-08-05 18:39:16 +02:00
13a2b0548d docs(readme): changelog for 1.3.12
Skadi flight, the Fenrir body, the Trenta crown, the Draugh rot in multiplayer,
and the Skeleton progression. Build and packaging changes are left out - the
changelog is written for players.
2026-08-05 18:38:23 +02:00
ece767de49 chore(release): 1.3.12
Both manifests and the plugin version. The changelog is written at merge, as
always, so the README is untouched here.
2026-08-05 18:32:11 +02:00
892b970df4 fix(skeleton): let everyone see the burning skull
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.
2026-08-05 18:22:57 +02:00
f012c96911 style(skeleton): put the head flame back to full size
Both halves of the dimming are reverted: scale to 1.8 and the torch light to half
range at 60% intensity. It was only turned down to get a clear look at the jaw
underneath, and the jaw is settled. The blaze is the point.
2026-08-05 18:09:04 +02:00
dc635f49cb fix(skeleton): stop hiding Fader's jaw, and take the race off properly on reset
Fader collapsed the jaw bone deliberately: the charred twitcher it used to wear
there carried a jaw of its own and the two doubled up. That model is gone from
every tier now, and the skeleton worn in its place has a jaw that belongs on the
face - so tier 8 was losing its mandible for no reason. The collapse is gone and
what remains is a restore, so anyone left jawless by the old build gets it back
on their next frame.

Resetting to Human left a burning skull and an invisible jaw behind. Everything
the race puts on the player is taken off in one branch - the one entered the
moment IsSkeleton stops being true - and neither the head flame nor the jaw was
ever listed there. The flame was only ever switched off from inside the Skeleton
branch, which by then is unreachable, and the jaw was only restored at tiers
below 8, which a Human never evaluates. Both now come off with everything else,
alongside the body scale that already did.
2026-08-05 17:57:01 +02:00
d9b87e97f0 fix(skeleton): put the jaw mapping back, and dim the head flame
The log settled it. All three skeleton models share one rig - 53 bones each, a
bone named Jaw in every one, and not a single bone falling through to the root -
which means the player rig has a real Jaw bone and the plain name match was
landing on it correctly all along. That is why the plain and poison skeletons
always looked right, and why pinning the skull group to the head deformed them.
Reverted; the parent walk stays for bones that genuinely match nothing.

Which leaves the real question: three models, one rig, one mapping, and only
Hildir wears its jaw wrongly. The difference has to be in how that jaw is posed
or bound rather than where it is mapped, so the diagnostic now prints the rest
transform of every skull bone alongside the player's own. One session loading a
working model and the broken one gives the exact correction instead of a third
guess at it.

The flame works - it resolved to the torch - but at 1.8 it was a white-hot bloom
that washed out the screen and hid the skull underneath, which is no way to judge
a jaw. Down to 1.1, with the torch light cut further.
2026-08-05 17:47:46 +02:00
5c75170a59 fix(skeleton): pin the whole skull to the head bone, and report how bones land
The previous attempt only helped bones that matched nothing, and the mandible did
not move - which says the jaw was matching something directly all along, and
being bound to it. A creature jaw is authored against its own skull, so whatever
it lands on, a bone-for-bone match included, puts the mandible near the face
rather than on it.

Jaw, teeth, tongue and chin are now pinned to the head bone as a group, before
any name matching runs, so the skull renders as one piece. It cannot open any
more, which is a fair trade for being attached.

If that is still not it, the shape of the problem is not visible in a screenshot:
it matters whether the jaw has a bone at all, whether it matched, and what it
matched. The body build now reports exactly that, once per model per session -
every skull part and every bone that fell through to the root - so the next look
starts from data instead of another guess.
2026-08-05 17:39:30 +02:00
59c250b4f8 fix(skeleton): reattach the mandible, light the skull for real, and grow at Fader
The jaw hung off the side of the skull because a creature rig carries bones a
human rig has no answer for. Unmatched bones fell back to bones[0] - the root -
so the mandible was skinned to the hips and followed them. The remap now walks
the creature'''s own hierarchy upward until something matches, which lands a jaw on
the head. It no longer opens, which no player will notice, and it is attached,
which every player did. Teeth and any other facial part the model carries are
fixed by the same walk.

The head flame never appeared. It was built by hand out of the smoke material
with a hand-rolled fire gradient, which at best would have read as a wisp rather
than a burning skull, and at worst never resolved a source at all and returned in
silence. It now clones real fire particles off a vanilla prefab - the torch
first, ground torches and the fire pit behind it - and says in the log which one
it took, or warns if none of them resolved. The torch light comes with it, at
half range and reduced intensity, since a light tuned to fill a corridor from
waist height blows out a face at point-blank range.

Fader now stands 15% taller. That scale goes on the player root, which is how
this race has always sized itself, so the collider, the camera pivot and every
equipment attachment scale with the mesh rather than leaving the model to drift
away from them.
2026-08-05 17:30:15 +02:00
6b890f71c4 fix(skeleton): keep Undead Fortitude on the player, and light the skull
The poison immunity fix before this one was necessary but not sufficient: it kept
the damage modifiers current, on an effect that was not there.

SE_SkeletonStats carries every damage modifier the race has - pierce and slash
resistance, the weakness to blunt, and the poison immunity - and it was applied
in exactly one place, the moment the player clicked Skeleton in the race menu.
Status effects are not saved with a character and do not survive death, so from
the next respawn or the next login onward a Skeleton simply had none of them.
That is why a blob still poisoned a tier 5 Skeleton. It is now re-applied
whenever it is missing.

The Moder regeneration bonus was broken the same way round: SkeletonRace wrote
m_healthRegenMultiplier onto the registered template, but SEMan.AddStatusEffect
clones what it is given and adds the clone, so the write reached nobody. The
effect now sets it on itself, alongside the modifiers it already rebuilds per
tier.

Also lights the skull. Cosmetic only, worn with the fire-tier model and nothing
else. It is parented to the player and moved onto the head bone each frame
rather than parented to the bone: the rig is authored at roughly 100x and a
particle system inheriting that would put a bonfire where a candle belongs.
2026-08-05 17:20:16 +02:00
f192f929f6 feat(skeleton): wear Skeleton_Hildir from Moder, not the charred twitcher
Swaps the model the race takes at Moder. Hildir'''s skeleton is built on the same
rig as the plain one, so the 0.85/1.20/0.85 squeeze goes with it - that existed
only to make the charred twitcher'''s broader, shorter proportions read as a
player, and the bone-by-name remapping the swap relies on now has an exact rig to
match against rather than an approximate one.

The compendium no longer claims the bones blacken, since they no longer do; the
fire aura it describes is unchanged.

An unresolved model id used to fail silently and invisibly - the human body is
switched off before the replacement is built, so a bad name leaves a player with
no mesh at all. It now warns once per name.
2026-08-05 17:04:10 +02:00
5ef7a102da fix(skeleton): make the progression real, and say so in the compendium
Four separate faults were behind one player report.

The tier table had drifted a long way from the published progression. Poison
immunity arrived at Bonemass instead of Eikthyr, auto-stun at The Queen instead
of The Elder, and lifesteal jumped 20/30/40 where the description promises a
climb in fives from 5% to 35%. Rewritten to match the description tier for tier,
which is the copy players actually read.

Poison immunity never worked even at the tier that granted it. SE_SkeletonStats
built its damage modifiers in Setup, which runs once when the effect is applied -
at spawn, before any boss has fallen - and nothing ever asked again, so the
modifiers stayed frozen at tier 1 for the whole session. Everything else the race
does re-reads the rules per hit, which is why only the modifiers looked broken.
They are now rebuilt when the tier actually changes.

Max health was whatever three scaled sausages happened to add up to. A Skeleton
cannot eat, so the race fakes three permanent foods to carry the tier bonus -
sound enough for regeneration, which Valheim drives off the food list, but the
number the game reads is Food.m_health, recomputed every second from the burn
curve, and anything that leaves those foods partly burnt or one short quietly
costs health. A Bonemass Skeleton had 95 where the table promises 165. The foods
stay for regeneration; the total is now overwritten at Player.GetTotalFoodValue,
which has exactly one caller and decides the number outright.

Skeleton Secrets was a one-line placeholder returning the same sentence at every
tier - never written rather than broken. It now unfolds tier by tier, and opens
by naming the standing the race believes it is on, so the next player who kills a
boss and sees nothing change can tell a tier that failed to advance from an
unlock that failed to fire.

The charred model moves from Fader to Moder, where the description asks for a
fire skeleton, and summons stay skeletons at both tiers rather than turning
charred at Fader. Both are one-line reverts if the old look is preferred.
2026-08-05 16:33:27 +02:00
9b48223932 Merge pull request 'feat(trenta): grow a crown of branches, and fix(draugh): let everyone see the rot' (#12) from trenta-crown-and-draugh-vfx into main
Reviewed-on: #12
2026-08-05 13:52:56 +02:00
67e445014f feat(trenta): grow a crown of branches, and fix(draugh): let everyone see the rot
Trenta: a greydwarf shaman trophy is hung on the player head bone and sunk into
the skull until only the horns and branches clear it - the Furling wears a goblin
head the same way, aimed at the opposite result. A trophy is a plain static mesh,
so unlike the Dvergar hood there is no rig to collapse: the player own head does
all the hiding, which makes the three offsets in TrentaConfig the entire look.
They are a first pass and want eyeballing in game.

Draugh: the smoke and the cloud of flies only ever existed on the client of the
player wearing them. DraughRace is a single MonoBehaviour that looks at
Player.m_localPlayer and nothing else, so in multiplayer every other player saw
an ordinary, unrotted Viking. The build moved to DraughVisuals, which takes a
Player, and RacesVisualController now grows the same aura on every remote Draugh
it can see. Nothing is networked and nothing needs to be - each client reads the
race off the ZDO and makes its own particles.

Both hang off VisEquipment.UpdateVisuals or the visual controller, the two hooks
that already run for remote players, so neither had to invent a sync path.
2026-08-05 13:40:09 +02:00
a5a64b3c6b Merge pull request 'rework-skadi-flight' (#11) from rework-skadi-flight into main
Reviewed-on: #11
2026-08-05 11:24:21 +02:00
668a017a91 fix(fenrir): hide the human body in every form, not just shrink it
Wolf, Ulv, Fenring and Cultist all hid the player by scaling the Visual child
to a thousandth of its size. That has quietly stopped working: the scale reset
that keeps a non-Trol player at normal height runs from a postfix on the same
update and puts the scale straight back to 1, so the man reappeared standing
inside his own wolf a frame after transforming. Fenrir is not one of the races
listed as sizing itself, so nothing exempted it from that reset.

Use PlayerVisualHider, the same fix Skadi and the Aswid already carry: renderers
go off with forceRenderingOff and are re-swept periodically, so nothing that
touches the transform can undo it, and the Animator is never disabled - which is
what made reverting look like respawning back when this was solved for the
dragon forms.

Both the local form and the copy other players see are switched over; the remote
path in ZdoVisualSync used the same scale trick and had the same bug.
2026-08-05 11:05:25 +02:00
0afeaa7f0e build: make a fresh clone build with nothing but the .NET SDK
Three things stood between a clean machine and a working build.

net48 reference assemblies now come from the Microsoft.NETFramework.ReferenceAssemblies
package, so the plain SDK is enough and no Visual Studio install is needed to
supply the targeting pack. Build-time only; nothing reaches the shipped DLL.

Jotunn publicizes the game assemblies and then references them, but it reads the
flag that enables it out of DoPrebuild.props, which its own Paths.props imports
through $(SolutionDir) - undefined on a `dotnet build` of this project, the same
trap that already caught the packaging target. The flag never arrived, the
publicizer never ran, and ten references failed to resolve on every build. It now
runs exactly when its output is missing: once on a fresh machine, never again,
and -p:ExecutePrebuild=true still forces it after a game update.

Jotunn 2.29.2 also references UnityEngine.ProfilerModule, which this build of
Valheim does not ship and nothing here uses. Dropped.

Build is clean: 0 errors, and the only warnings left are the pre-existing unused
locals and fields.
2026-08-05 10:29:51 +02:00
11985d9539 build: deploy the DLL to BepInEx\plugins only, and keep dist out of git
VALHEIM_INSTALL and BEPINEX_PATH were read from machine-level environment
variables that a fresh clone does not have. With them empty every derived path
started at the drive root, so the first Copy of a build failed on a new machine.
They now default to the standard Steam install and the environment variables
still override.

The DLL has exactly one destination, BepInEx\plugins, and it goes there on Debug
builds too - that is the loop you actually iterate in. If the folder is missing
the build warns instead of failing. The Thunderstore and Nexus zips stay in
dist\ and stay Release-only.

Copying assemblies into the Unity stub project is now opt-in
(-p:CopyAssembliesToUnity=true). It rewrote a folder of game assemblies on every
build for the sake of asset authoring that most builds are not doing.

dist\ is ignored. Only a stale icon.png was ever tracked in there - the packaging
step reads the real one from JotunnModStub\Package - so it is untracked, not
deleted.
2026-08-05 10:19:47 +02:00
5cfd8cfab8 feat(skadi): rework dragon flight - longer stasis, stamina sprint, reverse thrust, water take-off
The hover window that holds a form level after you stop powering goes from 2
seconds to 5, so gliding is a choice rather than something that happens to you
the moment you let go.

Shift while holding W spends 15 stamina a second for 22 m/s instead of 12. It is
the only part of flight that costs anything - base flight stays free, because the
drake arrives at The Elder, long before a player has the pool to pay for simply
staying airborne - and running dry drops you back to the free boost rather than
out of the sky.

S beats backwards along the aim, pitch included: look down and press it and you
rise away from what you are watching. Reverse thrust alone would have spun the
dragon round to fly nose-first away from the camera, putting its tail where its
breath comes out, so the form claims AlwaysRotateCamera for exactly those frames
and keeps facing what it is retreating from.

Water is no longer a trap. Character.UpdateMotion asks IsSwimming before it ever
looks at m_flying, so a dragon that touched the sea was handed to UpdateSwimming
every frame: the flight patch never ran and there was no way back up short of
finding land. The Aswid's bat escapes this only because debug-fly is checked at
the very top of UpdateMotion, before water is considered at all - which is
exactly why it can take off from the water and Moder could not. Those frames now
go back to UpdateFlying, and while in swim depth the form climbs regardless of
where the camera points, so the surface is something you break out of rather than
something you sit in. Nothing that merely asks IsSwimming - the Wet status, the
animator, stamina - is touched.

All five speeds now run through m_flySlowSpeed instead of the m_run/m_flyFastSpeed
pair, which only ever picked between two of them.
2026-08-05 10:16:52 +02:00
24e681c8dd chore(release): 1.3.11
Trenta, the Dvergur rename, and three fixes since 1.3.10.

The manifest description still listed seven races - it was never updated when the
Dvergur shipped either - so it now names all nine, alphabetically. Both copies of
the manifest are updated; the packaged one is what Thunderstore reads.

Race Progressions in the README are sorted alphabetically rather than by the order
the races happened to be written, which had stopped being an order at all.

The changelog keeps saying "Dvergur" for 1.3.10, because that is the name the race
shipped under. Only the sections describing what is currently true were renamed.
2026-08-05 09:16:36 +02:00
e7860cfcab Merge pull request 'feat(trenta): add the Trenta race' (#10) from create-trenta-race into main
Reviewed-on: #10
2026-08-05 08:23:02 +02:00
Ferdinando
d0ed92c553 feat(trenta): add the Trenta race
A vegan, tree-born race unlocking new perks per boss defeated: skin/hair
tint, blocked non-vegan food, awakened seed foods after Eikthyr, a mob
hostility list, Photosynthesis, elemental resistances, Purple Rain after
the Elder, swim/poison/wet immunity after Bonemass, Last Stand and Thorns
after Moder, a Homecoming Portal after Yagluth, Hornet's Nest after the
Queen, and Muspell (a half-size Elder transformation with Stomp/Spike
attacks) after Fader.

Also fixes RaceScale never listing Trenta as self-sizing, which let a
shared Player.Update postfix fight Muspell's own scale changes every
frame.
2026-08-04 20:58:01 +02:00
d164579e00 Merge pull request 'fix(aswid): make the Vampiric Aura land, and run it passively in every form' (#9) from fix-aswid-aura into main
Reviewed-on: #9
2026-08-04 11:20:52 +02:00
Ferdinando
a29b7e54b4 fix(aswid): make the Vampiric Aura land, and run it passively in every form
The aura dealt its damage through Character.ApplyDamage, which only edits
the local copy of a character. On anything we do not own - in multiplayer
that is most mobs - the owner overwrote the health change on the next sync,
so the aura neither hurt anything nor showed anything. It also bypassed our
own Character.Damage patches, which is why it never healed and never
triggered devour-on-kill despite being the *vampiric* aura. It now calls
Character.Damage, which routes RPC_Damage to whoever owns the target, and
sets m_dir so the target reacts to the hit.

The aura no longer has to be channelled by holding block in bat or mist
form. It ticks on its own in every form, with no key to hold and no icon or
message of its own; the form only decides how hard it bites - half damage
as a human, full as a bat, double as mist.

Also guarded the sunrise mist auto-revert with isTransformingSequence.
Without it the revert re-triggered on every frame of its own one-second
animation, stacking coroutines that fought over the same visuals and status
effect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 11:04:41 +02:00
49413df038 Merge pull request 'fix-aswid-dvergar' (#8) from fix-aswid-dvergar into main
Reviewed-on: #8
2026-08-04 00:24:23 +02:00
5febc588ea feat(dvergar): rename from Dvergur, and give it a lightning affinity
Rename covers the folder, all seven filenames and every identifier, status
effect name and display string. Valheim's own Dverger/dvergr prefab references
are untouched - the names never collided.

The race id is what sits in m_customData and the ZDO, so renaming it alone would
have handed every existing character the selection menu again. DvergarRace
migrates the old id on spawn, before anything else reads it.

Runic Spark is modelled on Skadi's Ice Affinity and deliberately shares its
shape: live from the base tier and growing a flat step per progression state, so
+2 at Base through +16 after Fader. Lightning rather than frost, and like
Skadi's it rides every blow rather than melee only. AddFlat gained the elemental
channels while it was there - lightning would otherwise have landed in generic
damage.

The Trol remote-sync trace fired on a two-second timer for as long as a remote
player existed, which in the main menu is forever: Player.m_localPlayer is null
there, so the character preview counts as remote and it never stopped. Keyed on
the state it reports instead, so it still catches a remote player being sized
wrongly without narrating an idle menu.
2026-08-04 00:22:58 +02:00