Reported from a live game: with "Faction truce" off, a Trenta's Greydwarves
stayed friendly. The switch was working - it just was not switched over the
patch that mattered.
Five separate Harmony postfixes answer BaseAI.IsEnemy, and only
FactionHostilityPatch was gated. A Trenta reads its Black Forest truce from
RaceHostilityManager, which had no switch, so turning the faction one off
changed nothing visible. The same held for the Fenrir's wolves, the Aswid's
progression list, the Draugh's undead, the Sverm's invertebrates, the
Furling's Plains roster and the Skeleton's undead.
Gated all four player-facing ones behind the existing flag rather than
adding a switch each: from the player's side there is one question being
asked, and a switch that answers a fifth of it is worse than none.
DvergarMercenaryTrucePatch is deliberately left alone - it is a truce
between a hired thrall and a wild dvergr, two NPCs, and has nothing to do
with whether mobs come after the player.
Key stays "Faction truce" though its scope grew: renaming it would orphan
the entry in every .cfg already written, and the file beats the default in
code, so anyone who had switched it off would silently get the truce back.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sverm Ravager Strain (replacing the Stinger Morph), Trenta Elder Root, the
Trol food and Black Forest truce work, and the faction FindEnemy patch.
Conflicts resolved:
- FactionHostilityPatch.cs: both sides added a class at the same spot and
they cover different holes, so both are kept - FactionStaticTargetPatch
(main, stops same-faction mobs smashing structures) and
FactionHuntPlayerPatch (war-vulture, closes the HuntPlayer fall-through).
- RaceCompendium.cs: both branches independently fixed the same off-by-one
in the Trol's progression gates. Took main's wording, which matches the
code - Axes are in the melee bonus (TrolDamagePatches sends them to
m_slash), the 4th food slot has no gate at all, and Yagluth is +5 not +10
(TrolConfig.YagluthMeleeBonus). Kept war-vulture's two new lines, the
Kindling fire weakness and the Black Forest truce.
- Package/manifest.json: 1.4.8, which is what the root manifest and
PluginVersion already said.
RacesOfValheim.cs referenced SvermConfig.StingerSE/StingerCdSE, which
war-vulture renamed to Ravager. Git merged those lines without a conflict
and the result did not compile; renamed.
Also in this commit:
- Factions on/off switches (FactionsConfig): "Faction truce" and "Faction
merchants", both default on, both read live so they take effect without a
restart. The truce gates its three postfixes; the merchants gate the
Character.Awake setup plus every behavioural patch, so turning them off
drops the prompt and the trade window on mobs already awake.
- SerpentMeat sells for 200 instead of 1 at the Fuling bench, moved to keep
the list's ascending price order (the sell panel renders it as declared).
- DraughFoodPatches mapped "SerpentMeatRaw", which is not a prefab; the
internal id is SerpentMeat, so serpent meat never cooked for a Draugh.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ReportWhyIfRefused fired on every refused placement by any Trol/Skadi
player, anywhere in the world - not just cave-related ones - since it
only rate-limits on the reason changing, not on location. Gate it on
distance to the nearest TrollCave02 mouth (100m) so it still catches a
refusal that survives near a cave, without logging every ordinary
"can't build here" the rest of the world produces.
- Trol has no consume/devour mechanic; that line was copy-pasted from
Aswid's entry, which does.
- Every boss-gated line was checking state >= N-1 instead of N, so each
unlock (Eikthyr XP bonus, Elder's rock throw/regen, Bonemass/Yagluth
bonuses, Moder's True Form, Queen's Log Weapon, Fader's Ashlands smash)
displayed a full tier early. Aligned all seven gates with
BossProgressionManager's state mapping and the actual code gates in
TrolSkillPatches, TrolRegenPatches, TrolRace, and TrolFarmingPatches.
- Yagluth melee bonus line said +10; TrolConfig.YagluthMeleeBonus
defaults to 5, matching the Rock Throwing figure beside it.
- Bonemass/Yagluth melee bonus text omitted Axes, though the bonus
(TrolDamagePatches) applies to Axes too.
These periodic Jotunn.Logger.LogInfo calls were spamming the console
for every remote player update; drop them along with their now-unused
throttle fields.
Brings in v1.4.3-v1.4.5 work: Trol's Hammer, Bone Servants, War Vulture
craftability, and the Aswid/Fenrir timed-claws rework, on top of the
bugfixes merged into main since v1.4.2.
Resolved conflicts in 7 files where main's post-v1.4.2 fixes overlapped
war-vulture's claws rework:
- README.md, manifest.json: took war-vulture's v1.4.5 content (main
hadn't touched either since the v1.4.2 release).
- RacesOfValheim.cs: plugin version -> 1.4.5.
- RaceClaws.cs: kept war-vulture's lazy EnsureRoster() fix for the
Fenrir claw-registration bug over main's belt-and-suspenders
Register(this), and dropped the now-stale comment referencing the
removed static constructor. Main's SetupDragItem race-ownership fix
carried through untouched.
- AswidConfig.cs/AswidRace.cs/AswidPatches.cs: adopted war-vulture's
single-key design (I toggles both Vampiric Aura and Devour together)
to match the documented v1.4.5 trader-safety fix, removing a duplicate
AuraEnabled field the two branches had each declared independently.
Kept main's IsDownIgnoringHeldKeys() input fix on top.
- RaceCompendium.cs: kept main's fact-checked Aswid/Fenrir entries
(war-vulture's copies were pre-fix stubs, one referencing a
nonexistent variable) and layered in war-vulture's timed-claws
wording.
Build verified clean (0 errors) after resolution.
The black smoke was never an Aswid effect - it is vanilla's Cold, hijacked.
Aswid_ColdStatus_Patch renames the live instance to "Night Aura" and
AswidRace.ApplyNightAuraTint paints its vfx_Cold particles black and
doubles the particle count, both applied directly to the instance hanging
off the player. ResetRace cleared a dozen of the mod's own status effects
but never Cold, since Cold is not one of them - so the blackened instance
survived a race change and followed the player onto whatever they picked
next, "Night Aura" label included.
There is no untinting it: the original colours and emission rates were
never recorded before being overwritten. So ResetRace now removes Cold
outright instead. The night hands out a fresh, ordinary Cold moments
later if it's still cold, with nobody left to rename or repaint it.
Confirmed in game.
ApplyCarapace had no removal path - it returned early for a non-Sverm
without restoring anything - and its only caller sat behind an
`if (isSverm)`, so the removal branch could not have run even if it had
existed. The carapace is a plain visual override written with
SetChestItem and friends, and nothing in the game corrects that on its
own, so the chitin stayed on after a race change. Equipping anything
only appeared to fix it: that was Valheim's own refresh writing the real
gear back over ours.
ApplyCarapace now restores the three slots from what the player actually
has equipped - the same values Humanoid.SetupVisEquipment writes, but
only for the slots we overrode, so it cannot disturb another race's
visuals or a weapon mid-swap. A CarapaceMark component tracks who is
wearing it so the restore fires once rather than every tick, and dies
with the GameObject so it cannot leak. The caller is unconditional now,
matching ApplyEyes/ApplyClaws/ApplySpines, which all already strip
themselves from whoever is not a Sverm.
The eye frame was read from the head bone's pose ON THE FRAME THE EYES
WERE BUILT, snapped to the nearest axis, then cached for the life of the
eyes. Catch the head a few degrees into a turn and the snap picks the
neighbouring axis, and the pair stays wrong until something rebuilds it.
Each race met this separately and each added the same guard - do not
build while attached, mid-attack or asleep - which caught the loud cases
and left the quiet one: a race change rebuilds while the rig is still
settling, which is none of those three. That is why resetting into a
race could break the placement while logging out and back in silently
fixed it. The logout was never a fix, only a rebuild at a calmer moment,
and no fourth guard condition would have closed it - the read itself had
to stop depending on when it happens.
sharedMesh.bindposes[headBone] is the rig as authored: no animation in
it, no timing, the same answer on frame one and frame ten thousand. A
rebuild is now deterministic and a bad moment cannot exist. Falls back to
the live read, warning once, on a rig that carries no bind pose.
Lives in one shared RigBindPose rather than in three copies. The three
eye implementations are separate files by design - they differ in what
they hang and how it is coloured - but this is the one piece of maths
where a divergence would be a bug in whichever copy got fixed second,
and it had already been fixed twice. The three now-dead private
SnapToAxis copies go with it.
Also updates the Aswid eye defaults to the values dialled in on screen:
forward 0.013, height 0.004, yaw 22.068.
The Cursed Claws were never issued because FenrirClaws was never in the
roster. RaceClawSet's static constructor registers the two singletons by
reading AswidClaws.Instance and FenrirClaws.Instance - but constructing
a derived type runs the base type's static constructor first, so the
race that triggers it is still mid-construction when its own Instance is
read, and reads null. Register(null) returns silently and that race is
left out for the rest of the session: For() never matches it, Maintain
never runs, no claws, no claw damage.
It was the Fenrir and not the Aswid only because FenrirRace runs first in
CreateAllModAssets - whichever race gets there first is the one that is
half-built.
EnsureRegistered now calls Register(this) before anything else. `this` is
a live object by definition, so there is nothing left to be null, and
every race puts itself in the roster at startup. The static constructor
stays as a harmless backstop with the trap written down next to it.
Damage scaling checked while here and needs no change: all three races
run the same SvermClaws.GetReferenceDamage/GetDamagePercent pair over the
one shared per-state table, so the same tier is worth the same damage.
Scale is inherited, so source.localScale could not come across either:
it is authored under a parent that puts the object at 0.02 lossy scale,
and re-parenting it under a head bone at ~95 drew the mesh some 4750x
too big - an eye the size of the character, centred near the face,
therefore mostly inside the skull with the corners reading as flat
rectangles. "Wrong place" and "blocky" were one scale error seen from
two angles. Carries lossyScale (the size the game actually draws it at
on a real skeleton) over the new parent's scale instead.
The remaining offset would not compute cleanly from either rig, so it
was dialled in on screen and written down as the new defaults rather
than guessed at again - size 1.1, forward 0.01, separation 0.007, yaw
24.664, roll -180 (the socket arrives upside down on a player's head
bone; that is the half turn that rights it).
The sliders that found those numbers could not have: they were bound at
+/-0.1 m and 0.1-5x, nowhere near far enough to pull the pair out of the
skull, so they read as doing nothing at all. Widened to +/-0.5 m and
0.01-50x.
Eye Rotation Y is now mirrored - the left eye takes the negative - so
the pair toes in or out together instead of both turning off the same
shoulder. X and Z stay shared on purpose: both eyes pitching up is a
face looking up, where mirroring pitch or roll would cross them.
Confirmed correct in game.
player.transform (previous commit) fixed the frame used for the
shift/rotation config offsets, but that code path is inert at every
offset's default of 0 - so it never touched the actual bug. The real
placement came from source.localPosition, copied straight off the
Skeleton creature's eye_l/eye_r and reinterpreted under the player's
own head bone. That only works if the two rigs agree on scale, and
they do not: the Skeleton's rig measured 0.02 lossy scale at the eye
bone against this player rig's ~95-100, with nothing tying one
prefab's authored scale to another's. Taken as-is it put the eyes
roughly 0.2 world units off the head bone - visibly floating above
the face, on every single build, matching the "never fixes, not even
after logout" report exactly.
Eyes are now placed from the player's own measured frame and three
fixed constants (BaseEyeForward/Height/Separation) - the pre-rewrite
sphere code's own numbers, already tuned and playtested on this exact
rig. Still borrows eye_l/eye_r for their mesh and material (the actual
point of the rewrite - real lit sockets instead of painted spheres),
just not their transform.
Confirmed against real numbers from in-game diagnostic logging rather
than guessed a third time; that logging has been removed.
Both files built their eye holder's forward/up axes from headBone.root
- the top of whatever hierarchy the head bone (from
VisEquipment.m_bodyModel's own bone array) happens to sit in. That
does not reliably resolve back to the player, so the measurement came
out wrong on every single build rather than on an occasional
bad-timing one - which is why resetting the race or logging out never
fixed it for Aswid, only starting a fresh build at the same wrong
reference every time.
DvergarVisuals.BuildEyes already reads player.transform directly and
does not have this problem - its own eye glitches are the ordinary
bad-pose-timing kind the attach/attack/sleep guard mostly covers,
which is why relogging (a fresh, differently-timed build) usually
fixes it. AswidVisuals and SvermVisuals now do the same.
Also gives SvermVisuals.ApplyEyes the same attach/attack/sleep guard
Aswid and Dvergar already had before building fresh, which it was
missing entirely.
Aswid's Claws of the Beast, Fenrir's Cursed Claws and Sverm's Vilebone
Maulclaws are all m_questItem so the game refuses to drop, trade or
tombstone them - the mod's way of saying "these are part of your
body". But none of the code enforcing that ever checked whether the
player was STILL that race, and nothing removed the item when they
switched away, so a player who was ever Fenrir or Sverm and then
became anything else was left holding claws with no way to shed them:
not by dying, not by breaking them, not by relogging.
- RaceClaws.cs / SvermClawSlot.cs: the SetupDragItem prefixes that
block moving/dropping the claws now also check that the item still
belongs to the player's CURRENT race, so an already-mismatched pair
becomes draggable again immediately.
- RaceItemCleanup.cs (new): central purge that unequips and removes
any claws (plus the disabled Aswid spectral claw) that don't match
the player's current race.
- Wired into ResetRace() - the Race Menu Ward's actual reset path -
so a reset now clears every race-specific status effect (several
cooldown SEs were missing entirely: Dvergar's Runic Ping/Overcharge,
Trenta's Purple Rain/Portal, all of Sverm's) as well as the items.
- Also wired into PlayerSpawnPatch so an ALREADY-stuck save heals
itself on next login, without the player needing to find the Ward.
Replaces the README (the war-vulture branch's own README edits were
incomplete/inaccurate) and bumps the version number across both
manifests and the plugin.
Brings in the Sverm race, the War Vulture flying mount, and Skadi's
Crystal Golem (replacing the Hidden Hollow). Resolved conflicts:
AswidVisuals.cs took war-vulture's skeleton-eye-light rewrite with
main's attach/attack/sleep timing guard re-applied on top, and
RaceCompendium.cs kept main's rewritten race entries while folding in
war-vulture's Sverm/War Vulture pages and the new Claws paragraphs for
Aswid and Fenrir.
The Sverm goes in as the tenth race, with its own progression block and a
description of the colony. The War Vulture gets a section of its own,
including the fact that it has no recipe yet and is console-spawned while
the flight is being proven - documenting it as craftable would have been
false.
The v1.5.0 changelog covers everything landed since v1.4.0: the race, the
mount, and the per-race station chains for all nine other races, plus the
merchant catalogue entries that gate them, the piece spacing rules and the
ObjectDB duplicate-item crash fix.
Skadis Nokkel is not mentioned anywhere: it never shipped, so its removal
is not a changelog entry.
The version is deliberately NOT bumped - manifest.json and PluginVersion
still read 1.4.0. More bugfixes are due before the release.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The staff opened a pair of client-side portals into a claimed troll cave,
and that whole mechanism broke in multiplayer. The two Harmony patches it
needed were the sharpest edge: SkadiNokkelCastPatch prefixed
Attack.OnAttackTrigger and SkadiNokkelFreeCastPatch postfixed the three
cost getters, so every attack by every character in the game went through
mod code before being filtered.
Nothing is put in its place, on purpose. The Crystal Golem is the Skadi's
station now and the balance was already settled around it, and the part of
the hollow that was actually worth having - Skadi and Trol building inside
any troll cave - lives in RaceCaveBuilding and is untouched.
Removed: SkadiNokkel.cs, SkadiHollow.cs, SkadiHollowPortal.cs, the
"Skadi - Hidden Hollow" config section, the HOLLOW_COOLDOWN_SE status
effect, the F8 dump, and the "Nothing takes root here" rule in
PieceDensityLimit, which existed only for the hollow.
Kept: SkadiIce, which the staff's file happened to host but the Frost
Heart and the golem both use - moved to its own file. Greater Frost Heart
stays on sale from the Fenring_Cultist at 1500 as it was.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Most GenerateXText methods described mechanics that didn't match what
the code actually does, some invented stats that never existed. Went
race by race and rewrote each one off the real ConfigEntry/Progression
values, verifying tier gates, keybinds and numbers against the actual
patches rather than restating old prose.
- Aswid: rewritten from scratch. Invented Damage/Armor/Jump-per-state
multipliers that don't exist in AswidConfig; Bat Form, Eclipse and
Tame were missing entirely; the Vampiric Aura was described as a
shield-block channel in bat/mist form when it's actually passive and
always-on (toggled with 'I').
- Furling: was a placeholder ("will be revealed soon...") with only
tiers 5-8 written and a mojibake dash in the base passive. Filled in
Master of Shadows (tier 2), The Wickerman (tier 3) and Dance of the
Dead (tier 4), all missing.
- Trenta: had no compendium entry at all - no title, no branch, no
method. Written from scratch off TrentaConfig/TrentaConfigManagement.
Also fixed a real gameplay bug found while cross-checking: Thorns had
no tier gate and was live from tier 1 instead of Moder (tier 5), the
way its own doc comment and config grouping said it should be.
- Skadi/Skeleton: audited line by line, already accurate, untouched.
- Dvergar: one stale line (claimed 33% height reduction; the live
VisualScale is 22%).
- Draugh: substantial rewrite. Removed a "permanent Corpse Run" buff
that doesn't exist anywhere in the codebase, corrected base-tier
Poison (ordinary until Bonemass, not resistant from tier 1), fixed
the Human Meat trigger (any nearby player death, not humanoid
kills), fixed a false "no stamina to spend" claim, and added the
missing skeleton/draugr/ghost/wraith hostility exemption, Frost
immunity and stagger-crit unlocks.
sfx_wolf_howl/sfx_wolf_alert/sfx_fenring_idle never resolved to anything
playable - wolves carry no standalone howl prefab. Reads
BaseAI.m_alertedEffects off the live Fenring/Fenring_Cultist prefabs
instead, the same effect the creature itself plays going on alert.
Still reported silent in testing; leaving it in as a step in the right
direction rather than reverting.
Defers the one-time head-orientation measurement for Aswid/Dvergar
glow eyes while the player is attached, attached to a ship, mid-attack
or asleep, so a bad snapshot no longer leaves the eyes stuck behind
the skull. Also shrinks the Aswid's eyes by 10%.
Same-faction mobs no longer smash player pieces - the truce previously
only covered combat hostility, not a mob's separate m_attackPlayerObjects
targeting.
The Vampiric Aura had no on/off switch - it always drains/executes
nearby targets in every form. I now toggles it (AswidRace.AuraEnabled,
on by default), matching the existing toggle pattern already used for
Devour.
Devour's own toggle moves off I to make room and stays on by default;
its keybind is unbound (KeyCode.None) rather than removed outright, so
it remains a real Configuration Manager entry for anyone who wants to
bind their own key to it.
AswidVisuals/DvergarVisuals measure which way the head bone faces
exactly once, the first time BuildEyes runs for a given character, by
reading the bone's live pose at that instant and snapping it to the
nearest axis - then cache the result for as long as the eyes exist.
Taken while sitting, attached, mid-attack or asleep, the head can be
turned away from the body's own forward, and the snap picks whichever
axis is closest to that pose - landing the eyes behind the skull
instead of on the face, and staying wrong for the rest of the session.
ApplyEyes now defers the first build while the player is attached,
attached to a ship, mid-attack or asleep, since it runs again on every
subsequent UpdateColors anyway. Reduces the obvious bad-timing cases;
does not by itself rule out a mistimed read during ordinary idle
animation, which would need the measurement moved to the model's bind
pose (animation-independent) to close out completely.
Also shrinks the Aswid's eyes by 10% (EyeSize 0.062 -> 0.0558), per
request.
Confirmed improved by playtest.
The truce only ever patched BaseAI.IsEnemy, but MonsterAI.UpdateTarget
picks a structure to attack (m_targetStatic) through a completely
separate gate - m_attackPlayerObjects, a flag baked into the prefab
(true for Troll among others) - and never calls IsEnemy at all. A Trol
player, exempt from a cave's resident Troll in combat, could still
watch it flatten a workbench built moments earlier in its own cave.
FactionStaticTargetPatch postfixes UpdateTarget and vetoes the pick if
a same-faction player is within 20 m (matching FindRandomStaticTarget's
own 10 m search radius with room to spare), rather than trying to
intercept the two private target-selection methods themselves.
Confirmed fixed by build+playtest.
Two fixes:
- abilities no longer stop responding while a movement key is held
(BepInEx KeyboardShortcut.IsDown blocks on any other held key);
affects every race, not just Skadi.
- the dragon breath and the model's own breath VFX now travel the same
way instead of drifting apart.
Stops the Trol log weapon's out-of-bounds inventory slot from crashing
InventoryGrid every frame (console spam, frame stall, corrupted icons),
and adds a safety net for saves that already carry the bad item.
The ice breath and the model's own breath VFX could end up aimed in
completely different directions, most visibly on Fader where the VFX
is green poison and the divergence is obvious.
Two causes, both fixed here:
- Every one of the 60 projectiles re-read GetLookDir() inside the
spawn loop, so over the ~3 s a breath lasts the ice tracked the
crosshair live while the VFX - baked into the animation, always
leaving the muzzle - stayed with the body.
- Character.UpdateRotation only steers the body by m_lookYaw when
AlwaysRotateCamera() is true or the player is standing still;
otherwise it faces m_moveDir. Running or strafing mid-breath turned
the model towards the run while the projectiles kept going where the
player aimed.
The breath now holds the body on the aim for its duration (a deadline
rather than a flag, so an interrupted coroutine cannot leave the body
pinned) and the projectiles come out along the body's forward, so the
two cannot separate: the mouse steers the head and the whole breath
follows it. Applied to Moder's ground breath as well, which had the
same shape.
Also replaces anim.SetTrigger with SetAttackTrigger, which warns when
a trigger name is not on the animator - Unity ignores those silently,
so a wrong name was indistinguishable from an animation not playing.