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:
parent
c055455027
commit
9bf144aedc
16 changed files with 203 additions and 66 deletions
|
|
@ -16,8 +16,8 @@ namespace RacesOfValheim
|
|||
{
|
||||
base.Setup(character);
|
||||
name = TrentaConfig.StatsSE;
|
||||
m_name = "Heartwood";
|
||||
m_tooltip = "Rooted, patient, and hard to fell.";
|
||||
m_name = "$rov_se_trenta_stats_name";
|
||||
m_tooltip = "$rov_se_trenta_stats_tooltip";
|
||||
|
||||
// Resistant/Weak are exactly ±50% damage taken (0.5x / 1.5x) - verified against
|
||||
// HitData.ApplyModifier's own IL rather than assumed, since the enum names alone
|
||||
|
|
@ -83,7 +83,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
var stats = ScriptableObject.CreateInstance<SE_TrentaStats>();
|
||||
stats.name = TrentaConfig.StatsSE;
|
||||
stats.m_name = "Heartwood";
|
||||
stats.m_name = "$rov_se_trenta_stats_name";
|
||||
stats.m_icon = GetItemIcon("Wood"); // TODO: pick the icon the race should carry
|
||||
|
||||
CustomStatusEffect customStats = new CustomStatusEffect(stats, fixReference: false);
|
||||
|
|
@ -92,15 +92,15 @@ namespace RacesOfValheim
|
|||
|
||||
var purpleRainCd = ScriptableObject.CreateInstance<SE_TrentaAbilityCooldown>();
|
||||
purpleRainCd.name = TrentaConfig.PurpleRainCdSE;
|
||||
purpleRainCd.m_name = "Purple Rain";
|
||||
purpleRainCd.m_tooltip = "The pollen must settle before you may call the rain again.";
|
||||
purpleRainCd.m_name = "$rov_se_trenta_purpleraincd_name";
|
||||
purpleRainCd.m_tooltip = "$rov_se_trenta_purpleraincd_tooltip";
|
||||
purpleRainCd.m_icon = GetItemIcon("TrophyGreydwarfShaman") ?? GetItemIcon("Wood");
|
||||
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(purpleRainCd, fixReference: false));
|
||||
|
||||
var portalCd = ScriptableObject.CreateInstance<SE_TrentaAbilityCooldown>();
|
||||
portalCd.name = TrentaConfig.PortalCdSE;
|
||||
portalCd.m_name = "Homecoming Portal";
|
||||
portalCd.m_tooltip = "The way home has not yet settled enough to open again.";
|
||||
portalCd.m_name = "$rov_se_trenta_portalcd_name";
|
||||
portalCd.m_tooltip = "$rov_se_trenta_portalcd_tooltip";
|
||||
portalCd.m_icon = GetItemIcon("Wood");
|
||||
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(portalCd, fixReference: false));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue