Commit graph

10 commits

Author SHA1 Message Date
b0d18b0654 feat(text): on-screen messages come from translation files
Every message the mod puts in the middle or corner of the screen now reads
its text through ModText.Get, and messages.json holds 191 texts in English
and Italian. Values computed in code become $1, $2 in the text, so a
translator can put them wherever the sentence needs them. Branching
messages get one key per branch.

A few messages travel through a field before they are shown: thralls'
refusals and the building limits now hold a token or key there. Boss and
form names inside messages use tokens too, the bosses the game's own, so
"The Elder" arrives translated.

ModText.Get now localizes each argument before inserting it. A token
argument left for a later pass ran into the text after it: "$1's power"
became the unknown token "enemy_eikthyr's".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 20:30:03 +02:00
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
6e87be3c77 minor bugfix and pad support 2026-09-12 10:42:01 +02:00
Ferdinando
819abb1a27 tester-fixes 2026-08-29 11:47:49 +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
4559e0b9e1 warvulture 2026-08-18 16:51:07 +02:00
Ferdinando
0aa1dc4dc8 warvulture 2026-08-16 07:44:44 +02:00
6db21b9d96 fix(fenrir): register the claw set from a live object, not a half-built singleton
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.
2026-08-12 17:05:58 +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