Commit graph

65 commits

Author SHA1 Message Date
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
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
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
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
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
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
11fd68757a fix(skills): honour "no skill loss" for every skill, not just the level
Death runs Skills.OnDeath, which is only

    LowerAllSkills(m_DeathLowerFactor * Game.m_skillReductionRate)

and the world modifier works by driving that rate to zero. LowerAllSkills then
takes nothing off m_level, as intended - but it also wipes m_accumulator on
every skill and prints "$msg_skills_lowered" unconditionally, whatever the
factor. So a death on a no-skill-loss world still quietly threw away all the
progress banked toward the next level and still announced a loss.

On a skill sitting just short of the next level that is indistinguishable from
losing one, which is how this surfaced on Blood Magic - the skill the Aswid
gains fastest, and so the one most often near a boundary.

The guard is on the factor rather than on any race, so it holds for every skill
and every race, and a world with a partial death penalty is left alone. It logs
the factor and the world rate on each death, since a death that lowers nothing
and a death that lowers something are otherwise identical from in-game.
2026-08-04 00:22:30 +02:00
bc9bb302db fix(aswid): let Blood Magic Mastery actually free the cast
Mastery forced Player.HaveEitr true and skipped Player.UseEitr, and neither is
what refuses the attack. Attack.Start gates on Character.TryUseEitr, whose first
test is GetMaxEitr() == 0 - an Aswid carrying no eitr food has a maximum of
zero, so the cast was rejected there and HaveEitr was never consulted at all.

That is also why it looked intermittent: it appeared to work for anyone who
happened to be eating eitr food and failed for exactly the player it was written
for, one leaning on blood magic without eitr.

TryUseEitr only gates - the spend is a separate UseEitr call - so returning true
there costs nothing, and the existing UseEitr prefix still blocks the drain. The
health price is untouched; it is meant to be the whole price.

The local-Aswid-holding-blood-magic test was written out three times and now
lives in one helper, so the weapon lookup cannot drift between them.
2026-08-04 00:22:30 +02:00
11e64e0df1 Merge remote-tracking branch 'origin/aswidfix2' 2026-08-03 21:57:11 +02:00
Ferdinando
2a5da9560e chore(release): 1.3.10
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-03 21:38:09 +02:00
Ferdinando
1dbfbd02b6 fix(aswid): center Vampiric Aura on the caster and stop transforms from casting the real Guardian Power
Vampiric Aura was centered 2m in front of the player instead of on
them, and its Blood Magic scaling only ever added up to +1 damage at
level 100; rebalanced to a 1 base + up to 5 scaled split.

Aswid Bat Form, Skadi Cold Spell, Skadi Drake/Moder Form and Fenrir
Wolf Form all borrow the native "gpower" animator trigger for its
arms-raised casting pose. That clip carries a baked-in Animation Event
that calls Player.ActivateGuardianPower(), which fired regardless of
who triggered the animation - borrowing it silently cast the player's
real Guardian Power (and burned its cooldown) whenever one was
available. Added a brief, time-based suppression window in RaceInput
around each borrowed trigger so only that one call is swallowed.

Also includes AswidSpectralClaw.cs, a boss-scaled bare-fist damage
item for Aswid, currently disabled pending equip-state fixes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-03 21:37:58 +02:00
244f2f5afc fix(dvergur): isolate the hood by bone collapse, and commit to a skin tone
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.
2026-08-02 23:24:24 +02:00
d157a730a3 fix(dvergur): carve the hood out of the dvergr mesh as a submesh
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.
2026-08-02 23:14:07 +02:00
8df7681cea fix(dvergur): tint the skin from UpdateColors, and raise the height
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.
2026-08-02 23:08:12 +02:00
79a54fb533 fix(dvergur): correct the health malus, body scale and hood
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.
2026-08-02 22:58:11 +02:00
3ec51aeb45 feat(dvergur): add the Dvergur race scaffold
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.
2026-08-02 21:45:44 +02:00
4cd452d187 chore(package): update the Thunderstore package icon 2026-08-02 19:17:55 +02:00
c3a3bd2864 chore(logging): strip the AswidDebug tracing and silence the visual hider
The [AswidDebug] logging shipped in 1.3.8 wrote a line per aura tick per enemy
in radius, four times a second while channelling, plus a line for every devour
attempt and every inedible kill. It filled BepInEx's log for anyone playing an
Aswid. Genuine failure warnings are kept and retagged [Aswid]; the F8
consume-nearest-mob test patch goes with it.

PlayerVisualHider.Diagnostics is off now that transformed bodies are confirmed
hidden. It is a static rather than a const so flipping it back does not leave
the guarded calls unreachable.

The 1.3.9 changelog also records the logging removal, and that remote Skadi
flight now works for observers - the second of the two known issues left open
in 1.3.8, confirmed in multiplayer.
2026-08-02 19:07:59 +02:00
3d0964ca80 chore(release): 1.3.9
Bumps manifest.json, the packaged manifest and PluginVersion, adds the 1.3.9
changelog entry and swaps in the updated package icon.

Ships the transform animation fix along with the multiplayer and Aswid work
merged after 1.3.8: remote dragon forms now animate for other players, remote
Trol sizing is corrected (the 1.3.8 known issue), Aswid food buffs survive
death, and Surtlings, Bears and the Greydwarf family have real nutrition.
2026-08-02 18:57:03 +02:00
4793811978 fix(transform): return from monster forms without replaying the spawn animation
Hiding the human body with SetActive(false) on the player's "Visual" also
disabled the Animator that lives on it, and Unity rebinds an Animator when it
is re-enabled: the controller restarts from its entry state, which for the
player is the get-up clip played when joining a world. Every Skadi dragon form,
Bat Form and Mist Form therefore ended with the player standing back up off the
ground.

PlayerVisualHider hides the body by suppressing its renderers instead, leaving
the GameObject active so the Animator and ZSyncAnimation keep running for the
whole transformation. Hiding uses forceRenderingOff on top of Renderer.enabled,
which nothing else in the game writes on a character, so the body cannot be
un-hidden behind our back.

Applied to the local and remote paths of both races, and to the ZDO sync's
revert so a remote player who dies mid-form cannot stay invisible.
2026-08-02 18:56:51 +02:00
Ferdinando
1bdf77e8d6 aswig and multiplayer fixes 2026-08-02 17:54:39 +02:00
d25800eca4 Release 1.3.8
Bumps manifest.json, the packaging copy under Package/, and PluginVersion -
the last of which had been stuck at 1.3.2 since well before 1.3.6, so BepInEx
and every log line reported the wrong version.

Changelog covers everything since 1.3.6: the Draugh race, the Race Menu Ward
and personal progression, the Aswid aura/diet/keybind work, and the Skadi
combat cost rework and tier rebalance. The known multiplayer issue with remote
Trol sizing and remote Skadi flight is written down rather than left implicit.

Also documents the Draugh and the ward in the README itself, which still
claimed six races, and drops three Furling progression lines that had been
duplicated verbatim.

Packaging fixes, both in the target added last commit:
- SolutionDir is only defined when msbuild is handed a .sln, so it expanded to
  "*Undefined*" and broke `dotnet build` of the project on its own. The repo
  root is derived from ProjectDir instead.
- Zip names now carry the version, read back out of manifest.json so a release
  is still numbered in exactly one place:
  dist/RacesOfValheim_Thunderstore_1.3.8.zip and _Nexus_1.3.8.zip.
2026-08-02 09:14:44 +02:00
c4d426a1ba Merge remote-tracking branch 'origin/main' into creating-race-totem 2026-08-02 08:49:19 +02:00
5350ebda5d Add the Race Menu Ward; WIP on remote Trol/Skadi visuals
Race Menu Ward: a buildable ward (2 wood, hammer/Misc, no crafting station)
that manages your race outside the debug console - reset the race, switch
between the server's boss progression and your own, and advance that personal
progression by offering a boss's secondary drop to it. One is placed near the
sacrificial stones on first load of a world, by the host only.

BossProgressionManager grows a personal mode alongside the world one. The tier
is stored on the character rather than the world, so a personal tier travels
with the player between servers instead of being tied to whichever world
unlocked it. resetrace and the ward now share RacesOfValheim.ResetRace so both
paths clean up identical state.

Also in progress, and NOT yet working: remote Trol sizing and remote Skadi
flight. Both are computed from the observer instead of the observed -

- Remote Trols are scaled from the observing player's own progression, and
  never show True Form, because SE_TrolTrueForm only exists on the transformed
  player's client. Each Trol now publishes its state and True Form flag onto
  its own ZDO for others to read.
- Remote Skadi dragons sink to the terrain regardless of the altitude being
  replicated: Character.m_flying is only ever set on the flying player's
  client, so observers run grounded motion under gravity. Flight is mirrored
  through the ZDO and the remote copy's rigidbody gravity is disabled while it
  lasts.

Neither has fixed the symptom yet, so both paths keep a throttled diagnostic
log reporting what each observer actually computes. Committed to get the
instrumentation onto the branch, not because it works.

Packaging no longer hardcodes another machine's desktop path: Thunderstore and
Nexus zips go to dist/ on Release builds only, and the DLL is copied into
Valheim only when VALHEIM_INSTALL actually points at a plugins folder.
2026-08-02 08:45:47 +02:00
f12999b7e4 Merge pull request 'draughfirstdraft' (#4) from draugh-race into main
Reviewed-on: #4
2026-08-02 08:41:45 +02:00
Ferdinando
be2f7a73cd draughfirstdraft 2026-08-02 08:30:53 +02:00
8906abfd79 Merge pull request 'balancing-skadi-progression' (#3) from balancing-skadi-progression into main
Reviewed-on: #3
2026-08-01 18:10:58 +02:00
5d5a6eab42 Fill in the Skadi compendium entry
It was a placeholder reading "The secrets of winter will be revealed
soon...". It now unfolds tier by tier like the Aswid and Furling ones,
covering the passives, the form keybinds, the flight controls and which
attacks are free. The frost bonus and spell damage figures are computed
from the same formulas the code uses, so the text cannot drift when
those constants are tuned.
2026-08-01 18:02:24 +02:00
fc7fd54404 Rework Skadi combat costs, fix dead melee, add cooldown icons
Dragon melee never dealt damage at all: the damage block sat behind
!isMelee, so bite, claw and spin played an animation, charged eitr and
did nothing. Melee now sweeps for targets the way Fenrir's claws do, and
costs nothing - it is the baseline attack that has to work at every tier.

Everything Skadi casts now runs on stamina rather than eitr. Eitr food
only exists from the Mistlands on, while the Cold Spell unlocks at
Eikthyr and the drake at the Elder, so the old costs were either
unpayable or, in the drake's case, silently ignored because UseEitr
never checked affordability. Ranged volleys are charged per projectile
so the sixty shard breath no longer costs the same as a three shard
spit, capped so the widest one stays castable.

The Cold Spell also stopped borrowing the Staff of Frost's damage, which
handed out Mistlands numbers from Eikthyr and multiplied them by every
shard. It now scales with progression, and the improved cast spreads one
budget across its shards: wider, not stronger.

The kick that played over every cast was Valheim's own SecondaryAttack,
bound to the same Middle Mouse button - suppressed for a Skadi holding
the spell. Moder now keeps its ranged attack on Middle Mouse in the air
as on the ground, with no left hand attack aloft, and Fader's airborne
branch is gone since its form cannot fly.

Ability cooldowns finally show on the HUD, each with its own icon and a
live countdown.
2026-08-01 18:02:24 +02:00
a8a14f0416 Move Freezing-to-Cold to Bonemass and eitr regen to Yagluth
Eikthyr was carrying three unlocks while later tiers carried little, so
the two passives move up: the Freezing-to-Cold conversion now lands with
Bonemass alongside the drake's attack, and eitr regeneration first
appears at Yagluth with the improved Cold Spell.

The +20% at Eikthyr is dropped rather than relocated, since Yagluth
already granted an undocumented +50% - now written down in the README.
2026-08-01 18:02:24 +02:00
Ferdinando
272adddd75 small fix to aswin aura 2026-08-01 17:49:12 +02:00
17fdeba320 List Trol in the mod description and sync the packaging manifest
Both manifests still described five races; Trol has been playable since
1.3.1. Draugh is deliberately left out until it ships. The packaging
manifest was also stuck at 1.3.3.1, two releases behind the root one
the build actually publishes.
2026-08-01 13:59:05 +02:00
51a23202ff Merge branch 'fix-skadi-race' 2026-08-01 13:50:25 +02:00
bca47beda6 Ignore race ability input while a GUI has focus
UnityEngine.Input reads the device directly, so abilities bound to keys
or mouse buttons kept firing with the map, the inventory, a chest, the
chat or a menu open - clicking an item in a container also swung the
transformed attack.

Route that input through Player.TakeInput, which is what Valheim runs
its own controls through and already reports false for those states
(InventoryGui covers the backpack and chests alike). Aswid's transform
keys were the only place already doing this; the shared helper replaces
that one-off and covers Skadi's cold spell, form keys, flight toggle,
form attacks and flight boost, Fenrir's form keys and the attacks of all
four form behaviors, Trol's rock throw and true form, and Aswid's devour
toggle.

Cultist fire is a held button, so it is gated per read rather than
around the block: opening a GUI mid-stream now falls through to
StopFire() instead of leaving the flames running.
2026-08-01 13:25:02 +02:00
16275d6abc Stop remote clients spawning a dragon model every frame
The multiplayer visual sync named each spawned model "<form>_multiplayer"
but searched for an existing one called "SkadiBody_Form", a name nothing
is ever assigned. The lookup therefore missed every time, and since
VisEquipment.UpdateVisuals runs each frame off CustomUpdate, observers
instantiated a fresh dragon roughly sixty times a second for as long as
the Skadi player stayed transformed.

The transformed player saw nothing wrong, because owners return early,
and the pile only got cleaned up in the reverted-to-human branch, so the
lag never let up on its own.

Look the model up by the name actually assigned. The scan also destroys
any surplus "_multiplayer" children it walks past, so clients that have
already accumulated a pile clear it on the first frame after updating
instead of needing to rejoin.
2026-08-01 13:24:44 +02:00
Ferdinando
d387131086 start draugh race 2026-08-01 13:17:13 +02:00
cccabe16ef Rework Skadi dragon flight, enforce form duration, surface timers in HUD
Flight ran on the debug-fly noclip, so it ignored aim entirely and needed
Space/Ctrl for height. It now uses Character's native flying-creature
movement with the camera's full look direction fed in each frame:

- Aim steers, including climb and dive; W powers forward, releasing it
  holds level briefly and then settles into a glide instead of coasting
  along the aim vector (which let you climb forever without input).
- The body actually turns now. m_flyTurnSpeed sat at Character's 12 deg/s
  default because the Player prefab was never set up to fly, so a quarter
  turn took over seven seconds and read as no rotation at all.
- Touching down no longer slides you forward forever. Zeroing the fly
  speeds stops the character without fighting the AddForce UpdateFlying
  queues, which had caused frame-to-frame jitter and TAA ghosting.

DurationMinutes was never wired to anything, so timed forms never expired
and their cooldown, which only starts on reversion, was unreachable in
practice. Timed forms now drop on their own, and both the remaining time
and the cooldown show up beside the minimap as a Moder trophy icon.

Attack capability was snapshotted when the form was entered, so reaching
the Bonemass tier while already transformed left the drake unarmed until
the player reverted and transformed again; it is re-read live now.
2026-07-31 16:25:06 +02:00
00b1b4e9ed Fix Skadi resetrace, cold spell VFX, and Freezing-to-Cold conversion
- resetrace never cleaned up SE_SkadiStats/SE_SkadiCooldown, so
  Skadi's Aura and its frost buffs stuck around after switching race.
- Cold Spell projectile spawned near the feet (0.4m) and used the
  unarmed kick animation; now spawns at chest height and uses the
  galdr_cast (raised-arms) trigger instead.
- Freezing-to-Cold silently did nothing from tier 1 onward: Skadi's
  passive Frost damage resistance made Valheim's own environmental
  check skip Cold/Freezing entirely before our conversion patch ever
  ran. Added a scoped patch that neutralizes just that environmental
  check for the local Skadi player, plus a guard against Valheim's
  own Cold-removal call flickering the converted status off every
  other frame, plus an explicit cleanup of any real Freezing left
  over from before the conversion kicked in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-31 13:04:30 +02:00
95dcf3c1e6 Fix build portability: add BepInEx NuGet feed and de-hardcode package paths
BepInEx.Core isn't on nuget.org (only on nuget.bepinex.dev), so restore
failed on machines without it configured globally. PackageThunderstore
also pointed at a contributor's personal desktop path; it now outputs
to a repo-local dist/ folder and uses the checked-in Package/icon.png.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-31 11:24:30 +02:00
Ferdinando
ff9fc4db2d Bind Taming ability to K key instead of E 2026-07-31 09:42:07 +02:00
Ferdinando
225b7115bc Allow Aswid stomach to refresh blinking duplicate foods when slots are fully occupied 2026-07-31 09:35:15 +02:00