Commit graph

19 commits

Author SHA1 Message Date
9bf144aedc feat(text): status effect names and tooltips come from translation files
Every status effect the mod registers now carries a $rov_se_ token instead
of English, and status_effects.json holds the texts in English and Italian.
Valheim localizes both fields itself when it shows them. The blood
potion's tooltip has numbers in it, so SE_BloodPotion fills its $1 and $2
in GetTooltipString, at display time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 19:51:10 +02:00
Ferdinando
e7325e4d25 chore(release): v1.4.21 - dragon form multiplayer sync, Sverm Ravager networking, dorsal spine fix
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 11:56:09 +02:00
Ferdinando
6e87be3c77 minor bugfix and pad support 2026-09-12 10:42:01 +02:00
Ferdinando
ce671e7124 jotunn 2.30 compatibility + minor bugs 2026-09-10 19:14:05 +02:00
Ferdinando
6193b3ee2d 1.0 compatibility 2026-09-10 18:05:24 +02:00
Ferdinando
7ac7f99287 feat(sverm): enforce the beehive cap, and put the aura and the nest limits in config
"Beehives per Aura" was bound into the config and then read by nobody.
SvermConfigManagement.Beehives had no callers and neither did the
constant behind it, so the entry described a limit that did not exist and
a player could raise thirty hives in one aura and get thirty workers.

SweepAura is two passes now, with the cap between them. The first applies
to hives already taken and counts them - that maintenance is not
skippable, it is what survives a zone reload - and only then are new
candidates considered. One pass would have let the order the physics
query happens to return decide whether a hive counted against the cap or
was measured by it. The minute keeps running on a hive that does not fit
today, so when a taken hive is destroyed the one that has waited longest
is claimed on the next sweep instead of starting over; lowering the cap
never hands a hive back.

Three limits are now the player's: Aura Radius, Nests per Radius and Nest
Spacing Radius. PieceDensityLimit.Register takes a snapshot of its
numbers, so the Hive Market and the Brood Mound both watch their entries
and re-register when one moves - Register replaces an entry rather than
stacking a second limit on the same piece.

All three are clamped, and the reason is not tidiness: Register REFUSES a
radius of zero or a maximum below one, and a refused limit is no limit at
all. A player typing 0 into "Nests per Radius" to mean "no nests" would
have been handed unlimited nests.

Every player-facing string that stated the old numbers now reads the live
ones - the two build refusals, the orphaned market's message and hover,
and the two Compendium lines. The nest's hover shows the cap next to the
count, so moving the knob has visible effect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 08:45:28 +02:00
Ferdinando
34bdf35325 Merge branch 'war-vulture' into main
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>
2026-08-25 18:52:10 +02:00
Ferdinando
ee5a2e2e7b warvulture 2026-08-24 19:17:47 +02:00
Ferdinando
e9d6e78ec8 warvulture 2026-08-19 19:18:24 +02:00
c2212df322 Merge branch 'war-vulture' into main
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.
2026-08-18 17:36:42 +02:00
Ferdinando
0aa1dc4dc8 warvulture 2026-08-16 07:44:44 +02:00
Ferdinando
d79f78e9f0 warvulture 2026-08-13 19:13:24 +02:00
da602a9b44 fix(sverm): take the carapace off a player who is no longer a Sverm
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.
2026-08-12 17:55:10 +02:00
3f09c7cf3f fix(visuals): measure the skull's facing from the bind pose, for all three clawed races
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.
2026-08-12 17:33:46 +02:00
7668a0a996 Merge branch 'fix-eye-position-glitch' into main 2026-08-12 16:29:01 +02:00
028c34be3c fix(visuals): stop Aswid and Sverm eyes measuring their facing off the wrong transform
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.
2026-08-12 13:44:59 +02:00
f51afd3a80 fix(claws): stop permanent claws from getting stuck in inventory after a race switch
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.
2026-08-12 13:04:40 +02:00
Ferdinando
1c4b20bb06 warvulture 2026-08-11 19:29:58 +02:00
Ferdinando
1d66b00374 warvulture 2026-08-11 16:30:20 +02:00