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>
This commit is contained in:
kanym 2026-09-26 19:51:10 +02:00
commit 9bf144aedc
16 changed files with 203 additions and 66 deletions

View file

@ -11,8 +11,8 @@ namespace RacesOfValheim
{
base.Setup(character);
name = "SE_AswidStats";
m_name = "Benedictus et Afflictus";
m_tooltip = "Vampiric senses and life drain.";
m_name = "$rov_se_aswid_stats_name";
m_tooltip = "$rov_se_aswid_stats_tooltip";
}
public void UpdateStats(int state)
@ -59,8 +59,8 @@ namespace RacesOfValheim
{
base.Setup(character);
name = "SE_BatForm";
m_name = "Like a Bat out of Hell";
m_tooltip = "You have taken the form of a Bat. You can fly, but cannot attack.";
m_name = "$rov_se_aswid_batform_name";
m_tooltip = "$rov_se_aswid_batform_tooltip";
m_fallDamageModifier = -1f; // Immune to fall damage just in case
}
}
@ -71,8 +71,8 @@ namespace RacesOfValheim
{
base.Setup(character);
name = "SE_MistForm";
m_name = "Weight of Shadows";
m_tooltip = "You are mist. Immune to physical damage and poison. Cannot attack or run.";
m_name = "$rov_se_aswid_mistform_name";
m_tooltip = "$rov_se_aswid_mistform_tooltip";
m_fallDamageModifier = -1f;
m_mods = new System.Collections.Generic.List<HitData.DamageModPair>
{
@ -90,7 +90,7 @@ namespace RacesOfValheim
{
base.Setup(character);
name = "SE_AswidSensesMark";
m_name = "Sensed";
m_name = "$rov_se_aswid_sensed_name";
m_tooltip = "";
m_ttl = 2f;
m_icon = null; // No icon needed for mobs
@ -103,8 +103,8 @@ namespace RacesOfValheim
{
base.Setup(character);
name = "SE_SuperhumanSenses";
m_name = "Auspex";
m_tooltip = "Sensing life force of nearby creatures.";
m_name = "$rov_se_aswid_auspex_name";
m_tooltip = "$rov_se_aswid_auspex_tooltip";
}
}
@ -132,7 +132,7 @@ namespace RacesOfValheim
var sensesMark = ScriptableObject.CreateInstance<SE_AswidSensesMark>();
sensesMark.name = "SE_AswidSensesMark";
sensesMark.m_name = "Sensed";
sensesMark.m_name = "$rov_se_aswid_sensed_name";
sensesMark.m_ttl = 2f;
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(sensesMark, fixReference: false));