fix-aswid-dvergar #8

Merged
kanym merged 3 commits from fix-aswid-dvergar into main 2026-08-04 00:24:23 +02:00
Collaborator
No description provided.
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.
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.
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.
kanym merged commit 49413df038 into main 2026-08-04 00:24:23 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nandor/RacesOfValheim!8
No description provided.