From 73b67cd6ce547057e070a666d6f261018584ee62 Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 26 Sep 2026 19:43:48 +0200 Subject: [PATCH 001/216] feat(text): the race menu reads its texts from translation files First step of moving every piece of text out of the code so modders can translate the mod. The texts live in Translations//*.json, one file per kind of text, which Jotunn finds on its own and falls back to English for. ModText reads them; values take Valheim's $1, $2 placeholders. This step covers the race selection menu: title, buttons, every race's name and description, in English and Italian. The race ID and the name on screen are now separate strings. The ID is what the save and the ZDO hold, so it must never be translated. The files are deployed to plugins\RacesOfValheim\Translations and packed into both release zips. Co-Authored-By: Claude Opus 5.5 --- JotunnModStub/ModText.cs | 50 +++++++++++++++++++ JotunnModStub/RacesOfValheim.cs | 48 ++++++++++-------- JotunnModStub/RacesOfValheim.csproj | 17 ++++++- JotunnModStub/Translations/English/races.json | 38 ++++++++++++++ JotunnModStub/Translations/Italian/races.json | 38 ++++++++++++++ 5 files changed, 169 insertions(+), 22 deletions(-) create mode 100644 JotunnModStub/ModText.cs create mode 100644 JotunnModStub/Translations/English/races.json create mode 100644 JotunnModStub/Translations/Italian/races.json diff --git a/JotunnModStub/ModText.cs b/JotunnModStub/ModText.cs new file mode 100644 index 0000000..4e43258 --- /dev/null +++ b/JotunnModStub/ModText.cs @@ -0,0 +1,50 @@ +using System.Linq; + +namespace RacesOfValheim +{ + /// + /// Every piece of text the mod shows, read from the translation files instead of the code. + /// + /// The files are JSON under Translations/<Language>/, one per kind of text, next to the DLL. + /// Jotunn finds them on its own: it searches the whole plugins folder for any .json whose + /// grandparent folder is called "Translations", takes the language from the folder name + /// (Valheim's own names: English, Italian, German...), and falls back to English for any key a + /// language leaves out. A key missing from English too shows up on screen as [key]. + /// + /// Keys go in the files without the leading $ and are read here the same way. Values take + /// Valheim's own placeholders, $1, $2..., filled from the arguments in order, so a translator + /// can move a number to wherever their grammar wants it. + /// + internal static class ModText + { + public static string Get(string key, params object[] args) + { + if (Localization.instance == null) return "[" + key + "]"; + + string[] words = args.Select(a => a?.ToString() ?? "").ToArray(); + return Localization.instance.Localize("$" + key, words); + } + + /// + /// A race's name as the player reads it. Only ever for display. + /// + /// The race ID ("Skadi", "Trol"...) is a different thing and never goes through here: it is + /// written into the character save and the ZDO, and compared all over the code. Translate + /// that and a character saved under one language stops being recognised under another. + /// + public static string RaceName(string raceId) + { + return Get(RaceKey(raceId) + "_name"); + } + + public static string RaceDescription(string raceId, params object[] args) + { + return Get(RaceKey(raceId) + "_desc", args); + } + + private static string RaceKey(string raceId) + { + return "rov_race_" + raceId.ToLowerInvariant(); + } + } +} diff --git a/JotunnModStub/RacesOfValheim.cs b/JotunnModStub/RacesOfValheim.cs index 9b7a5c3..7778632 100644 --- a/JotunnModStub/RacesOfValheim.cs +++ b/JotunnModStub/RacesOfValheim.cs @@ -303,7 +303,7 @@ namespace RacesOfValheim titleObj.transform.SetParent(selectionPanel.transform, false); Text titleText = titleObj.AddComponent(); titleText.font = GUIManager.Instance.AveriaSerifBold; - titleText.text = "Choose your Race"; + titleText.text = ModText.Get("rov_menu_choose_race"); titleText.fontSize = 50; titleText.alignment = TextAnchor.MiddleCenter; titleText.color = Color.white; @@ -346,7 +346,7 @@ namespace RacesOfValheim btnOkTxtObj.transform.SetParent(btnOkObj.transform, false); Text btnOkTxt = btnOkTxtObj.AddComponent(); btnOkTxt.font = GUIManager.Instance.AveriaSerifBold; - btnOkTxt.text = "OK"; + btnOkTxt.text = ModText.Get("rov_menu_ok"); btnOkTxt.fontSize = 24; btnOkTxt.alignment = TextAnchor.MiddleCenter; btnOkTxt.color = Color.white; @@ -371,7 +371,7 @@ namespace RacesOfValheim btnBackTxtObj.transform.SetParent(btnBackObj.transform, false); Text btnBackTxt = btnBackTxtObj.AddComponent(); btnBackTxt.font = GUIManager.Instance.AveriaSerifBold; - btnBackTxt.text = "Back"; + btnBackTxt.text = ModText.Get("rov_menu_back"); btnBackTxt.fontSize = 24; btnBackTxt.alignment = TextAnchor.MiddleCenter; btnBackTxt.color = Color.white; @@ -379,34 +379,40 @@ namespace RacesOfValheim btnBackTxtRect.anchorMin = Vector2.zero; btnBackTxtRect.anchorMax = Vector2.one; btnBackTxtRect.offsetMin = Vector2.zero; btnBackTxtRect.offsetMax = Vector2.zero; - void CreateRaceButtonWithConfirm(string label, Vector2 position, Sprite iconSprite, string description, UnityEngine.Events.UnityAction onConfirm) + // The race ID picks the texts and is what gets saved; the button, the title and the + // description only ever show the translated name. See ModText.RaceName for why the two + // must never be the same string. + void CreateRaceButtonWithConfirm(string raceId, Vector2 position, Sprite iconSprite, UnityEngine.Events.UnityAction onConfirm, params object[] descArgs) { - CreateRaceButton(label, position, iconSprite, selectionPanel.transform, () => { + string name = ModText.RaceName(raceId); + CreateRaceButton(raceId, name, position, iconSprite, selectionPanel.transform, () => { selectionPanel.SetActive(false); confirmationPanel.SetActive(true); - confTitleText.text = label; - confDescText.text = description; + confTitleText.text = name; + confDescText.text = ModText.RaceDescription(raceId, descArgs); btnOk.onClick.RemoveAllListeners(); btnOk.onClick.AddListener(onConfirm); }); } // Row 1 (y = 100) - CreateRaceButtonWithConfirm("Human", new Vector2(-450, 100), GetHumanIcon(), "The versatile founders of Midgard. Balanced stats with no specific weaknesses.", SelectHuman); - CreateRaceButtonWithConfirm("Fenrir", new Vector2(-150, 100), GetFenrirIcon(), "Cursed by the blood of the wolf. Fast and deadly, but vulnerable to silver.", SelectFenrir); - CreateRaceButtonWithConfirm("Skadi", new Vector2(150, 100), GetSkadiIcon(), "Children of the mountains. Resistant to frost, at home in the freezing cold.", SelectSkadi); - CreateRaceButtonWithConfirm("Skeleton", new Vector2(450, 100), GetSkeletonIcon(), "Undead warriors. Immune to poison, but brittle against blunt trauma.", SelectSkeleton); - + CreateRaceButtonWithConfirm("Human", new Vector2(-450, 100), GetHumanIcon(), SelectHuman); + CreateRaceButtonWithConfirm("Fenrir", new Vector2(-150, 100), GetFenrirIcon(), SelectFenrir); + CreateRaceButtonWithConfirm("Skadi", new Vector2(150, 100), GetSkadiIcon(), SelectSkadi); + CreateRaceButtonWithConfirm(SkeletonVisuals.RaceId, new Vector2(450, 100), GetSkeletonIcon(), SelectSkeleton); + // Row 2 (y = -20) - CreateRaceButtonWithConfirm("Aswid", new Vector2(-450, -20), GetAswidIcon(), "Fierce night stalker. Strong and resilient, transforms into a bat.", SelectAswid); - CreateRaceButtonWithConfirm("Furling", new Vector2(-150, -20), GetFurlingIcon(), "Cunning goblin-like creatures. Agile and resourceful.", SelectFurling); - CreateRaceButtonWithConfirm("Trol", new Vector2(150, -20), GetTrolIcon(), $"Massive brute strength. Towering over others, at peace with the Black Forest - but fire burns a Trol {(TrolConfig.FireWeaknessMultiplier.Value - 1f) * 100f:0}% harder than anyone else.", SelectTrol); - CreateRaceButtonWithConfirm("Draugh", new Vector2(450, -20), GetDraughIcon(), "A decaying undead warrior fueled by dark magic and extreme metal.", SelectDraugh); + CreateRaceButtonWithConfirm("Aswid", new Vector2(-450, -20), GetAswidIcon(), SelectAswid); + CreateRaceButtonWithConfirm("Furling", new Vector2(-150, -20), GetFurlingIcon(), SelectFurling); + // $1 in the Trol's description is how much harder fire burns it, read from the config. + CreateRaceButtonWithConfirm("Trol", new Vector2(150, -20), GetTrolIcon(), SelectTrol, + ((TrolConfig.FireWeaknessMultiplier.Value - 1f) * 100f).ToString("0")); + CreateRaceButtonWithConfirm(DraughVisuals.RaceId, new Vector2(450, -20), GetDraughIcon(), SelectDraugh); // Row 3 (y = -140) - CreateRaceButtonWithConfirm("Dvergar", new Vector2(-450, -140), GetDvergarIcon(), "Small, stubborn smiths of the deep. Frail of frame, but masters of metal, mine and market.", SelectDvergar); - CreateRaceButtonWithConfirm("Trenta", new Vector2(-150, -140), GetTrentaIcon(), "Tree-born folk, kin to root and leaf. Patient and hard to fell.", SelectTrenta); - CreateRaceButtonWithConfirm("Sverm", new Vector2(150, -140), GetSvermIcon(), "Chitin-born swarm kin. Armoured from birth and never slowed, venomous, at peace with every crawling thing - but blunt trauma and fire find the seams.", SelectSverm); + CreateRaceButtonWithConfirm(DvergarConfig.RaceId, new Vector2(-450, -140), GetDvergarIcon(), SelectDvergar); + CreateRaceButtonWithConfirm(TrentaConfig.RaceId, new Vector2(-150, -140), GetTrentaIcon(), SelectTrenta); + CreateRaceButtonWithConfirm(SvermConfig.RaceId, new Vector2(150, -140), GetSvermIcon(), SelectSverm); GUIManager.BlockInput(true); } @@ -481,9 +487,9 @@ namespace RacesOfValheim return null; } - private void CreateRaceButton(string label, Vector2 position, Sprite iconSprite, Transform parentTransform, UnityEngine.Events.UnityAction onClick) + private void CreateRaceButton(string raceId, string label, Vector2 position, Sprite iconSprite, Transform parentTransform, UnityEngine.Events.UnityAction onClick) { - GameObject btnObj = new GameObject(label + "Button"); + GameObject btnObj = new GameObject(raceId + "Button"); btnObj.transform.SetParent(parentTransform, false); RectTransform btnRect = btnObj.AddComponent(); btnRect.sizeDelta = new Vector2(250, 80); diff --git a/JotunnModStub/RacesOfValheim.csproj b/JotunnModStub/RacesOfValheim.csproj index 58ed010..188493c 100644 --- a/JotunnModStub/RacesOfValheim.csproj +++ b/JotunnModStub/RacesOfValheim.csproj @@ -138,18 +138,33 @@ + + + + + + $(REPO_ROOT)dist\ + + + $(IntermediateOutputPath)nexus\ + + + - + diff --git a/JotunnModStub/Translations/English/races.json b/JotunnModStub/Translations/English/races.json new file mode 100644 index 0000000..8d930c3 --- /dev/null +++ b/JotunnModStub/Translations/English/races.json @@ -0,0 +1,38 @@ +{ + "rov_menu_choose_race": "Choose your Race", + "rov_menu_ok": "OK", + "rov_menu_back": "Back", + + "rov_race_human_name": "Human", + "rov_race_human_desc": "The versatile founders of Midgard. Balanced stats with no specific weaknesses.", + + "rov_race_fenrir_name": "Fenrir", + "rov_race_fenrir_desc": "Cursed by the blood of the wolf. Fast and deadly, but vulnerable to silver.", + + "rov_race_skadi_name": "Skadi", + "rov_race_skadi_desc": "Children of the mountains. Resistant to frost, at home in the freezing cold.", + + "rov_race_skeleton_name": "Skeleton", + "rov_race_skeleton_desc": "Undead warriors. Immune to poison, but brittle against blunt trauma.", + + "rov_race_aswid_name": "Aswid", + "rov_race_aswid_desc": "Fierce night stalker. Strong and resilient, transforms into a bat.", + + "rov_race_furling_name": "Furling", + "rov_race_furling_desc": "Cunning goblin-like creatures. Agile and resourceful.", + + "rov_race_trol_name": "Trol", + "rov_race_trol_desc": "Massive brute strength. Towering over others, at peace with the Black Forest - but fire burns a Trol $1% harder than anyone else.", + + "rov_race_draugh_name": "Draugh", + "rov_race_draugh_desc": "A decaying undead warrior fueled by dark magic and extreme metal.", + + "rov_race_dvergar_name": "Dvergar", + "rov_race_dvergar_desc": "Small, stubborn smiths of the deep. Frail of frame, but masters of metal, mine and market.", + + "rov_race_trenta_name": "Trenta", + "rov_race_trenta_desc": "Tree-born folk, kin to root and leaf. Patient and hard to fell.", + + "rov_race_sverm_name": "Sverm", + "rov_race_sverm_desc": "Chitin-born swarm kin. Armoured from birth and never slowed, venomous, at peace with every crawling thing - but blunt trauma and fire find the seams." +} diff --git a/JotunnModStub/Translations/Italian/races.json b/JotunnModStub/Translations/Italian/races.json new file mode 100644 index 0000000..2e29263 --- /dev/null +++ b/JotunnModStub/Translations/Italian/races.json @@ -0,0 +1,38 @@ +{ + "rov_menu_choose_race": "Scegli la tua razza", + "rov_menu_ok": "OK", + "rov_menu_back": "Indietro", + + "rov_race_human_name": "Umano", + "rov_race_human_desc": "I versatili fondatori di Midgard. Statistiche equilibrate, senza debolezze particolari.", + + "rov_race_fenrir_name": "Fenrir", + "rov_race_fenrir_desc": "Maledetti dal sangue del lupo. Veloci e letali, ma vulnerabili all'argento.", + + "rov_race_skadi_name": "Skadi", + "rov_race_skadi_desc": "Figli delle montagne. Resistenti al gelo, a casa loro nel freddo più rigido.", + + "rov_race_skeleton_name": "Scheletro", + "rov_race_skeleton_desc": "Guerrieri non morti. Immuni al veleno, ma fragili contro i colpi contundenti.", + + "rov_race_aswid_name": "Aswid", + "rov_race_aswid_desc": "Feroce cacciatore notturno. Forte e resistente, si trasforma in pipistrello.", + + "rov_race_furling_name": "Furling", + "rov_race_furling_desc": "Astute creature simili a goblin. Agili e piene di risorse.", + + "rov_race_trol_name": "Trol", + "rov_race_trol_desc": "Forza bruta smisurata. Sovrasta tutti gli altri ed è in pace con la Foresta Nera, ma il fuoco brucia un Trol il $1% in più di chiunque altro.", + + "rov_race_draugh_name": "Draugh", + "rov_race_draugh_desc": "Un guerriero non morto in decomposizione, alimentato da magia oscura e metallo estremo.", + + "rov_race_dvergar_name": "Dvergar", + "rov_race_dvergar_desc": "Piccoli e testardi fabbri del profondo. Fragili nel fisico, ma maestri di metallo, miniera e mercato.", + + "rov_race_trenta_name": "Trenta", + "rov_race_trenta_desc": "Popolo nato dagli alberi, parente di radici e foglie. Paziente e difficile da abbattere.", + + "rov_race_sverm_name": "Sverm", + "rov_race_sverm_desc": "Stirpe dello sciame nata dalla chitina. Corazzata dalla nascita e mai rallentata, velenosa, in pace con ogni cosa che striscia, ma i colpi contundenti e il fuoco trovano le giunture." +} From 9bf144aedc255833bcbfa1e15ee7c4ba394d921b Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 26 Sep 2026 19:51:10 +0200 Subject: [PATCH 002/216] 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 --- JotunnModStub/Aswid/AswidBloodPotions.cs | 15 ++++- JotunnModStub/Aswid/AswidPatches.cs | 4 +- JotunnModStub/Aswid/AswidStatusEffects.cs | 20 +++--- .../Draugh/DraughProgressionPatches.cs | 2 +- JotunnModStub/Dvergar/DvergarStatusEffects.cs | 18 +++--- JotunnModStub/Fenrir/FenrirRace.cs | 14 ++--- JotunnModStub/RaceClaws.cs | 2 +- JotunnModStub/Skadi/SkadiRace.cs | 16 ++--- JotunnModStub/Skadi/SkadiStatusEffects.cs | 4 +- JotunnModStub/Skeleton/SkeletonRace.cs | 2 +- .../Skeleton/SkeletonStatusEffects.cs | 4 +- JotunnModStub/Sverm/SvermStatusEffects.cs | 18 +++--- .../Translations/English/status_effects.json | 62 +++++++++++++++++++ .../Translations/Italian/status_effects.json | 62 +++++++++++++++++++ JotunnModStub/Trenta/TrentaStatusEffects.cs | 14 ++--- JotunnModStub/Trol/TrolStatusEffects.cs | 12 ++-- 16 files changed, 203 insertions(+), 66 deletions(-) create mode 100644 JotunnModStub/Translations/English/status_effects.json create mode 100644 JotunnModStub/Translations/Italian/status_effects.json diff --git a/JotunnModStub/Aswid/AswidBloodPotions.cs b/JotunnModStub/Aswid/AswidBloodPotions.cs index 83ebf3c..a9a17f1 100644 --- a/JotunnModStub/Aswid/AswidBloodPotions.cs +++ b/JotunnModStub/Aswid/AswidBloodPotions.cs @@ -176,7 +176,7 @@ namespace RacesOfValheim SE_BloodPotion effect = ScriptableObject.CreateInstance(); effect.name = name; effect.m_name = displayName; - effect.m_tooltip = $"Stomachs filled with blood. Healing {Mathf.RoundToInt(fraction * 100f)}% over {HealDuration:0} seconds."; + effect.m_tooltip = "$rov_se_aswid_bloodpotion_tooltip"; // numbers go in at display, see GetTooltipString effect.m_ttl = HealDuration; effect.m_healFraction = fraction; effect.m_essencePrefab = essencePrefab; @@ -287,6 +287,19 @@ namespace RacesOfValheim public float m_healFraction = 0.05f; public string m_essencePrefab = ""; + /// + /// The tooltip's $1 and $2 are the heal share and the duration. Filled in here, at display + /// time, because a translation can only be looked up once the language is loaded, and the + /// game localizes this string after us in a single pass that would leave $1 as it is. + /// + public override string GetTooltipString() + { + string text = base.GetTooltipString(); + if (Localization.instance == null) return text; + return Localization.instance.Localize(text, + Mathf.RoundToInt(m_healFraction * 100f).ToString(), m_ttl.ToString("0")); + } + public override void Setup(Character character) { // SEMan clones the effect before setting it up, so writing the resolved amount here diff --git a/JotunnModStub/Aswid/AswidPatches.cs b/JotunnModStub/Aswid/AswidPatches.cs index 400e4a4..0bc1753 100644 --- a/JotunnModStub/Aswid/AswidPatches.cs +++ b/JotunnModStub/Aswid/AswidPatches.cs @@ -502,9 +502,9 @@ namespace RacesOfValheim __instance.m_icon = null; } - __instance.m_name = "Night Aura"; + __instance.m_name = "$rov_se_aswid_nightaura_name"; __instance.m_startMessage = ""; // "The darkness empowers you."; - __instance.m_tooltip = "The cold strengthens your beastly senses."; + __instance.m_tooltip = "$rov_se_aswid_nightaura_tooltip"; if (__instance is SE_Stats stats) { diff --git a/JotunnModStub/Aswid/AswidStatusEffects.cs b/JotunnModStub/Aswid/AswidStatusEffects.cs index ac3ab3f..0a91feb 100644 --- a/JotunnModStub/Aswid/AswidStatusEffects.cs +++ b/JotunnModStub/Aswid/AswidStatusEffects.cs @@ -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 { @@ -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(); 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)); diff --git a/JotunnModStub/Draugh/DraughProgressionPatches.cs b/JotunnModStub/Draugh/DraughProgressionPatches.cs index 105eb1b..eaa8357 100644 --- a/JotunnModStub/Draugh/DraughProgressionPatches.cs +++ b/JotunnModStub/Draugh/DraughProgressionPatches.cs @@ -22,7 +22,7 @@ namespace RacesOfValheim // Invert the Wet debuff to actually heal the Draugh __instance.m_healthRegenMultiplier = DraughConfig.WetHealthRegenMultiplier.Value; __instance.m_staminaRegenMultiplier = 1f; // No stamina penalty - __instance.m_tooltip = "The water restores your rotten flesh. Health regeneration increased."; + __instance.m_tooltip = "$rov_se_draugh_wet_tooltip"; } } } diff --git a/JotunnModStub/Dvergar/DvergarStatusEffects.cs b/JotunnModStub/Dvergar/DvergarStatusEffects.cs index 10f83d1..23055b9 100644 --- a/JotunnModStub/Dvergar/DvergarStatusEffects.cs +++ b/JotunnModStub/Dvergar/DvergarStatusEffects.cs @@ -16,8 +16,8 @@ namespace RacesOfValheim { base.Setup(character); name = DvergarConfig.StatsSE; - m_name = "Stone and Forge"; - m_tooltip = "Small, sturdy, and born to the anvil."; + m_name = "$rov_se_dvergar_stats_name"; + m_tooltip = "$rov_se_dvergar_stats_tooltip"; } public override void ModifyAttackStaminaUsage(float baseStaminaUse, ref float staminaUse) @@ -80,7 +80,7 @@ namespace RacesOfValheim var stats = ScriptableObject.CreateInstance(); stats.name = DvergarConfig.StatsSE; - stats.m_name = "Stone and Forge"; + stats.m_name = "$rov_se_dvergar_stats_name"; stats.m_icon = icon; CustomStatusEffect customStats = new CustomStatusEffect(stats, fixReference: false); ItemManager.Instance.AddStatusEffect(customStats); @@ -88,22 +88,22 @@ namespace RacesOfValheim var overcharge = ScriptableObject.CreateInstance(); overcharge.name = DvergarConfig.OverchargeSE; - overcharge.m_name = "Runic Overcharge"; - overcharge.m_tooltip = "Your next blow with a favoured weapon carries the whole of the charge."; + overcharge.m_name = "$rov_se_dvergar_overcharge_name"; + overcharge.m_tooltip = "$rov_se_dvergar_overcharge_tooltip"; overcharge.m_icon = GetItemIcon("Eitr") ?? icon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(overcharge, fixReference: false)); var pingCd = ScriptableObject.CreateInstance(); pingCd.name = DvergarConfig.RunicPingCdSE; - pingCd.m_name = "Runic Ping"; - pingCd.m_tooltip = "The runes must settle before you may call on them again."; + pingCd.m_name = "$rov_se_dvergar_pingcd_name"; + pingCd.m_tooltip = "$rov_se_dvergar_pingcd_tooltip"; pingCd.m_icon = GetItemIcon("DvergrKeyFragment") ?? icon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(pingCd, fixReference: false)); var overchargeCd = ScriptableObject.CreateInstance(); overchargeCd.name = DvergarConfig.OverchargeCdSE; - overchargeCd.m_name = "Overcharge Cooldown"; - overchargeCd.m_tooltip = "The runes are spent."; + overchargeCd.m_name = "$rov_se_dvergar_overchargecd_name"; + overchargeCd.m_tooltip = "$rov_se_dvergar_overchargecd_tooltip"; overchargeCd.m_icon = GetItemIcon("Eitr") ?? icon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(overchargeCd, fixReference: false)); } diff --git a/JotunnModStub/Fenrir/FenrirRace.cs b/JotunnModStub/Fenrir/FenrirRace.cs index 5c00200..22c1ee6 100644 --- a/JotunnModStub/Fenrir/FenrirRace.cs +++ b/JotunnModStub/Fenrir/FenrirRace.cs @@ -42,8 +42,8 @@ namespace RacesOfValheim { curseSE = ScriptableObject.CreateInstance(); curseSE.name = "SE_FenrirCurse"; - curseSE.m_name = "Fenrir's Blood"; - curseSE.m_tooltip = "You are of the Fenrir race."; + curseSE.m_name = "$rov_se_fenrir_curse_name"; + curseSE.m_tooltip = "$rov_se_fenrir_curse_tooltip"; curseSE.m_mods = new System.Collections.Generic.List() { new HitData.DamageModPair() { m_type = HitData.DamageType.Spirit, m_modifier = HitData.DamageModifier.Weak } @@ -64,19 +64,19 @@ namespace RacesOfValheim { fenrirCdSE = ScriptableObject.CreateInstance(); fenrirCdSE.name = "SE_FenrirCooldown"; - fenrirCdSE.m_name = "Fenrir Form Cooldown"; + fenrirCdSE.m_name = "$rov_se_fenrir_formcd_name"; fenrirCdSE.m_icon = fenringTrophyIcon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(fenrirCdSE, fixReference: false)); cultistCdSE = ScriptableObject.CreateInstance(); cultistCdSE.name = "SE_CultistCooldown"; - cultistCdSE.m_name = "Cultist Form Cooldown"; + cultistCdSE.m_name = "$rov_se_fenrir_cultistcd_name"; cultistCdSE.m_icon = fenringTrophyIcon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(cultistCdSE, fixReference: false)); formBuffSE = ScriptableObject.CreateInstance(); formBuffSE.name = "SE_FenrirForm"; - formBuffSE.m_name = "Bestial Fury"; + formBuffSE.m_name = "$rov_se_fenrir_form_name"; formBuffSE.m_speedModifier = FenrirConfig.FullFormSpeedBonus.Value; formBuffSE.m_jumpModifier = new Vector3(0, FenrirConfig.FullFormJumpBonus.Value, 0); formBuffSE.m_fallDamageModifier = -FenrirConfig.FullFormFallDamageReduction.Value; @@ -87,7 +87,7 @@ namespace RacesOfValheim { cultistFormBuffSE = ScriptableObject.CreateInstance(); cultistFormBuffSE.name = "SE_CultistForm"; - cultistFormBuffSE.m_name = "Cultist Fury"; + cultistFormBuffSE.m_name = "$rov_se_fenrir_cultistform_name"; cultistFormBuffSE.m_speedModifier = FenrirConfig.FullFormSpeedBonus.Value; cultistFormBuffSE.m_jumpModifier = new Vector3(0, FenrirConfig.FullFormJumpBonus.Value, 0); cultistFormBuffSE.m_fallDamageModifier = -FenrirConfig.FullFormFallDamageReduction.Value; @@ -98,7 +98,7 @@ namespace RacesOfValheim { wolfFormBuffSE = ScriptableObject.CreateInstance(); wolfFormBuffSE.name = "SE_WolfForm"; - wolfFormBuffSE.m_name = "Wolf Senses"; + wolfFormBuffSE.m_name = "$rov_se_fenrir_wolfform_name"; wolfFormBuffSE.m_speedModifier = FenrirConfig.WolfFormSpeedBonus.Value; wolfFormBuffSE.m_fallDamageModifier = -FenrirConfig.WolfFormFallDamageReduction.Value; wolfFormBuffSE.m_staminaRegenMultiplier = FenrirConfig.FormStaminaRegenMultiplier.Value; diff --git a/JotunnModStub/RaceClaws.cs b/JotunnModStub/RaceClaws.cs index 660fabc..3fc2bbb 100644 --- a/JotunnModStub/RaceClaws.cs +++ b/JotunnModStub/RaceClaws.cs @@ -302,7 +302,7 @@ namespace RacesOfValheim StatusEffect se = ScriptableObject.CreateInstance(); se.name = ActiveSeName; se.m_name = DisplayName; - se.m_tooltip = "Your claws are out. They retract when this runs out."; + se.m_tooltip = "$rov_se_claws_tooltip"; se.m_icon = icon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(se, fixReference: false)); diff --git a/JotunnModStub/Skadi/SkadiRace.cs b/JotunnModStub/Skadi/SkadiRace.cs index 4746139..fbdffb6 100644 --- a/JotunnModStub/Skadi/SkadiRace.cs +++ b/JotunnModStub/Skadi/SkadiRace.cs @@ -58,7 +58,7 @@ namespace RacesOfValheim var se = ScriptableObject.CreateInstance(); se.name = "SE_SkadiStats"; - se.m_name = "Skadi's Blessing"; + se.m_name = "$rov_se_skadi_stats_name"; // Icon GameObject drakeTrophy = PrefabManager.Cache.GetPrefab("TrophyHatchling")?.gameObject; @@ -81,14 +81,14 @@ namespace RacesOfValheim skadiCdSE = ScriptableObject.CreateInstance(); skadiCdSE.name = "SE_SkadiCooldown"; - skadiCdSE.m_name = "Dragon Form Cooldown"; + skadiCdSE.m_name = "$rov_se_skadi_formcd_name"; skadiCdSE.m_icon = dragonIcon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(skadiCdSE, fixReference: false)); skadiFormSE = ScriptableObject.CreateInstance(); skadiFormSE.name = "SE_SkadiForm"; - skadiFormSE.m_name = "Dragon Form"; - skadiFormSE.m_tooltip = "Your dragon shape holds for a while longer."; + skadiFormSE.m_name = "$rov_se_skadi_form_name"; + skadiFormSE.m_tooltip = "$rov_se_skadi_form_tooltip"; skadiFormSE.m_icon = dragonIcon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(skadiFormSE, fixReference: false)); @@ -96,15 +96,15 @@ namespace RacesOfValheim // differently from a dragon attack on cooldown at a glance. var spellCd = ScriptableObject.CreateInstance(); spellCd.name = SPELL_COOLDOWN_SE; - spellCd.m_name = "Cold Spell"; - spellCd.m_tooltip = "The frost must gather again before you may cast."; + spellCd.m_name = "$rov_se_skadi_coldspellcd_name"; + spellCd.m_tooltip = "$rov_se_skadi_coldspellcd_tooltip"; spellCd.m_icon = GetItemIcon("StaffIceShards") ?? dragonIcon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(spellCd, fixReference: false)); var attackCd = ScriptableObject.CreateInstance(); attackCd.name = ATTACK_COOLDOWN_SE; - attackCd.m_name = "Dragon Attack"; - attackCd.m_tooltip = "Your dragon shape must ready itself to strike again."; + attackCd.m_name = "$rov_se_skadi_dragonattackcd_name"; + attackCd.m_tooltip = "$rov_se_skadi_dragonattackcd_tooltip"; attackCd.m_icon = GetItemIcon("TrophyHatchling") ?? dragonIcon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(attackCd, fixReference: false)); } diff --git a/JotunnModStub/Skadi/SkadiStatusEffects.cs b/JotunnModStub/Skadi/SkadiStatusEffects.cs index 00a7e56..6f47454 100644 --- a/JotunnModStub/Skadi/SkadiStatusEffects.cs +++ b/JotunnModStub/Skadi/SkadiStatusEffects.cs @@ -23,8 +23,8 @@ namespace RacesOfValheim { base.Setup(character); name = "SE_SkadiStats"; - m_name = "Skadi's Aura"; - m_tooltip = "Empowered by the frost."; + m_name = "$rov_se_skadi_aura_name"; + m_tooltip = "$rov_se_skadi_aura_tooltip"; } // What the last UpdateStats call actually wrote. SEMan.AddStatusEffect stores a Clone() of diff --git a/JotunnModStub/Skeleton/SkeletonRace.cs b/JotunnModStub/Skeleton/SkeletonRace.cs index 3f0a3cb..22bc3ec 100644 --- a/JotunnModStub/Skeleton/SkeletonRace.cs +++ b/JotunnModStub/Skeleton/SkeletonRace.cs @@ -24,7 +24,7 @@ namespace RacesOfValheim var se = ScriptableObject.CreateInstance(); se.name = "SE_SkeletonStats"; - se.m_name = "Undead Fortitude"; + se.m_name = "$rov_se_skeleton_stats_name"; // Icon GameObject skelTrophy = PrefabManager.Cache.GetPrefab("TrophySkeleton")?.gameObject; diff --git a/JotunnModStub/Skeleton/SkeletonStatusEffects.cs b/JotunnModStub/Skeleton/SkeletonStatusEffects.cs index 502dd04..6bc69ac 100644 --- a/JotunnModStub/Skeleton/SkeletonStatusEffects.cs +++ b/JotunnModStub/Skeleton/SkeletonStatusEffects.cs @@ -60,8 +60,8 @@ namespace RacesOfValheim public override void Setup(Character character) { base.Setup(character); - m_name = "Resurrection Cooldown"; - m_tooltip = "Your skeletal body is too weak to resurrect again right now."; + m_name = "$rov_se_skeleton_resurrectcd_name"; + m_tooltip = "$rov_se_skeleton_resurrectcd_tooltip"; m_icon = Jotunn.Managers.PrefabManager.Cache.GetPrefab("TrophySkeletonPoison")?.GetComponent()?.m_itemData.GetIcon() ?? Jotunn.Managers.PrefabManager.Cache.GetPrefab("TrophySkeleton")?.GetComponent()?.m_itemData.GetIcon(); m_ttl = SkeletonConfig.ResurrectionCooldown.Value; diff --git a/JotunnModStub/Sverm/SvermStatusEffects.cs b/JotunnModStub/Sverm/SvermStatusEffects.cs index 7d05d34..3566dcc 100644 --- a/JotunnModStub/Sverm/SvermStatusEffects.cs +++ b/JotunnModStub/Sverm/SvermStatusEffects.cs @@ -30,8 +30,8 @@ namespace RacesOfValheim { base.Setup(character); name = SvermConfig.StatsSE; - m_name = "Chitin Plating"; - m_tooltip = "Armoured, venomous, and never alone."; + m_name = "$rov_se_sverm_stats_name"; + m_tooltip = "$rov_se_sverm_stats_tooltip"; RebuildForState(); } @@ -101,8 +101,8 @@ namespace RacesOfValheim public override void Setup(Character character) { base.Setup(character); - m_name = "Ravager Strain Cooldown"; - m_tooltip = "The strain is spent. It will take again soon."; + m_name = "$rov_se_sverm_ravagercd_name"; + m_tooltip = "$rov_se_sverm_ravagercd_tooltip"; m_ttl = SvermConfig.RavagerCooldownSeconds; } } @@ -120,8 +120,8 @@ namespace RacesOfValheim public override void Setup(Character character) { base.Setup(character); - m_name = "Ravager Strain"; - m_tooltip = "The shell doubles, and nothing that hits it lands the same again."; + m_name = "$rov_se_sverm_ravager_name"; + m_tooltip = "$rov_se_sverm_ravager_tooltip"; m_ttl = SvermConfig.RavagerDurationSeconds; } } @@ -138,7 +138,7 @@ namespace RacesOfValheim var stats = ScriptableObject.CreateInstance(); stats.name = SvermConfig.StatsSE; - stats.m_name = "Chitin Plating"; + stats.m_name = "$rov_se_sverm_stats_name"; stats.m_icon = icon; CustomStatusEffect customStats = new CustomStatusEffect(stats, fixReference: false); ItemManager.Instance.AddStatusEffect(customStats); @@ -146,13 +146,13 @@ namespace RacesOfValheim var form = ScriptableObject.CreateInstance(); form.name = SvermConfig.RavagerSE; - form.m_name = "Ravager Strain"; + form.m_name = "$rov_se_sverm_ravager_name"; form.m_icon = icon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(form, fixReference: false)); var cooldown = ScriptableObject.CreateInstance(); cooldown.name = SvermConfig.RavagerCdSE; - cooldown.m_name = "Ravager Strain Cooldown"; + cooldown.m_name = "$rov_se_sverm_ravagercd_name"; cooldown.m_icon = icon; ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(cooldown, fixReference: false)); } diff --git a/JotunnModStub/Translations/English/status_effects.json b/JotunnModStub/Translations/English/status_effects.json new file mode 100644 index 0000000..ba0b959 --- /dev/null +++ b/JotunnModStub/Translations/English/status_effects.json @@ -0,0 +1,62 @@ +{ + "rov_se_aswid_auspex_name": "Auspex", + "rov_se_aswid_auspex_tooltip": "Sensing life force of nearby creatures.", + "rov_se_aswid_batform_name": "Like a Bat out of Hell", + "rov_se_aswid_batform_tooltip": "You have taken the form of a Bat. You can fly, but cannot attack.", + "rov_se_aswid_bloodpotion_tooltip": "Stomachs filled with blood. Healing $1% over $2 seconds.", + "rov_se_aswid_mistform_name": "Weight of Shadows", + "rov_se_aswid_mistform_tooltip": "You are mist. Immune to physical damage and poison. Cannot attack or run.", + "rov_se_aswid_nightaura_name": "Night Aura", + "rov_se_aswid_nightaura_tooltip": "The cold strengthens your beastly senses.", + "rov_se_aswid_sensed_name": "Sensed", + "rov_se_aswid_stats_name": "Benedictus et Afflictus", + "rov_se_aswid_stats_tooltip": "Vampiric senses and life drain.", + "rov_se_claws_tooltip": "Your claws are out. They retract when this runs out.", + "rov_se_draugh_wet_tooltip": "The water restores your rotten flesh. Health regeneration increased.", + "rov_se_dvergar_overcharge_name": "Runic Overcharge", + "rov_se_dvergar_overcharge_tooltip": "Your next blow with a favoured weapon carries the whole of the charge.", + "rov_se_dvergar_overchargecd_name": "Overcharge Cooldown", + "rov_se_dvergar_overchargecd_tooltip": "The runes are spent.", + "rov_se_dvergar_pingcd_name": "Runic Ping", + "rov_se_dvergar_pingcd_tooltip": "The runes must settle before you may call on them again.", + "rov_se_dvergar_stats_name": "Stone and Forge", + "rov_se_dvergar_stats_tooltip": "Small, sturdy, and born to the anvil.", + "rov_se_fenrir_cultistcd_name": "Cultist Form Cooldown", + "rov_se_fenrir_cultistform_name": "Cultist Fury", + "rov_se_fenrir_curse_name": "Fenrir's Blood", + "rov_se_fenrir_curse_tooltip": "You are of the Fenrir race.", + "rov_se_fenrir_form_name": "Bestial Fury", + "rov_se_fenrir_formcd_name": "Fenrir Form Cooldown", + "rov_se_fenrir_wolfform_name": "Wolf Senses", + "rov_se_skadi_aura_name": "Skadi's Aura", + "rov_se_skadi_aura_tooltip": "Empowered by the frost.", + "rov_se_skadi_coldspellcd_name": "Cold Spell", + "rov_se_skadi_coldspellcd_tooltip": "The frost must gather again before you may cast.", + "rov_se_skadi_dragonattackcd_name": "Dragon Attack", + "rov_se_skadi_dragonattackcd_tooltip": "Your dragon shape must ready itself to strike again.", + "rov_se_skadi_form_name": "Dragon Form", + "rov_se_skadi_form_tooltip": "Your dragon shape holds for a while longer.", + "rov_se_skadi_formcd_name": "Dragon Form Cooldown", + "rov_se_skadi_stats_name": "Skadi's Blessing", + "rov_se_skeleton_resurrectcd_name": "Resurrection Cooldown", + "rov_se_skeleton_resurrectcd_tooltip": "Your skeletal body is too weak to resurrect again right now.", + "rov_se_skeleton_stats_name": "Undead Fortitude", + "rov_se_sverm_ravager_name": "Ravager Strain", + "rov_se_sverm_ravager_tooltip": "The shell doubles, and nothing that hits it lands the same again.", + "rov_se_sverm_ravagercd_name": "Ravager Strain Cooldown", + "rov_se_sverm_ravagercd_tooltip": "The strain is spent. It will take again soon.", + "rov_se_sverm_stats_name": "Chitin Plating", + "rov_se_sverm_stats_tooltip": "Armoured, venomous, and never alone.", + "rov_se_trenta_portalcd_name": "Homecoming Portal", + "rov_se_trenta_portalcd_tooltip": "The way home has not yet settled enough to open again.", + "rov_se_trenta_purpleraincd_name": "Purple Rain", + "rov_se_trenta_purpleraincd_tooltip": "The pollen must settle before you may call the rain again.", + "rov_se_trenta_stats_name": "Heartwood", + "rov_se_trenta_stats_tooltip": "Rooted, patient, and hard to fell.", + "rov_se_trol_throwcd_name": "Throw Rock Cooldown", + "rov_se_trol_throwcd_tooltip": "You must wait before throwing another rock.", + "rov_se_trol_trueform_name": "True Form", + "rov_se_trol_trueform_tooltip": "You have unleashed your inner troll!", + "rov_se_trol_trueformcd_name": "True Form Cooldown", + "rov_se_trol_trueformcd_tooltip": "You are exhausted from your True Form." +} diff --git a/JotunnModStub/Translations/Italian/status_effects.json b/JotunnModStub/Translations/Italian/status_effects.json new file mode 100644 index 0000000..4e8c742 --- /dev/null +++ b/JotunnModStub/Translations/Italian/status_effects.json @@ -0,0 +1,62 @@ +{ + "rov_se_aswid_auspex_name": "Auspex", + "rov_se_aswid_auspex_tooltip": "Percepisci la forza vitale delle creature vicine.", + "rov_se_aswid_batform_name": "Come un pipistrello dall'inferno", + "rov_se_aswid_batform_tooltip": "Hai preso la forma di un pipistrello. Puoi volare, ma non puoi attaccare.", + "rov_se_aswid_bloodpotion_tooltip": "Stomaci pieni di sangue. Cura il $1% in $2 secondi.", + "rov_se_aswid_mistform_name": "Peso delle ombre", + "rov_se_aswid_mistform_tooltip": "Sei nebbia. Immune ai danni fisici e al veleno. Non puoi attaccare né correre.", + "rov_se_aswid_nightaura_name": "Aura notturna", + "rov_se_aswid_nightaura_tooltip": "Il freddo acuisce i tuoi sensi bestiali.", + "rov_se_aswid_sensed_name": "Percepito", + "rov_se_aswid_stats_name": "Benedictus et Afflictus", + "rov_se_aswid_stats_tooltip": "Sensi vampirici e risucchio vitale.", + "rov_se_claws_tooltip": "Hai gli artigli fuori. Si ritraggono quando questo effetto finisce.", + "rov_se_draugh_wet_tooltip": "L'acqua ristora la tua carne putrefatta. Rigenerazione della salute aumentata.", + "rov_se_dvergar_overcharge_name": "Sovraccarico runico", + "rov_se_dvergar_overcharge_tooltip": "Il tuo prossimo colpo con un'arma prediletta scarica tutta la carica.", + "rov_se_dvergar_overchargecd_name": "Ricarica del sovraccarico", + "rov_se_dvergar_overchargecd_tooltip": "Le rune sono esaurite.", + "rov_se_dvergar_pingcd_name": "Richiamo runico", + "rov_se_dvergar_pingcd_tooltip": "Le rune devono assestarsi prima che tu possa invocarle di nuovo.", + "rov_se_dvergar_stats_name": "Pietra e forgia", + "rov_se_dvergar_stats_tooltip": "Piccolo, robusto e nato per l'incudine.", + "rov_se_fenrir_cultistcd_name": "Ricarica forma Cultista", + "rov_se_fenrir_cultistform_name": "Furia del Cultista", + "rov_se_fenrir_curse_name": "Sangue di Fenrir", + "rov_se_fenrir_curse_tooltip": "Sei della razza Fenrir.", + "rov_se_fenrir_form_name": "Furia bestiale", + "rov_se_fenrir_formcd_name": "Ricarica forma Fenrir", + "rov_se_fenrir_wolfform_name": "Sensi del lupo", + "rov_se_skadi_aura_name": "Aura di Skadi", + "rov_se_skadi_aura_tooltip": "Potenziato dal gelo.", + "rov_se_skadi_coldspellcd_name": "Incantesimo del freddo", + "rov_se_skadi_coldspellcd_tooltip": "Il gelo deve raccogliersi di nuovo prima che tu possa lanciare.", + "rov_se_skadi_dragonattackcd_name": "Attacco del drago", + "rov_se_skadi_dragonattackcd_tooltip": "La tua forma di drago deve prepararsi prima di colpire ancora.", + "rov_se_skadi_form_name": "Forma di drago", + "rov_se_skadi_form_tooltip": "La tua forma di drago resiste ancora per un po'.", + "rov_se_skadi_formcd_name": "Ricarica forma di drago", + "rov_se_skadi_stats_name": "Benedizione di Skadi", + "rov_se_skeleton_resurrectcd_name": "Ricarica resurrezione", + "rov_se_skeleton_resurrectcd_tooltip": "Il tuo corpo scheletrico è troppo debole per risorgere di nuovo adesso.", + "rov_se_skeleton_stats_name": "Tempra non morta", + "rov_se_sverm_ravager_name": "Ceppo Devastatore", + "rov_se_sverm_ravager_tooltip": "Il guscio raddoppia, e niente di ciò che lo colpisce va a segno come prima.", + "rov_se_sverm_ravagercd_name": "Ricarica Ceppo Devastatore", + "rov_se_sverm_ravagercd_tooltip": "Il ceppo è esaurito. Attecchirà di nuovo presto.", + "rov_se_sverm_stats_name": "Corazza di chitina", + "rov_se_sverm_stats_tooltip": "Corazzato, velenoso e mai solo.", + "rov_se_trenta_portalcd_name": "Portale del ritorno", + "rov_se_trenta_portalcd_tooltip": "La via di casa non si è ancora assestata abbastanza per riaprirsi.", + "rov_se_trenta_purpleraincd_name": "Pioggia viola", + "rov_se_trenta_purpleraincd_tooltip": "Il polline deve posarsi prima che tu possa richiamare la pioggia.", + "rov_se_trenta_stats_name": "Durame", + "rov_se_trenta_stats_tooltip": "Radicato, paziente e difficile da abbattere.", + "rov_se_trol_throwcd_name": "Ricarica lancio di massi", + "rov_se_trol_throwcd_tooltip": "Devi aspettare prima di lanciare un altro masso.", + "rov_se_trol_trueform_name": "Vera forma", + "rov_se_trol_trueform_tooltip": "Hai scatenato il troll che è in te!", + "rov_se_trol_trueformcd_name": "Ricarica vera forma", + "rov_se_trol_trueformcd_tooltip": "Sei esausto dopo la tua vera forma." +} diff --git a/JotunnModStub/Trenta/TrentaStatusEffects.cs b/JotunnModStub/Trenta/TrentaStatusEffects.cs index 7afb670..ae0351d 100644 --- a/JotunnModStub/Trenta/TrentaStatusEffects.cs +++ b/JotunnModStub/Trenta/TrentaStatusEffects.cs @@ -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(); 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(); 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(); 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)); } diff --git a/JotunnModStub/Trol/TrolStatusEffects.cs b/JotunnModStub/Trol/TrolStatusEffects.cs index 9c0c4dc..7873ce7 100644 --- a/JotunnModStub/Trol/TrolStatusEffects.cs +++ b/JotunnModStub/Trol/TrolStatusEffects.cs @@ -10,8 +10,8 @@ namespace RacesOfValheim { base.Setup(character); name = "SE_TrolThrowRockCooldown"; - m_name = "Throw Rock Cooldown"; - m_tooltip = "You must wait before throwing another rock."; + m_name = "$rov_se_trol_throwcd_name"; + m_tooltip = "$rov_se_trol_throwcd_tooltip"; m_ttl = 60f; // 1 minute cooldown // Try to find a rock-like icon, e.g. Stone @@ -33,8 +33,8 @@ namespace RacesOfValheim { base.Setup(character); name = "SE_TrolTrueForm"; - m_name = "True Form"; - m_tooltip = "You have unleashed your inner troll!"; + m_name = "$rov_se_trol_trueform_name"; + m_tooltip = "$rov_se_trol_trueform_tooltip"; // Past Fader the form no longer runs out: m_ttl 0 is vanilla's "never expires", and // the True Form key becomes the only way back (see TrolRace.TryTrueForm). m_ttl = BossProgressionManager.GetCurrentProgressionState() >= 8 ? 0f : TrolConfig.TrueFormDuration.Value; @@ -57,8 +57,8 @@ namespace RacesOfValheim { base.Setup(character); name = "SE_TrolTrueFormCooldown"; - m_name = "True Form Cooldown"; - m_tooltip = "You are exhausted from your True Form."; + m_name = "$rov_se_trol_trueformcd_name"; + m_tooltip = "$rov_se_trol_trueformcd_tooltip"; m_ttl = TrolConfig.TrueFormCooldown.Value; GameObject itemPrefab = PrefabManager.Cache.GetPrefab("Stone"); From b177c89c71619e19248890dc681d7482739c8a88 Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 26 Sep 2026 19:58:53 +0200 Subject: [PATCH 003/216] feat(text): item, piece and creature names come from translation files The mod's own items, build pieces and summoned creatures now carry $rov_item_, $rov_piece_ and $rov_creature_ tokens for their names and descriptions, and items.json holds the texts in English and Italian. Valheim localizes these fields wherever it shows them: tooltips, hover texts, messages, the build menu. Where a name doubles as an identifier, both sides use the same constant, so the comparisons still hold. The Aswid foods keep their prefix as a constant for the refinery's check and now name the creature with its vanilla token, so "Boar" translates too. The Furling crops get one whole description per crop instead of an English sentence with the metal dropped in. The Race Menu Ward's panel title is a mod UI Text, so it reads the translation directly. Saves are unaffected: items and eaten foods are stored by prefab name. The Sverm hive's goods stay for the merchant step. Co-Authored-By: Claude Opus 5.5 --- JotunnModStub/Aswid/AswidBloodPotions.cs | 17 ++- JotunnModStub/Aswid/AswidBloodRefinery.cs | 20 ++- JotunnModStub/Aswid/AswidClaws.cs | 4 +- JotunnModStub/Aswid/AswidRace.cs | 11 +- JotunnModStub/Aswid/AswidSpectralClaw.cs | 4 +- JotunnModStub/Butler/BoneServant.cs | 12 +- JotunnModStub/Draugh/DraughHumanMeat.cs | 4 +- JotunnModStub/Draugh/DraughSpawner.cs | 16 +-- JotunnModStub/Dvergar/DvergarBanco.cs | 4 +- JotunnModStub/Dvergar/DvergarBotte.cs | 5 +- JotunnModStub/Fenrir/FenrirClaws.cs | 4 +- JotunnModStub/Fenrir/FenrirMangiatoia.cs | 26 ++-- JotunnModStub/Furling/FurlingCrops.cs | 49 ++++--- JotunnModStub/RaceMenuWard.cs | 8 +- JotunnModStub/Skadi/SkadiFrostHeart.cs | 4 +- JotunnModStub/Skadi/SkadiGolem.cs | 5 +- JotunnModStub/Skeleton/SkeletonBonePile.cs | 23 ++- JotunnModStub/Skeleton/SkeletonSentry.cs | 4 +- JotunnModStub/Sverm/SvermBlisterTick.cs | 2 +- JotunnModStub/Sverm/SvermClawSlot.cs | 4 +- JotunnModStub/Sverm/SvermConfig.cs | 2 +- JotunnModStub/Sverm/SvermHive.cs | 2 +- JotunnModStub/Sverm/SvermHiveStore.cs | 4 +- JotunnModStub/Sverm/SvermRace.cs | 2 +- JotunnModStub/Translations/English/items.json | 131 ++++++++++++++++++ JotunnModStub/Translations/Italian/items.json | 131 ++++++++++++++++++ JotunnModStub/Trenta/TrentaComposter.cs | 8 +- JotunnModStub/Trenta/TrentaConfig.cs | 14 +- JotunnModStub/Trenta/TrentaElderRoot.cs | 3 +- JotunnModStub/Trenta/TrentaHeartwoodGrove.cs | 4 +- JotunnModStub/Trol/TrolRace.cs | 4 +- JotunnModStub/Trol/TrolTotem.cs | 4 +- JotunnModStub/TrolsHammer/TrolsHammerItem.cs | 6 +- JotunnModStub/WarVulture/WarVultureItem.cs | 6 +- 34 files changed, 405 insertions(+), 142 deletions(-) create mode 100644 JotunnModStub/Translations/English/items.json create mode 100644 JotunnModStub/Translations/Italian/items.json diff --git a/JotunnModStub/Aswid/AswidBloodPotions.cs b/JotunnModStub/Aswid/AswidBloodPotions.cs index a9a17f1..cf592e4 100644 --- a/JotunnModStub/Aswid/AswidBloodPotions.cs +++ b/JotunnModStub/Aswid/AswidBloodPotions.cs @@ -27,8 +27,8 @@ namespace RacesOfValheim public const string SuperiorBaseName = "MeadBaseSuperiorBloodPotion"; public const string SuperiorPotionName = "MeadSuperiorBloodPotion"; - private const string PotionDisplayName = "Blood Potion"; - private const string SuperiorPotionDisplayName = "Superior Blood Potion"; + private const string PotionDisplayName = "$rov_item_aswid_bloodpotion_name"; + private const string SuperiorPotionDisplayName = "$rov_item_aswid_superiorbloodpotion_name"; private const float HealDuration = 8f; private const float HealFraction = 0.05f; @@ -54,15 +54,14 @@ namespace RacesOfValheim SE_BloodPotion superiorDrink = CreateEffect("SE_SuperiorBloodPotion", SuperiorPotionDisplayName, SuperiorHealFraction, AswidBloodRefinery.SuperiorEssenceName, "MoltenCore"); - GameObject meadBase = CloneItem(BaseName, "MeadBaseHealthMinor", "Blood Potion Mead Base", - "Blood, berries and crypt light, waiting on a barrel."); + GameObject meadBase = CloneItem(BaseName, "MeadBaseHealthMinor", "$rov_item_aswid_bloodpotionbase_name", + "$rov_item_aswid_bloodpotionbase_desc"); GameObject potion = CloneItem(PotionName, "MeadHealthMinor", PotionDisplayName, - "Drink and the hunger stops mattering for a while. Fills every stomach with blood essence, " + - "full or not, and knits the flesh back together."); - GameObject superiorBase = CloneItem(SuperiorBaseName, "MeadBaseHealthMedium", "Superior Blood Potion Mead Base", - "The twice-rendered draught, still raw."); + "$rov_item_aswid_bloodpotion_desc"); + GameObject superiorBase = CloneItem(SuperiorBaseName, "MeadBaseHealthMedium", "$rov_item_aswid_superiorbloodpotionbase_name", + "$rov_item_aswid_superiorbloodpotionbase_desc"); GameObject superiorPotion = CloneItem(SuperiorPotionName, "MeadHealthMedium", SuperiorPotionDisplayName, - "The same mercy, twice as deep."); + "$rov_item_aswid_superiorbloodpotion_desc"); AttachEffect(potion, drink); AttachEffect(superiorPotion, superiorDrink); diff --git a/JotunnModStub/Aswid/AswidBloodRefinery.cs b/JotunnModStub/Aswid/AswidBloodRefinery.cs index c89a2fd..0e8d711 100644 --- a/JotunnModStub/Aswid/AswidBloodRefinery.cs +++ b/JotunnModStub/Aswid/AswidBloodRefinery.cs @@ -30,10 +30,10 @@ namespace RacesOfValheim // The Aswid food patches recognise a meal by its display name, so these strings are part // of the contract with AswidPatches - see IsAswidMeal. - public const string EssenceDisplayName = "Blood Essence"; - public const string SuperiorEssenceDisplayName = "Superior Blood Essence"; - public const string CoreDisplayName = "Blood Core"; - public const string PieceDisplayName = "Blood Refinery"; + public const string EssenceDisplayName = "$rov_item_aswid_bloodessence_name"; + public const string SuperiorEssenceDisplayName = "$rov_item_aswid_superiorbloodessence_name"; + public const string CoreDisplayName = "$rov_item_aswid_bloodcore_name"; + public const string PieceDisplayName = "$rov_piece_aswid_bloodrefinery_name"; // Regeneration is tied to the health value rather than set per tier, so 60 hp gives 5 and // 80 hp gives 6.67 without a second number to keep in sync. @@ -94,7 +94,7 @@ namespace RacesOfValheim public static bool IsAswidMeal(ItemDrop.ItemData item) { if (item == null || item.m_shared == null || item.m_shared.m_name == null) return false; - return item.m_shared.m_name.StartsWith("Aswid Food:") + return item.m_shared.m_name.StartsWith(AswidRace.AswidFoodNamePrefix) || item.m_shared.m_name == EssenceDisplayName || IsEssence(item); } @@ -122,8 +122,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = CoreDisplayName; - shared.m_description = "A knot of clotted blood kept beating by something that is not a heart. " + - "The dead trade them; only the dead know how they are made."; + shared.m_description = "$rov_item_aswid_bloodcore_desc"; shared.m_itemType = ItemDrop.ItemData.ItemType.Material; shared.m_food = 0f; shared.m_foodStamina = 0f; @@ -142,8 +141,7 @@ namespace RacesOfValheim EssencePrefab = BuildEssence( EssenceName, EssenceDisplayName, - "Blood rendered down to what it actually is. The only real food an Aswid can " + - "still chew, and the base of every draught worth brewing.", + "$rov_item_aswid_bloodessence_desc", food: 60f, tint: EssenceTint, iconSource: "GemstoneRed"); @@ -151,7 +149,7 @@ namespace RacesOfValheim SuperiorEssencePrefab = BuildEssence( SuperiorEssenceName, SuperiorEssenceDisplayName, - "The same blood, rendered twice. Darker, thicker, and worth five of the first pass.", + "$rov_item_aswid_superiorbloodessence_desc", food: 80f, tint: SuperiorEssenceTint, iconSource: "MoltenCore"); @@ -267,7 +265,7 @@ namespace RacesOfValheim PieceConfig config = new PieceConfig { Name = PieceDisplayName, - Description = "Flesh goes in, bone goes in, and what is left of both comes out red.", + Description = "$rov_piece_aswid_bloodrefinery_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Requirements = new[] diff --git a/JotunnModStub/Aswid/AswidClaws.cs b/JotunnModStub/Aswid/AswidClaws.cs index cbfe3db..774857d 100644 --- a/JotunnModStub/Aswid/AswidClaws.cs +++ b/JotunnModStub/Aswid/AswidClaws.cs @@ -20,8 +20,8 @@ namespace RacesOfValheim public override string RaceId => "Aswid"; public override string ItemName => "AswidBeastClaws"; - public override string DisplayName => "Claws of the Beast"; - public override string Description => "Grown in the dark, and darker for it. They do not come off."; + public override string DisplayName => "$rov_item_aswid_claws_name"; + public override string Description => "$rov_item_aswid_claws_desc"; // The Bjorn claw first, by name, because that is the one this race is meant to wear. The // rest are the near-identical ids the manifest also carries - see SvermConfig's own diff --git a/JotunnModStub/Aswid/AswidRace.cs b/JotunnModStub/Aswid/AswidRace.cs index c864a7f..2ca35de 100644 --- a/JotunnModStub/Aswid/AswidRace.cs +++ b/JotunnModStub/Aswid/AswidRace.cs @@ -7,6 +7,9 @@ namespace RacesOfValheim { public class AswidRace : MonoBehaviour { + /// The start of every Aswid food's name, and how those items are told apart. + public const string AswidFoodNamePrefix = "$rov_item_aswid_food_name"; + public static AswidRace Instance { get; private set; } private static Dictionary mobToTrophyMap = new Dictionary @@ -117,8 +120,12 @@ namespace RacesOfValheim string foodName = "AswidFood_" + mobName; Jotunn.Configs.ItemConfig config = new Jotunn.Configs.ItemConfig(); - config.Name = "Aswid Food: " + mobName; - config.Description = "The life force of the conquered."; + // The prefix token and the creature's own vanilla token ("$enemy_boar"), which the + // game translates too. The prefix is also how the refinery recognises these items - + // see AswidBloodRefinery.IsAswidMeal - so the two must stay the same string. + string mobDisplay = Jotunn.Managers.PrefabManager.Cache.GetPrefab(mobName)?.m_name; + config.Name = AswidFoodNamePrefix + " " + (string.IsNullOrEmpty(mobDisplay) ? mobName : mobDisplay); + config.Description = "$rov_item_aswid_food_desc"; Jotunn.Entities.CustomItem customItem = null; diff --git a/JotunnModStub/Aswid/AswidSpectralClaw.cs b/JotunnModStub/Aswid/AswidSpectralClaw.cs index 64f2c87..01e568d 100644 --- a/JotunnModStub/Aswid/AswidSpectralClaw.cs +++ b/JotunnModStub/Aswid/AswidSpectralClaw.cs @@ -156,8 +156,8 @@ namespace RacesOfValheim ItemDrop itemDrop = clone.GetComponent(); if (itemDrop == null) return false; - itemDrop.m_itemData.m_shared.m_name = "Spectral Claw"; - itemDrop.m_itemData.m_shared.m_description = "A claw of pure shadow, bound to your rage rather than your grip."; + itemDrop.m_itemData.m_shared.m_name = "$rov_item_aswid_spectralclaw_name"; + itemDrop.m_itemData.m_shared.m_description = "$rov_item_aswid_spectralclaw_desc"; itemDrop.m_itemData.m_shared.m_weight = 0f; itemDrop.m_itemData.m_shared.m_useDurability = false; itemDrop.m_itemData.m_shared.m_questItem = true; // undroppable, unsellable diff --git a/JotunnModStub/Butler/BoneServant.cs b/JotunnModStub/Butler/BoneServant.cs index bbd9147..8c7a0a3 100644 --- a/JotunnModStub/Butler/BoneServant.cs +++ b/JotunnModStub/Butler/BoneServant.cs @@ -42,13 +42,13 @@ namespace RacesOfValheim // The smith inherits the names the single servant had, so nothing already built is orphaned. public const string SmithName = "BoneServant"; public const string SmithTableName = "ServantTable"; - public const string SmithDisplay = "Bone Smith"; - public const string SmithTableDisplay = "Smith's Table"; + public const string SmithDisplay = "$rov_creature_bonesmith_name"; + public const string SmithTableDisplay = "$rov_piece_smithtable_name"; public const string CookName = "BoneCook"; public const string CookTableName = "CookTable"; - public const string CookDisplay = "Bone Cook"; - public const string CookTableDisplay = "Cook's Table"; + public const string CookDisplay = "$rov_creature_bonecook_name"; + public const string CookTableDisplay = "$rov_piece_cooktable_name"; /// Vanilla's guaranteed-melee skeleton: the plain one rolls its own weapon, and the /// point here is to have none at all. @@ -90,7 +90,7 @@ namespace RacesOfValheim if (RegisterServant(SmithName, SmithDisplay, ButlerFamily.Forge)) { RegisterTable(SmithTableName, SmithTableDisplay, SmithName, ButlerFamily.Forge, - "A slab of bone and slate, dusted with ore. Something patient waits by the fires.", + "$rov_piece_smithtable_desc", "Coal"); PieceDensityLimit.Register(SmithTableName, TableSpacing, 1, @@ -114,7 +114,7 @@ namespace RacesOfValheim if (RegisterServant(CookName, CookDisplay, ButlerFamily.Kitchen)) { RegisterTable(CookTableName, CookTableDisplay, CookName, ButlerFamily.Kitchen, - "A slab of bone and slate, worn smooth. Something patient waits by the hearth.", + "$rov_piece_cooktable_desc", "CookedMeat"); PieceDensityLimit.Register(CookTableName, TableSpacing, 1, diff --git a/JotunnModStub/Draugh/DraughHumanMeat.cs b/JotunnModStub/Draugh/DraughHumanMeat.cs index 6ba3293..8a4977f 100644 --- a/JotunnModStub/Draugh/DraughHumanMeat.cs +++ b/JotunnModStub/Draugh/DraughHumanMeat.cs @@ -72,8 +72,8 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = item.ItemDrop.m_itemData.m_shared; ItemDrop.ItemData.SharedData source = nourishment.m_itemData.m_shared; - shared.m_name = "Human Meat"; - shared.m_description = "A piece of somebody. The living gag on it; you do not."; + shared.m_name = "$rov_item_draugh_humanmeat_name"; + shared.m_description = "$rov_item_draugh_humanmeat_desc"; // Raw meat is a Material in vanilla, so none of the food fields below would be read // without this. diff --git a/JotunnModStub/Draugh/DraughSpawner.cs b/JotunnModStub/Draugh/DraughSpawner.cs index b921be7..9e00fd5 100644 --- a/JotunnModStub/Draugh/DraughSpawner.cs +++ b/JotunnModStub/Draugh/DraughSpawner.cs @@ -25,17 +25,17 @@ namespace RacesOfValheim { // ─── Names ─────────────────────────────────────────────────────────── public const string PieceName = "DraughBodyPile"; - public const string PieceDisplayName = "Cursed Body Pile"; + public const string PieceDisplayName = "$rov_piece_draugh_bodypile_name"; public const string BoneName = "CursedBone"; - public const string BoneDisplayName = "Cursed Bone"; + public const string BoneDisplayName = "$rov_item_draugh_cursedbone_name"; public const string GreaterBoneName = "GreaterCursedBone"; - public const string GreaterBoneDisplayName = "Greater Cursed Bone"; + public const string GreaterBoneDisplayName = "$rov_item_draugh_greatercursedbone_name"; public const string ThrallName = "DraughThrall_Draugr"; public const string ThrallEliteName = "DraughThrall_DraugrElite"; - public const string ThrallDisplayName = "Draugr Thrall"; - public const string ThrallEliteDisplayName = "Draugr Elite Thrall"; + public const string ThrallDisplayName = "$rov_creature_draugh_thrall_name"; + public const string ThrallEliteDisplayName = "$rov_creature_draugh_thrallelite_name"; // RaisedThrall groups by kind for follower caps and for the roster, so these are the strings // that decide "is this one an officer" - no longer a display-name comparison. @@ -118,9 +118,9 @@ namespace RacesOfValheim public static void Register() { RegisterBone(BoneName, BoneDisplayName, BoneTint, - "A bone that will not stay quiet. The dead sell them; the dead do not say why."); + "$rov_item_draugh_cursedbone_desc"); RegisterBone(GreaterBoneName, GreaterBoneDisplayName, GreaterBoneTint, - "The same bone, older, and louder. A pile fed one of these starts keeping officers."); + "$rov_item_draugh_greatercursedbone_desc"); RegisterThrall(ThrallName, "Draugr", ThrallDisplayName, KindNormal, MaxFollowers); RegisterThrall(ThrallEliteName, "Draugr_Elite", ThrallEliteDisplayName, KindElite, MaxEliteFollowers); @@ -263,7 +263,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = PieceDisplayName, - Description = "Feed it and it answers. The dead here are yours, if you are dead enough to ask.", + Description = "$rov_piece_draugh_bodypile_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Icon = BorrowIcon(TrophyDraugr), diff --git a/JotunnModStub/Dvergar/DvergarBanco.cs b/JotunnModStub/Dvergar/DvergarBanco.cs index f686d6a..b18e968 100644 --- a/JotunnModStub/Dvergar/DvergarBanco.cs +++ b/JotunnModStub/Dvergar/DvergarBanco.cs @@ -36,7 +36,7 @@ namespace RacesOfValheim public static class DvergarBanco { public const string PieceName = "DvergarContractBank"; - public const string PieceDisplayName = "Contract Bank"; + public const string PieceDisplayName = "$rov_piece_dvergar_contractbank_name"; public const string RaceId = DvergarConfig.RaceId; /// The Queen's drop, mapped to state 7 in BossProgressionManager. Mistlands money for @@ -348,7 +348,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = PieceDisplayName, - Description = "A ledger, a seal and a heap of coin. Sign here and someone else does the dying.", + Description = "$rov_piece_dvergar_contractbank_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Icon = BorrowIcon("TrophyDvergr"), diff --git a/JotunnModStub/Dvergar/DvergarBotte.cs b/JotunnModStub/Dvergar/DvergarBotte.cs index b389bc8..05ee712 100644 --- a/JotunnModStub/Dvergar/DvergarBotte.cs +++ b/JotunnModStub/Dvergar/DvergarBotte.cs @@ -33,7 +33,7 @@ namespace RacesOfValheim public static class DvergarBotte { public const string PieceName = "DvergarRuneBarrel"; - public const string PieceDisplayName = "Rune Barrel"; + public const string PieceDisplayName = "$rov_piece_dvergar_runebarrel_name"; public const string RaceId = DvergarConfig.RaceId; /// How many drinks it holds. One dose is one mercenary served, so twenty is four @@ -101,8 +101,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = PieceDisplayName, - Description = "Pour a brew in and the crew drinks. What it does to them is whatever it " + - "would have done to you - if they have the parts for it.", + Description = "$rov_piece_dvergar_runebarrel_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Icon = BorrowIcon("MeadHealthMinor") ?? BorrowIcon("TrophyDvergr"), diff --git a/JotunnModStub/Fenrir/FenrirClaws.cs b/JotunnModStub/Fenrir/FenrirClaws.cs index ebe749d..a9a8f15 100644 --- a/JotunnModStub/Fenrir/FenrirClaws.cs +++ b/JotunnModStub/Fenrir/FenrirClaws.cs @@ -19,8 +19,8 @@ namespace RacesOfValheim public override string RaceId => "Fenrir"; public override string ItemName => "FenrirCursedClaws"; - public override string DisplayName => "Cursed Claws"; - public override string Description => "The wolf's hands, kept on in the man's shape. They do not come off."; + public override string DisplayName => "$rov_item_fenrir_claws_name"; + public override string Description => "$rov_item_fenrir_claws_desc"; public override string[] ModelPrefabs => new[] { diff --git a/JotunnModStub/Fenrir/FenrirMangiatoia.cs b/JotunnModStub/Fenrir/FenrirMangiatoia.cs index 79a9c38..b098f0a 100644 --- a/JotunnModStub/Fenrir/FenrirMangiatoia.cs +++ b/JotunnModStub/Fenrir/FenrirMangiatoia.cs @@ -35,12 +35,12 @@ namespace RacesOfValheim { // ─── Names ─────────────────────────────────────────────────────────── public const string PieceName = "FenrirPackTrough"; - public const string PieceDisplayName = "Pack Trough"; + public const string PieceDisplayName = "$rov_piece_fenrir_packtrough_name"; public const string UlvsblodName = "Ulvsblod"; - public const string UlvsblodDisplayName = "Ulvsblod"; + public const string UlvsblodDisplayName = "$rov_item_fenrir_ulvsblod_name"; public const string GreaterUlvsblodName = "GreaterUlvsblod"; - public const string GreaterUlvsblodDisplayName = "Greater Ulvsblod"; + public const string GreaterUlvsblodDisplayName = "$rov_item_fenrir_greaterulvsblod_name"; public const int UlvsblodPrice = 500; public const int GreaterUlvsblodPrice = 1500; @@ -49,9 +49,9 @@ namespace RacesOfValheim public const string UlvName = "FenrirPack_Ulv"; public const string FenrirName = "FenrirPack_Fenrir"; - public const string WolfDisplayName = "Pack Wolf"; - public const string UlvDisplayName = "Ulv"; - public const string FenrirDisplayName = "Fenrir"; + public const string WolfDisplayName = "$rov_creature_fenrir_packwolf_name"; + public const string UlvDisplayName = "$rov_creature_fenrir_packulv_name"; + public const string FenrirDisplayName = "$rov_creature_fenrir_packfenrir_name"; public const string KindWolf = "FenrirPackWolf"; public const string KindUlv = "FenrirPackUlv"; @@ -140,18 +140,16 @@ namespace RacesOfValheim public static void Register() { RegisterUlvsblod(UlvsblodName, UlvsblodDisplayName, UlvsblodTint, - "Wolf blood, kept warm by something that should not be able to keep anything warm. " + - "The Fenring sell it and do not explain it."); + "$rov_item_fenrir_ulvsblod_desc"); RegisterUlvsblod(GreaterUlvsblodName, GreaterUlvsblodDisplayName, GreaterUlvsblodTint, - "Older blood, and further down the line. A trough given one of these starts raising " + - "something worse than ulv."); + "$rov_item_fenrir_greaterulvsblod_desc"); RegisterPackAnimal(WolfName, "Wolf", WolfDisplayName, KindWolf, - "It answers to the blood of the wolf, not to you.", 1f); + "$rov_creature_fenrir_pack_desc", 1f); RegisterPackAnimal(UlvName, "Ulv", UlvDisplayName, KindUlv, - "It answers to the blood of the wolf, not to you.", 1f); + "$rov_creature_fenrir_pack_desc", 1f); RegisterPackAnimal(FenrirName, "Fenring", FenrirDisplayName, KindFenrir, - "Only the blood of the wolf commands this one.", FenrirScale); + "$rov_creature_fenrir_packfenrir_desc", FenrirScale); RegisterPiece(); @@ -338,7 +336,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = PieceDisplayName, - Description = "Fill it with meat and the pack comes. One at a time, and it remembers its dead.", + Description = "$rov_piece_fenrir_packtrough_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Icon = BorrowIcon("TrophyFenring"), diff --git a/JotunnModStub/Furling/FurlingCrops.cs b/JotunnModStub/Furling/FurlingCrops.cs index 75a7455..79cf5c9 100644 --- a/JotunnModStub/Furling/FurlingCrops.cs +++ b/JotunnModStub/Furling/FurlingCrops.cs @@ -65,27 +65,27 @@ namespace RacesOfValheim { new MetalCrop { - Metal = "Copper", FlaxName = "CopperFlax", FlaxDisplay = "Copper Flax", - DustName = "CopperDust", DustDisplay = "Copper Dust", + Metal = "Copper", FlaxName = "CopperFlax", FlaxDisplay = "$rov_item_furling_copperflax_name", + DustName = "CopperDust", DustDisplay = "$rov_item_furling_copperdust_name", PickableName = "Pickable_CopperFlax", SaplingName = "sapling_copperflax", - SaplingDisplay = "Copper Flax", OrePrefab = "CopperOre", + SaplingDisplay = "$rov_piece_furling_copperflaxsapling_name", OrePrefab = "CopperOre", Tint = new Color(0.72f, 0.45f, 0.20f, 1f), }, new MetalCrop { - Metal = "Tin", FlaxName = "TinFlax", FlaxDisplay = "Tin Flax", - DustName = "TinDust", DustDisplay = "Tin Dust", + Metal = "Tin", FlaxName = "TinFlax", FlaxDisplay = "$rov_item_furling_tinflax_name", + DustName = "TinDust", DustDisplay = "$rov_item_furling_tindust_name", PickableName = "Pickable_TinFlax", SaplingName = "sapling_tinflax", - SaplingDisplay = "Tin Flax", OrePrefab = "TinOre", + SaplingDisplay = "$rov_piece_furling_tinflaxsapling_name", OrePrefab = "TinOre", Tint = new Color(0.80f, 0.82f, 0.85f, 1f), }, new MetalCrop { - Metal = "Iron", FlaxName = "IronFlax", FlaxDisplay = "Iron Flax", - DustName = "IronDust", DustDisplay = "Iron Dust", + Metal = "Iron", FlaxName = "IronFlax", FlaxDisplay = "$rov_item_furling_ironflax_name", + DustName = "IronDust", DustDisplay = "$rov_item_furling_irondust_name", PickableName = "Pickable_IronFlax", SaplingName = "sapling_ironflax", // Iron's raw form is IronScrap, not "IronOre" - there is no IronOre prefab. - SaplingDisplay = "Iron Flax", OrePrefab = "IronScrap", + SaplingDisplay = "$rov_piece_furling_ironflaxsapling_name", OrePrefab = "IronScrap", Tint = new Color(0.35f, 0.36f, 0.38f, 1f), }, }; @@ -104,18 +104,29 @@ namespace RacesOfValheim { new RockBerry { - BerryName = "Stoneberry", BerryDisplay = "Stoneberry", - BushName = "StoneberryBush", BushDisplay = "Stoneberry Bush", + BerryName = "Stoneberry", BerryDisplay = "$rov_item_furling_stoneberry_name", + BushName = "StoneberryBush", BushDisplay = "$rov_piece_furling_stoneberrybush_name", YieldPrefab = "Stone", Tint = new Color(0.55f, 0.55f, 0.55f, 1f), }, new RockBerry { - BerryName = "Flintberry", BerryDisplay = "Flintberry", - BushName = "FlintberryBush", BushDisplay = "Flintberry Bush", + BerryName = "Flintberry", BerryDisplay = "$rov_item_furling_flintberry_name", + BushName = "FlintberryBush", BushDisplay = "$rov_piece_furling_flintberrybush_name", YieldPrefab = "Flint", Tint = new Color(0.30f, 0.32f, 0.35f, 1f), }, }; + /// + /// The description token that goes with a name token: "$rov_item_furling_tinflax_name" gives + /// "$rov_item_furling_tinflax_desc". One whole sentence per crop in the translation files, + /// rather than one sentence with the metal dropped in, so a translator can decline the metal + /// or move it wherever their language wants it. + /// + private static string DescriptionFor(string nameToken) + { + return nameToken.EndsWith("_name") ? nameToken.Substring(0, nameToken.Length - 5) + "_desc" : nameToken; + } + public static void Register() { foreach (MetalCrop crop in Crops) RegisterCrop(crop); @@ -151,8 +162,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = crop.FlaxDisplay; - shared.m_description = $"Flax grown in {crop.Metal.ToLowerInvariant()}-poisoned soil, and it took. " + - "Useless as cloth. Grind it and see."; + shared.m_description = DescriptionFor(crop.FlaxDisplay); // Teleportable is inherited from Flax and left alone on purpose: the flax travels, the // dust does not. That asymmetry is the whole point of the chain. @@ -177,8 +187,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = crop.DustDisplay; - shared.m_description = $"A sack of {crop.Metal.ToLowerInvariant()} ground fine. " + - "A furnace cannot tell it from ore, and it will not go through a portal either."; + shared.m_description = DescriptionFor(crop.DustDisplay); shared.m_itemType = ItemDrop.ItemData.ItemType.Material; shared.m_food = 0f; shared.m_foodStamina = 0f; @@ -280,7 +289,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = crop.SaplingDisplay, - Description = $"Plant it and it grows more {crop.FlaxDisplay}.", + Description = DescriptionFor(crop.SaplingDisplay), PieceTable = PieceTables.Cultivator, Requirements = new[] { new RequirementConfig(crop.FlaxName, 1, 0, true) }, })); @@ -310,7 +319,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = berry.BerryDisplay; - shared.m_description = $"Not a berry, whatever it looks like. Bury one and a {berry.YieldPrefab.ToLowerInvariant()}-bearing bush comes up."; + shared.m_description = DescriptionFor(berry.BerryDisplay); // Inedible, as designed. Material with every food value at zero also keeps it clear of // the Trenta's vegan check and of the Aswid/Skeleton food gates, all three of which only @@ -385,7 +394,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = berry.BushDisplay, - Description = $"Yields {berry.YieldPrefab.ToLowerInvariant()}, and keeps yielding it.", + Description = DescriptionFor(berry.BushDisplay), PieceTable = PieceTables.Cultivator, // The one thing that was actually missing the first time round. Icon = BorrowIcon(berry.YieldPrefab), diff --git a/JotunnModStub/RaceMenuWard.cs b/JotunnModStub/RaceMenuWard.cs index 255b38e..5457560 100644 --- a/JotunnModStub/RaceMenuWard.cs +++ b/JotunnModStub/RaceMenuWard.cs @@ -46,8 +46,8 @@ namespace RacesOfValheim PieceConfig config = new PieceConfig { - Name = "Race Menu Ward", - Description = "Commune with your heritage. Offer a fallen boss's relic to claim its power.", + Name = "$rov_piece_racemenuward_name", + Description = "$rov_piece_racemenuward_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Misc, // Deliberately trivial: this is a utility the player needs early, not a reward. @@ -167,7 +167,7 @@ namespace RacesOfValheim // serialised m_hoverOffset, which is 0 unless the prefab sets one, so 0 is vanilla behaviour. public float GetHoverOffset() => 0f; - public string GetHoverName() => "Race Menu Ward"; + public string GetHoverName() => "$rov_piece_racemenuward_name"; public string GetHoverText() { @@ -266,7 +266,7 @@ namespace RacesOfValheim Image bg = panel.AddComponent(); bg.color = new Color(0f, 0f, 0f, 0.85f); - AddLabel("Title", "Race Menu Ward", 46, new Vector2(0, 230), new Vector2(700, 90)); + AddLabel("Title", ModText.Get("rov_piece_racemenuward_name"), 46, new Vector2(0, 230), new Vector2(700, 90)); AddLabel("Status", BuildStatusText(), 24, new Vector2(0, 110), new Vector2(900, 160)); diff --git a/JotunnModStub/Skadi/SkadiFrostHeart.cs b/JotunnModStub/Skadi/SkadiFrostHeart.cs index 0b53594..d2d50cc 100644 --- a/JotunnModStub/Skadi/SkadiFrostHeart.cs +++ b/JotunnModStub/Skadi/SkadiFrostHeart.cs @@ -18,7 +18,7 @@ namespace RacesOfValheim public static class SkadiFrostHeart { public const string PrefabName = "GreaterFrostHeart"; - public const string DisplayName = "Greater Frost Heart"; + public const string DisplayName = "$rov_item_skadi_greaterfrostheart_name"; public const int Price = 1500; private const string SourcePrefab = "FreezeGland"; @@ -43,7 +43,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = DisplayName; - shared.m_description = "Older cold than the mountain's. The cultists sell it and will not say where they dig."; + shared.m_description = "$rov_item_skadi_greaterfrostheart_desc"; shared.m_itemType = ItemDrop.ItemData.ItemType.Material; shared.m_weight = 0.5f; shared.m_maxStackSize = 10; diff --git a/JotunnModStub/Skadi/SkadiGolem.cs b/JotunnModStub/Skadi/SkadiGolem.cs index 07e6aeb..9a1035e 100644 --- a/JotunnModStub/Skadi/SkadiGolem.cs +++ b/JotunnModStub/Skadi/SkadiGolem.cs @@ -39,7 +39,7 @@ namespace RacesOfValheim // ─── Names ─────────────────────────────────────────────────────────── public const string GolemName = "SkadiCrystalGolem"; public const string SeedPieceName = "SkadiCrystalGolemSeed"; - public const string DisplayName = "Crystal Golem"; + public const string DisplayName = "$rov_creature_skadi_crystalgolem_name"; private const string SourceGolem = "StoneGolem"; @@ -271,8 +271,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = DisplayName, - Description = "Cut at the stone and woken with a tear. It will not follow you, and it " + - "will not leave the stonecutter that shaped it.", + Description = "$rov_piece_skadi_crystalgolem_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, // The stonecutter is the station, so vanilla itself refuses to place one anywhere its diff --git a/JotunnModStub/Skeleton/SkeletonBonePile.cs b/JotunnModStub/Skeleton/SkeletonBonePile.cs index 8824612..35fcdd9 100644 --- a/JotunnModStub/Skeleton/SkeletonBonePile.cs +++ b/JotunnModStub/Skeleton/SkeletonBonePile.cs @@ -33,29 +33,29 @@ namespace RacesOfValheim { // ─── Names ─────────────────────────────────────────────────────────── public const string PieceName = "SkeletonBonePile"; - public const string PieceDisplayName = "Bound Bone Pile"; + public const string PieceDisplayName = "$rov_piece_skeleton_bonepile_name"; // The Soul Stone: a green ruby, sold by the Skeleton bench, and the thing that binds a skull and // ten fragments into a sentry that cannot walk. Cheap on purpose - 50 coins - because the real // cost of a sentry is the skull, which has to be taken off a skeleton rather than bought. public const string SoulStoneName = "SoulStone"; - public const string SoulStoneDisplayName = "Soul Stone"; + public const string SoulStoneDisplayName = "$rov_item_skeleton_soulstone_name"; public const int SoulStonePrice = 50; private static readonly Color SoulStoneTint = new Color(0.15f, 0.85f, 0.35f, 1f); public const string SkullName = "CursedSkull"; - public const string SkullDisplayName = "Cursed Skull"; + public const string SkullDisplayName = "$rov_item_skeleton_cursedskull_name"; public const string GreaterSkullName = "GreaterCursedSkull"; - public const string GreaterSkullDisplayName = "Greater Cursed Skull"; + public const string GreaterSkullDisplayName = "$rov_item_skeleton_greatercursedskull_name"; public const string ThrallMeleeName = "SkeletonThrall_Melee"; public const string ThrallRangedName = "SkeletonThrall_Ranged"; public const string ThrallRancidName = "SkeletonThrall_Rancid"; - public const string ThrallMeleeDisplay = "Bound Skeleton"; - public const string ThrallRangedDisplay = "Bound Archer"; - public const string ThrallRancidDisplay = "Bound Rancid Remains"; + public const string ThrallMeleeDisplay = "$rov_creature_skeleton_thrallmelee_name"; + public const string ThrallRangedDisplay = "$rov_creature_skeleton_thrallranged_name"; + public const string ThrallRancidDisplay = "$rov_creature_skeleton_thrallrancid_name"; public const string KindMelee = "SkeletonMelee"; public const string KindRanged = "SkeletonRanged"; @@ -119,9 +119,9 @@ namespace RacesOfValheim public static void Register() { RegisterSkull(SkullName, SkullDisplayName, SkullTint, - "A skull that keeps counting. Set it down and the ground starts answering."); + "$rov_item_skeleton_cursedskull_desc"); RegisterSkull(GreaterSkullName, GreaterSkullDisplayName, GreaterSkullTint, - "Older, and it counts higher. A pile given one of these raises the rotten too."); + "$rov_item_skeleton_greatercursedskull_desc"); RegisterSoulStone(); @@ -191,8 +191,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = SoulStoneDisplayName; - shared.m_description = "Something is still in there, and it is still angry. Bind it to a skull " + - "and it will stand watch as long as the bones hold."; + shared.m_description = "$rov_item_skeleton_soulstone_desc"; shared.m_itemType = ItemDrop.ItemData.ItemType.Material; shared.m_weight = 0.5f; shared.m_maxStackSize = 20; @@ -339,7 +338,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = PieceDisplayName, - Description = "Twenty fragments buy a place in the line. The one who fills it will keep standing up.", + Description = "$rov_piece_skeleton_bonepile_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Icon = BorrowIcon("TrophySkeleton"), diff --git a/JotunnModStub/Skeleton/SkeletonSentry.cs b/JotunnModStub/Skeleton/SkeletonSentry.cs index ef37404..dd96949 100644 --- a/JotunnModStub/Skeleton/SkeletonSentry.cs +++ b/JotunnModStub/Skeleton/SkeletonSentry.cs @@ -26,7 +26,7 @@ namespace RacesOfValheim { public const string SentryName = "SkeletonSentry"; public const string SeedPieceName = "SkeletonSentrySeed"; - public const string DisplayName = "Bound Sentry"; + public const string DisplayName = "$rov_creature_skeleton_sentry_name"; /// Seconds without being hit before it starts closing its wounds. public const float RegenDelay = 10f; @@ -157,7 +157,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = DisplayName, - Description = "A skull on a soul stone. It will not walk, and it will not stop watching.", + Description = "$rov_piece_skeleton_sentry_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Icon = BorrowIcon("TrophySkeleton"), diff --git a/JotunnModStub/Sverm/SvermBlisterTick.cs b/JotunnModStub/Sverm/SvermBlisterTick.cs index 7363fb1..507b97f 100644 --- a/JotunnModStub/Sverm/SvermBlisterTick.cs +++ b/JotunnModStub/Sverm/SvermBlisterTick.cs @@ -22,7 +22,7 @@ namespace RacesOfValheim public static class SvermBlisterTick { public const string PrefabName = "SvermBlisterTick"; - public const string DisplayName = "Blister Tick"; + public const string DisplayName = "$rov_creature_sverm_blistertick_name"; private const string SourcePrefab = "Tick"; /// How many slots this nest has bought. Permanent, and the respawn reads it. diff --git a/JotunnModStub/Sverm/SvermClawSlot.cs b/JotunnModStub/Sverm/SvermClawSlot.cs index 54201c6..34bf82e 100644 --- a/JotunnModStub/Sverm/SvermClawSlot.cs +++ b/JotunnModStub/Sverm/SvermClawSlot.cs @@ -42,7 +42,7 @@ namespace RacesOfValheim /// longer resolve. The display name below is the only half a player ever reads. /// public const string ItemName = "SvermMaulclaws"; - public const string ItemDisplayName = "Chitin Claws"; + public const string ItemDisplayName = "$rov_item_sverm_claws_name"; /// Row in the reserved column the claws sit on. The other three await the carapace. private const int ClawRow = 0; @@ -80,7 +80,7 @@ namespace RacesOfValheim { ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = ItemDisplayName; - shared.m_description = "Grown, not forged. They do not come off."; + shared.m_description = "$rov_item_sverm_claws_desc"; // Quest item: Valheim refuses to drop, trade or stack these. It is the cheapest // honest way to say "this is part of your body" without a patch per verb. diff --git a/JotunnModStub/Sverm/SvermConfig.cs b/JotunnModStub/Sverm/SvermConfig.cs index f5f0c93..0a341ca 100644 --- a/JotunnModStub/Sverm/SvermConfig.cs +++ b/JotunnModStub/Sverm/SvermConfig.cs @@ -444,7 +444,7 @@ namespace RacesOfValheim public static readonly float MarketSize = 1.6f; // metres, the borrowed model's largest side // ─── Seeker Worker ─────────────────────────────────────────────────── - public const string WorkerDisplayName = "Seeker Worker"; + public const string WorkerDisplayName = "$rov_creature_sverm_worker_name"; public static readonly float WorkerScale = 0.5f; public static readonly float WorkerHealthFraction = 0.5f; public static readonly float WorkerDamageFraction = 0.5f; diff --git a/JotunnModStub/Sverm/SvermHive.cs b/JotunnModStub/Sverm/SvermHive.cs index 6e8f53b..3c2266b 100644 --- a/JotunnModStub/Sverm/SvermHive.cs +++ b/JotunnModStub/Sverm/SvermHive.cs @@ -95,7 +95,7 @@ namespace RacesOfValheim // station ends up unplaceable with no error. Piece piece = prefab.GetComponent() ?? prefab.AddComponent(); piece.m_name = DisplayName; - piece.m_description = "The colony begins here. Everything else grows out of it."; + piece.m_description = "$rov_piece_sverm_broodmound_desc"; piece.m_groundPiece = true; piece.m_groundOnly = true; piece.m_cultivatedGroundOnly = false; diff --git a/JotunnModStub/Sverm/SvermHiveStore.cs b/JotunnModStub/Sverm/SvermHiveStore.cs index 39df58b..f63f642 100644 --- a/JotunnModStub/Sverm/SvermHiveStore.cs +++ b/JotunnModStub/Sverm/SvermHiveStore.cs @@ -258,7 +258,7 @@ namespace RacesOfValheim public static class SvermHiveMarketPiece { public const string PieceName = "SvermHiveMarket"; - public const string DisplayName = "Hive Market"; + public const string DisplayName = "$rov_piece_sverm_hivemarket_name"; /// Scenery only, and checked rather than trusted - see SvermHive.MouthCandidates. private static readonly string[] SourceCandidates = @@ -325,7 +325,7 @@ namespace RacesOfValheim piece.m_craftingStation = null; piece.m_resources = new Piece.Requirement[0]; piece.m_name = DisplayName; - piece.m_description = "Where the colony trades. It spends the tank of the nest it stands in."; + piece.m_description = "$rov_piece_sverm_hivemarket_desc"; piece.m_groundPiece = true; piece.m_groundOnly = true; piece.m_canBeRemoved = true; diff --git a/JotunnModStub/Sverm/SvermRace.cs b/JotunnModStub/Sverm/SvermRace.cs index f3f1450..69a11f9 100644 --- a/JotunnModStub/Sverm/SvermRace.cs +++ b/JotunnModStub/Sverm/SvermRace.cs @@ -101,6 +101,6 @@ namespace RacesOfValheim public static class SvermHiveNames { public const string PieceName = "SvermBroodMound"; - public const string PieceDisplayName = "Brood Mound"; + public const string PieceDisplayName = "$rov_piece_sverm_broodmound_name"; } } diff --git a/JotunnModStub/Translations/English/items.json b/JotunnModStub/Translations/English/items.json new file mode 100644 index 0000000..1d707d6 --- /dev/null +++ b/JotunnModStub/Translations/English/items.json @@ -0,0 +1,131 @@ +{ + "rov_creature_bonecook_name": "Bone Cook", + "rov_creature_bonesmith_name": "Bone Smith", + "rov_creature_draugh_thrall_name": "Draugr Thrall", + "rov_creature_draugh_thrallelite_name": "Draugr Elite Thrall", + "rov_creature_fenrir_pack_desc": "It answers to the blood of the wolf, not to you.", + "rov_creature_fenrir_packfenrir_desc": "Only the blood of the wolf commands this one.", + "rov_creature_fenrir_packfenrir_name": "Fenrir", + "rov_creature_fenrir_packulv_name": "Ulv", + "rov_creature_fenrir_packwolf_name": "Pack Wolf", + "rov_creature_skadi_crystalgolem_name": "Crystal Golem", + "rov_creature_skeleton_sentry_name": "Bound Sentry", + "rov_creature_skeleton_thrallmelee_name": "Bound Skeleton", + "rov_creature_skeleton_thrallrancid_name": "Bound Rancid Remains", + "rov_creature_skeleton_thrallranged_name": "Bound Archer", + "rov_creature_sverm_blistertick_name": "Blister Tick", + "rov_creature_sverm_worker_name": "Seeker Worker", + "rov_item_aswid_bloodcore_desc": "A knot of clotted blood kept beating by something that is not a heart. The dead trade them; only the dead know how they are made.", + "rov_item_aswid_bloodcore_name": "Blood Core", + "rov_item_aswid_bloodessence_desc": "Blood rendered down to what it actually is. The only real food an Aswid can still chew, and the base of every draught worth brewing.", + "rov_item_aswid_bloodessence_name": "Blood Essence", + "rov_item_aswid_bloodpotion_desc": "Drink and the hunger stops mattering for a while. Fills every stomach with blood essence, full or not, and knits the flesh back together.", + "rov_item_aswid_bloodpotion_name": "Blood Potion", + "rov_item_aswid_bloodpotionbase_desc": "Blood, berries and crypt light, waiting on a barrel.", + "rov_item_aswid_bloodpotionbase_name": "Blood Potion Mead Base", + "rov_item_aswid_claws_desc": "Grown in the dark, and darker for it. They do not come off.", + "rov_item_aswid_claws_name": "Claws of the Beast", + "rov_item_aswid_food_desc": "The life force of the conquered.", + "rov_item_aswid_food_name": "Aswid Food:", + "rov_item_aswid_spectralclaw_desc": "A claw of pure shadow, bound to your rage rather than your grip.", + "rov_item_aswid_spectralclaw_name": "Spectral Claw", + "rov_item_aswid_superiorbloodessence_desc": "The same blood, rendered twice. Darker, thicker, and worth five of the first pass.", + "rov_item_aswid_superiorbloodessence_name": "Superior Blood Essence", + "rov_item_aswid_superiorbloodpotion_desc": "The same mercy, twice as deep.", + "rov_item_aswid_superiorbloodpotion_name": "Superior Blood Potion", + "rov_item_aswid_superiorbloodpotionbase_desc": "The twice-rendered draught, still raw.", + "rov_item_aswid_superiorbloodpotionbase_name": "Superior Blood Potion Mead Base", + "rov_item_draugh_cursedbone_desc": "A bone that will not stay quiet. The dead sell them; the dead do not say why.", + "rov_item_draugh_cursedbone_name": "Cursed Bone", + "rov_item_draugh_greatercursedbone_desc": "The same bone, older, and louder. A pile fed one of these starts keeping officers.", + "rov_item_draugh_greatercursedbone_name": "Greater Cursed Bone", + "rov_item_draugh_humanmeat_desc": "A piece of somebody. The living gag on it; you do not.", + "rov_item_draugh_humanmeat_name": "Human Meat", + "rov_item_fenrir_claws_desc": "The wolf's hands, kept on in the man's shape. They do not come off.", + "rov_item_fenrir_claws_name": "Cursed Claws", + "rov_item_fenrir_greaterulvsblod_desc": "Older blood, and further down the line. A trough given one of these starts raising something worse than ulv.", + "rov_item_fenrir_greaterulvsblod_name": "Greater Ulvsblod", + "rov_item_fenrir_ulvsblod_desc": "Wolf blood, kept warm by something that should not be able to keep anything warm. The Fenring sell it and do not explain it.", + "rov_item_fenrir_ulvsblod_name": "Ulvsblod", + "rov_item_furling_copperdust_desc": "A sack of copper ground fine. A furnace cannot tell it from ore, and it will not go through a portal either.", + "rov_item_furling_copperdust_name": "Copper Dust", + "rov_item_furling_copperflax_desc": "Flax grown in copper-poisoned soil, and it took. Useless as cloth. Grind it and see.", + "rov_item_furling_copperflax_name": "Copper Flax", + "rov_item_furling_flintberry_desc": "Not a berry, whatever it looks like. Bury one and a flint-bearing bush comes up.", + "rov_item_furling_flintberry_name": "Flintberry", + "rov_item_furling_irondust_desc": "A sack of iron ground fine. A furnace cannot tell it from ore, and it will not go through a portal either.", + "rov_item_furling_irondust_name": "Iron Dust", + "rov_item_furling_ironflax_desc": "Flax grown in iron-poisoned soil, and it took. Useless as cloth. Grind it and see.", + "rov_item_furling_ironflax_name": "Iron Flax", + "rov_item_furling_stoneberry_desc": "Not a berry, whatever it looks like. Bury one and a stone-bearing bush comes up.", + "rov_item_furling_stoneberry_name": "Stoneberry", + "rov_item_furling_tindust_desc": "A sack of tin ground fine. A furnace cannot tell it from ore, and it will not go through a portal either.", + "rov_item_furling_tindust_name": "Tin Dust", + "rov_item_furling_tinflax_desc": "Flax grown in tin-poisoned soil, and it took. Useless as cloth. Grind it and see.", + "rov_item_furling_tinflax_name": "Tin Flax", + "rov_item_skadi_greaterfrostheart_desc": "Older cold than the mountain's. The cultists sell it and will not say where they dig.", + "rov_item_skadi_greaterfrostheart_name": "Greater Frost Heart", + "rov_item_skeleton_cursedskull_desc": "A skull that keeps counting. Set it down and the ground starts answering.", + "rov_item_skeleton_cursedskull_name": "Cursed Skull", + "rov_item_skeleton_greatercursedskull_desc": "Older, and it counts higher. A pile given one of these raises the rotten too.", + "rov_item_skeleton_greatercursedskull_name": "Greater Cursed Skull", + "rov_item_skeleton_soulstone_desc": "Something is still in there, and it is still angry. Bind it to a skull and it will stand watch as long as the bones hold.", + "rov_item_skeleton_soulstone_name": "Soul Stone", + "rov_item_sverm_claws_desc": "Grown, not forged. They do not come off.", + "rov_item_sverm_claws_name": "Chitin Claws", + "rov_item_trenta_fertilizer_desc": "Everything that was meat, a month later. Press it into the soil and whatever is rooted there stops waiting.", + "rov_item_trenta_fertilizer_name": "Fertilizer", + "rov_item_trenta_heartwoodseed_desc": "A seed fed on a whole barrel of rot. Plant it and go away for a while.", + "rov_item_trenta_heartwoodseed_name": "Heartwood Seed", + "rov_item_trenta_rotseed_desc": "A seed that died before it could sprout, and did not stop. The forest folk sell them; only the forest knows what grows from one.", + "rov_item_trenta_rotseed_name": "Rot Seed", + "rov_item_trol_giantslog_desc": "A massive tree log wielded as a weapon.", + "rov_item_trol_giantslog_name": "Giant's Log", + "rov_item_trolshammer_desc": "A hammer swung by something that never had to duck through a doorway. It builds everything the ordinary one builds, out of the same materials, and simply builds it bigger.", + "rov_item_trolshammer_name": "Trol's Hammer", + "rov_item_warvulture_desc": "A vulture's head, kept. Raise it and the bird comes back under you, and it will carry you as long as you care to stay up - though it only has so much haste in it before it settles into a glide.", + "rov_item_warvulture_name": "War Vulture", + "rov_piece_aswid_bloodrefinery_desc": "Flesh goes in, bone goes in, and what is left of both comes out red.", + "rov_piece_aswid_bloodrefinery_name": "Blood Refinery", + "rov_piece_cooktable_desc": "A slab of bone and slate, worn smooth. Something patient waits by the hearth.", + "rov_piece_cooktable_name": "Cook's Table", + "rov_piece_draugh_bodypile_desc": "Feed it and it answers. The dead here are yours, if you are dead enough to ask.", + "rov_piece_draugh_bodypile_name": "Cursed Body Pile", + "rov_piece_dvergar_contractbank_desc": "A ledger, a seal and a heap of coin. Sign here and someone else does the dying.", + "rov_piece_dvergar_contractbank_name": "Contract Bank", + "rov_piece_dvergar_runebarrel_desc": "Pour a brew in and the crew drinks. What it does to them is whatever it would have done to you - if they have the parts for it.", + "rov_piece_dvergar_runebarrel_name": "Rune Barrel", + "rov_piece_fenrir_packtrough_desc": "Fill it with meat and the pack comes. One at a time, and it remembers its dead.", + "rov_piece_fenrir_packtrough_name": "Pack Trough", + "rov_piece_furling_copperflaxsapling_desc": "Plant it and it grows more Copper Flax.", + "rov_piece_furling_copperflaxsapling_name": "Copper Flax", + "rov_piece_furling_flintberrybush_desc": "Yields flint, and keeps yielding it.", + "rov_piece_furling_flintberrybush_name": "Flintberry Bush", + "rov_piece_furling_ironflaxsapling_desc": "Plant it and it grows more Iron Flax.", + "rov_piece_furling_ironflaxsapling_name": "Iron Flax", + "rov_piece_furling_stoneberrybush_desc": "Yields stone, and keeps yielding it.", + "rov_piece_furling_stoneberrybush_name": "Stoneberry Bush", + "rov_piece_furling_tinflaxsapling_desc": "Plant it and it grows more Tin Flax.", + "rov_piece_furling_tinflaxsapling_name": "Tin Flax", + "rov_piece_racemenuward_desc": "Commune with your heritage. Offer a fallen boss's relic to claim its power.", + "rov_piece_racemenuward_name": "Race Menu Ward", + "rov_piece_skadi_crystalgolem_desc": "Cut at the stone and woken with a tear. It will not follow you, and it will not leave the stonecutter that shaped it.", + "rov_piece_skeleton_bonepile_desc": "Twenty fragments buy a place in the line. The one who fills it will keep standing up.", + "rov_piece_skeleton_bonepile_name": "Bound Bone Pile", + "rov_piece_skeleton_sentry_desc": "A skull on a soul stone. It will not walk, and it will not stop watching.", + "rov_piece_smithtable_desc": "A slab of bone and slate, dusted with ore. Something patient waits by the fires.", + "rov_piece_smithtable_name": "Smith's Table", + "rov_piece_sverm_broodmound_desc": "The colony begins here. Everything else grows out of it.", + "rov_piece_sverm_broodmound_name": "Brood Mound", + "rov_piece_sverm_hivemarket_desc": "Where the colony trades. It spends the tank of the nest it stands in.", + "rov_piece_sverm_hivemarket_name": "Hive Market", + "rov_piece_trenta_composter_desc": "What rots is not lost. It feeds.", + "rov_piece_trenta_composter_name": "Composter", + "rov_piece_trenta_elderroot_desc": "What the Elder left behind, still growing. Mends itself, and everything a player built close enough to it.", + "rov_piece_trenta_elderroot_name": "Root of the Elder", + "rov_piece_trenta_heartwoodgrove_desc": "A crate of rot with something growing out of it. Give it time.", + "rov_piece_trenta_heartwoodgrove_name": "Heartwood Grove", + "rov_piece_trenta_heartwoodsapling_name": "Heartwood Sapling", + "rov_piece_trol_wartotem_desc": "A head that still remembers how to shout. Coin goes in, a warband walks out.", + "rov_piece_trol_wartotem_name": "War Totem" +} diff --git a/JotunnModStub/Translations/Italian/items.json b/JotunnModStub/Translations/Italian/items.json new file mode 100644 index 0000000..40e5ddd --- /dev/null +++ b/JotunnModStub/Translations/Italian/items.json @@ -0,0 +1,131 @@ +{ + "rov_creature_bonecook_name": "Cuoco d'ossa", + "rov_creature_bonesmith_name": "Fabbro d'ossa", + "rov_creature_draugh_thrall_name": "Servo Draugr", + "rov_creature_draugh_thrallelite_name": "Servo Draugr d'élite", + "rov_creature_fenrir_pack_desc": "Risponde al sangue del lupo, non a te.", + "rov_creature_fenrir_packfenrir_desc": "Solo il sangue del lupo comanda questo.", + "rov_creature_fenrir_packfenrir_name": "Fenrir", + "rov_creature_fenrir_packulv_name": "Ulv", + "rov_creature_fenrir_packwolf_name": "Lupo del branco", + "rov_creature_skadi_crystalgolem_name": "Golem di cristallo", + "rov_creature_skeleton_sentry_name": "Sentinella vincolata", + "rov_creature_skeleton_thrallmelee_name": "Scheletro vincolato", + "rov_creature_skeleton_thrallrancid_name": "Resti rancidi vincolati", + "rov_creature_skeleton_thrallranged_name": "Arciere vincolato", + "rov_creature_sverm_blistertick_name": "Zecca vescicante", + "rov_creature_sverm_worker_name": "Operaio cercatore", + "rov_item_aswid_bloodcore_desc": "Un grumo di sangue rappreso che batte ancora, tenuto in vita da qualcosa che non è un cuore. I morti lo commerciano; solo i morti sanno come si fa.", + "rov_item_aswid_bloodcore_name": "Nucleo di sangue", + "rov_item_aswid_bloodessence_desc": "Sangue ridotto a ciò che è davvero. L'unico vero cibo che un Aswid riesce ancora a masticare, e la base di ogni pozione che valga la pena distillare.", + "rov_item_aswid_bloodessence_name": "Essenza di sangue", + "rov_item_aswid_bloodpotion_desc": "Bevi e la fame smette di contare per un po'. Riempie ogni stomaco di essenza di sangue, pieno o no, e ricuce la carne.", + "rov_item_aswid_bloodpotion_name": "Pozione di sangue", + "rov_item_aswid_bloodpotionbase_desc": "Sangue, bacche e luce di cripta, in attesa in un barile.", + "rov_item_aswid_bloodpotionbase_name": "Base per pozione di sangue", + "rov_item_aswid_claws_desc": "Cresciuti nel buio, e più scuri per questo. Non si staccano.", + "rov_item_aswid_claws_name": "Artigli della Bestia", + "rov_item_aswid_food_desc": "La forza vitale dei vinti.", + "rov_item_aswid_food_name": "Cibo Aswid:", + "rov_item_aswid_spectralclaw_desc": "Un artiglio di pura ombra, legato alla tua furia più che alla tua presa.", + "rov_item_aswid_spectralclaw_name": "Artiglio spettrale", + "rov_item_aswid_superiorbloodessence_desc": "Lo stesso sangue, ridotto due volte. Più scuro, più denso, e vale cinque volte il primo passaggio.", + "rov_item_aswid_superiorbloodessence_name": "Essenza di sangue superiore", + "rov_item_aswid_superiorbloodpotion_desc": "La stessa pietà, due volte più profonda.", + "rov_item_aswid_superiorbloodpotion_name": "Pozione di sangue superiore", + "rov_item_aswid_superiorbloodpotionbase_desc": "L'infuso ridotto due volte, ancora crudo.", + "rov_item_aswid_superiorbloodpotionbase_name": "Base per pozione di sangue superiore", + "rov_item_draugh_cursedbone_desc": "Un osso che non vuole stare zitto. I morti lo vendono; i morti non dicono perché.", + "rov_item_draugh_cursedbone_name": "Osso maledetto", + "rov_item_draugh_greatercursedbone_desc": "Lo stesso osso, più vecchio e più rumoroso. Un mucchio nutrito con uno di questi comincia a tenere ufficiali.", + "rov_item_draugh_greatercursedbone_name": "Osso maledetto superiore", + "rov_item_draugh_humanmeat_desc": "Un pezzo di qualcuno. Ai vivi viene il voltastomaco; a te no.", + "rov_item_draugh_humanmeat_name": "Carne umana", + "rov_item_fenrir_claws_desc": "Le mani del lupo, rimaste nella forma dell'uomo. Non si staccano.", + "rov_item_fenrir_claws_name": "Artigli maledetti", + "rov_item_fenrir_greaterulvsblod_desc": "Sangue più antico, più in basso nella discendenza. Una mangiatoia che ne riceve uno comincia a far nascere qualcosa di peggio di un ulv.", + "rov_item_fenrir_greaterulvsblod_name": "Ulvsblod superiore", + "rov_item_fenrir_ulvsblod_desc": "Sangue di lupo, tenuto caldo da qualcosa che non dovrebbe poter scaldare niente. I Fenring lo vendono e non lo spiegano.", + "rov_item_fenrir_ulvsblod_name": "Ulvsblod", + "rov_item_furling_copperdust_desc": "Un sacco di rame macinato fine. Una fornace non lo distingue dal minerale, e non passa nemmeno da un portale.", + "rov_item_furling_copperdust_name": "Polvere di rame", + "rov_item_furling_copperflax_desc": "Lino cresciuto in un terreno avvelenato dal rame, e ha attecchito. Inutile come stoffa. Macinalo e vedrai.", + "rov_item_furling_copperflax_name": "Lino di rame", + "rov_item_furling_flintberry_desc": "Non è una bacca, anche se ci somiglia. Seppelliscine una e spunta un cespuglio che dà selce.", + "rov_item_furling_flintberry_name": "Bacca di selce", + "rov_item_furling_irondust_desc": "Un sacco di ferro macinato fine. Una fornace non lo distingue dal minerale, e non passa nemmeno da un portale.", + "rov_item_furling_irondust_name": "Polvere di ferro", + "rov_item_furling_ironflax_desc": "Lino cresciuto in un terreno avvelenato dal ferro, e ha attecchito. Inutile come stoffa. Macinalo e vedrai.", + "rov_item_furling_ironflax_name": "Lino di ferro", + "rov_item_furling_stoneberry_desc": "Non è una bacca, anche se ci somiglia. Seppelliscine una e spunta un cespuglio che dà pietra.", + "rov_item_furling_stoneberry_name": "Bacca di pietra", + "rov_item_furling_tindust_desc": "Un sacco di stagno macinato fine. Una fornace non lo distingue dal minerale, e non passa nemmeno da un portale.", + "rov_item_furling_tindust_name": "Polvere di stagno", + "rov_item_furling_tinflax_desc": "Lino cresciuto in un terreno avvelenato dallo stagno, e ha attecchito. Inutile come stoffa. Macinalo e vedrai.", + "rov_item_furling_tinflax_name": "Lino di stagno", + "rov_item_skadi_greaterfrostheart_desc": "Un freddo più antico di quello della montagna. I cultisti lo vendono e non dicono dove scavano.", + "rov_item_skadi_greaterfrostheart_name": "Cuore di gelo superiore", + "rov_item_skeleton_cursedskull_desc": "Un teschio che continua a contare. Posalo e il terreno comincia a rispondere.", + "rov_item_skeleton_cursedskull_name": "Teschio maledetto", + "rov_item_skeleton_greatercursedskull_desc": "Più vecchio, e conta più in alto. Un mucchio che ne riceve uno fa risorgere anche i rancidi.", + "rov_item_skeleton_greatercursedskull_name": "Teschio maledetto superiore", + "rov_item_skeleton_soulstone_desc": "Là dentro c'è ancora qualcosa, ed è ancora arrabbiato. Legalo a un teschio e farà la guardia finché le ossa reggono.", + "rov_item_skeleton_soulstone_name": "Pietra dell'anima", + "rov_item_sverm_claws_desc": "Cresciuti, non forgiati. Non si staccano.", + "rov_item_sverm_claws_name": "Artigli di chitina", + "rov_item_trenta_fertilizer_desc": "Tutto ciò che era carne, un mese dopo. Premilo nel terreno e ciò che vi è radicato smette di aspettare.", + "rov_item_trenta_fertilizer_name": "Fertilizzante", + "rov_item_trenta_heartwoodseed_desc": "Un seme nutrito con un intero barile di marciume. Piantalo e vattene per un po'.", + "rov_item_trenta_heartwoodseed_name": "Seme di durame", + "rov_item_trenta_rotseed_desc": "Un seme morto prima di germogliare, che non si è fermato. Il popolo della foresta li vende; solo la foresta sa cosa ne cresce.", + "rov_item_trenta_rotseed_name": "Seme marcio", + "rov_item_trol_giantslog_desc": "Un enorme tronco d'albero brandito come arma.", + "rov_item_trol_giantslog_name": "Tronco del gigante", + "rov_item_trolshammer_desc": "Un martello brandito da qualcosa che non ha mai dovuto chinarsi sotto una porta. Costruisce tutto ciò che costruisce quello normale, con gli stessi materiali, e lo fa semplicemente più grande.", + "rov_item_trolshammer_name": "Martello del Trol", + "rov_item_warvulture_desc": "La testa di un avvoltoio, conservata. Sollevala e l'uccello torna sotto di te, e ti porterà finché vorrai restare in aria, anche se ha solo un po' di slancio prima di mettersi a planare.", + "rov_item_warvulture_name": "Avvoltoio da guerra", + "rov_piece_aswid_bloodrefinery_desc": "Entra carne, entra osso, e quel che resta di entrambi esce rosso.", + "rov_piece_aswid_bloodrefinery_name": "Raffineria di sangue", + "rov_piece_cooktable_desc": "Una lastra di osso e ardesia, consumata dall'uso. Qualcosa di paziente aspetta accanto al focolare.", + "rov_piece_cooktable_name": "Tavolo del cuoco", + "rov_piece_draugh_bodypile_desc": "Nutrilo e risponde. I morti qui sono tuoi, se sei abbastanza morto da chiederlo.", + "rov_piece_draugh_bodypile_name": "Mucchio di corpi maledetto", + "rov_piece_dvergar_contractbank_desc": "Un registro, un sigillo e un mucchio di monete. Firma qui e a morire ci pensa qualcun altro.", + "rov_piece_dvergar_contractbank_name": "Banca dei contratti", + "rov_piece_dvergar_runebarrel_desc": "Versaci una bevanda e la squadra beve. Quello che fa a loro è quello che avrebbe fatto a te, se hanno i pezzi giusti.", + "rov_piece_dvergar_runebarrel_name": "Barile runico", + "rov_piece_fenrir_packtrough_desc": "Riempila di carne e il branco arriva. Uno alla volta, e ricorda i suoi morti.", + "rov_piece_fenrir_packtrough_name": "Mangiatoia del branco", + "rov_piece_furling_copperflaxsapling_desc": "Piantalo e crescerà altro lino di rame.", + "rov_piece_furling_copperflaxsapling_name": "Lino di rame", + "rov_piece_furling_flintberrybush_desc": "Dà selce, e continua a darla.", + "rov_piece_furling_flintberrybush_name": "Cespuglio di bacche di selce", + "rov_piece_furling_ironflaxsapling_desc": "Piantalo e crescerà altro lino di ferro.", + "rov_piece_furling_ironflaxsapling_name": "Lino di ferro", + "rov_piece_furling_stoneberrybush_desc": "Dà pietra, e continua a darla.", + "rov_piece_furling_stoneberrybush_name": "Cespuglio di bacche di pietra", + "rov_piece_furling_tinflaxsapling_desc": "Piantalo e crescerà altro lino di stagno.", + "rov_piece_furling_tinflaxsapling_name": "Lino di stagno", + "rov_piece_racemenuward_desc": "Entra in comunione con la tua stirpe. Offri la reliquia di un boss caduto per reclamarne il potere.", + "rov_piece_racemenuward_name": "Sigillo della razza", + "rov_piece_skadi_crystalgolem_desc": "Tagliato dalla pietra e risvegliato con una lacrima. Non ti seguirà, e non lascerà lo scalpellino che l'ha plasmato.", + "rov_piece_skeleton_bonepile_desc": "Venti frammenti comprano un posto nella fila. Chi lo occupa continuerà a rialzarsi.", + "rov_piece_skeleton_bonepile_name": "Mucchio d'ossa vincolato", + "rov_piece_skeleton_sentry_desc": "Un teschio su una pietra dell'anima. Non camminerà, e non smetterà di guardare.", + "rov_piece_smithtable_desc": "Una lastra di osso e ardesia, spolverata di minerale. Qualcosa di paziente aspetta accanto ai fuochi.", + "rov_piece_smithtable_name": "Tavolo del fabbro", + "rov_piece_sverm_broodmound_desc": "La colonia comincia qui. Tutto il resto cresce da questo.", + "rov_piece_sverm_broodmound_name": "Cumulo della covata", + "rov_piece_sverm_hivemarket_desc": "Dove la colonia commercia. Spende la riserva del nido in cui si trova.", + "rov_piece_sverm_hivemarket_name": "Mercato dell'alveare", + "rov_piece_trenta_composter_desc": "Ciò che marcisce non è perduto. Nutre.", + "rov_piece_trenta_composter_name": "Compostiera", + "rov_piece_trenta_elderroot_desc": "Ciò che l'Antico si è lasciato dietro, ancora in crescita. Si ripara da sé, e ripara tutto ciò che un giocatore ha costruito abbastanza vicino.", + "rov_piece_trenta_elderroot_name": "Radice dell'Antico", + "rov_piece_trenta_heartwoodgrove_desc": "Una cassa di marciume con qualcosa che ci cresce dentro. Dagli tempo.", + "rov_piece_trenta_heartwoodgrove_name": "Boschetto di durame", + "rov_piece_trenta_heartwoodsapling_name": "Germoglio di durame", + "rov_piece_trol_wartotem_desc": "Una testa che ricorda ancora come si urla. Entrano monete, esce una banda da guerra.", + "rov_piece_trol_wartotem_name": "Totem di guerra" +} diff --git a/JotunnModStub/Trenta/TrentaComposter.cs b/JotunnModStub/Trenta/TrentaComposter.cs index 92ddd18..914ec5e 100644 --- a/JotunnModStub/Trenta/TrentaComposter.cs +++ b/JotunnModStub/Trenta/TrentaComposter.cs @@ -100,8 +100,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = TrentaConfig.RotSeedDisplayName; - shared.m_description = "A seed that died before it could sprout, and did not stop. " + - "The forest folk sell them; only the forest knows what grows from one."; + shared.m_description = "$rov_item_trenta_rotseed_desc"; shared.m_itemType = ItemDrop.ItemData.ItemType.Material; shared.m_weight = 0.5f; shared.m_maxStackSize = 20; @@ -125,8 +124,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = TrentaConfig.FertilizerDisplayName; - shared.m_description = "Everything that was meat, a month later. Press it into the soil and " + - "whatever is rooted there stops waiting."; + shared.m_description = "$rov_item_trenta_fertilizer_desc"; // Consumable, not Material, and this is the only reason: a Material never reaches // Humanoid.UseItem - vanilla refuses it before that - while a Consumable does, which is @@ -223,7 +221,7 @@ namespace RacesOfValheim PieceConfig config = new PieceConfig { Name = TrentaConfig.ComposterDisplayName, - Description = "What rots is not lost. It feeds.", + Description = "$rov_piece_trenta_composter_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Requirements = new[] diff --git a/JotunnModStub/Trenta/TrentaConfig.cs b/JotunnModStub/Trenta/TrentaConfig.cs index f395a6e..35fc25d 100644 --- a/JotunnModStub/Trenta/TrentaConfig.cs +++ b/JotunnModStub/Trenta/TrentaConfig.cs @@ -405,13 +405,13 @@ namespace RacesOfValheim // The chain: a Rot Seed bought from the Greydwarf faction bench gates the Composter, the // Composter rots raw flesh into Fertilizer, and Fertilizer grows any plant on the spot. public const string ComposterPieceName = "TrentaComposter"; - public const string ComposterDisplayName = "Composter"; + public const string ComposterDisplayName = "$rov_piece_trenta_composter_name"; public const string FertilizerName = "Fertilizer"; - public const string FertilizerDisplayName = "Fertilizer"; + public const string FertilizerDisplayName = "$rov_item_trenta_fertilizer_name"; public const string RotSeedName = "RotSeed"; - public const string RotSeedDisplayName = "Rot Seed"; + public const string RotSeedDisplayName = "$rov_item_trenta_rotseed_name"; // Same band as the Aswid's Blood Core, which does the same job for the same reason. public const int RotSeedPrice = 500; @@ -452,7 +452,7 @@ namespace RacesOfValheim // point would need if it had one: this is a race identity piece, not a purchase from // someone else's bench (see the War Totem's own note on the same choice). public const string ElderRootPieceName = "TrentaElderRoot"; - public const string ElderRootDisplayName = "Root of the Elder"; + public const string ElderRootDisplayName = "$rov_piece_trenta_elderroot_name"; public const int ElderRootUnlockState = 3; // The Elder dead @@ -507,11 +507,11 @@ namespace RacesOfValheim // Plant a seed, wait, and the tree that comes up fertilises what surrounds it, stings what // approaches it, and fills a chest with honey. Three independent functions on one piece. public const string GroveSeedName = "HeartwoodSeed"; - public const string GroveSeedDisplayName = "Heartwood Seed"; + public const string GroveSeedDisplayName = "$rov_item_trenta_heartwoodseed_name"; public const string GroveSaplingPieceName = "TrentaHeartwoodSapling"; - public const string GroveSaplingDisplayName = "Heartwood Sapling"; + public const string GroveSaplingDisplayName = "$rov_piece_trenta_heartwoodsapling_name"; public const string GrovePieceName = "TrentaHeartwoodGrove"; - public const string GroveDisplayName = "Heartwood Grove"; + public const string GroveDisplayName = "$rov_piece_trenta_heartwoodgrove_name"; // A grove costs exactly one full Composter batch. That is the whole balance argument. public const int GroveSeedFertilizerCost = ComposterYield; diff --git a/JotunnModStub/Trenta/TrentaElderRoot.cs b/JotunnModStub/Trenta/TrentaElderRoot.cs index ccbcc54..d36d67c 100644 --- a/JotunnModStub/Trenta/TrentaElderRoot.cs +++ b/JotunnModStub/Trenta/TrentaElderRoot.cs @@ -93,8 +93,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = TrentaConfig.ElderRootDisplayName, - Description = "What the Elder left behind, still growing. Mends itself, and " + - "everything a player built close enough to it.", + Description = "$rov_piece_trenta_elderroot_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Icon = icon, diff --git a/JotunnModStub/Trenta/TrentaHeartwoodGrove.cs b/JotunnModStub/Trenta/TrentaHeartwoodGrove.cs index aeb43c1..a8ca08c 100644 --- a/JotunnModStub/Trenta/TrentaHeartwoodGrove.cs +++ b/JotunnModStub/Trenta/TrentaHeartwoodGrove.cs @@ -58,7 +58,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = TrentaConfig.GroveSeedDisplayName; - shared.m_description = "A seed fed on a whole barrel of rot. Plant it and go away for a while."; + shared.m_description = "$rov_item_trenta_heartwoodseed_desc"; shared.m_itemType = ItemDrop.ItemData.ItemType.Material; shared.m_weight = 1f; shared.m_maxStackSize = 10; @@ -129,7 +129,7 @@ namespace RacesOfValheim PieceConfig config = new PieceConfig { Name = TrentaConfig.GroveDisplayName, - Description = "A crate of rot with something growing out of it. Give it time.", + Description = "$rov_piece_trenta_heartwoodgrove_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Misc, Requirements = new[] diff --git a/JotunnModStub/Trol/TrolRace.cs b/JotunnModStub/Trol/TrolRace.cs index 3016bca..591ca5b 100644 --- a/JotunnModStub/Trol/TrolRace.cs +++ b/JotunnModStub/Trol/TrolRace.cs @@ -77,8 +77,8 @@ namespace RacesOfValheim if (logPrefab != null) { Jotunn.Configs.ItemConfig config = new Jotunn.Configs.ItemConfig(); - config.Name = "Giant's Log"; - config.Description = "A massive tree log wielded as a weapon."; + config.Name = "$rov_item_trol_giantslog_name"; + config.Description = "$rov_item_trol_giantslog_desc"; CustomItem customWep = new CustomItem("TrolWeapon_" + logName, "MaceIron", config); if (customWep != null && customWep.ItemPrefab != null) diff --git a/JotunnModStub/Trol/TrolTotem.cs b/JotunnModStub/Trol/TrolTotem.cs index b4beb46..512437b 100644 --- a/JotunnModStub/Trol/TrolTotem.cs +++ b/JotunnModStub/Trol/TrolTotem.cs @@ -26,7 +26,7 @@ namespace RacesOfValheim public static class TrolTotem { public const string PieceName = "TrolWarTotem"; - public const string PieceDisplayName = "War Totem"; + public const string PieceDisplayName = "$rov_piece_trol_wartotem_name"; public const string RaceId = "Trol"; /// Core wood. The item is RoundLog - another display name that does not predict the id. @@ -313,7 +313,7 @@ namespace RacesOfValheim PieceManager.Instance.AddPiece(new CustomPiece(prefab, fixReference: false, new PieceConfig { Name = PieceDisplayName, - Description = "A head that still remembers how to shout. Coin goes in, a warband walks out.", + Description = "$rov_piece_trol_wartotem_desc", PieceTable = PieceTables.Hammer, Category = PieceCategories.Crafting, Icon = BorrowIcon(TrollHead), diff --git a/JotunnModStub/TrolsHammer/TrolsHammerItem.cs b/JotunnModStub/TrolsHammer/TrolsHammerItem.cs index 5fa4076..b008b59 100644 --- a/JotunnModStub/TrolsHammer/TrolsHammerItem.cs +++ b/JotunnModStub/TrolsHammer/TrolsHammerItem.cs @@ -24,7 +24,7 @@ namespace RacesOfValheim public static class TrolsHammerItem { public const string PrefabName = "TrolsHammer"; - public const string DisplayName = "Trol's Hammer"; + public const string DisplayName = "$rov_item_trolshammer_name"; private const string SourcePrefab = "Hammer"; private const string Label = "TrolsHammer"; @@ -51,9 +51,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = DisplayName; - shared.m_description = "A hammer swung by something that never had to duck through a " + - "doorway. It builds everything the ordinary one builds, out of the " + - "same materials, and simply builds it bigger."; + shared.m_description = "$rov_item_trolshammer_desc"; if (shared.m_buildPieces == null) { diff --git a/JotunnModStub/WarVulture/WarVultureItem.cs b/JotunnModStub/WarVulture/WarVultureItem.cs index e3443d9..7b735fa 100644 --- a/JotunnModStub/WarVulture/WarVultureItem.cs +++ b/JotunnModStub/WarVulture/WarVultureItem.cs @@ -32,7 +32,7 @@ namespace RacesOfValheim public static class WarVultureItem { public const string PrefabName = "WarVulture"; - public const string DisplayName = "War Vulture"; + public const string DisplayName = "$rov_item_warvulture_name"; private const string SourcePrefab = "StaffSkeleton"; private const string TrophyPrefab = "TrophyVolture"; @@ -62,9 +62,7 @@ namespace RacesOfValheim ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared; shared.m_name = DisplayName; - shared.m_description = "A vulture's head, kept. Raise it and the bird comes back under you, " + - "and it will carry you as long as you care to stay up - though it only " + - "has so much haste in it before it settles into a glide."; + shared.m_description = "$rov_item_warvulture_desc"; shared.m_useDurability = false; // ItemType is left exactly as the vanilla staff has it: it decides the equip slot and From b0d18b0654976ddb1fe5d170e06c07658231d49c Mon Sep 17 00:00:00 2001 From: kanym Date: Sat, 26 Sep 2026 20:30:03 +0200 Subject: [PATCH 004/216] 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 --- JotunnModStub/Aswid/AswidBloodRefinery.cs | 2 +- JotunnModStub/Aswid/AswidPatches.cs | 2 +- JotunnModStub/Aswid/AswidRace.cs | 18 +- JotunnModStub/Aswid/AswidThrall.cs | 8 +- JotunnModStub/Aswid/BloodRefineryBehaviour.cs | 2 +- JotunnModStub/BossProgressionManager.cs | 20 ++ JotunnModStub/Butler/BoneServant.cs | 8 +- JotunnModStub/Butler/ServantTableBehaviour.cs | 8 +- JotunnModStub/Draugh/DraughFoodPatches.cs | 4 +- .../Draugh/DraughProgressionPatches.cs | 6 +- JotunnModStub/Draugh/DraughRace.cs | 2 +- JotunnModStub/Draugh/DraughSpawner.cs | 4 +- .../Draugh/DraughSpawnerBehaviour.cs | 12 +- JotunnModStub/Dvergar/DvergarAbilities.cs | 8 +- JotunnModStub/Dvergar/DvergarBanco.cs | 6 +- .../Dvergar/DvergarBancoBehaviour.cs | 14 +- JotunnModStub/Dvergar/DvergarBotte.cs | 2 +- .../Dvergar/DvergarBotteBehaviour.cs | 14 +- JotunnModStub/Dvergar/DvergarPatches.cs | 2 +- JotunnModStub/Fenrir/FenrirBehaviors.cs | 2 +- JotunnModStub/Fenrir/FenrirMangiatoia.cs | 2 +- .../Fenrir/FenrirMangiatoiaBehaviour.cs | 12 +- JotunnModStub/Fenrir/FenrirRace.cs | 19 +- JotunnModStub/Fenrir/FenrirStatusEffects.cs | 2 +- JotunnModStub/ModText.cs | 8 +- JotunnModStub/PieceDensityLimit.cs | 3 +- JotunnModStub/RaceCaveBuilding.cs | 2 +- JotunnModStub/RaceClaws.cs | 2 +- JotunnModStub/RaceMenuWard.cs | 8 +- JotunnModStub/RacesOfValheim.cs | 36 ++-- JotunnModStub/RaisedThrall.cs | 16 +- JotunnModStub/Skadi/DrakeFormBehavior.cs | 2 +- JotunnModStub/Skadi/SkadiGolem.cs | 10 +- JotunnModStub/Skadi/SkadiGolemBehaviour.cs | 2 +- JotunnModStub/Skadi/SkadiRace.cs | 16 +- JotunnModStub/Skeleton/SkeletonBonePile.cs | 4 +- .../Skeleton/SkeletonBonePileBehaviour.cs | 18 +- JotunnModStub/Skeleton/SkeletonPatches.cs | 6 +- JotunnModStub/Sverm/SvermBlisterTick.cs | 2 +- JotunnModStub/Sverm/SvermBrood.cs | 2 +- JotunnModStub/Sverm/SvermClawSlot.cs | 2 +- JotunnModStub/Sverm/SvermFood.cs | 2 +- JotunnModStub/Sverm/SvermHive.cs | 8 +- JotunnModStub/Sverm/SvermHiveGoods.cs | 2 +- JotunnModStub/Sverm/SvermHiveStore.cs | 18 +- JotunnModStub/Sverm/SvermMedicine.cs | 2 +- JotunnModStub/Sverm/SvermPatches.cs | 2 +- JotunnModStub/Sverm/SvermRavagerForm.cs | 8 +- .../Translations/English/messages.json | 193 ++++++++++++++++++ .../Translations/Italian/messages.json | 193 ++++++++++++++++++ JotunnModStub/Trenta/ComposterBehaviour.cs | 4 +- JotunnModStub/Trenta/GroveBehaviour.cs | 4 +- JotunnModStub/Trenta/TrentaComposter.cs | 8 +- JotunnModStub/Trenta/TrentaElderRoot.cs | 4 +- JotunnModStub/Trenta/TrentaFoodPatches.cs | 2 +- JotunnModStub/Trenta/TrentaHeartwoodGrove.cs | 2 +- JotunnModStub/Trenta/TrentaMuspell.cs | 4 +- JotunnModStub/Trol/TrolLogWeapon.cs | 6 +- JotunnModStub/Trol/TrolTotem.cs | 4 +- JotunnModStub/Trol/TrolTotemBehaviour.cs | 14 +- JotunnModStub/WarVulture/WarVultureMount.cs | 8 +- 61 files changed, 606 insertions(+), 200 deletions(-) create mode 100644 JotunnModStub/Translations/English/messages.json create mode 100644 JotunnModStub/Translations/Italian/messages.json diff --git a/JotunnModStub/Aswid/AswidBloodRefinery.cs b/JotunnModStub/Aswid/AswidBloodRefinery.cs index 0e8d711..78a9867 100644 --- a/JotunnModStub/Aswid/AswidBloodRefinery.cs +++ b/JotunnModStub/Aswid/AswidBloodRefinery.cs @@ -567,7 +567,7 @@ namespace RacesOfValheim if (!AswidBloodRefinery.IsEssence(item)) return true; if (AswidRace.IsAswid()) return true; - player.Message(MessageHud.MessageType.Center, "Living blood curdles in a living throat."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_living_blood_curdles_living_throat")); return false; } } diff --git a/JotunnModStub/Aswid/AswidPatches.cs b/JotunnModStub/Aswid/AswidPatches.cs index 0bc1753..9361df9 100644 --- a/JotunnModStub/Aswid/AswidPatches.cs +++ b/JotunnModStub/Aswid/AswidPatches.cs @@ -529,7 +529,7 @@ namespace RacesOfValheim { AswidRace.DevourEnabled = !AswidRace.DevourEnabled; AswidRace.AuraEnabled = AswidRace.DevourEnabled; - string msg = AswidRace.DevourEnabled ? "Vampiric Aura: ENABLED" : "Vampiric Aura: DISABLED"; + string msg = ModText.Get(AswidRace.DevourEnabled ? "rov_msg_aswid_aura_enabled" : "rov_msg_aswid_aura_disabled"); __instance.Message(MessageHud.MessageType.Center, msg); } diff --git a/JotunnModStub/Aswid/AswidRace.cs b/JotunnModStub/Aswid/AswidRace.cs index 2ca35de..edfbdc5 100644 --- a/JotunnModStub/Aswid/AswidRace.cs +++ b/JotunnModStub/Aswid/AswidRace.cs @@ -338,11 +338,11 @@ namespace RacesOfValheim { if (isNight) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "what a horrible night to have a curse"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_what_horrible_night_have_curse")); } else { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "The morning sun has vanquished the horrible night"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_morning_sun_has_vanquished_horrible")); } } wasNight = isNight; @@ -431,7 +431,7 @@ namespace RacesOfValheim if (IsTransformed && !isTransformingSequence && activeRules != null && activeRules.NeedsNight && EnvMan.instance != null && EnvMan.IsDay()) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "The morning sun drives the bat back into your body"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_morning_sun_drives_bat_back")); StartCoroutine(RevertToHumanRoutine()); } } @@ -534,7 +534,7 @@ namespace RacesOfValheim // sunrise must always be able to turn back. if (rules.NeedsNight && (EnvMan.instance == null || !EnvMan.IsNight())) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "The sun burns. You can only take bat form at night."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_sun_burns_can_only_take")); return; } @@ -844,7 +844,7 @@ namespace RacesOfValheim c.SetTamed(true); HarmonyLib.Traverse.Create(tameable).Method("Tame").GetValue(); // attempt to call Tame for VFX if it exists tameable.Command(Player.m_localPlayer); - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Tamed!"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_tamed")); } } } @@ -863,7 +863,7 @@ namespace RacesOfValheim if (Time.time - lastEclipseTime < cooldown) { int remaining = (int)(cooldown - (Time.time - lastEclipseTime)); - Player.m_localPlayer.Message(MessageHud.MessageType.Center, $"Eclipse is on cooldown. Remaining: {remaining}s"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_eclipse_cooldown_remaining_s", remaining)); return; } @@ -915,7 +915,7 @@ namespace RacesOfValheim } // Lock player for the duration of the cast (approx 2 seconds) - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "An Eclipse descends..."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_eclipse_descends")); float castTimer = 0f; while(castTimer < AswidConfig.EclipseCastTime.Value) @@ -967,7 +967,7 @@ namespace RacesOfValheim if (Player.m_localPlayer != null) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "The Eclipse has ended."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_eclipse_has_ended")); } } @@ -1160,7 +1160,7 @@ namespace RacesOfValheim if (successfullyEaten) { // Show the Vae Victis message in the center of the screen - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Vae Victis"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_vae_victis")); Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, "$msg_ate " + addedItem.m_shared.m_name); // Vae Victis XP logic - similar to Dead Raiser diff --git a/JotunnModStub/Aswid/AswidThrall.cs b/JotunnModStub/Aswid/AswidThrall.cs index 35d1562..638ce4e 100644 --- a/JotunnModStub/Aswid/AswidThrall.cs +++ b/JotunnModStub/Aswid/AswidThrall.cs @@ -81,12 +81,12 @@ namespace RacesOfValheim if (m_ai.GetFollowTarget() == user.gameObject) { m_ai.SetFollowTarget(null); - user.Message(MessageHud.MessageType.Center, $"{m_character.m_name} is staying."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_staying", m_character.m_name)); } else { m_ai.SetFollowTarget(user.gameObject); - user.Message(MessageHud.MessageType.Center, $"{m_character.m_name} is following."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_following", m_character.m_name)); } } return true; @@ -98,7 +98,7 @@ namespace RacesOfValheim float cooldown = AswidRace.GetEnslaveCooldown(); if (cooldown > 0) { - user.Message(MessageHud.MessageType.Center, $"Dominate on cooldown ({Mathf.CeilToInt(cooldown / 60f)}m {Mathf.CeilToInt(cooldown % 60f)}s)"); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_dominate_cooldown_m_s", Mathf.CeilToInt(cooldown / 60f), Mathf.CeilToInt(cooldown % 60f))); return false; } @@ -123,7 +123,7 @@ namespace RacesOfValheim GameObject vfx = ZNetScene.instance.GetPrefab("vfx_corpse_destruction_medium"); if (vfx) Instantiate(vfx, m_character.transform.position, Quaternion.identity); - user.Message(MessageHud.MessageType.Center, $"{m_character.m_name} dominated!"); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_dominated", m_character.m_name)); return true; } diff --git a/JotunnModStub/Aswid/BloodRefineryBehaviour.cs b/JotunnModStub/Aswid/BloodRefineryBehaviour.cs index d06b47b..ada6820 100644 --- a/JotunnModStub/Aswid/BloodRefineryBehaviour.cs +++ b/JotunnModStub/Aswid/BloodRefineryBehaviour.cs @@ -98,7 +98,7 @@ namespace RacesOfValheim if (item == null) item = FindUsable(inventory, isMeat); if (item == null) { - user.Message(MessageHud.MessageType.Center, isMeat ? "No raw flesh to render." : "No bone to grind."); + user.Message(MessageHud.MessageType.Center, (isMeat ? ModText.Get("rov_msg_aswid_no_raw_flesh_render") : ModText.Get("rov_msg_aswid_no_bone_grind"))); return false; } diff --git a/JotunnModStub/BossProgressionManager.cs b/JotunnModStub/BossProgressionManager.cs index 27e492e..cc7f2ad 100644 --- a/JotunnModStub/BossProgressionManager.cs +++ b/JotunnModStub/BossProgressionManager.cs @@ -39,6 +39,26 @@ namespace RacesOfValheim { "FaderDrop", 8 } // Fader - Fader relic }; + /// + /// The boss's name as the game's own localization token, for text shown to players: + /// Valheim translates it wherever it is localized, so "The Elder" arrives in every language. + /// GetBossNameForState stays English, for logs and anything not localized. + /// + public static string GetBossTokenForState(int state) + { + switch (state) + { + case 2: return "$enemy_eikthyr"; + case 3: return "$enemy_gdking"; + case 4: return "$enemy_bonemass"; + case 5: return "$enemy_dragon"; + case 6: return "$enemy_goblinking"; + case 7: return "$enemy_seekerqueen"; + case 8: return "$enemy_fader"; + default: return GetBossNameForState(state); + } + } + public static string GetBossNameForState(int state) { switch (state) diff --git a/JotunnModStub/Butler/BoneServant.cs b/JotunnModStub/Butler/BoneServant.cs index 8c7a0a3..6126d1d 100644 --- a/JotunnModStub/Butler/BoneServant.cs +++ b/JotunnModStub/Butler/BoneServant.cs @@ -94,7 +94,7 @@ namespace RacesOfValheim "Coal"); PieceDensityLimit.Register(SmithTableName, TableSpacing, 1, - "Another smith's table stands within forty paces. One smith to a yard."); + "rov_msg_build_limit_smithtable"); // Two races, and it is the wider of the two locks: the Skeleton raises the dead to work // for it, and Skadi's hold is a forge under ice. @@ -105,7 +105,7 @@ namespace RacesOfValheim if (player != null) { player.Message(MessageHud.MessageType.Center, - "The bones do not answer to your blood."); + ModText.Get("rov_msg_butler_bones_do_not_answer_blood")); } return false; }); @@ -118,7 +118,7 @@ namespace RacesOfValheim "CookedMeat"); PieceDensityLimit.Register(CookTableName, TableSpacing, 1, - "Another cook's table stands within forty paces. One cook to a yard."); + "rov_msg_build_limit_cooktable"); // Skadi alone. A hearth kept by something dead is hers, not the Skeleton's. PieceDensityLimit.RegisterGate(CookTableName, (player, position) => @@ -128,7 +128,7 @@ namespace RacesOfValheim if (player != null) { player.Message(MessageHud.MessageType.Center, - "Only Skadi's hearth is kept by the dead."); + ModText.Get("rov_msg_butler_only_skadi_s_hearth_kept")); } return false; }); diff --git a/JotunnModStub/Butler/ServantTableBehaviour.cs b/JotunnModStub/Butler/ServantTableBehaviour.cs index 6aab038..bac4a73 100644 --- a/JotunnModStub/Butler/ServantTableBehaviour.cs +++ b/JotunnModStub/Butler/ServantTableBehaviour.cs @@ -70,7 +70,7 @@ namespace RacesOfValheim if (Servant() != null) { - player.Message(MessageHud.MessageType.Center, "It is already at work."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_butler_already_at_work")); return false; } @@ -78,7 +78,7 @@ namespace RacesOfValheim if (wait > 0f) { player.Message(MessageHud.MessageType.Center, - $"The bones are not ready. {Mathf.CeilToInt(wait)}s."); + ModText.Get("rov_msg_butler_bones_are_not_ready_s", Mathf.CeilToInt(wait))); return false; } @@ -94,7 +94,7 @@ namespace RacesOfValheim if (prefab == null) { Jotunn.Logger.LogWarning($"[Butler] No '{m_servantPrefab}' in ZNetScene; nothing was raised."); - player.Message(MessageHud.MessageType.Center, "Nothing answers."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_butler_nothing_answers")); return false; } @@ -109,7 +109,7 @@ namespace RacesOfValheim if (ZNet.instance != null) m_nview.GetZDO().Set(KeyLastRaise, ZNet.instance.GetTime().Ticks); - player.Message(MessageHud.MessageType.Center, "The servant rises."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_butler_servant_rises")); return true; } diff --git a/JotunnModStub/Draugh/DraughFoodPatches.cs b/JotunnModStub/Draugh/DraughFoodPatches.cs index 847a615..f6d7fe7 100644 --- a/JotunnModStub/Draugh/DraughFoodPatches.cs +++ b/JotunnModStub/Draugh/DraughFoodPatches.cs @@ -42,7 +42,7 @@ namespace RacesOfValheim { if (!DraughRace.IsDraugh()) { - player.Message(MessageHud.MessageType.Center, "This rotting flesh is fatal to the living."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_this_rotting_flesh_fatal_living")); return false; // Block consumption } // If it IS a Draugh, let them consume it via native mechanics @@ -101,7 +101,7 @@ namespace RacesOfValheim bool isFood = item.m_shared.m_food > 0 || item.m_shared.m_foodStamina > 0 || item.m_shared.m_foodEitr > 0; if (isFood) { - player.Message(MessageHud.MessageType.Center, "Draugr consume only raw flesh, eyes, entrails or blood."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_draugr_consume_only_raw_flesh")); return false; // Block it } } diff --git a/JotunnModStub/Draugh/DraughProgressionPatches.cs b/JotunnModStub/Draugh/DraughProgressionPatches.cs index eaa8357..26743f5 100644 --- a/JotunnModStub/Draugh/DraughProgressionPatches.cs +++ b/JotunnModStub/Draugh/DraughProgressionPatches.cs @@ -153,7 +153,7 @@ namespace RacesOfValheim } } - Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, "The northern wind blows"); + Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, ModText.Get("rov_msg_draugh_northern_wind_blows")); } } } @@ -312,7 +312,7 @@ namespace RacesOfValheim if (prefab != null) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Swarm of Terror!"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_swarm_terror")); for (int i = 0; i < DraughConfig.SwarmSpawnCount.Value; i++) { @@ -356,7 +356,7 @@ namespace RacesOfValheim float healAmount = Player.m_localPlayer.GetMaxHealth() * DraughConfig.StealBreathHealPercent.Value; Player.m_localPlayer.Heal(healAmount); - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Steal Their Breath! Death is denied."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_steal_their_breath_death_denied")); // Restore visuals immediately if (Player.m_localPlayer.GetComponent() != null) diff --git a/JotunnModStub/Draugh/DraughRace.cs b/JotunnModStub/Draugh/DraughRace.cs index 9362f5c..f654eac 100644 --- a/JotunnModStub/Draugh/DraughRace.cs +++ b/JotunnModStub/Draugh/DraughRace.cs @@ -133,7 +133,7 @@ namespace RacesOfValheim public System.Collections.IEnumerator UndyingWillRoutine(Player p) { - p.Message(MessageHud.MessageType.Center, "Zombie Ritual Activated! Your borrowed time is fading..."); + p.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_zombie_ritual_activated_borrowed_time")); // Trigger a re-evaluation of visuals to apply the ghost effect if (p.GetComponent() != null) diff --git a/JotunnModStub/Draugh/DraughSpawner.cs b/JotunnModStub/Draugh/DraughSpawner.cs index 9e00fd5..a2604b2 100644 --- a/JotunnModStub/Draugh/DraughSpawner.cs +++ b/JotunnModStub/Draugh/DraughSpawner.cs @@ -129,7 +129,7 @@ namespace RacesOfValheim PieceDensityLimit.Register(PieceName, PieceDensityLimit.RadiusForArea(DensityAreaKm2), MaxPilesInRange, - "The ground here already carries {0} of these. Find another country."); + "rov_msg_build_limit_draugh_bodypile"); } // ---------------------------------------------------------------- items @@ -201,7 +201,7 @@ namespace RacesOfValheim thrall.m_maxFollowers = maxFollowers; thrall.m_witherSeconds = OrphanWitherSeconds; thrall.m_homeCheckRange = HomeCheckRange; - thrall.m_refusalMessage = "The dead do not take orders from the living."; + thrall.m_refusalMessage = "$rov_msg_thrall_refusal_draugh"; PrefabManager.Instance.AddPrefab(prefab); } diff --git a/JotunnModStub/Draugh/DraughSpawnerBehaviour.cs b/JotunnModStub/Draugh/DraughSpawnerBehaviour.cs index faf40ee..39b1dd7 100644 --- a/JotunnModStub/Draugh/DraughSpawnerBehaviour.cs +++ b/JotunnModStub/Draugh/DraughSpawnerBehaviour.cs @@ -82,7 +82,7 @@ namespace RacesOfValheim if (item == null) item = FindAnyInput(inventory); if (item == null) { - user.Message(MessageHud.MessageType.Center, "It wants flesh, or the head of one of its own."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_wants_flesh_or_head_one")); return false; } @@ -93,7 +93,7 @@ namespace RacesOfValheim if (prefabName == DraughSpawner.TrophyDraugrElite && !IsUpgraded()) { - user.Message(MessageHud.MessageType.Center, "This pile keeps no officers yet."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_this_pile_keeps_no_officers")); return false; } @@ -162,19 +162,19 @@ namespace RacesOfValheim { if (IsUpgraded()) { - user.Message(MessageHud.MessageType.Center, "It has already had one."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_has_already_had_one")); return false; } if (BossProgressionManager.GetCurrentProgressionState() < DraughSpawner.UpgradeProgressionState) { - user.Message(MessageHud.MessageType.Center, "The bone will not wake. Something older has to fall first."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_bone_will_not_wake_something")); return false; } inventory.RemoveItem(item, 1); m_nview.InvokeRPC("RoV_DraughUpgrade"); - user.Message(MessageHud.MessageType.Center, "The pile stirs. It will keep officers now."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_draugh_pile_stirs_will_keep_officers")); return true; } @@ -294,7 +294,7 @@ namespace RacesOfValheim if (bound.Count > 0 && Player.m_localPlayer != null) { Player.m_localPlayer.Message(MessageHud.MessageType.Center, - $"The pile is broken. {bound.Count} will not outlast it by more than a minute."); + ModText.Get("rov_msg_draugh_pile_broken_will_not_outlast", bound.Count)); } SetFlesh(0f); diff --git a/JotunnModStub/Dvergar/DvergarAbilities.cs b/JotunnModStub/Dvergar/DvergarAbilities.cs index 11cc807..63daff3 100644 --- a/JotunnModStub/Dvergar/DvergarAbilities.cs +++ b/JotunnModStub/Dvergar/DvergarAbilities.cs @@ -45,7 +45,7 @@ namespace RacesOfValheim if (player.GetEitr() < DvergarConfig.RunicPingEitrCost) { - player.Message(MessageHud.MessageType.Center, "Not enough eitr"); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_not_enough_eitr")); return; } @@ -55,7 +55,7 @@ namespace RacesOfValheim int marked = MarkSurroundings(player); player.Message(MessageHud.MessageType.Center, - marked > 0 ? $"Runic Ping: {marked} echoes answer" : "Runic Ping: the stone is silent"); + (marked > 0 ? ModText.Get("rov_msg_dvergar_runic_ping_echoes_answer", marked) : ModText.Get("rov_msg_dvergar_runic_ping_stone_silent"))); } /// @@ -173,7 +173,7 @@ namespace RacesOfValheim if (player.GetEitr() < DvergarConfig.RunicOverchargeEitrCost) { - player.Message(MessageHud.MessageType.Center, "Not enough eitr"); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_not_enough_eitr")); return; } @@ -186,7 +186,7 @@ namespace RacesOfValheim // The charge is held, not permanent: it lapses if no favoured blow lands in time. if (se != null) se.m_ttl = DvergarConfig.RunicOverchargeWindow; - player.Message(MessageHud.MessageType.Center, "Runic Overcharge: your next blow is loaded"); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_runic_overcharge_next_blow_loaded")); } /// diff --git a/JotunnModStub/Dvergar/DvergarBanco.cs b/JotunnModStub/Dvergar/DvergarBanco.cs index b18e968..98559ee 100644 --- a/JotunnModStub/Dvergar/DvergarBanco.cs +++ b/JotunnModStub/Dvergar/DvergarBanco.cs @@ -195,7 +195,7 @@ namespace RacesOfValheim PieceDensityLimit.Register(PieceName, PieceDensityLimit.RadiusForArea(DensityAreaKm2), MaxBanksInRange, - "There is already {0} contract bank within a day's walk. One ledger per valley."); + "rov_msg_build_limit_dvergar_contractbank"); } // ---------------------------------------------------------------- the hired @@ -233,7 +233,7 @@ namespace RacesOfValheim thrall.m_maxFollowers = MaxFollowers; thrall.m_witherSeconds = WitherSeconds; thrall.m_homeCheckRange = HomeCheckRange; - thrall.m_refusalMessage = "Your name is not on the contract."; + thrall.m_refusalMessage = "$rov_msg_thrall_refusal_dvergar"; // Ten seconds unhurt, then two percent a second - the sentry's regeneration, shared with // the Trol's troops and the Fenrir's pack. A dead mercenary still stays dead. @@ -412,7 +412,7 @@ namespace RacesOfValheim if (Utils.GetPrefabName(__0.gameObject) != DvergarBanco.PieceName) return true; if (DvergarRace.IsDvergar()) return true; - __instance.Message(MessageHud.MessageType.Center, "The contract is in runic. You do not sign it."); + __instance.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_contract_runic_do_not_sign")); return false; } } diff --git a/JotunnModStub/Dvergar/DvergarBancoBehaviour.cs b/JotunnModStub/Dvergar/DvergarBancoBehaviour.cs index a0646a7..cb381e0 100644 --- a/JotunnModStub/Dvergar/DvergarBancoBehaviour.cs +++ b/JotunnModStub/Dvergar/DvergarBancoBehaviour.cs @@ -66,7 +66,7 @@ namespace RacesOfValheim if (!DvergarRace.IsDvergar()) { - player.Message(MessageHud.MessageType.Center, "The ledger is not written for you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_ledger_not_written")); // With an item in hand, false makes Humanoid.UseItem cover this message with its // generic "$msg_cantuseon"; true tells it the use was handled here. return item != null; @@ -93,19 +93,19 @@ namespace RacesOfValheim { if (IsUpgraded()) { - player.Message(MessageHud.MessageType.Center, "It has already had one."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_has_already_had_one")); return true; } if (BossProgressionManager.GetCurrentProgressionState() < DvergarBanco.UpgradeProgressionState) { - player.Message(MessageHud.MessageType.Center, "Not while she still sits under the mist."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_not_while_she_still_sits")); return true; } player.GetInventory().RemoveItem(item, 1); m_nview.InvokeRPC("RoV_DvergarUpgrade"); - player.Message(MessageHud.MessageType.Center, "The ledger is rewritten. Better names sign it now."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_ledger_rewritten_better_names_sign")); return true; } @@ -119,7 +119,7 @@ namespace RacesOfValheim Trader trader = GetComponent(); if (trader == null || StoreGui.instance == null) { - player.Message(MessageHud.MessageType.Center, "The ledger is shut."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_ledger_shut")); return false; } @@ -144,7 +144,7 @@ namespace RacesOfValheim if (CountGroups() >= DvergarBanco.MaxTroops) { - player.Message(MessageHud.MessageType.Center, "Five contracts is all the ledger holds."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_five_contracts_all_ledger_holds")); return; } @@ -163,7 +163,7 @@ namespace RacesOfValheim TakeCoins(inventory, price); m_nview.InvokeRPC("RoV_DvergarHire", troop.Id); - player.Message(MessageHud.MessageType.Center, $"{troop.Display} signs on."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_signs", troop.Display)); } private const string CoinsPrefab = "Coins"; diff --git a/JotunnModStub/Dvergar/DvergarBotte.cs b/JotunnModStub/Dvergar/DvergarBotte.cs index 05ee712..e0a7953 100644 --- a/JotunnModStub/Dvergar/DvergarBotte.cs +++ b/JotunnModStub/Dvergar/DvergarBotte.cs @@ -203,7 +203,7 @@ namespace RacesOfValheim if (Utils.GetPrefabName(__0.gameObject) != DvergarBotte.PieceName) return true; if (DvergarRace.IsDvergar()) return true; - __instance.Message(MessageHud.MessageType.Center, "You do not know what goes in it."); + __instance.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_do_not_know_what_goes")); return false; } } diff --git a/JotunnModStub/Dvergar/DvergarBotteBehaviour.cs b/JotunnModStub/Dvergar/DvergarBotteBehaviour.cs index 84b810c..32d4a82 100644 --- a/JotunnModStub/Dvergar/DvergarBotteBehaviour.cs +++ b/JotunnModStub/Dvergar/DvergarBotteBehaviour.cs @@ -77,7 +77,7 @@ namespace RacesOfValheim ItemDrop.ItemData found = FindAnyBrew(inventory); if (found == null) { - player.Message(MessageHud.MessageType.Center, "It is empty, and so are you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_empty_so_are")); return false; } @@ -106,7 +106,7 @@ namespace RacesOfValheim if (!string.IsNullOrEmpty(current) && current != prefabName && GetDoses() > 0) { player.Message(MessageHud.MessageType.Center, - $"There is still {DvergarBotte.BrewDisplayName(current)} in it."); + ModText.Get("rov_msg_dvergar_there_still", DvergarBotte.BrewDisplayName(current))); return false; } @@ -151,14 +151,14 @@ namespace RacesOfValheim StatusEffect effect = DvergarBotte.BrewEffect(brew); if (effect == null) { - player.Message(MessageHud.MessageType.Center, "Whatever is in it does nothing to anyone."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_whatever_does_nothing_anyone")); return false; } List drinkers = InRange(); if (drinkers.Count == 0) { - player.Message(MessageHud.MessageType.Center, "Nobody is at the barrel."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_nobody_at_barrel")); return false; } @@ -173,16 +173,14 @@ namespace RacesOfValheim if (served == 0) { - player.Message(MessageHud.MessageType.Center, "Not a drop went down."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_dvergar_not_drop_went_down")); return false; } m_nview.InvokeRPC("RoV_DvergarBotteSpend", served); string what = DvergarBotte.BrewDisplayName(brew); - player.Message(MessageHud.MessageType.Center, served < drinkers.Count - ? $"{served} drink {what}. The barrel runs dry." - : $"{served} drink {what}."); + player.Message(MessageHud.MessageType.Center, (served < drinkers.Count ? ModText.Get("rov_msg_dvergar_drink_barrel_runs_dry", served, what) : ModText.Get("rov_msg_dvergar_drink", served, what))); return true; } diff --git a/JotunnModStub/Dvergar/DvergarPatches.cs b/JotunnModStub/Dvergar/DvergarPatches.cs index 6de3f31..de75252 100644 --- a/JotunnModStub/Dvergar/DvergarPatches.cs +++ b/JotunnModStub/Dvergar/DvergarPatches.cs @@ -110,7 +110,7 @@ namespace RacesOfValheim DvergarAbilities.ConsumeOvercharge(Player.m_localPlayer)) { ScalePhysical(hit, DvergarConfig.RunicOverchargeMultiplier); - Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, "Runic Overcharge discharges"); + Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, ModText.Get("rov_msg_dvergar_runic_overcharge_discharges")); } } diff --git a/JotunnModStub/Fenrir/FenrirBehaviors.cs b/JotunnModStub/Fenrir/FenrirBehaviors.cs index 9b13a35..9f71886 100644 --- a/JotunnModStub/Fenrir/FenrirBehaviors.cs +++ b/JotunnModStub/Fenrir/FenrirBehaviors.cs @@ -920,7 +920,7 @@ namespace RacesOfValheim lastNoEitrMessage = Time.time; Player.m_localPlayer.Message(MessageHud.MessageType.Center, - "Only breath comes out. The fire wants eitr."); + ModText.Get("rov_msg_fenrir_only_breath_comes_out_fire")); } private void StartFire() diff --git a/JotunnModStub/Fenrir/FenrirMangiatoia.cs b/JotunnModStub/Fenrir/FenrirMangiatoia.cs index b098f0a..8280607 100644 --- a/JotunnModStub/Fenrir/FenrirMangiatoia.cs +++ b/JotunnModStub/Fenrir/FenrirMangiatoia.cs @@ -155,7 +155,7 @@ namespace RacesOfValheim PieceDensityLimit.Register(PieceName, PieceDensityLimit.RadiusForArea(DensityAreaKm2), MaxTroughsInRange, - "There is already {0} of these within a day's walk. A pack needs room."); + "rov_msg_build_limit_fenrir_packtrough"); } // ---------------------------------------------------------------- items diff --git a/JotunnModStub/Fenrir/FenrirMangiatoiaBehaviour.cs b/JotunnModStub/Fenrir/FenrirMangiatoiaBehaviour.cs index a7e2bfb..8a54e0f 100644 --- a/JotunnModStub/Fenrir/FenrirMangiatoiaBehaviour.cs +++ b/JotunnModStub/Fenrir/FenrirMangiatoiaBehaviour.cs @@ -289,7 +289,7 @@ namespace RacesOfValheim if (item == null) item = FindAnyInput(inventory); if (item == null) { - user.Message(MessageHud.MessageType.Center, "It wants meat. Any meat."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_wants_meat_any_meat")); return false; } @@ -342,19 +342,19 @@ namespace RacesOfValheim { if (IsUpgraded()) { - user.Message(MessageHud.MessageType.Center, "It has already had one."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_has_already_had_one")); return false; } if (BossProgressionManager.GetCurrentProgressionState() < FenrirMangiatoia.UpgradeProgressionState) { - user.Message(MessageHud.MessageType.Center, "The blood will not take. Something in the plains has to fall first."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_blood_will_not_take_something")); return false; } if (inventory.CountItems(YagluthDropName()) < 1) { - user.Message(MessageHud.MessageType.Center, "It wants what Yagluth left behind."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_wants_what_yagluth_left_behind")); return false; } @@ -362,7 +362,7 @@ namespace RacesOfValheim inventory.RemoveItem(item, 1); m_nview.InvokeRPC("RoV_FenrirUpgrade"); - user.Message(MessageHud.MessageType.Center, "The trough takes it. The line runs deeper now."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_trough_takes_line_runs_deeper")); return true; } @@ -404,7 +404,7 @@ namespace RacesOfValheim if (bound.Count > 0 && Player.m_localPlayer != null) { Player.m_localPlayer.Message(MessageHud.MessageType.Center, - $"The trough is broken. {bound.Count} will not outlast it by long."); + ModText.Get("rov_msg_fenrir_trough_broken_will_not_outlast", bound.Count)); } SetFeed(0f); diff --git a/JotunnModStub/Fenrir/FenrirRace.cs b/JotunnModStub/Fenrir/FenrirRace.cs index 22c1ee6..f6ff044 100644 --- a/JotunnModStub/Fenrir/FenrirRace.cs +++ b/JotunnModStub/Fenrir/FenrirRace.cs @@ -176,7 +176,7 @@ namespace RacesOfValheim { // forms allowed by day would otherwise be locked out right after every sunrise. if (rules.NeedsNight && sunSicknessTimer > 0f) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "The beast is tired"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_beast_tired")); return; } @@ -188,7 +188,7 @@ namespace RacesOfValheim { if (rules.NeedsNight && !EnvMan.IsNight()) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "The beast rests. You can only transform at night."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_beast_rests_can_only_transform")); return; } @@ -203,8 +203,9 @@ namespace RacesOfValheim { if (remaining < 0) remaining = 0; int rMin = Mathf.FloorToInt(remaining / 60f); int rSec = Mathf.FloorToInt(remaining % 60f); - string formName = rules.Form == FenrirProgression.FormType.Cultist ? "Cultist" : "Fenrir"; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, $"{formName} form is on cooldown ({rMin}:{rSec:00})."); + // A token, which the message's own localization pass translates along with the rest. + string formName = rules.Form == FenrirProgression.FormType.Cultist ? "$rov_msg_fenrir_formname_cultist" : "$rov_msg_fenrir_formname_fenrir"; + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_form_cooldown", formName, rMin, (rSec).ToString("00"))); return; } } @@ -410,7 +411,7 @@ namespace RacesOfValheim { Player.m_localPlayer.GetSEMan().AddStatusEffect("SE_WolfForm".GetStableHashCode(), true); var se = Player.m_localPlayer.GetSEMan().GetStatusEffect("SE_WolfForm".GetStableHashCode()); if (se != null) se.m_ttl = ttl; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You are an Ulv!"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_are_ulv")); } else if (prefabName == "Wolf") { @@ -418,7 +419,7 @@ namespace RacesOfValheim { Player.m_localPlayer.GetSEMan().AddStatusEffect("SE_WolfForm".GetStableHashCode(), true); var se = Player.m_localPlayer.GetSEMan().GetStatusEffect("SE_WolfForm".GetStableHashCode()); if (se != null) se.m_ttl = ttl; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You are a Wolf!"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_are_wolf")); } else if (prefabName == "Fenring_Cultist") { @@ -426,7 +427,7 @@ namespace RacesOfValheim { Player.m_localPlayer.GetSEMan().AddStatusEffect("SE_CultistForm".GetStableHashCode(), true); var se = Player.m_localPlayer.GetSEMan().GetStatusEffect("SE_CultistForm".GetStableHashCode()); if (se != null) se.m_ttl = ttl; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You are a Cultist!"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_are_cultist")); } else { @@ -434,7 +435,7 @@ namespace RacesOfValheim { Player.m_localPlayer.GetSEMan().AddStatusEffect("SE_FenrirForm".GetStableHashCode(), true); var se = Player.m_localPlayer.GetSEMan().GetStatusEffect("SE_FenrirForm".GetStableHashCode()); if (se != null) se.m_ttl = ttl; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You are a Fenring!"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_are_fenring")); } isTransformed = true; @@ -480,7 +481,7 @@ namespace RacesOfValheim { Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_WolfForm".GetStableHashCode()); isTransformed = false; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You returned to human form."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_returned_human_form")); if (activeRules != null && activeRules.CooldownMinutes > 0) { diff --git a/JotunnModStub/Fenrir/FenrirStatusEffects.cs b/JotunnModStub/Fenrir/FenrirStatusEffects.cs index b519103..43de139 100644 --- a/JotunnModStub/Fenrir/FenrirStatusEffects.cs +++ b/JotunnModStub/Fenrir/FenrirStatusEffects.cs @@ -17,7 +17,7 @@ namespace RacesOfValheim base.Stop(); if (Player.m_localPlayer != null) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, $"{m_name} is Ready!"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_fenrir_ready", m_name)); } } } diff --git a/JotunnModStub/ModText.cs b/JotunnModStub/ModText.cs index 4e43258..b5bb3e9 100644 --- a/JotunnModStub/ModText.cs +++ b/JotunnModStub/ModText.cs @@ -21,7 +21,13 @@ namespace RacesOfValheim { if (Localization.instance == null) return "[" + key + "]"; - string[] words = args.Select(a => a?.ToString() ?? "").ToArray(); + // Each argument is localized on its own before it goes in. An argument is often a token + // itself - a creature's m_name, a boss - and left for a later pass it would run into + // whatever follows the $1: "$enemy_eikthyr's power" reads as the token + // "enemy_eikthyr's", because an apostrophe does not end a token. + string[] words = args + .Select(a => Localization.instance.Localize(a?.ToString() ?? "")) + .ToArray(); return Localization.instance.Localize("$" + key, words); } diff --git a/JotunnModStub/PieceDensityLimit.cs b/JotunnModStub/PieceDensityLimit.cs index 1546e21..daf3047 100644 --- a/JotunnModStub/PieceDensityLimit.cs +++ b/JotunnModStub/PieceDensityLimit.cs @@ -62,6 +62,7 @@ namespace RacesOfValheim /// Caps a piece. Call once from the chain's Register(); calling twice just replaces the entry, /// so a Register() that runs more than once cannot stack limits. /// + /// A translation key, not text: its $1 is how many stand nearby, $2 the limit. public static void Register(string piecePrefabName, float radius, int max, string refusalMessage) { if (string.IsNullOrEmpty(piecePrefabName) || max < 1 || radius <= 0f) @@ -156,7 +157,7 @@ namespace RacesOfValheim if (player != null) { - player.Message(MessageHud.MessageType.Center, string.Format(limit.Message, nearby, limit.Max)); + player.Message(MessageHud.MessageType.Center, ModText.Get(limit.Message, nearby, limit.Max)); } return false; } diff --git a/JotunnModStub/RaceCaveBuilding.cs b/JotunnModStub/RaceCaveBuilding.cs index 4e026d7..e9ddb8f 100644 --- a/JotunnModStub/RaceCaveBuilding.cs +++ b/JotunnModStub/RaceCaveBuilding.cs @@ -155,7 +155,7 @@ namespace RacesOfValheim allowing = true; Jotunn.Logger.LogInfo($"[Races] In a troll cave: {flipped.Count} pieces temporarily allowed in dungeons."); - player.Message(MessageHud.MessageType.Center, "This cave will hold what you build in it."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_build_this_cave_will_hold_what")); } /// diff --git a/JotunnModStub/RaceClaws.cs b/JotunnModStub/RaceClaws.cs index 3fc2bbb..818ffc7 100644 --- a/JotunnModStub/RaceClaws.cs +++ b/JotunnModStub/RaceClaws.cs @@ -899,7 +899,7 @@ namespace RacesOfValheim if (owner == null) return true; if (Player.m_localPlayer == null || owner != RaceClawSet.For(Player.m_localPlayer)) return true; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "They are part of your hands."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_claws_they_are_part_hands")); return false; } } diff --git a/JotunnModStub/RaceMenuWard.cs b/JotunnModStub/RaceMenuWard.cs index 5457560..94ef37a 100644 --- a/JotunnModStub/RaceMenuWard.cs +++ b/JotunnModStub/RaceMenuWard.cs @@ -201,20 +201,20 @@ namespace RacesOfValheim string prefabName = item.m_dropPrefab != null ? item.m_dropPrefab.name : null; if (prefabName == null || !BossProgressionManager.BossDropStates.TryGetValue(prefabName, out int state)) { - user.Message(MessageHud.MessageType.Center, "The ward has no use for that."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_ward_ward_has_no_use_that")); return true; } if (!BossProgressionManager.UsePersonalProgression) { - user.Message(MessageHud.MessageType.Center, "Switch to personal progression first."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_ward_switch_personal_progression_first")); return true; } if (BossProgressionManager.PersonalState >= state) { user.Message(MessageHud.MessageType.Center, - $"You already carry {BossProgressionManager.GetBossNameForState(state)}'s power."); + ModText.Get("rov_msg_ward_already_carry_s_power", BossProgressionManager.GetBossTokenForState(state))); return true; } @@ -223,7 +223,7 @@ namespace RacesOfValheim BossProgressionManager.PersonalState = state; user.Message(MessageHud.MessageType.Center, - $"{BossProgressionManager.GetBossNameForState(state)}'s power is yours."); + ModText.Get("rov_msg_ward_s_power_yours", BossProgressionManager.GetBossTokenForState(state))); RefreshRaceState(); return true; diff --git a/JotunnModStub/RacesOfValheim.cs b/JotunnModStub/RacesOfValheim.cs index 7778632..f9d3462 100644 --- a/JotunnModStub/RacesOfValheim.cs +++ b/JotunnModStub/RacesOfValheim.cs @@ -199,16 +199,16 @@ namespace RacesOfValheim } int state = BossProgressionManager.GetCurrentProgressionState(); - string boss = BossProgressionManager.GetBossNameForState(state); + string boss = BossProgressionManager.GetBossTokenForState(state); if (clearedPersonal) - summary = $"Personal progression reset to {boss} ({state}/{BossProgressionManager.MaxState}). Claim your relics again."; + summary = ModText.Get("rov_msg_core_progression_reset", boss, state, BossProgressionManager.MaxState); else if (BossProgressionManager.UsePersonalProgression) - summary = $"Nothing to reset - you have claimed no relics yet ({state}/{BossProgressionManager.MaxState})."; + summary = ModText.Get("rov_msg_core_nothing_reset_personal", state, BossProgressionManager.MaxState); else - summary = $"Nothing to reset - you follow the world's progression: {boss} ({state}/{BossProgressionManager.MaxState})."; + summary = ModText.Get("rov_msg_core_nothing_reset_world", boss, state, BossProgressionManager.MaxState); - if (hadDebugOverride) summary += " Debug override cleared."; + if (hadDebugOverride) summary += " " + ModText.Get("rov_msg_core_debug_override_cleared"); Player player = Player.m_localPlayer; if (player != null) @@ -537,7 +537,7 @@ namespace RacesOfValheim Player.m_localPlayer.m_customData["Race"] = "Human"; ZNetView nview = Player.m_localPlayer.GetComponent(); if (nview != null && nview.IsValid()) nview.GetZDO().Set("RacesOfValheim_Race", "Human"); - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose to remain Human."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_remain_human")); } CloseRaceSelectionMenu(); } @@ -552,7 +552,7 @@ namespace RacesOfValheim Player.m_localPlayer.m_customData["FenrirCurse_Active"] = "true"; Player.m_localPlayer.GetSEMan().AddStatusEffect("SE_FenrirCurse".GetStableHashCode(), true); - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Fenrir."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_fenrir")); } CloseRaceSelectionMenu(); } @@ -565,7 +565,7 @@ namespace RacesOfValheim ZNetView nview = Player.m_localPlayer.GetComponent(); if (nview != null && nview.IsValid()) nview.GetZDO().Set("RacesOfValheim_Race", "Skadi"); - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of Skadi."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_skadi")); // Force update skin colors VisEquipment visEq = Player.m_localPlayer.GetComponent(); @@ -594,7 +594,7 @@ namespace RacesOfValheim visEq.GetType().GetMethod("UpdateColors", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)?.Invoke(visEq, null); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Skeleton."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_skeleton")); CloseRaceSelectionMenu(); } } @@ -624,7 +624,7 @@ namespace RacesOfValheim visEq.GetType().GetMethod("UpdateColors", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)?.Invoke(visEq, null); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Aswid."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_aswid")); CloseRaceSelectionMenu(); } } @@ -652,7 +652,7 @@ namespace RacesOfValheim visEq.GetType().GetMethod("UpdateColors", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)?.Invoke(visEq, null); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Furling."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_furling")); CloseRaceSelectionMenu(); } } @@ -694,7 +694,7 @@ namespace RacesOfValheim visEq.GetType().GetMethod("UpdateColors", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)?.Invoke(visEq, null); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Trol."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_trol")); CloseRaceSelectionMenu(); } } @@ -740,7 +740,7 @@ namespace RacesOfValheim visEq.GetType().GetMethod("UpdateColors", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)?.Invoke(visEq, null); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Draugh."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_draugh")); CloseRaceSelectionMenu(); } } @@ -777,7 +777,7 @@ namespace RacesOfValheim visEq.GetType().GetMethod("UpdateVisuals", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)?.Invoke(visEq, null); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Dvergar."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_dvergar")); CloseRaceSelectionMenu(); } } @@ -813,7 +813,7 @@ namespace RacesOfValheim visEq.GetType().GetMethod("UpdateVisuals", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)?.Invoke(visEq, null); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Sverm."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_sverm")); CloseRaceSelectionMenu(); } } @@ -868,7 +868,7 @@ namespace RacesOfValheim visEq.GetType().GetMethod("UpdateColors", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public)?.Invoke(visEq, null); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You chose the path of the Trenta."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_chose_path_trenta")); CloseRaceSelectionMenu(); } } @@ -1015,7 +1015,7 @@ namespace RacesOfValheim if (Player.m_localPlayer != null) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, $"World Progression State: {state}"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_world_progression_state", state)); } } } @@ -1038,7 +1038,7 @@ namespace RacesOfValheim Console.instance.Print($"[DEBUG] Progression state increased to: {BossProgressionManager.DebugState}"); if (Player.m_localPlayer != null) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, $"Progression State: {BossProgressionManager.DebugState}"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_core_progression_state", BossProgressionManager.DebugState)); Traverse.Create(Player.m_localPlayer).Method("SetupEquipment").GetValue(); } } diff --git a/JotunnModStub/RaisedThrall.cs b/JotunnModStub/RaisedThrall.cs index f1ecd9c..c46aea5 100644 --- a/JotunnModStub/RaisedThrall.cs +++ b/JotunnModStub/RaisedThrall.cs @@ -53,7 +53,7 @@ namespace RacesOfValheim public float m_homeCheckRange = 20f; /// Shown in the refusal when a station is not this player's to command. - public string m_refusalMessage = "It does not answer to you."; + public string m_refusalMessage = "$rov_msg_thrall_refusal_default"; /// /// How many thralls of OTHER kinds, from the same station, come along when this one is @@ -298,7 +298,7 @@ namespace RacesOfValheim { m_monsterAI.SetFollowTarget(null); GoHome(); - if (announce) player.Message(MessageHud.MessageType.Center, $"{m_character.m_name} returns."); + if (announce) player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_thrall_returns", m_character.m_name)); return true; } @@ -308,7 +308,7 @@ namespace RacesOfValheim { if (announce) { - player.Message(MessageHud.MessageType.Center, $"Only {m_maxFollowers} may walk with you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_thrall_only_may_walk_with", m_maxFollowers)); } return false; } @@ -323,7 +323,7 @@ namespace RacesOfValheim if (m_ai != null) m_ai.ResetPatrolPoint(); m_monsterAI.SetFollowTarget(player.gameObject); - if (announce) player.Message(MessageHud.MessageType.Center, $"{m_character.m_name} follows."); + if (announce) player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_thrall_follows", m_character.m_name)); return true; } @@ -355,9 +355,7 @@ namespace RacesOfValheim if (other.SetFollowing(player, follow, announce: false)) taken++; } - player.Message(MessageHud.MessageType.Center, follow - ? $"{m_character.m_name} rises with {taken}." - : $"{m_character.m_name} stands down with {taken}."); + player.Message(MessageHud.MessageType.Center, (follow ? ModText.Get("rov_msg_thrall_rises_with", m_character.m_name, taken) : ModText.Get("rov_msg_thrall_stands_down_with", m_character.m_name, taken))); } private static int CountFollowers(Player player, string kind) @@ -445,12 +443,12 @@ namespace RacesOfValheim if (came > 0) { - player.Message(MessageHud.MessageType.Center, $"{came} answer the call."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_thrall_answer_call", came)); } else if (refused > 0) { // The only way SetFollowing refuses a thrall that may be commanded is the cap. - player.Message(MessageHud.MessageType.Center, "No more may walk with you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_thrall_no_more_may_walk_with")); } } diff --git a/JotunnModStub/Skadi/DrakeFormBehavior.cs b/JotunnModStub/Skadi/DrakeFormBehavior.cs index ffd3b74..53b9049 100644 --- a/JotunnModStub/Skadi/DrakeFormBehavior.cs +++ b/JotunnModStub/Skadi/DrakeFormBehavior.cs @@ -257,7 +257,7 @@ namespace RacesOfValheim float cost = Mathf.Min(STAMINA_PER_PROJECTILE * projCount, MAX_VOLLEY_STAMINA); if (!Player.m_localPlayer.HaveStamina(cost)) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Not enough stamina"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_not_enough_stamina")); return false; } Player.m_localPlayer.UseStamina(cost); diff --git a/JotunnModStub/Skadi/SkadiGolem.cs b/JotunnModStub/Skadi/SkadiGolem.cs index 9a1035e..99fca6a 100644 --- a/JotunnModStub/Skadi/SkadiGolem.cs +++ b/JotunnModStub/Skadi/SkadiGolem.cs @@ -306,21 +306,21 @@ namespace RacesOfValheim if (!SkadiRace.IsLocalSkadi()) { - player.Message(MessageHud.MessageType.Center, "The stone does not answer to you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_stone_does_not_answer")); return false; } if (BossProgressionManager.GetCurrentProgressionState() < ModerProgressionState) { player.Message(MessageHud.MessageType.Center, - "The tear is cold. Nothing wakes in the stone until the mountain's queen has fallen."); + ModText.Get("rov_msg_skadi_tear_cold_nothing_wakes_stone")); return false; } CraftingStation station = FindStonecutter(position); if (station == null) { - player.Message(MessageHud.MessageType.Center, "It needs a stonecutter to be cut at."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_needs_stonecutter_cut_at")); return false; } @@ -328,7 +328,7 @@ namespace RacesOfValheim if (bound >= MaxPerStation) { player.Message(MessageHud.MessageType.Center, - $"That stonecutter already holds {bound}. It will not hold more."); + ModText.Get("rov_msg_skadi_that_stonecutter_already_holds_will", bound)); return false; } @@ -336,7 +336,7 @@ namespace RacesOfValheim if (nearby >= MaxInArea) { player.Message(MessageHud.MessageType.Center, - $"There are already {nearby} of these within a day's walk. The stone is spent."); + ModText.Get("rov_msg_skadi_there_are_already_these_within", nearby)); return false; } diff --git a/JotunnModStub/Skadi/SkadiGolemBehaviour.cs b/JotunnModStub/Skadi/SkadiGolemBehaviour.cs index b21621a..36554c4 100644 --- a/JotunnModStub/Skadi/SkadiGolemBehaviour.cs +++ b/JotunnModStub/Skadi/SkadiGolemBehaviour.cs @@ -181,7 +181,7 @@ namespace RacesOfValheim Vector3.Distance(Player.m_localPlayer.transform.position, transform.position) < 30f) { Player.m_localPlayer.Message(MessageHud.MessageType.Center, - "The stonecutter is gone. What it cut will not outlast it by long."); + ModText.Get("rov_msg_skadi_stonecutter_gone_what_cut_will")); } } diff --git a/JotunnModStub/Skadi/SkadiRace.cs b/JotunnModStub/Skadi/SkadiRace.cs index fbdffb6..16744af 100644 --- a/JotunnModStub/Skadi/SkadiRace.cs +++ b/JotunnModStub/Skadi/SkadiRace.cs @@ -246,7 +246,7 @@ namespace RacesOfValheim if (isTransformed && formExpireTime > 0f && Time.time >= formExpireTime) { formExpireTime = 0f; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Your dragon form fades."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_dragon_form_fades")); StartCoroutine(RevertToHumanRoutine()); return; } @@ -265,7 +265,7 @@ namespace RacesOfValheim DumpPrefabDebugInfo("Dragon"); DumpPrefabDebugInfo("Hatchling"); DumpPrefabDebugInfo("Fader"); - if (Player.m_localPlayer != null) Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Dumped Dragon/Drake/Fader debug info to console!"); + if (Player.m_localPlayer != null) Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_dumped_dragon_drake_fader_debug")); } } @@ -438,7 +438,7 @@ namespace RacesOfValheim // the Mistlands onward, so the old HaveEitr gate left it unusable for five tiers. if (!Player.m_localPlayer.HaveStamina(SPELL_STAMINA_COST)) { - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Not enough stamina"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_not_enough_stamina")); return; } @@ -710,7 +710,7 @@ namespace RacesOfValheim if (remaining < 0) remaining = 0; int rMin = Mathf.FloorToInt(remaining / 60f); int rSec = Mathf.FloorToInt(remaining % 60f); - Player.m_localPlayer.Message(MessageHud.MessageType.Center, $"Dragon Form is on cooldown ({rMin}:{rSec:00})."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_dragon_form_cooldown", rMin, (rSec).ToString("00"))); return; } } @@ -891,9 +891,9 @@ namespace RacesOfValheim DrakeFormBehavior behavior = currentTransformation.AddComponent(); behavior.Initialize(rules); - if (prefabName == "Hatchling") Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You are a Drake!"); - else if (prefabName == "Dragon") Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You are Moder!"); - else if (prefabName == "Fader") Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You are Fader!"); + if (prefabName == "Hatchling") Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_are_drake")); + else if (prefabName == "Dragon") Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_are_moder")); + else if (prefabName == "Fader") Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_are_fader")); isTransformed = true; StartFormTimer(rules); @@ -943,7 +943,7 @@ namespace RacesOfValheim isTransformed = false; formExpireTime = 0f; Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_SkadiForm".GetStableHashCode(), true); - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You returned to human form."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skadi_returned_human_form")); if (activeRules != null && activeRules.CooldownMinutes > 0) { diff --git a/JotunnModStub/Skeleton/SkeletonBonePile.cs b/JotunnModStub/Skeleton/SkeletonBonePile.cs index 35fcdd9..9c6d6c1 100644 --- a/JotunnModStub/Skeleton/SkeletonBonePile.cs +++ b/JotunnModStub/Skeleton/SkeletonBonePile.cs @@ -136,7 +136,7 @@ namespace RacesOfValheim PieceDensityLimit.Register(PieceName, PieceDensityLimit.RadiusForArea(DensityAreaKm2), MaxPilesInRange, - "There are already {0} of these listening nearby. Take it further out."); + "rov_msg_build_limit_skeleton_bonepile"); } // ---------------------------------------------------------------- items @@ -282,7 +282,7 @@ namespace RacesOfValheim thrall.m_maxFollowers = MaxFollowers; thrall.m_witherSeconds = OrphanWitherSeconds; thrall.m_homeCheckRange = HomeCheckRange; - thrall.m_refusalMessage = "These bones answer only to their own kind."; + thrall.m_refusalMessage = "$rov_msg_thrall_refusal_skeleton"; thrall.m_escortCount = escortCount; PrefabManager.Instance.AddPrefab(prefab); diff --git a/JotunnModStub/Skeleton/SkeletonBonePileBehaviour.cs b/JotunnModStub/Skeleton/SkeletonBonePileBehaviour.cs index 002e2a4..f65e631 100644 --- a/JotunnModStub/Skeleton/SkeletonBonePileBehaviour.cs +++ b/JotunnModStub/Skeleton/SkeletonBonePileBehaviour.cs @@ -108,7 +108,7 @@ namespace RacesOfValheim { if (!IsUpgraded()) { - player.Message(MessageHud.MessageType.Center, "This pile cannot hold the rotten yet."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_this_pile_cannot_hold_rotten")); return false; } room = RancidCap() - GetSlots(SkeletonBonePile.KindRancid); @@ -149,7 +149,7 @@ namespace RacesOfValheim List bound = RaisedThrall.BoundTo(transform.position); if (bound.Count == 0) { - player.Message(MessageHud.MessageType.Center, "Nothing is standing yet. It wants bone."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_nothing_standing_yet_wants_bone")); return false; } @@ -169,13 +169,11 @@ namespace RacesOfValheim if (moved == 0) { // Every one of them refused, which for these means the player is not a Skeleton. - player.Message(MessageHud.MessageType.Center, "These bones answer only to their own kind."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_these_bones_answer_only_their")); return false; } - player.Message(MessageHud.MessageType.Center, anyFollowing - ? $"{moved} return to the pile." - : $"{moved} rise and follow."); + player.Message(MessageHud.MessageType.Center, (anyFollowing ? ModText.Get("rov_msg_skeleton_return_pile", moved) : ModText.Get("rov_msg_skeleton_rise_follow", moved))); return true; } @@ -183,19 +181,19 @@ namespace RacesOfValheim { if (IsUpgraded()) { - player.Message(MessageHud.MessageType.Center, "It has already had one."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_has_already_had_one")); return false; } if (BossProgressionManager.GetCurrentProgressionState() < SkeletonBonePile.UpgradeProgressionState) { - player.Message(MessageHud.MessageType.Center, "The skull will not wake. Something older has to fall first."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_skull_will_not_wake_something")); return false; } inventory.RemoveItem(item, 1); m_nview.InvokeRPC("RoV_SkelUpgrade"); - player.Message(MessageHud.MessageType.Center, "The pile deepens. The rotten will stand here too."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_pile_deepens_rotten_will_stand")); return true; } @@ -332,7 +330,7 @@ namespace RacesOfValheim if (bound.Count > 0 && Player.m_localPlayer != null) { Player.m_localPlayer.Message(MessageHud.MessageType.Center, - $"The pile is broken. {bound.Count} fall where they stand."); + ModText.Get("rov_msg_skeleton_pile_broken_fall_where_they", bound.Count)); } } diff --git a/JotunnModStub/Skeleton/SkeletonPatches.cs b/JotunnModStub/Skeleton/SkeletonPatches.cs index 10fdf7d..6ffb291 100644 --- a/JotunnModStub/Skeleton/SkeletonPatches.cs +++ b/JotunnModStub/Skeleton/SkeletonPatches.cs @@ -80,7 +80,7 @@ namespace RacesOfValheim { if (SkeletonRace.IsSkeleton() && item.m_shared.m_itemType == ItemDrop.ItemData.ItemType.Consumable && (item.m_shared.m_food > 0 || item.m_shared.m_foodStamina > 0 || item.m_shared.m_foodEitr > 0)) { - __instance.Message(MessageHud.MessageType.Center, "Skeletons do not need to eat."); + __instance.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_skeletons_do_not_need_eat")); __result = false; return false; } @@ -88,7 +88,7 @@ namespace RacesOfValheim // survive this blanket refusal - everything else mortal still bounces. else if (AswidRace.IsAswid() && !AswidRace.BypassAswidFoodCheck && !AswidBloodRefinery.IsAswidMeal(item) && item.m_shared.m_itemType == ItemDrop.ItemData.ItemType.Consumable && (item.m_shared.m_food > 0 || item.m_shared.m_foodStamina > 0 || item.m_shared.m_foodEitr > 0)) { - __instance.Message(MessageHud.MessageType.Center, "Mortal food disgusts you."); + __instance.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_mortal_food_disgusts")); __result = false; return false; } @@ -630,7 +630,7 @@ namespace RacesOfValheim UnityEngine.Object.Instantiate(vfx, Player.m_localPlayer.transform.position, Quaternion.identity); } - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "You have been resurrected by dark magic!"); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_have_been_resurrected_by_dark")); return false; // Skip applying this lethal damage } } diff --git a/JotunnModStub/Sverm/SvermBlisterTick.cs b/JotunnModStub/Sverm/SvermBlisterTick.cs index 507b97f..b0fd8ad 100644 --- a/JotunnModStub/Sverm/SvermBlisterTick.cs +++ b/JotunnModStub/Sverm/SvermBlisterTick.cs @@ -79,7 +79,7 @@ namespace RacesOfValheim thrall.m_maxFollowers = -1; thrall.m_witherSeconds = SvermConfig.TroopWitherSeconds; thrall.m_homeCheckRange = SvermConfig.TroopHomeCheckRange; - thrall.m_refusalMessage = "It does not smell your colony on you."; + thrall.m_refusalMessage = "$rov_msg_thrall_refusal_sverm"; // No SkeletonSentryBehaviour. A tick that healed itself would be a tick that never gets // round to exploding, which is its entire job. diff --git a/JotunnModStub/Sverm/SvermBrood.cs b/JotunnModStub/Sverm/SvermBrood.cs index f67c92d..be162e4 100644 --- a/JotunnModStub/Sverm/SvermBrood.cs +++ b/JotunnModStub/Sverm/SvermBrood.cs @@ -118,7 +118,7 @@ namespace RacesOfValheim thrall.m_maxFollowers = -1; // the cap is the colony's, counted at the nest, not per player thrall.m_witherSeconds = SvermConfig.TroopWitherSeconds; thrall.m_homeCheckRange = SvermConfig.TroopHomeCheckRange; - thrall.m_refusalMessage = "It does not smell your colony on you."; + thrall.m_refusalMessage = "$rov_msg_thrall_refusal_sverm"; // Section 11.2, reused whole: ten seconds untouched, then two percent a second. Healing // and not respawning - a dead troop is dead, and the egg it cost is already back. diff --git a/JotunnModStub/Sverm/SvermClawSlot.cs b/JotunnModStub/Sverm/SvermClawSlot.cs index 34bf82e..3d9212b 100644 --- a/JotunnModStub/Sverm/SvermClawSlot.cs +++ b/JotunnModStub/Sverm/SvermClawSlot.cs @@ -300,7 +300,7 @@ namespace RacesOfValheim if (!SvermClawSlot.IsClaws(item)) return true; if (Player.m_localPlayer == null || !SvermVisuals.IsSvermPlayer(Player.m_localPlayer)) return true; - Player.m_localPlayer.Message(MessageHud.MessageType.Center, "They are part of your hands."); + Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_they_are_part_hands")); return false; } } diff --git a/JotunnModStub/Sverm/SvermFood.cs b/JotunnModStub/Sverm/SvermFood.cs index dad338b..21402c9 100644 --- a/JotunnModStub/Sverm/SvermFood.cs +++ b/JotunnModStub/Sverm/SvermFood.cs @@ -235,7 +235,7 @@ namespace RacesOfValheim if (item.m_dropPrefab != null && item.m_dropPrefab.name.StartsWith("SvermMeal_") == false && IsAswidBlood(item)) { - player.Message(MessageHud.MessageType.Center, "Alchemical blood is not food."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_alchemical_blood_not_food")); return false; } diff --git a/JotunnModStub/Sverm/SvermHive.cs b/JotunnModStub/Sverm/SvermHive.cs index 3c2266b..468846b 100644 --- a/JotunnModStub/Sverm/SvermHive.cs +++ b/JotunnModStub/Sverm/SvermHive.cs @@ -178,13 +178,13 @@ namespace RacesOfValheim if (!SvermVisuals.IsSvermPlayer(player)) { - player.Message(MessageHud.MessageType.Center, "Only the Sverm can raise a hive."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_only_sverm_can_raise_hive")); return false; } if (BossProgressionManager.GetCurrentProgressionState() < SvermConfig.HiveUnlockState) { - player.Message(MessageHud.MessageType.Center, "The colony will not wake until the Elder falls."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_colony_will_not_wake_until")); return false; } @@ -198,7 +198,7 @@ namespace RacesOfValheim private static void RegisterNestDensity() { PieceDensityLimit.Register(PieceName, SvermConfigManagement.NestRadius, SvermConfigManagement.NestMax, - "There is already a hive holding this ground."); + "rov_msg_build_limit_sverm_hive"); } /// @@ -437,7 +437,7 @@ namespace RacesOfValheim if (!SvermVisuals.IsSvermPlayer(player)) { - player.Message(MessageHud.MessageType.Center, "The hive does not know you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_hive_does_not_know")); return true; } diff --git a/JotunnModStub/Sverm/SvermHiveGoods.cs b/JotunnModStub/Sverm/SvermHiveGoods.cs index 7962d3c..7ba51e6 100644 --- a/JotunnModStub/Sverm/SvermHiveGoods.cs +++ b/JotunnModStub/Sverm/SvermHiveGoods.cs @@ -297,7 +297,7 @@ namespace RacesOfValheim // stage it was not paid for cannot be undone. if (!SvermBiomass.Spend(hive.transform, good.Price)) { - player?.Message(MessageHud.MessageType.Center, "Not enough biomass in the bank."); + player?.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_not_enough_biomass_bank")); return false; } diff --git a/JotunnModStub/Sverm/SvermHiveStore.cs b/JotunnModStub/Sverm/SvermHiveStore.cs index f63f642..fe7a064 100644 --- a/JotunnModStub/Sverm/SvermHiveStore.cs +++ b/JotunnModStub/Sverm/SvermHiveStore.cs @@ -128,7 +128,7 @@ namespace RacesOfValheim float room = SvermBiomass.Space(hive.transform); if (room <= 0f) { - player.Message(MessageHud.MessageType.Center, "The hive is full. Give it time to digest."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_hive_full_give_time_digest")); return true; } @@ -149,12 +149,12 @@ namespace RacesOfValheim inventory.RemoveItem(item, units); player.Message(MessageHud.MessageType.TopLeft, - $"{name} x{units} -> +{fed:0} biomass, digesting"); + ModText.Get("rov_msg_sverm_x_biomass_digesting", name, units, (fed).ToString("0"))); return true; } player.Message(MessageHud.MessageType.Center, - "Nothing here it will eat. Food, wood and resin - honey and royal jelly are medicine."); + ModText.Get("rov_msg_sverm_nothing_here_will_eat_food")); return true; } } @@ -202,7 +202,7 @@ namespace RacesOfValheim if (!SvermVisuals.IsSvermPlayer(player)) { - player.Message(MessageHud.MessageType.Center, "The hive does not know you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_hive_does_not_know")); return true; } @@ -389,14 +389,14 @@ namespace RacesOfValheim if (!SvermVisuals.IsSvermPlayer(player)) { - player.Message(MessageHud.MessageType.Center, "Only the Sverm can raise a market."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_only_sverm_can_raise_market")); return false; } if (SvermHive.NearestNest(position, SvermConfigManagement.AuraRadius) == null) { player.Message(MessageHud.MessageType.Center, - $"A market has to stand within {SvermConfigManagement.AuraRadius:0} metres of a hive."); + ModText.Get("rov_msg_sverm_market_has_stand_within_metres", (SvermConfigManagement.AuraRadius).ToString("0"))); return false; } @@ -410,7 +410,7 @@ namespace RacesOfValheim private static void RegisterMarketDensity() { PieceDensityLimit.Register(PieceName, SvermConfigManagement.AuraRadius, 1, - "This hive already has a market."); + "rov_msg_build_limit_sverm_market"); } } @@ -428,7 +428,7 @@ namespace RacesOfValheim if (!SvermVisuals.IsSvermPlayer(player)) { - player.Message(MessageHud.MessageType.Center, "The hive does not know you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_hive_does_not_know")); return true; } @@ -439,7 +439,7 @@ namespace RacesOfValheim if (nest == null) { player.Message(MessageHud.MessageType.Center, - $"No hive within {SvermConfigManagement.AuraRadius:0} metres. This counter is dead."); + ModText.Get("rov_msg_sverm_no_hive_within_metres_this", (SvermConfigManagement.AuraRadius).ToString("0"))); return true; } diff --git a/JotunnModStub/Sverm/SvermMedicine.cs b/JotunnModStub/Sverm/SvermMedicine.cs index 5fa46cd..3605304 100644 --- a/JotunnModStub/Sverm/SvermMedicine.cs +++ b/JotunnModStub/Sverm/SvermMedicine.cs @@ -54,7 +54,7 @@ namespace RacesOfValheim // Localized, because a creature's m_name is a token: printing it raw would put // "$enemy_seeker is not hurt" on the screen. string who = Localization.instance.Localize(patient.m_name); - player.Message(MessageHud.MessageType.Center, $"{who} is not hurt."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_not_hurt", who)); return true; } diff --git a/JotunnModStub/Sverm/SvermPatches.cs b/JotunnModStub/Sverm/SvermPatches.cs index 5d909f1..8d43fcc 100644 --- a/JotunnModStub/Sverm/SvermPatches.cs +++ b/JotunnModStub/Sverm/SvermPatches.cs @@ -76,7 +76,7 @@ namespace RacesOfValheim if (player == Player.m_localPlayer) { - player.Message(MessageHud.MessageType.Center, "Your carapace has no room for that."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_carapace_has_no_room_that")); } __result = false; diff --git a/JotunnModStub/Sverm/SvermRavagerForm.cs b/JotunnModStub/Sverm/SvermRavagerForm.cs index a8b9b88..91055b1 100644 --- a/JotunnModStub/Sverm/SvermRavagerForm.cs +++ b/JotunnModStub/Sverm/SvermRavagerForm.cs @@ -149,7 +149,7 @@ namespace RacesOfValheim if (IsActive && Time.time >= expiresAt) { - RunExit(player, spendCooldown: true, "The shell recedes."); + RunExit(player, spendCooldown: true, "$rov_msg_sverm_shell_recedes"); return; } @@ -165,13 +165,13 @@ namespace RacesOfValheim if (!SvermProgression.Current.RavagerForm) { - player.Message(MessageHud.MessageType.Center, "The strain has not taken yet."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_strain_has_not_taken_yet")); return; } if (Time.time < nextAllowedAt) { - player.Message(MessageHud.MessageType.Center, "The strain is spent."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_strain_spent")); return; } @@ -285,7 +285,7 @@ namespace RacesOfValheim PlayEffect(SvermConfig.RavagerMorphInEffects, player.transform.position); - player.Message(MessageHud.MessageType.Center, "The Ravager Strain takes hold."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_sverm_ravager_strain_takes_hold")); } private static void PlayEffect(string[] candidates, Vector3 where) diff --git a/JotunnModStub/Translations/English/messages.json b/JotunnModStub/Translations/English/messages.json new file mode 100644 index 0000000..a8b69c1 --- /dev/null +++ b/JotunnModStub/Translations/English/messages.json @@ -0,0 +1,193 @@ +{ + "rov_msg_aswid_aura_disabled": "Vampiric Aura: DISABLED", + "rov_msg_aswid_aura_enabled": "Vampiric Aura: ENABLED", + "rov_msg_aswid_dominate_cooldown_m_s": "Dominate on cooldown ($1m $2s)", + "rov_msg_aswid_dominated": "$1 dominated!", + "rov_msg_aswid_eclipse_cooldown_remaining_s": "Eclipse is on cooldown. Remaining: $1s", + "rov_msg_aswid_eclipse_descends": "An Eclipse descends...", + "rov_msg_aswid_eclipse_has_ended": "The Eclipse has ended.", + "rov_msg_aswid_following": "$1 is following.", + "rov_msg_aswid_living_blood_curdles_living_throat": "Living blood curdles in a living throat.", + "rov_msg_aswid_morning_sun_drives_bat_back": "The morning sun drives the bat back into your body", + "rov_msg_aswid_morning_sun_has_vanquished_horrible": "The morning sun has vanquished the horrible night", + "rov_msg_aswid_no_bone_grind": "No bone to grind.", + "rov_msg_aswid_no_raw_flesh_render": "No raw flesh to render.", + "rov_msg_aswid_staying": "$1 is staying.", + "rov_msg_aswid_sun_burns_can_only_take": "The sun burns. You can only take bat form at night.", + "rov_msg_aswid_tamed": "Tamed!", + "rov_msg_aswid_vae_victis": "Vae Victis", + "rov_msg_aswid_what_horrible_night_have_curse": "what a horrible night to have a curse", + "rov_msg_build_limit_cooktable": "Another cook's table stands within forty paces. One cook to a yard.", + "rov_msg_build_limit_draugh_bodypile": "The ground here already carries $1 of these. Find another country.", + "rov_msg_build_limit_dvergar_contractbank": "There is already $1 contract bank within a day's walk. One ledger per valley.", + "rov_msg_build_limit_fenrir_packtrough": "There is already $1 of these within a day's walk. A pack needs room.", + "rov_msg_build_limit_skeleton_bonepile": "There are already $1 of these listening nearby. Take it further out.", + "rov_msg_build_limit_smithtable": "Another smith's table stands within forty paces. One smith to a yard.", + "rov_msg_build_limit_sverm_hive": "There is already a hive holding this ground.", + "rov_msg_build_limit_sverm_market": "This hive already has a market.", + "rov_msg_build_limit_trenta_grove": "This country already answers to $1 of these. Plant it somewhere else.", + "rov_msg_build_this_cave_will_hold_what": "This cave will hold what you build in it.", + "rov_msg_butler_already_at_work": "It is already at work.", + "rov_msg_butler_bones_are_not_ready_s": "The bones are not ready. $1s.", + "rov_msg_butler_bones_do_not_answer_blood": "The bones do not answer to your blood.", + "rov_msg_butler_nothing_answers": "Nothing answers.", + "rov_msg_butler_only_skadi_s_hearth_kept": "Only Skadi's hearth is kept by the dead.", + "rov_msg_butler_servant_rises": "The servant rises.", + "rov_msg_claws_they_are_part_hands": "They are part of your hands.", + "rov_msg_core_chose_path_aswid": "You chose the path of the Aswid.", + "rov_msg_core_chose_path_draugh": "You chose the path of the Draugh.", + "rov_msg_core_chose_path_dvergar": "You chose the path of the Dvergar.", + "rov_msg_core_chose_path_fenrir": "You chose the path of the Fenrir.", + "rov_msg_core_chose_path_furling": "You chose the path of the Furling.", + "rov_msg_core_chose_path_skadi": "You chose the path of Skadi.", + "rov_msg_core_chose_path_skeleton": "You chose the path of the Skeleton.", + "rov_msg_core_chose_path_sverm": "You chose the path of the Sverm.", + "rov_msg_core_chose_path_trenta": "You chose the path of the Trenta.", + "rov_msg_core_chose_path_trol": "You chose the path of the Trol.", + "rov_msg_core_chose_remain_human": "You chose to remain Human.", + "rov_msg_core_debug_override_cleared": "Debug override cleared.", + "rov_msg_core_nothing_reset_personal": "Nothing to reset - you have claimed no relics yet ($1/$2).", + "rov_msg_core_nothing_reset_world": "Nothing to reset - you follow the world's progression: $1 ($2/$3).", + "rov_msg_core_progression_reset": "Personal progression reset to $1 ($2/$3). Claim your relics again.", + "rov_msg_core_progression_state": "Progression State: $1", + "rov_msg_core_world_progression_state": "World Progression State: $1", + "rov_msg_draugh_bone_will_not_wake_something": "The bone will not wake. Something older has to fall first.", + "rov_msg_draugh_draugr_consume_only_raw_flesh": "Draugr consume only raw flesh, eyes, entrails or blood.", + "rov_msg_draugh_has_already_had_one": "It has already had one.", + "rov_msg_draugh_northern_wind_blows": "The northern wind blows", + "rov_msg_draugh_pile_broken_will_not_outlast": "The pile is broken. $1 will not outlast it by more than a minute.", + "rov_msg_draugh_pile_stirs_will_keep_officers": "The pile stirs. It will keep officers now.", + "rov_msg_draugh_steal_their_breath_death_denied": "Steal Their Breath! Death is denied.", + "rov_msg_draugh_swarm_terror": "Swarm of Terror!", + "rov_msg_draugh_this_pile_keeps_no_officers": "This pile keeps no officers yet.", + "rov_msg_draugh_this_rotting_flesh_fatal_living": "This rotting flesh is fatal to the living.", + "rov_msg_draugh_wants_flesh_or_head_one": "It wants flesh, or the head of one of its own.", + "rov_msg_draugh_zombie_ritual_activated_borrowed_time": "Zombie Ritual Activated! Your borrowed time is fading...", + "rov_msg_dvergar_contract_runic_do_not_sign": "The contract is in runic. You do not sign it.", + "rov_msg_dvergar_do_not_know_what_goes": "You do not know what goes in it.", + "rov_msg_dvergar_drink": "$1 drink $2.", + "rov_msg_dvergar_drink_barrel_runs_dry": "$1 drink $2. The barrel runs dry.", + "rov_msg_dvergar_empty_so_are": "It is empty, and so are you.", + "rov_msg_dvergar_five_contracts_all_ledger_holds": "Five contracts is all the ledger holds.", + "rov_msg_dvergar_has_already_had_one": "It has already had one.", + "rov_msg_dvergar_ledger_not_written": "The ledger is not written for you.", + "rov_msg_dvergar_ledger_rewritten_better_names_sign": "The ledger is rewritten. Better names sign it now.", + "rov_msg_dvergar_ledger_shut": "The ledger is shut.", + "rov_msg_dvergar_nobody_at_barrel": "Nobody is at the barrel.", + "rov_msg_dvergar_not_drop_went_down": "Not a drop went down.", + "rov_msg_dvergar_not_enough_eitr": "Not enough eitr", + "rov_msg_dvergar_not_while_she_still_sits": "Not while she still sits under the mist.", + "rov_msg_dvergar_runic_overcharge_discharges": "Runic Overcharge discharges", + "rov_msg_dvergar_runic_overcharge_next_blow_loaded": "Runic Overcharge: your next blow is loaded", + "rov_msg_dvergar_runic_ping_echoes_answer": "Runic Ping: $1 echoes answer", + "rov_msg_dvergar_runic_ping_stone_silent": "Runic Ping: the stone is silent", + "rov_msg_dvergar_signs": "$1 signs on.", + "rov_msg_dvergar_there_still": "There is still $1 in it.", + "rov_msg_dvergar_whatever_does_nothing_anyone": "Whatever is in it does nothing to anyone.", + "rov_msg_fenrir_are_cultist": "You are a Cultist!", + "rov_msg_fenrir_are_fenring": "You are a Fenring!", + "rov_msg_fenrir_are_ulv": "You are an Ulv!", + "rov_msg_fenrir_are_wolf": "You are a Wolf!", + "rov_msg_fenrir_beast_rests_can_only_transform": "The beast rests. You can only transform at night.", + "rov_msg_fenrir_beast_tired": "The beast is tired", + "rov_msg_fenrir_blood_will_not_take_something": "The blood will not take. Something in the plains has to fall first.", + "rov_msg_fenrir_form_cooldown": "$1 form is on cooldown ($2:$3).", + "rov_msg_fenrir_formname_cultist": "Cultist", + "rov_msg_fenrir_formname_fenrir": "Fenrir", + "rov_msg_fenrir_has_already_had_one": "It has already had one.", + "rov_msg_fenrir_only_breath_comes_out_fire": "Only breath comes out. The fire wants eitr.", + "rov_msg_fenrir_ready": "$1 is Ready!", + "rov_msg_fenrir_returned_human_form": "You returned to human form.", + "rov_msg_fenrir_trough_broken_will_not_outlast": "The trough is broken. $1 will not outlast it by long.", + "rov_msg_fenrir_trough_takes_line_runs_deeper": "The trough takes it. The line runs deeper now.", + "rov_msg_fenrir_wants_meat_any_meat": "It wants meat. Any meat.", + "rov_msg_fenrir_wants_what_yagluth_left_behind": "It wants what Yagluth left behind.", + "rov_msg_skadi_are_drake": "You are a Drake!", + "rov_msg_skadi_are_fader": "You are Fader!", + "rov_msg_skadi_are_moder": "You are Moder!", + "rov_msg_skadi_dragon_form_cooldown": "Dragon Form is on cooldown ($1:$2).", + "rov_msg_skadi_dragon_form_fades": "Your dragon form fades.", + "rov_msg_skadi_dumped_dragon_drake_fader_debug": "Dumped Dragon/Drake/Fader debug info to console!", + "rov_msg_skadi_needs_stonecutter_cut_at": "It needs a stonecutter to be cut at.", + "rov_msg_skadi_not_enough_stamina": "Not enough stamina", + "rov_msg_skadi_returned_human_form": "You returned to human form.", + "rov_msg_skadi_stone_does_not_answer": "The stone does not answer to you.", + "rov_msg_skadi_stonecutter_gone_what_cut_will": "The stonecutter is gone. What it cut will not outlast it by long.", + "rov_msg_skadi_tear_cold_nothing_wakes_stone": "The tear is cold. Nothing wakes in the stone until the mountain's queen has fallen.", + "rov_msg_skadi_that_stonecutter_already_holds_will": "That stonecutter already holds $1. It will not hold more.", + "rov_msg_skadi_there_are_already_these_within": "There are already $1 of these within a day's walk. The stone is spent.", + "rov_msg_skeleton_has_already_had_one": "It has already had one.", + "rov_msg_skeleton_have_been_resurrected_by_dark": "You have been resurrected by dark magic!", + "rov_msg_skeleton_mortal_food_disgusts": "Mortal food disgusts you.", + "rov_msg_skeleton_nothing_standing_yet_wants_bone": "Nothing is standing yet. It wants bone.", + "rov_msg_skeleton_pile_broken_fall_where_they": "The pile is broken. $1 fall where they stand.", + "rov_msg_skeleton_pile_deepens_rotten_will_stand": "The pile deepens. The rotten will stand here too.", + "rov_msg_skeleton_return_pile": "$1 return to the pile.", + "rov_msg_skeleton_rise_follow": "$1 rise and follow.", + "rov_msg_skeleton_skeletons_do_not_need_eat": "Skeletons do not need to eat.", + "rov_msg_skeleton_skull_will_not_wake_something": "The skull will not wake. Something older has to fall first.", + "rov_msg_skeleton_these_bones_answer_only_their": "These bones answer only to their own kind.", + "rov_msg_skeleton_this_pile_cannot_hold_rotten": "This pile cannot hold the rotten yet.", + "rov_msg_sverm_alchemical_blood_not_food": "Alchemical blood is not food.", + "rov_msg_sverm_carapace_has_no_room_that": "Your carapace has no room for that.", + "rov_msg_sverm_colony_will_not_wake_until": "The colony will not wake until the Elder falls.", + "rov_msg_sverm_hive_does_not_know": "The hive does not know you.", + "rov_msg_sverm_hive_full_give_time_digest": "The hive is full. Give it time to digest.", + "rov_msg_sverm_market_has_stand_within_metres": "A market has to stand within $1 metres of a hive.", + "rov_msg_sverm_no_hive_within_metres_this": "No hive within $1 metres. This counter is dead.", + "rov_msg_sverm_not_enough_biomass_bank": "Not enough biomass in the bank.", + "rov_msg_sverm_not_hurt": "$1 is not hurt.", + "rov_msg_sverm_nothing_here_will_eat_food": "Nothing here it will eat. Food, wood and resin - honey and royal jelly are medicine.", + "rov_msg_sverm_only_sverm_can_raise_hive": "Only the Sverm can raise a hive.", + "rov_msg_sverm_only_sverm_can_raise_market": "Only the Sverm can raise a market.", + "rov_msg_sverm_ravager_strain_takes_hold": "The Ravager Strain takes hold.", + "rov_msg_sverm_shell_recedes": "The shell recedes.", + "rov_msg_sverm_strain_has_not_taken_yet": "The strain has not taken yet.", + "rov_msg_sverm_strain_spent": "The strain is spent.", + "rov_msg_sverm_they_are_part_hands": "They are part of your hands.", + "rov_msg_sverm_x_biomass_digesting": "$1 x$2 -> +$3 biomass, digesting", + "rov_msg_thrall_answer_call": "$1 answer the call.", + "rov_msg_thrall_follows": "$1 follows.", + "rov_msg_thrall_no_more_may_walk_with": "No more may walk with you.", + "rov_msg_thrall_only_may_walk_with": "Only $1 may walk with you.", + "rov_msg_thrall_refusal_default": "It does not answer to you.", + "rov_msg_thrall_refusal_draugh": "The dead do not take orders from the living.", + "rov_msg_thrall_refusal_dvergar": "Your name is not on the contract.", + "rov_msg_thrall_refusal_skeleton": "These bones answer only to their own kind.", + "rov_msg_thrall_refusal_sverm": "It does not smell your colony on you.", + "rov_msg_thrall_refusal_trol": "They were not paid by you.", + "rov_msg_thrall_returns": "$1 returns.", + "rov_msg_thrall_rises_with": "$1 rises with $2.", + "rov_msg_thrall_stands_down_with": "$1 stands down with $2.", + "rov_msg_trenta_are_muspell_ash_ember_given": "You are Muspell, ash and ember given shape.", + "rov_msg_trenta_elder_has_not_fallen_yet": "The Elder has not fallen yet.", + "rov_msg_trenta_grows": "It grows.", + "rov_msg_trenta_no_raw_flesh_rot": "No raw flesh to rot.", + "rov_msg_trenta_nothing_feed_wants_fertilizer": "Nothing to feed it. It wants Fertilizer.", + "rov_msg_trenta_nothing_there_feed": "Nothing there to feed.", + "rov_msg_trenta_return_rooted_form": "You return to your rooted form.", + "rov_msg_trenta_ripe_already": "It is ripe already.", + "rov_msg_trenta_root_will_not_take_hold": "The root will not take hold for you.", + "rov_msg_trenta_still_growing_minutes": "Still growing. $1 minutes.", + "rov_msg_trenta_still_rotting_minutes": "Still rotting. $1 minutes.", + "rov_msg_trenta_this_one_not_well_nothing": "This one is not well. Nothing will hurry it.", + "rov_msg_trenta_trenta_eat_only_what_grows": "The Trenta eat only what grows from root and leaf - no meat, fish, egg or honey.", + "rov_msg_trol_answers": "$1 answers.", + "rov_msg_trol_are_already_holding_log": "You are already holding a log!", + "rov_msg_trol_five_warbands_all_can_shout": "Five warbands is all it can shout for.", + "rov_msg_trol_has_already_had_one": "It has already had one.", + "rov_msg_trol_head_has_nothing_say": "The head has nothing to say.", + "rov_msg_trol_head_will_not_shout": "The head will not shout for you.", + "rov_msg_trol_must_true_form_lift_this": "You must be in True Form to lift this!", + "rov_msg_trol_no_room_lift": "No room to lift it!", + "rov_msg_trol_not_until_one_belonged_has": "Not until the one it belonged to has fallen.", + "rov_msg_trol_totem_wears_king_now": "The totem wears a king now.", + "rov_msg_ward_already_carry_s_power": "You already carry $1's power.", + "rov_msg_ward_s_power_yours": "$1's power is yours.", + "rov_msg_ward_switch_personal_progression_first": "Switch to personal progression first.", + "rov_msg_ward_ward_has_no_use_that": "The ward has no use for that.", + "rov_msg_warvulture_bird_does_not_know": "The bird does not know you.", + "rov_msg_warvulture_vulture_does_not_answer": "The vulture does not answer.", + "rov_msg_warvulture_vulture_settles_into_glide": "The vulture settles into a glide.", + "rov_msg_warvulture_vulture_spirals_down": "The vulture spirals down." +} diff --git a/JotunnModStub/Translations/Italian/messages.json b/JotunnModStub/Translations/Italian/messages.json new file mode 100644 index 0000000..b03faf1 --- /dev/null +++ b/JotunnModStub/Translations/Italian/messages.json @@ -0,0 +1,193 @@ +{ + "rov_msg_aswid_aura_disabled": "Aura vampirica: DISATTIVATA", + "rov_msg_aswid_aura_enabled": "Aura vampirica: ATTIVATA", + "rov_msg_aswid_dominate_cooldown_m_s": "Dominio in ricarica ($1m $2s)", + "rov_msg_aswid_dominated": "$1 dominato!", + "rov_msg_aswid_eclipse_cooldown_remaining_s": "L'Eclissi è in ricarica. Mancano: $1s", + "rov_msg_aswid_eclipse_descends": "Un'Eclissi discende...", + "rov_msg_aswid_eclipse_has_ended": "L'Eclissi è finita.", + "rov_msg_aswid_following": "$1 ti segue.", + "rov_msg_aswid_living_blood_curdles_living_throat": "Il sangue vivo si rapprende in una gola viva.", + "rov_msg_aswid_morning_sun_drives_bat_back": "Il sole del mattino ricaccia il pipistrello nel tuo corpo", + "rov_msg_aswid_morning_sun_has_vanquished_horrible": "Il sole del mattino ha sconfitto l'orribile notte", + "rov_msg_aswid_no_bone_grind": "Nessun osso da macinare.", + "rov_msg_aswid_no_raw_flesh_render": "Nessuna carne cruda da raffinare.", + "rov_msg_aswid_staying": "$1 resta qui.", + "rov_msg_aswid_sun_burns_can_only_take": "Il sole brucia. Puoi prendere la forma di pipistrello solo di notte.", + "rov_msg_aswid_tamed": "Addomesticato!", + "rov_msg_aswid_vae_victis": "Vae Victis", + "rov_msg_aswid_what_horrible_night_have_curse": "che notte orribile per avere una maledizione", + "rov_msg_build_limit_cooktable": "C'è già un altro tavolo del cuoco entro quaranta passi. Un cuoco per cortile.", + "rov_msg_build_limit_draugh_bodypile": "Questo terreno ne porta già $1. Trova un'altra contrada.", + "rov_msg_build_limit_dvergar_contractbank": "C'è già $1 banca dei contratti a una giornata di cammino. Un registro per valle.", + "rov_msg_build_limit_fenrir_packtrough": "Ce n'è già $1 a una giornata di cammino. Un branco ha bisogno di spazio.", + "rov_msg_build_limit_skeleton_bonepile": "Ce ne sono già $1 in ascolto qui vicino. Portalo più lontano.", + "rov_msg_build_limit_smithtable": "C'è già un altro tavolo del fabbro entro quaranta passi. Un fabbro per cortile.", + "rov_msg_build_limit_sverm_hive": "C'è già un alveare che occupa questo terreno.", + "rov_msg_build_limit_sverm_market": "Questo alveare ha già un mercato.", + "rov_msg_build_limit_trenta_grove": "Questa contrada ne ospita già $1. Piantalo altrove.", + "rov_msg_build_this_cave_will_hold_what": "Questa grotta terrà ciò che vi costruisci.", + "rov_msg_butler_already_at_work": "È già al lavoro.", + "rov_msg_butler_bones_are_not_ready_s": "Le ossa non sono pronte. $1s.", + "rov_msg_butler_bones_do_not_answer_blood": "Le ossa non rispondono al tuo sangue.", + "rov_msg_butler_nothing_answers": "Niente risponde.", + "rov_msg_butler_only_skadi_s_hearth_kept": "Solo il focolare di Skadi è tenuto dai morti.", + "rov_msg_butler_servant_rises": "Il servitore si alza.", + "rov_msg_claws_they_are_part_hands": "Fanno parte delle tue mani.", + "rov_msg_core_chose_path_aswid": "Hai scelto la via degli Aswid.", + "rov_msg_core_chose_path_draugh": "Hai scelto la via dei Draugh.", + "rov_msg_core_chose_path_dvergar": "Hai scelto la via dei Dvergar.", + "rov_msg_core_chose_path_fenrir": "Hai scelto la via dei Fenrir.", + "rov_msg_core_chose_path_furling": "Hai scelto la via dei Furling.", + "rov_msg_core_chose_path_skadi": "Hai scelto la via di Skadi.", + "rov_msg_core_chose_path_skeleton": "Hai scelto la via degli Scheletri.", + "rov_msg_core_chose_path_sverm": "Hai scelto la via degli Sverm.", + "rov_msg_core_chose_path_trenta": "Hai scelto la via dei Trenta.", + "rov_msg_core_chose_path_trol": "Hai scelto la via dei Trol.", + "rov_msg_core_chose_remain_human": "Hai scelto di restare Umano.", + "rov_msg_core_debug_override_cleared": "Override di debug rimosso.", + "rov_msg_core_nothing_reset_personal": "Niente da azzerare: non hai ancora reclamato reliquie ($1/$2).", + "rov_msg_core_nothing_reset_world": "Niente da azzerare: segui la progressione del mondo: $1 ($2/$3).", + "rov_msg_core_progression_reset": "Progressione personale azzerata a $1 ($2/$3). Reclama di nuovo le tue reliquie.", + "rov_msg_core_progression_state": "Stato di progressione: $1", + "rov_msg_core_world_progression_state": "Stato di progressione del mondo: $1", + "rov_msg_draugh_bone_will_not_wake_something": "L'osso non si sveglia. Qualcosa di più antico deve cadere prima.", + "rov_msg_draugh_draugr_consume_only_raw_flesh": "I Draugr consumano solo carne cruda, occhi, interiora o sangue.", + "rov_msg_draugh_has_already_had_one": "Ne ha già avuto uno.", + "rov_msg_draugh_northern_wind_blows": "Soffia il vento del nord", + "rov_msg_draugh_pile_broken_will_not_outlast": "Il mucchio è distrutto. $1 non gli sopravviveranno più di un minuto.", + "rov_msg_draugh_pile_stirs_will_keep_officers": "Il mucchio si agita. Ora terrà anche degli ufficiali.", + "rov_msg_draugh_steal_their_breath_death_denied": "Ruba il loro respiro! La morte è negata.", + "rov_msg_draugh_swarm_terror": "Sciame del terrore!", + "rov_msg_draugh_this_pile_keeps_no_officers": "Questo mucchio non tiene ancora ufficiali.", + "rov_msg_draugh_this_rotting_flesh_fatal_living": "Questa carne putrefatta è letale per i vivi.", + "rov_msg_draugh_wants_flesh_or_head_one": "Vuole carne, o la testa di uno dei suoi.", + "rov_msg_draugh_zombie_ritual_activated_borrowed_time": "Rituale zombie attivato! Il tuo tempo in prestito sta svanendo...", + "rov_msg_dvergar_contract_runic_do_not_sign": "Il contratto è in runico. Non lo firmi.", + "rov_msg_dvergar_do_not_know_what_goes": "Non sai cosa ci va dentro.", + "rov_msg_dvergar_drink": "$1 bevono $2.", + "rov_msg_dvergar_drink_barrel_runs_dry": "$1 bevono $2. Il barile si svuota.", + "rov_msg_dvergar_empty_so_are": "È vuoto, e lo sei anche tu.", + "rov_msg_dvergar_five_contracts_all_ledger_holds": "Cinque contratti è tutto ciò che il registro contiene.", + "rov_msg_dvergar_has_already_had_one": "Ne ha già avuto uno.", + "rov_msg_dvergar_ledger_not_written": "Il registro non è scritto per te.", + "rov_msg_dvergar_ledger_rewritten_better_names_sign": "Il registro è riscritto. Ora lo firmano nomi migliori.", + "rov_msg_dvergar_ledger_shut": "Il registro è chiuso.", + "rov_msg_dvergar_nobody_at_barrel": "Non c'è nessuno al barile.", + "rov_msg_dvergar_not_drop_went_down": "Non è andata giù nemmeno una goccia.", + "rov_msg_dvergar_not_enough_eitr": "Eitr insufficiente", + "rov_msg_dvergar_not_while_she_still_sits": "Non finché lei siede ancora sotto la nebbia.", + "rov_msg_dvergar_runic_overcharge_discharges": "Il sovraccarico runico si scarica", + "rov_msg_dvergar_runic_overcharge_next_blow_loaded": "Sovraccarico runico: il tuo prossimo colpo è carico", + "rov_msg_dvergar_runic_ping_echoes_answer": "Richiamo runico: rispondono $1 echi", + "rov_msg_dvergar_runic_ping_stone_silent": "Richiamo runico: la pietra tace", + "rov_msg_dvergar_signs": "$1 firma.", + "rov_msg_dvergar_there_still": "C'è ancora $1 dentro.", + "rov_msg_dvergar_whatever_does_nothing_anyone": "Qualunque cosa ci sia dentro, non fa niente a nessuno.", + "rov_msg_fenrir_are_cultist": "Sei un Cultista!", + "rov_msg_fenrir_are_fenring": "Sei un Fenring!", + "rov_msg_fenrir_are_ulv": "Sei un Ulv!", + "rov_msg_fenrir_are_wolf": "Sei un Lupo!", + "rov_msg_fenrir_beast_rests_can_only_transform": "La bestia riposa. Puoi trasformarti solo di notte.", + "rov_msg_fenrir_beast_tired": "La bestia è stanca", + "rov_msg_fenrir_blood_will_not_take_something": "Il sangue non attecchisce. Qualcosa nelle pianure deve cadere prima.", + "rov_msg_fenrir_form_cooldown": "La forma $1 è in ricarica ($2:$3).", + "rov_msg_fenrir_formname_cultist": "Cultista", + "rov_msg_fenrir_formname_fenrir": "Fenrir", + "rov_msg_fenrir_has_already_had_one": "Ne ha già avuto uno.", + "rov_msg_fenrir_only_breath_comes_out_fire": "Esce solo fiato. Il fuoco vuole eitr.", + "rov_msg_fenrir_ready": "$1 è pronto!", + "rov_msg_fenrir_returned_human_form": "Sei tornato in forma umana.", + "rov_msg_fenrir_trough_broken_will_not_outlast": "La mangiatoia è distrutta. $1 non le sopravviveranno a lungo.", + "rov_msg_fenrir_trough_takes_line_runs_deeper": "La mangiatoia lo accetta. Ora la discendenza va più a fondo.", + "rov_msg_fenrir_wants_meat_any_meat": "Vuole carne. Qualsiasi carne.", + "rov_msg_fenrir_wants_what_yagluth_left_behind": "Vuole ciò che Yagluth ha lasciato.", + "rov_msg_skadi_are_drake": "Sei un Drake!", + "rov_msg_skadi_are_fader": "Sei Fader!", + "rov_msg_skadi_are_moder": "Sei Moder!", + "rov_msg_skadi_dragon_form_cooldown": "La forma di drago è in ricarica ($1:$2).", + "rov_msg_skadi_dragon_form_fades": "La tua forma di drago svanisce.", + "rov_msg_skadi_dumped_dragon_drake_fader_debug": "Info di debug Dragon/Drake/Fader scritte nella console!", + "rov_msg_skadi_needs_stonecutter_cut_at": "Ha bisogno di uno scalpellino per essere tagliato.", + "rov_msg_skadi_not_enough_stamina": "Stamina insufficiente", + "rov_msg_skadi_returned_human_form": "Sei tornato in forma umana.", + "rov_msg_skadi_stone_does_not_answer": "La pietra non ti risponde.", + "rov_msg_skadi_stonecutter_gone_what_cut_will": "Lo scalpellino non c'è più. Ciò che ha tagliato non gli sopravviverà a lungo.", + "rov_msg_skadi_tear_cold_nothing_wakes_stone": "La lacrima è fredda. Niente si sveglia nella pietra finché la regina della montagna non è caduta.", + "rov_msg_skadi_that_stonecutter_already_holds_will": "Quello scalpellino ne tiene già $1. Non ne terrà altri.", + "rov_msg_skadi_there_are_already_these_within": "Ce ne sono già $1 a una giornata di cammino. La pietra è esaurita.", + "rov_msg_skeleton_has_already_had_one": "Ne ha già avuto uno.", + "rov_msg_skeleton_have_been_resurrected_by_dark": "Sei stato resuscitato dalla magia oscura!", + "rov_msg_skeleton_mortal_food_disgusts": "Il cibo dei mortali ti disgusta.", + "rov_msg_skeleton_nothing_standing_yet_wants_bone": "Non c'è ancora niente in piedi. Vuole ossa.", + "rov_msg_skeleton_pile_broken_fall_where_they": "Il mucchio è distrutto. $1 cadono dove si trovano.", + "rov_msg_skeleton_pile_deepens_rotten_will_stand": "Il mucchio si fa più profondo. Anche i rancidi si alzeranno qui.", + "rov_msg_skeleton_return_pile": "$1 tornano al mucchio.", + "rov_msg_skeleton_rise_follow": "$1 si alzano e ti seguono.", + "rov_msg_skeleton_skeletons_do_not_need_eat": "Gli scheletri non hanno bisogno di mangiare.", + "rov_msg_skeleton_skull_will_not_wake_something": "Il teschio non si sveglia. Qualcosa di più antico deve cadere prima.", + "rov_msg_skeleton_these_bones_answer_only_their": "Queste ossa rispondono solo ai loro simili.", + "rov_msg_skeleton_this_pile_cannot_hold_rotten": "Questo mucchio non può ancora tenere i rancidi.", + "rov_msg_sverm_alchemical_blood_not_food": "Il sangue alchemico non è cibo.", + "rov_msg_sverm_carapace_has_no_room_that": "Il tuo carapace non ha spazio per quello.", + "rov_msg_sverm_colony_will_not_wake_until": "La colonia non si sveglierà finché l'Antico non sarà caduto.", + "rov_msg_sverm_hive_does_not_know": "L'alveare non ti conosce.", + "rov_msg_sverm_hive_full_give_time_digest": "L'alveare è pieno. Dagli tempo di digerire.", + "rov_msg_sverm_market_has_stand_within_metres": "Un mercato deve stare entro $1 metri da un alveare.", + "rov_msg_sverm_no_hive_within_metres_this": "Nessun alveare entro $1 metri. Questo bancone è morto.", + "rov_msg_sverm_not_enough_biomass_bank": "Non c'è abbastanza biomassa nella riserva.", + "rov_msg_sverm_not_hurt": "$1 non è ferito.", + "rov_msg_sverm_nothing_here_will_eat_food": "Qui non c'è niente che mangerebbe. Cibo, legno e resina: miele e pappa reale sono medicine.", + "rov_msg_sverm_only_sverm_can_raise_hive": "Solo gli Sverm possono far sorgere un alveare.", + "rov_msg_sverm_only_sverm_can_raise_market": "Solo gli Sverm possono far sorgere un mercato.", + "rov_msg_sverm_ravager_strain_takes_hold": "Il Ceppo Devastatore attecchisce.", + "rov_msg_sverm_shell_recedes": "Il guscio si ritrae.", + "rov_msg_sverm_strain_has_not_taken_yet": "Il ceppo non ha ancora attecchito.", + "rov_msg_sverm_strain_spent": "Il ceppo è esaurito.", + "rov_msg_sverm_they_are_part_hands": "Fanno parte delle tue mani.", + "rov_msg_sverm_x_biomass_digesting": "$1 x$2 -> +$3 biomassa, in digestione", + "rov_msg_thrall_answer_call": "$1 rispondono alla chiamata.", + "rov_msg_thrall_follows": "$1 ti segue.", + "rov_msg_thrall_no_more_may_walk_with": "Nessun altro può camminare con te.", + "rov_msg_thrall_only_may_walk_with": "Solo $1 possono camminare con te.", + "rov_msg_thrall_refusal_default": "Non ti risponde.", + "rov_msg_thrall_refusal_draugh": "I morti non prendono ordini dai vivi.", + "rov_msg_thrall_refusal_dvergar": "Il tuo nome non è sul contratto.", + "rov_msg_thrall_refusal_skeleton": "Queste ossa rispondono solo ai loro simili.", + "rov_msg_thrall_refusal_sverm": "Non sente l'odore della tua colonia su di te.", + "rov_msg_thrall_refusal_trol": "Non li hai pagati tu.", + "rov_msg_thrall_returns": "$1 torna indietro.", + "rov_msg_thrall_rises_with": "$1 si alza con $2.", + "rov_msg_thrall_stands_down_with": "$1 si ritira con $2.", + "rov_msg_trenta_are_muspell_ash_ember_given": "Sei Muspell, cenere e brace fatte forma.", + "rov_msg_trenta_elder_has_not_fallen_yet": "L'Antico non è ancora caduto.", + "rov_msg_trenta_grows": "Cresce.", + "rov_msg_trenta_no_raw_flesh_rot": "Nessuna carne cruda da far marcire.", + "rov_msg_trenta_nothing_feed_wants_fertilizer": "Niente con cui nutrirlo. Vuole fertilizzante.", + "rov_msg_trenta_nothing_there_feed": "Non c'è niente da nutrire.", + "rov_msg_trenta_return_rooted_form": "Torni alla tua forma radicata.", + "rov_msg_trenta_ripe_already": "È già maturo.", + "rov_msg_trenta_root_will_not_take_hold": "La radice non attecchisce per te.", + "rov_msg_trenta_still_growing_minutes": "Sta ancora crescendo. $1 minuti.", + "rov_msg_trenta_still_rotting_minutes": "Sta ancora marcendo. $1 minuti.", + "rov_msg_trenta_this_one_not_well_nothing": "Questo non sta bene. Niente lo farà affrettare.", + "rov_msg_trenta_trenta_eat_only_what_grows": "I Trenta mangiano solo ciò che nasce da radice e foglia: niente carne, pesce, uova o miele.", + "rov_msg_trol_answers": "$1 risponde.", + "rov_msg_trol_are_already_holding_log": "Stai già tenendo un tronco!", + "rov_msg_trol_five_warbands_all_can_shout": "Cinque bande da guerra è tutto ciò che può chiamare.", + "rov_msg_trol_has_already_had_one": "Ne ha già avuto uno.", + "rov_msg_trol_head_has_nothing_say": "La testa non ha niente da dire.", + "rov_msg_trol_head_will_not_shout": "La testa non urlerà per te.", + "rov_msg_trol_must_true_form_lift_this": "Devi essere nella Vera forma per sollevarlo!", + "rov_msg_trol_no_room_lift": "Non c'è spazio per sollevarlo!", + "rov_msg_trol_not_until_one_belonged_has": "Non finché colui a cui apparteneva non sarà caduto.", + "rov_msg_trol_totem_wears_king_now": "Ora il totem porta un re.", + "rov_msg_ward_already_carry_s_power": "Porti già il potere di $1.", + "rov_msg_ward_s_power_yours": "Il potere di $1 è tuo.", + "rov_msg_ward_switch_personal_progression_first": "Passa prima alla progressione personale.", + "rov_msg_ward_ward_has_no_use_that": "Al sigillo non serve.", + "rov_msg_warvulture_bird_does_not_know": "L'uccello non ti conosce.", + "rov_msg_warvulture_vulture_does_not_answer": "L'avvoltoio non risponde.", + "rov_msg_warvulture_vulture_settles_into_glide": "L'avvoltoio si mette a planare.", + "rov_msg_warvulture_vulture_spirals_down": "L'avvoltoio scende a spirale." +} diff --git a/JotunnModStub/Trenta/ComposterBehaviour.cs b/JotunnModStub/Trenta/ComposterBehaviour.cs index 4dd7524..82c9871 100644 --- a/JotunnModStub/Trenta/ComposterBehaviour.cs +++ b/JotunnModStub/Trenta/ComposterBehaviour.cs @@ -98,7 +98,7 @@ namespace RacesOfValheim if (state == State.Composting) { - user.Message(MessageHud.MessageType.Center, $"Still rotting. {MinutesLeft()} minutes."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_still_rotting_minutes", MinutesLeft())); return false; } @@ -108,7 +108,7 @@ namespace RacesOfValheim if (item == null) item = FindFlesh(inventory); if (item == null) { - user.Message(MessageHud.MessageType.Center, "No raw flesh to rot."); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_no_raw_flesh_rot")); return false; } diff --git a/JotunnModStub/Trenta/GroveBehaviour.cs b/JotunnModStub/Trenta/GroveBehaviour.cs index 0d0fde3..64f3989 100644 --- a/JotunnModStub/Trenta/GroveBehaviour.cs +++ b/JotunnModStub/Trenta/GroveBehaviour.cs @@ -274,9 +274,7 @@ namespace RacesOfValheim if (item == null) item = FindFertilizer(inventory); if (item == null) { - user.Message(MessageHud.MessageType.Center, IsGrown() - ? "Nothing to feed it. It wants Fertilizer." - : $"Still growing. {MinutesLeft()} minutes."); + user.Message(MessageHud.MessageType.Center, (IsGrown() ? ModText.Get("rov_msg_trenta_nothing_feed_wants_fertilizer") : ModText.Get("rov_msg_trenta_still_growing_minutes", MinutesLeft()))); return false; } diff --git a/JotunnModStub/Trenta/TrentaComposter.cs b/JotunnModStub/Trenta/TrentaComposter.cs index 914ec5e..64bcf5d 100644 --- a/JotunnModStub/Trenta/TrentaComposter.cs +++ b/JotunnModStub/Trenta/TrentaComposter.cs @@ -387,19 +387,19 @@ namespace RacesOfValheim { case GrowOutcome.Grown: if (inventory != null) inventory.RemoveItem(item, 1); - player.Message(MessageHud.MessageType.Center, "It grows."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_grows")); break; case GrowOutcome.AlreadyRipe: - player.Message(MessageHud.MessageType.Center, "It is ripe already."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_ripe_already")); break; case GrowOutcome.Unhealthy: - player.Message(MessageHud.MessageType.Center, "This one is not well. Nothing will hurry it."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_this_one_not_well_nothing")); break; case GrowOutcome.NoTarget: - player.Message(MessageHud.MessageType.Center, "Nothing there to feed."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_nothing_there_feed")); break; default: diff --git a/JotunnModStub/Trenta/TrentaElderRoot.cs b/JotunnModStub/Trenta/TrentaElderRoot.cs index d36d67c..ba21936 100644 --- a/JotunnModStub/Trenta/TrentaElderRoot.cs +++ b/JotunnModStub/Trenta/TrentaElderRoot.cs @@ -291,13 +291,13 @@ namespace RacesOfValheim if (!TrentaRace.IsTrenta()) { - __instance.Message(MessageHud.MessageType.Center, "The root will not take hold for you."); + __instance.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_root_will_not_take_hold")); return false; } if (BossProgressionManager.GetCurrentProgressionState() < TrentaConfig.ElderRootUnlockState) { - __instance.Message(MessageHud.MessageType.Center, "The Elder has not fallen yet."); + __instance.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_elder_has_not_fallen_yet")); return false; } diff --git a/JotunnModStub/Trenta/TrentaFoodPatches.cs b/JotunnModStub/Trenta/TrentaFoodPatches.cs index f083369..bc17d19 100644 --- a/JotunnModStub/Trenta/TrentaFoodPatches.cs +++ b/JotunnModStub/Trenta/TrentaFoodPatches.cs @@ -81,7 +81,7 @@ namespace RacesOfValheim if (TrentaConfig.VeganFoodPrefabNames.Contains(prefabName)) return true; - player.Message(MessageHud.MessageType.Center, "The Trenta eat only what grows from root and leaf - no meat, fish, egg or honey."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_trenta_eat_only_what_grows")); return false; // Block consumption } } diff --git a/JotunnModStub/Trenta/TrentaHeartwoodGrove.cs b/JotunnModStub/Trenta/TrentaHeartwoodGrove.cs index a8ca08c..ce9f741 100644 --- a/JotunnModStub/Trenta/TrentaHeartwoodGrove.cs +++ b/JotunnModStub/Trenta/TrentaHeartwoodGrove.cs @@ -39,7 +39,7 @@ namespace RacesOfValheim PieceDensityLimit.Register(TrentaConfig.GrovePieceName, PieceDensityLimit.RadiusForArea(TrentaConfig.GroveDensityAreaKm2), TrentaConfig.GroveMaxInRange, - "This country already answers to {0} of these. Plant it somewhere else."); + "rov_msg_build_limit_trenta_grove"); } // ---------------------------------------------------------------- the seed diff --git a/JotunnModStub/Trenta/TrentaMuspell.cs b/JotunnModStub/Trenta/TrentaMuspell.cs index 6f7fbf6..2864acf 100644 --- a/JotunnModStub/Trenta/TrentaMuspell.cs +++ b/JotunnModStub/Trenta/TrentaMuspell.cs @@ -185,7 +185,7 @@ namespace RacesOfValheim IsTransformed = true; - player.Message(MessageHud.MessageType.Center, "You are Muspell, ash and ember given shape."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_are_muspell_ash_ember_given")); } private static void ExecuteReversion(Player player) @@ -208,7 +208,7 @@ namespace RacesOfValheim IsTransformed = false; - player.Message(MessageHud.MessageType.Center, "You return to your rooted form."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trenta_return_rooted_form")); } } diff --git a/JotunnModStub/Trol/TrolLogWeapon.cs b/JotunnModStub/Trol/TrolLogWeapon.cs index fa42538..f315494 100644 --- a/JotunnModStub/Trol/TrolLogWeapon.cs +++ b/JotunnModStub/Trol/TrolLogWeapon.cs @@ -19,7 +19,7 @@ namespace RacesOfValheim if (!seman.HaveStatusEffect("SE_TrolTrueForm".GetStableHashCode())) { - user.Message(MessageHud.MessageType.Center, "You must be in True Form to lift this!"); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_must_true_form_lift_this")); return; } @@ -47,7 +47,7 @@ namespace RacesOfValheim ItemDrop.ItemData rightItem = HarmonyLib.Traverse.Create(user).Field("m_rightItem").Value; if (rightItem != null && rightItem.m_dropPrefab != null && rightItem.m_dropPrefab.name.StartsWith("TrolWeapon_")) { - user.Message(MessageHud.MessageType.Center, "You are already holding a log!"); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_are_already_holding_log")); return; } @@ -80,7 +80,7 @@ namespace RacesOfValheim Vector2i gridPos = HarmonyLib.Traverse.Create(user.GetInventory()).Method("FindEmptySlot", false).GetValue(); if (gridPos.x == -1) { - user.Message(MessageHud.MessageType.Center, "No room to lift it!"); + user.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_no_room_lift")); return; } newItem.m_gridPos = gridPos; diff --git a/JotunnModStub/Trol/TrolTotem.cs b/JotunnModStub/Trol/TrolTotem.cs index 512437b..9187631 100644 --- a/JotunnModStub/Trol/TrolTotem.cs +++ b/JotunnModStub/Trol/TrolTotem.cs @@ -190,7 +190,7 @@ namespace RacesOfValheim thrall.m_maxFollowers = MaxFollowers; thrall.m_witherSeconds = WitherSeconds; thrall.m_homeCheckRange = HomeCheckRange; - thrall.m_refusalMessage = "They were not paid by you."; + thrall.m_refusalMessage = "$rov_msg_thrall_refusal_trol"; // The sentry's regeneration, reused whole: untouched for ten seconds, then two percent a // second. "Rigenerarsi come i nostri scheletri" is the healing, not a respawn - a dead @@ -374,7 +374,7 @@ namespace RacesOfValheim if (Utils.GetPrefabName(__0.gameObject) != TrolTotem.PieceName) return true; if (TrolRace.IsTrol()) return true; - __instance.Message(MessageHud.MessageType.Center, "The head will not shout for you."); + __instance.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_head_will_not_shout")); return false; } } diff --git a/JotunnModStub/Trol/TrolTotemBehaviour.cs b/JotunnModStub/Trol/TrolTotemBehaviour.cs index 4543646..b567f9d 100644 --- a/JotunnModStub/Trol/TrolTotemBehaviour.cs +++ b/JotunnModStub/Trol/TrolTotemBehaviour.cs @@ -70,7 +70,7 @@ namespace RacesOfValheim if (!TrolRace.IsTrol()) { - player.Message(MessageHud.MessageType.Center, "The head will not shout for you."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_head_will_not_shout")); // With an item in hand, false makes Humanoid.UseItem cover this message with its // generic "$msg_cantuseon"; true tells it the use was handled here. return item != null; @@ -97,19 +97,19 @@ namespace RacesOfValheim { if (IsUpgraded()) { - player.Message(MessageHud.MessageType.Center, "It has already had one."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_has_already_had_one")); return true; } if (BossProgressionManager.GetCurrentProgressionState() < TrolTotem.UpgradeProgressionState) { - player.Message(MessageHud.MessageType.Center, "Not until the one it belonged to has fallen."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_not_until_one_belonged_has")); return true; } player.GetInventory().RemoveItem(item, 1); m_nview.InvokeRPC("RoV_TrolUpgrade"); - player.Message(MessageHud.MessageType.Center, "The totem wears a king now."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_totem_wears_king_now")); return true; } @@ -123,7 +123,7 @@ namespace RacesOfValheim Trader trader = GetComponent(); if (trader == null || StoreGui.instance == null) { - player.Message(MessageHud.MessageType.Center, "The head has nothing to say."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_head_has_nothing_say")); return false; } @@ -148,7 +148,7 @@ namespace RacesOfValheim if (CountGroups() >= TrolTotem.MaxTroops) { - player.Message(MessageHud.MessageType.Center, "Five warbands is all it can shout for."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_five_warbands_all_can_shout")); return; } @@ -163,7 +163,7 @@ namespace RacesOfValheim TakeCoins(inventory, troop.Price); m_nview.InvokeRPC("RoV_TrolHire", troop.Id); - player.Message(MessageHud.MessageType.Center, $"{troop.Display} answers."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_trol_answers", troop.Display)); } private const string CoinsPrefab = "Coins"; diff --git a/JotunnModStub/WarVulture/WarVultureMount.cs b/JotunnModStub/WarVulture/WarVultureMount.cs index 1d8646a..3667b5d 100644 --- a/JotunnModStub/WarVulture/WarVultureMount.cs +++ b/JotunnModStub/WarVulture/WarVultureMount.cs @@ -113,13 +113,13 @@ namespace RacesOfValheim if (!WarVultureConfig.RaceAllowed(race)) { - rider.Message(MessageHud.MessageType.Center, "The bird does not know you."); + rider.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_warvulture_bird_does_not_know")); return; } if (!WarVultureVisual.Ready) { - rider.Message(MessageHud.MessageType.Center, "The vulture does not answer."); + rider.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_warvulture_vulture_does_not_answer")); Jotunn.Logger.LogWarning($"[{Label}] Call refused: the stripped model template was never built, " + "so there is no bird to show. The reason is logged at startup - and " + "refusing is deliberate, because the alternative is putting an unstripped " + @@ -245,7 +245,7 @@ namespace RacesOfValheim { landing = true; landingStartedAt = Time.time; - player.Message(MessageHud.MessageType.Center, "The vulture spirals down."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_warvulture_vulture_spirals_down")); } private void UpdateLanding() @@ -304,7 +304,7 @@ namespace RacesOfValheim wind = Mathf.Max(0f, wind - dt); if (wind <= 0f) { - player.Message(MessageHud.MessageType.Center, "The vulture settles into a glide."); + player.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_warvulture_vulture_settles_into_glide")); } } else if (wind < WarVultureConfig.SprintSeconds.Value) From 0a0d9410e76a3b6bae2aab06cb65776614ed8469 Mon Sep 17 00:00:00 2001 From: kanym Date: Sun, 27 Sep 2026 00:52:01 +0200 Subject: [PATCH 005/216] fix(skadi): Middle Mouse in Drake form no longer spends the attack cooldown on nothing PerformAttackCoroutine starts the cooldown and shows its icon before it looks at the form, and the Drake has no Middle Mouse attack, so the press cost a cooldown and fired nothing. HasAttackForButton now answers for the Drake too and guards all three buttons, as it already did Left Mouse. Co-Authored-By: Claude Opus 5.5 --- JotunnModStub/Skadi/DrakeFormBehavior.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/JotunnModStub/Skadi/DrakeFormBehavior.cs b/JotunnModStub/Skadi/DrakeFormBehavior.cs index 53b9049..b86a59e 100644 --- a/JotunnModStub/Skadi/DrakeFormBehavior.cs +++ b/JotunnModStub/Skadi/DrakeFormBehavior.cs @@ -221,14 +221,14 @@ namespace RacesOfValheim } else if (SkadiConfig.BreathAttackKey.Value.IsDownIgnoringHeldKeys() || RaceInput.PadAttackDown(2)) { - if (Time.time - lastAttackTime >= ATTACK_COOLDOWN) + if (HasAttackForButton(2) && Time.time - lastAttackTime >= ATTACK_COOLDOWN) { StartCoroutine(PerformAttackCoroutine(2)); } } else if ((SkadiConfig.SpinAttackKey.Value.IsDownIgnoringHeldKeys() || RaceInput.PadAttackDown(1)) && formRules.Form == SkadiProgression.FormType.SkeletonDragon) // Fader Spin { - if (Time.time - lastAttackTime >= ATTACK_COOLDOWN) + if (HasAttackForButton(1) && Time.time - lastAttackTime >= ATTACK_COOLDOWN) { StartCoroutine(PerformAttackCoroutine(1)); } @@ -236,13 +236,23 @@ namespace RacesOfValheim } } + // Whether this form has an attack on this button right now. Asked before the cooldown for + // every button, because PerformAttackCoroutine starts the cooldown and shows its icon before + // it looks at the form: a button with nothing behind it used to spend both and fire nothing. + // + // The Drake has only its Left Mouse volley; Middle Mouse is Moder's and Fader's breath. // Airborne Moder keeps the same hand as the ground: the ranged breath is Middle Mouse, and // Left Mouse has no attack in the air (its ground bite and claws cannot reach from up - // there). Checked before the cooldown so a stray left click does not eat the next volley. + // there). private bool HasAttackForButton(int button) { if (formRules == null) return false; + if (formRules.Form == SkadiProgression.FormType.Drake && button != 0) + { + return false; + } + bool airborne = isFlying || isLanding; if (airborne && formRules.Form == SkadiProgression.FormType.Moder && button != 2) { From 99a1817eb0c59e933a5dc19b5d9db33e9b98eaeb Mon Sep 17 00:00:00 2001 From: kanym Date: Mon, 28 Sep 2026 13:55:14 +0200 Subject: [PATCH 006/216] feat(text): hover texts come from translation files What the stations, thralls, the ward and the hive show under the crosshair now reads its text through ModText.Get, and hover.json holds 50 texts in English and Italian. The Aswid thralls and the Race Menu Ward wrote the use key as a literal E; they now use $KEY_Use, which shows the key the player actually bound. For that to work, ModText.Get runs a second localization pass when a $ is left in the result: Valheim resolves tokens once and never looks inside what it inserted, and hover texts go to the HUD without another pass. The Sverm hive stage names stay English for now: the compendium and the hive's goods show them too, and those come with the merchants step. Co-Authored-By: Claude Opus 5.5 --- JotunnModStub/Aswid/AswidThrall.cs | 6 +-- JotunnModStub/Butler/ServantTableBehaviour.cs | 5 +- .../Draugh/DraughSpawnerBehaviour.cs | 9 ++-- .../Dvergar/DvergarBancoBehaviour.cs | 8 +-- .../Dvergar/DvergarBotteBehaviour.cs | 6 +-- .../Fenrir/FenrirMangiatoiaBehaviour.cs | 15 ++---- JotunnModStub/ModText.cs | 9 +++- JotunnModStub/RaceMenuWard.cs | 8 ++- .../Skeleton/SkeletonBonePileBehaviour.cs | 14 ++--- JotunnModStub/Sverm/SvermHive.cs | 6 +-- JotunnModStub/Sverm/SvermHiveStore.cs | 23 ++++---- JotunnModStub/Translations/English/hover.json | 52 +++++++++++++++++++ JotunnModStub/Translations/Italian/hover.json | 52 +++++++++++++++++++ JotunnModStub/Trenta/ComposterBehaviour.cs | 8 ++- JotunnModStub/Trenta/GroveBehaviour.cs | 16 +++--- JotunnModStub/Trol/TrolTotemBehaviour.cs | 6 +-- 16 files changed, 164 insertions(+), 79 deletions(-) create mode 100644 JotunnModStub/Translations/English/hover.json create mode 100644 JotunnModStub/Translations/Italian/hover.json diff --git a/JotunnModStub/Aswid/AswidThrall.cs b/JotunnModStub/Aswid/AswidThrall.cs index 638ce4e..9566bd9 100644 --- a/JotunnModStub/Aswid/AswidThrall.cs +++ b/JotunnModStub/Aswid/AswidThrall.cs @@ -142,15 +142,15 @@ namespace RacesOfValheim if (isEnslaved) { bool following = m_ai != null && m_ai.GetFollowTarget() != null; - return following ? "[E] Stay" : "[E] Follow"; + return (following ? ModText.Get("rov_hover_aswid_stay") : ModText.Get("rov_hover_aswid_follow")); } else { if (BossProgressionManager.GetCurrentProgressionState() < 6) return ""; float cd = AswidRace.GetEnslaveCooldown(); - if (cd > 0) return $"[E] Dominate (Cooldown: {Mathf.CeilToInt(cd / 60f)}m)"; - return "[E] Dominate"; + if (cd > 0) return ModText.Get("rov_hover_aswid_dominate_cooldown_m", Mathf.CeilToInt(cd / 60f)); + return ModText.Get("rov_hover_aswid_dominate"); } } diff --git a/JotunnModStub/Butler/ServantTableBehaviour.cs b/JotunnModStub/Butler/ServantTableBehaviour.cs index bac4a73..e4964e6 100644 --- a/JotunnModStub/Butler/ServantTableBehaviour.cs +++ b/JotunnModStub/Butler/ServantTableBehaviour.cs @@ -137,12 +137,11 @@ namespace RacesOfValheim if (servant == null) { - return m_title + "\nNo servant stands here.\n" + - "[$KEY_Use] Raise one"; + return ModText.Get("rov_hover_butler_no_servant_stands_here_raise", m_title); } string status = servant.Status; - if (string.IsNullOrEmpty(status)) status = "Waiting."; + if (string.IsNullOrEmpty(status)) status = ModText.Get("rov_hover_butler_waiting"); return m_title + "\n" + status; } diff --git a/JotunnModStub/Draugh/DraughSpawnerBehaviour.cs b/JotunnModStub/Draugh/DraughSpawnerBehaviour.cs index 39b1dd7..e7a6a10 100644 --- a/JotunnModStub/Draugh/DraughSpawnerBehaviour.cs +++ b/JotunnModStub/Draugh/DraughSpawnerBehaviour.cs @@ -328,21 +328,20 @@ namespace RacesOfValheim if (thrall.Kind == DraughSpawner.KindElite) aliveElite++; else aliveNormal++; } - string body = $"flesh {Mathf.Floor(GetFlesh())}/{DraughSpawner.FleshPerThrall}, " + - $"risen {aliveNormal}/{AliveCap()}, waiting {GetReserve()}/{DraughSpawner.ReserveCap}"; + string body = ModText.Get("rov_hover_draugh_flesh_risen_waiting", Mathf.Floor(GetFlesh()), DraughSpawner.FleshPerThrall, aliveNormal, AliveCap(), GetReserve(), DraughSpawner.ReserveCap); if (IsUpgraded()) { - body += $"\nofficers {aliveElite}/{EliteCap()}, waiting {GetReserveElite()}/{DraughSpawner.ReserveCapElite}"; + body += ModText.Get("rov_hover_draugh_officers_waiting", aliveElite, EliteCap(), GetReserveElite(), DraughSpawner.ReserveCapElite); } if (m_respawnTimer > 0f) { int left = Mathf.Max(1, Mathf.CeilToInt(DraughSpawner.RespawnSeconds - m_respawnTimer)); - body += $"\nnext rises in {left}s"; + body += ModText.Get("rov_hover_draugh_next_rises_s", left); } - body += "\n[$KEY_Use] Feed it flesh, or a draugr's head"; + body += ModText.Get("rov_hover_draugh_feed_flesh_or_draugr_s"); return Localization.instance.Localize($"{DraughSpawner.PieceDisplayName} ({body})"); } diff --git a/JotunnModStub/Dvergar/DvergarBancoBehaviour.cs b/JotunnModStub/Dvergar/DvergarBancoBehaviour.cs index cb381e0..444b065 100644 --- a/JotunnModStub/Dvergar/DvergarBancoBehaviour.cs +++ b/JotunnModStub/Dvergar/DvergarBancoBehaviour.cs @@ -277,16 +277,16 @@ namespace RacesOfValheim private string Hover() { - string body = $"contracts {CountGroups()}/{DvergarBanco.MaxTroops}"; + string body = ModText.Get("rov_hover_dvergar_contracts", CountGroups(), DvergarBanco.MaxTroops); // Said in as many words: a player who cannot see their own discount will read the lower // number in the window as a mistake. float discount = Mathf.Clamp01(DvergarProgression.Current.TraderBuyDiscount); - if (discount > 0f) body += $"\nyour seal is worth {Mathf.RoundToInt(discount * 100f)}% off"; + if (discount > 0f) body += ModText.Get("rov_hover_dvergar_seal_worth_off", Mathf.RoundToInt(discount * 100f)); - if (!IsUpgraded()) body += "\n(what the Queen left behind buys two more crews)"; + if (!IsUpgraded()) body += ModText.Get("rov_hover_dvergar_what_queen_left_behind_buys"); - body += "\n[$KEY_Use] Read the ledger"; + body += ModText.Get("rov_hover_dvergar_read_ledger"); return Localization.instance.Localize($"{DvergarBanco.PieceDisplayName} ({body})"); } diff --git a/JotunnModStub/Dvergar/DvergarBotteBehaviour.cs b/JotunnModStub/Dvergar/DvergarBotteBehaviour.cs index 32d4a82..de506db 100644 --- a/JotunnModStub/Dvergar/DvergarBotteBehaviour.cs +++ b/JotunnModStub/Dvergar/DvergarBotteBehaviour.cs @@ -252,14 +252,12 @@ namespace RacesOfValheim string body; if (doses <= 0 || string.IsNullOrEmpty(brew)) { - body = "empty\n[$KEY_Use] Pour a brew in"; + body = ModText.Get("rov_hover_dvergar_empty_pour_brew"); } else { int waiting = InRange().Count; - body = $"{DvergarBotte.BrewDisplayName(brew)} {doses}/{DvergarBotte.MaxDoses}" + - $"\n{waiting} at the barrel" + - $"\n[$KEY_Use] Pour a round"; + body = ModText.Get("rov_hover_dvergar_at_barrel_pour_round", DvergarBotte.BrewDisplayName(brew), doses, DvergarBotte.MaxDoses, waiting); } return Localization.instance.Localize($"{DvergarBotte.PieceDisplayName} ({body})"); diff --git a/JotunnModStub/Fenrir/FenrirMangiatoiaBehaviour.cs b/JotunnModStub/Fenrir/FenrirMangiatoiaBehaviour.cs index 8a54e0f..94fce8c 100644 --- a/JotunnModStub/Fenrir/FenrirMangiatoiaBehaviour.cs +++ b/JotunnModStub/Fenrir/FenrirMangiatoiaBehaviour.cs @@ -440,13 +440,10 @@ namespace RacesOfValheim { Count(out int wolves, out int ulv, out int fenrir); - string body = $"meat {Mathf.Floor(GetFeed())}/{FenrirMangiatoia.TankCap}" + - $"\nwolves {wolves}/{WolfCap()}, ulv {ulv}/{UlvCap()}"; + string body = ModText.Get("rov_hover_fenrir_meat_wolves_ulv", Mathf.Floor(GetFeed()), FenrirMangiatoia.TankCap, wolves, WolfCap(), ulv, UlvCap()); // Said in as many words, because the upgrade is deliberately invisible on the model. - body += IsUpgraded() - ? $", fenrir {fenrir}/{FenrirCap()}" - : "\nthe blood is thin here - it raises no fenrir yet"; + body += (IsUpgraded() ? ModText.Get("rov_hover_fenrir_fenrir", fenrir, FenrirCap()) : ModText.Get("rov_hover_fenrir_blood_thin_here_raises_no")); if (m_waitingFor != null) { @@ -458,16 +455,14 @@ namespace RacesOfValheim : m_waitingFor == FenrirMangiatoia.KindUlv ? FenrirMangiatoia.UlvCost : FenrirMangiatoia.FenrirCost; - body += GetFeed() < cost - ? $"\nnot enough meat for the next one ({cost} needed)" - : $"\nnext in {Mathf.Max(1, Mathf.CeilToInt(wait - m_timer))}s"; + body += (GetFeed() < cost ? ModText.Get("rov_hover_fenrir_not_enough_meat_next_one", cost) : ModText.Get("rov_hover_fenrir_next_s", Mathf.Max(1, Mathf.CeilToInt(wait - m_timer)))); } else { - body += "\nthe pack is whole"; + body += ModText.Get("rov_hover_fenrir_pack_whole"); } - body += "\n[$KEY_Use] Fill it with meat"; + body += ModText.Get("rov_hover_fenrir_fill_with_meat"); return Localization.instance.Localize($"{FenrirMangiatoia.PieceDisplayName} ({body})"); } diff --git a/JotunnModStub/ModText.cs b/JotunnModStub/ModText.cs index b5bb3e9..a60f631 100644 --- a/JotunnModStub/ModText.cs +++ b/JotunnModStub/ModText.cs @@ -28,7 +28,14 @@ namespace RacesOfValheim string[] words = args .Select(a => Localization.instance.Localize(a?.ToString() ?? "")) .ToArray(); - return Localization.instance.Localize("$" + key, words); + string text = Localization.instance.Localize("$" + key, words); + + // Valheim resolves tokens in one pass and never looks inside what it put in, so a + // "$KEY_Use" written in a translation came out as it was. Places that localize the + // result again (MessageHud, the stations' own Localize) hid that; hover texts returned + // straight to the HUD did not. A second pass costs nothing when there is no $ left. + if (text.IndexOf('$') >= 0) text = Localization.instance.Localize(text); + return text; } /// diff --git a/JotunnModStub/RaceMenuWard.cs b/JotunnModStub/RaceMenuWard.cs index 94ef37a..e59b237 100644 --- a/JotunnModStub/RaceMenuWard.cs +++ b/JotunnModStub/RaceMenuWard.cs @@ -171,13 +171,11 @@ namespace RacesOfValheim public string GetHoverText() { - string mode = BossProgressionManager.UsePersonalProgression ? "Personal" : "World"; + string mode = (BossProgressionManager.UsePersonalProgression ? ModText.Get("rov_hover_ward_personal") : ModText.Get("rov_hover_ward_world")); int state = BossProgressionManager.GetCurrentProgressionState(); - string boss = BossProgressionManager.GetBossNameForState(state); + string boss = BossProgressionManager.GetBossTokenForState(state); - return $"Race Menu Ward\n{mode} progression - {boss} ({state}/{BossProgressionManager.MaxState})\n" + - "[E] Open\n" + - "[Use item] Offer a boss relic"; + return ModText.Get("rov_hover_ward_race_menu_ward_progression_open", mode, boss, state, BossProgressionManager.MaxState); } public bool Interact(Humanoid user, bool hold, bool alt) diff --git a/JotunnModStub/Skeleton/SkeletonBonePileBehaviour.cs b/JotunnModStub/Skeleton/SkeletonBonePileBehaviour.cs index f65e631..aaa454f 100644 --- a/JotunnModStub/Skeleton/SkeletonBonePileBehaviour.cs +++ b/JotunnModStub/Skeleton/SkeletonBonePileBehaviour.cs @@ -362,25 +362,21 @@ namespace RacesOfValheim // upgraded, so there was no way to know the cap was two until ten trophies had gone in. // Every shelf is now visible whether or not it can be used yet, and says why when it cannot. string body = - $"\nmelee {alive[SkeletonBonePile.KindMelee]}/{GetSlots(SkeletonBonePile.KindMelee)} of {MeleeCap()}" + - $"\narchers {alive[SkeletonBonePile.KindRanged]}/{GetSlots(SkeletonBonePile.KindRanged)} of {RangedCap()}" + - $"\nrotten {alive[SkeletonBonePile.KindRancid]}/{GetSlots(SkeletonBonePile.KindRancid)} of {RancidCap()}"; + ModText.Get("rov_hover_skeleton_melee_archers_rotten", alive[SkeletonBonePile.KindMelee], GetSlots(SkeletonBonePile.KindMelee), MeleeCap(), alive[SkeletonBonePile.KindRanged], GetSlots(SkeletonBonePile.KindRanged), RangedCap(), alive[SkeletonBonePile.KindRancid], GetSlots(SkeletonBonePile.KindRancid), RancidCap()); - if (!IsUpgraded()) body += " (needs a Greater Cursed Skull)"; + if (!IsUpgraded()) body += ModText.Get("rov_hover_skeleton_needs_greater_cursed_skull"); int bonesToward = m_nview.GetZDO().GetInt(KeyBones); int placesLeft = TotalCap() - PaidSlots(); - body += placesLeft > 0 - ? $"\nbone {bonesToward}/{SkeletonBonePile.BonesPerSlot} toward the next of {placesLeft} places" - : "\nevery place is bought"; + body += (placesLeft > 0 ? ModText.Get("rov_hover_skeleton_bone_toward_next_places", bonesToward, SkeletonBonePile.BonesPerSlot, placesLeft) : ModText.Get("rov_hover_skeleton_every_place_bought")); if (m_respawnTimer > 0f) { int left = Mathf.Max(1, Mathf.CeilToInt(RespawnSeconds() - m_respawnTimer)); - body += $"\nnext rises in {left}s"; + body += ModText.Get("rov_hover_skeleton_next_rises_s", left); } - body += "\n[$KEY_Use] Bone in hand to buy a place, empty hands to move the line"; + body += ModText.Get("rov_hover_skeleton_bone_hand_buy_place_empty"); return Localization.instance.Localize($"{SkeletonBonePile.PieceDisplayName} ({body})"); } diff --git a/JotunnModStub/Sverm/SvermHive.cs b/JotunnModStub/Sverm/SvermHive.cs index 468846b..5470162 100644 --- a/JotunnModStub/Sverm/SvermHive.cs +++ b/JotunnModStub/Sverm/SvermHive.cs @@ -461,11 +461,7 @@ namespace RacesOfValheim // Both numbers, always, even when nothing is going down. A line that appears and // disappears is one the player has to notice twice before they believe it. - return $"{SvermHiveStage.NameOf(SvermHiveStage.Of(transform))}\n" + - SvermHiveReadout.Tank(transform) + - $"Beehives {infected} taken of {SvermConfigManagement.Beehives} allowed, {beehives} in range\n" + - SvermWorker.Readout(transform.position) + - "[$KEY_Use] Feed it a stack"; + return ModText.Get("rov_hover_sverm_beehives_taken_allowed_range_feed", SvermHiveStage.NameOf(SvermHiveStage.Of(transform)), SvermHiveReadout.Tank(transform), infected, SvermConfigManagement.Beehives, beehives, SvermWorker.Readout(transform.position)); } // New in Valheim 1.0: Hoverable gained this. Every vanilla implementation returns a diff --git a/JotunnModStub/Sverm/SvermHiveStore.cs b/JotunnModStub/Sverm/SvermHiveStore.cs index fe7a064..ef96cc7 100644 --- a/JotunnModStub/Sverm/SvermHiveStore.cs +++ b/JotunnModStub/Sverm/SvermHiveStore.cs @@ -222,17 +222,15 @@ namespace RacesOfValheim SvermHiveBehaviour hive = Hive; if (hive == null) return Title; - return $"{Title}\n" + - SvermHiveReadout.Tank(hive.transform) + - $"[$KEY_Use] {Prompt}"; + return ModText.Get("rov_hover_sverm_msg", Title, SvermHiveReadout.Tank(hive.transform), Prompt); } } /// The hive at the foot of the nest. Press E, a stack goes in. public class SvermHiveStomach : SvermHiveMouth { - protected override string Title => "Hive Stomach"; - protected override string Prompt => "Feed it a stack"; + protected override string Title => "$rov_hover_sverm_stomach_title"; + protected override string Prompt => "$rov_hover_sverm_stomach_prompt"; protected override bool Use(SvermHiveBehaviour hive, Player player) { @@ -459,13 +457,11 @@ namespace RacesOfValheim SvermHiveBehaviour nest = Nest; if (nest == null) { - return $"{SvermHiveMarketPiece.DisplayName}\n" + - $"No hive within {SvermConfigManagement.AuraRadius:0} metres."; + return ModText.Get("rov_hover_sverm_market_no_hive", SvermHiveMarketPiece.DisplayName, + SvermConfigManagement.AuraRadius.ToString("0")); } - return $"{SvermHiveMarketPiece.DisplayName}\n" + - SvermHiveReadout.Tank(nest.transform) + - "[$KEY_Use] Trade with the hive"; + return ModText.Get("rov_hover_sverm_trade_with_hive", SvermHiveMarketPiece.DisplayName, SvermHiveReadout.Tank(nest.transform)); } } @@ -474,9 +470,10 @@ namespace RacesOfValheim { public static string Tank(Transform nest) { - return $"Biomass {SvermBiomass.Bank(nest):0} / {SvermBiomass.Capacity(nest):0}\n" + - $"Digesting {SvermBiomass.Digesting(nest):0}\n" + - $"Brood eggs {SvermBroodEggs.Count(nest)} / {SvermBroodEggs.Cap(nest)}\n"; + return ModText.Get("rov_hover_sverm_tank", + SvermBiomass.Bank(nest).ToString("0"), SvermBiomass.Capacity(nest).ToString("0"), + SvermBiomass.Digesting(nest).ToString("0"), + SvermBroodEggs.Count(nest), SvermBroodEggs.Cap(nest)); } } diff --git a/JotunnModStub/Translations/English/hover.json b/JotunnModStub/Translations/English/hover.json new file mode 100644 index 0000000..9c09cb6 --- /dev/null +++ b/JotunnModStub/Translations/English/hover.json @@ -0,0 +1,52 @@ +{ + "rov_hover_aswid_dominate": "[$KEY_Use] Dominate", + "rov_hover_aswid_dominate_cooldown_m": "[$KEY_Use] Dominate (Cooldown: $1m)", + "rov_hover_aswid_follow": "[$KEY_Use] Follow", + "rov_hover_aswid_stay": "[$KEY_Use] Stay", + "rov_hover_butler_no_servant_stands_here_raise": "$1\nNo servant stands here.\n[$KEY_Use] Raise one", + "rov_hover_butler_waiting": "Waiting.", + "rov_hover_draugh_feed_flesh_or_draugr_s": "\n[$KEY_Use] Feed it flesh, or a draugr's head", + "rov_hover_draugh_flesh_risen_waiting": "flesh $1/$2, risen $3/$4, waiting $5/$6", + "rov_hover_draugh_next_rises_s": "\nnext rises in $1s", + "rov_hover_draugh_officers_waiting": "\nofficers $1/$2, waiting $3/$4", + "rov_hover_dvergar_at_barrel_pour_round": "$1 $2/$3\n$4 at the barrel\n[$KEY_Use] Pour a round", + "rov_hover_dvergar_contracts": "contracts $1/$2", + "rov_hover_dvergar_empty_pour_brew": "empty\n[$KEY_Use] Pour a brew in", + "rov_hover_dvergar_read_ledger": "\n[$KEY_Use] Read the ledger", + "rov_hover_dvergar_seal_worth_off": "\nyour seal is worth $1% off", + "rov_hover_dvergar_what_queen_left_behind_buys": "\n(what the Queen left behind buys two more crews)", + "rov_hover_fenrir_blood_thin_here_raises_no": "\nthe blood is thin here - it raises no fenrir yet", + "rov_hover_fenrir_fenrir": ", fenrir $1/$2", + "rov_hover_fenrir_fill_with_meat": "\n[$KEY_Use] Fill it with meat", + "rov_hover_fenrir_meat_wolves_ulv": "meat $1/$2\nwolves $3/$4, ulv $5/$6", + "rov_hover_fenrir_next_s": "\nnext in $1s", + "rov_hover_fenrir_not_enough_meat_next_one": "\nnot enough meat for the next one ($1 needed)", + "rov_hover_fenrir_pack_whole": "\nthe pack is whole", + "rov_hover_skeleton_bone_hand_buy_place_empty": "\n[$KEY_Use] Bone in hand to buy a place, empty hands to move the line", + "rov_hover_skeleton_bone_toward_next_places": "\nbone $1/$2 toward the next of $3 places", + "rov_hover_skeleton_every_place_bought": "\nevery place is bought", + "rov_hover_skeleton_melee_archers_rotten": "\nmelee $1/$2 of $3\narchers $4/$5 of $6\nrotten $7/$8 of $9", + "rov_hover_skeleton_needs_greater_cursed_skull": " (needs a Greater Cursed Skull)", + "rov_hover_skeleton_next_rises_s": "\nnext rises in $1s", + "rov_hover_sverm_beehives_taken_allowed_range_feed": "$1\n$2Beehives $3 taken of $4 allowed, $5 in range\n$6[$KEY_Use] Feed it a stack", + "rov_hover_sverm_market_no_hive": "$1\nNo hive within $2 metres.", + "rov_hover_sverm_msg": "$1\n$2[$KEY_Use] $3", + "rov_hover_sverm_stomach_prompt": "Feed it a stack", + "rov_hover_sverm_stomach_title": "Hive Stomach", + "rov_hover_sverm_tank": "Biomass $1 / $2\nDigesting $3\nBrood eggs $4 / $5\n", + "rov_hover_sverm_trade_with_hive": "$1\n$2[$KEY_Use] Trade with the hive", + "rov_hover_trenta_flesh_feed_raw_flesh": "flesh $1/$2\n[$KEY_Use] Feed it raw flesh", + "rov_hover_trenta_grove_growing": "$1 (growing, $2 minutes left)", + "rov_hover_trenta_grove_grown": "$1 ($2 $3/$4, honey $5)\n[$KEY_Use] Feed it Fertilizer", + "rov_hover_trenta_honey_full": "$1, full", + "rov_hover_trenta_honey_next": "$1, next in $2 min", + "rov_hover_trenta_honey_none": "none (no honey item found)", + "rov_hover_trenta_ready_empty": "ready: $1 $2\n[$KEY_Use] Empty it", + "rov_hover_trenta_rotting_minutes_left": "rotting, $1 minutes left", + "rov_hover_trol_call_warbands": "\n[$KEY_Use] Call the warbands", + "rov_hover_trol_warbands": "warbands $1/$2", + "rov_hover_trol_yagluth_drop_hand_buys_king": "\n(a Yagluth drop in hand buys a king's head, and two more bands)", + "rov_hover_ward_personal": "Personal", + "rov_hover_ward_race_menu_ward_progression_open": "$rov_piece_racemenuward_name\n$1 progression - $2 ($3/$4)\n[$KEY_Use] Open\n[Use item] Offer a boss relic", + "rov_hover_ward_world": "World" +} diff --git a/JotunnModStub/Translations/Italian/hover.json b/JotunnModStub/Translations/Italian/hover.json new file mode 100644 index 0000000..d332961 --- /dev/null +++ b/JotunnModStub/Translations/Italian/hover.json @@ -0,0 +1,52 @@ +{ + "rov_hover_aswid_dominate": "[$KEY_Use] Domina", + "rov_hover_aswid_dominate_cooldown_m": "[$KEY_Use] Domina (ricarica: $1m)", + "rov_hover_aswid_follow": "[$KEY_Use] Segui", + "rov_hover_aswid_stay": "[$KEY_Use] Resta", + "rov_hover_butler_no_servant_stands_here_raise": "$1\nQui non c'è nessun servitore.\n[$KEY_Use] Fanne alzare uno", + "rov_hover_butler_waiting": "In attesa.", + "rov_hover_draugh_feed_flesh_or_draugr_s": "\n[$KEY_Use] Nutrilo di carne, o della testa di un draugr", + "rov_hover_draugh_flesh_risen_waiting": "carne $1/$2, risorti $3/$4, in attesa $5/$6", + "rov_hover_draugh_next_rises_s": "\nil prossimo si alza tra $1s", + "rov_hover_draugh_officers_waiting": "\nufficiali $1/$2, in attesa $3/$4", + "rov_hover_dvergar_at_barrel_pour_round": "$1 $2/$3\n$4 al barile\n[$KEY_Use] Versa un giro", + "rov_hover_dvergar_contracts": "contratti $1/$2", + "rov_hover_dvergar_empty_pour_brew": "vuoto\n[$KEY_Use] Versaci una bevanda", + "rov_hover_dvergar_read_ledger": "\n[$KEY_Use] Leggi il registro", + "rov_hover_dvergar_seal_worth_off": "\nil tuo sigillo vale uno sconto del $1%", + "rov_hover_dvergar_what_queen_left_behind_buys": "\n(ciò che la Regina ha lasciato compra altre due squadre)", + "rov_hover_fenrir_blood_thin_here_raises_no": "\nqui il sangue è debole: non fa ancora nascere fenrir", + "rov_hover_fenrir_fenrir": ", fenrir $1/$2", + "rov_hover_fenrir_fill_with_meat": "\n[$KEY_Use] Riempila di carne", + "rov_hover_fenrir_meat_wolves_ulv": "carne $1/$2\nlupi $3/$4, ulv $5/$6", + "rov_hover_fenrir_next_s": "\nil prossimo tra $1s", + "rov_hover_fenrir_not_enough_meat_next_one": "\nnon c'è abbastanza carne per il prossimo (ne serve $1)", + "rov_hover_fenrir_pack_whole": "\nil branco è al completo", + "rov_hover_skeleton_bone_hand_buy_place_empty": "\n[$KEY_Use] Osso in mano per comprare un posto, mani vuote per muovere la fila", + "rov_hover_skeleton_bone_toward_next_places": "\nossa $1/$2 per il prossimo dei $3 posti", + "rov_hover_skeleton_every_place_bought": "\nogni posto è comprato", + "rov_hover_skeleton_melee_archers_rotten": "\nmischia $1/$2 di $3\narcieri $4/$5 di $6\nrancidi $7/$8 di $9", + "rov_hover_skeleton_needs_greater_cursed_skull": " (serve un teschio maledetto superiore)", + "rov_hover_skeleton_next_rises_s": "\nil prossimo si alza tra $1s", + "rov_hover_sverm_beehives_taken_allowed_range_feed": "$1\n$2Alveari $3 occupati su $4 consentiti, $5 nel raggio\n$6[$KEY_Use] Dagli da mangiare una pila", + "rov_hover_sverm_market_no_hive": "$1\nNessun alveare entro $2 metri.", + "rov_hover_sverm_msg": "$1\n$2[$KEY_Use] $3", + "rov_hover_sverm_stomach_prompt": "Dagli da mangiare una pila", + "rov_hover_sverm_stomach_title": "Stomaco dell'alveare", + "rov_hover_sverm_tank": "Biomassa $1 / $2\nIn digestione $3\nUova della covata $4 / $5\n", + "rov_hover_sverm_trade_with_hive": "$1\n$2[$KEY_Use] Commercia con l'alveare", + "rov_hover_trenta_flesh_feed_raw_flesh": "carne $1/$2\n[$KEY_Use] Nutrila di carne cruda", + "rov_hover_trenta_grove_growing": "$1 (in crescita, mancano $2 minuti)", + "rov_hover_trenta_grove_grown": "$1 ($2 $3/$4, miele $5)\n[$KEY_Use] Nutrilo di fertilizzante", + "rov_hover_trenta_honey_full": "$1, pieno", + "rov_hover_trenta_honey_next": "$1, il prossimo tra $2 min", + "rov_hover_trenta_honey_none": "nessuno (oggetto miele non trovato)", + "rov_hover_trenta_ready_empty": "pronto: $1 $2\n[$KEY_Use] Svuotala", + "rov_hover_trenta_rotting_minutes_left": "sta marcendo, mancano $1 minuti", + "rov_hover_trol_call_warbands": "\n[$KEY_Use] Chiama le bande da guerra", + "rov_hover_trol_warbands": "bande da guerra $1/$2", + "rov_hover_trol_yagluth_drop_hand_buys_king": "\n(un bottino di Yagluth in mano compra la testa di un re, e altre due bande)", + "rov_hover_ward_personal": "Personale", + "rov_hover_ward_race_menu_ward_progression_open": "$rov_piece_racemenuward_name\nProgressione $1 - $2 ($3/$4)\n[$KEY_Use] Apri\n[Usa oggetto] Offri una reliquia di boss", + "rov_hover_ward_world": "del mondo" +} diff --git a/JotunnModStub/Trenta/ComposterBehaviour.cs b/JotunnModStub/Trenta/ComposterBehaviour.cs index 82c9871..df7caf1 100644 --- a/JotunnModStub/Trenta/ComposterBehaviour.cs +++ b/JotunnModStub/Trenta/ComposterBehaviour.cs @@ -243,17 +243,15 @@ namespace RacesOfValheim switch (GetState()) { case State.Ready: - body = $"ready: {m_yield} {TrentaConfig.FertilizerDisplayName}\n" + - "[$KEY_Use] Empty it"; + body = ModText.Get("rov_hover_trenta_ready_empty", m_yield, TrentaConfig.FertilizerDisplayName); break; case State.Composting: - body = $"rotting, {MinutesLeft()} minutes left"; + body = ModText.Get("rov_hover_trenta_rotting_minutes_left", MinutesLeft()); break; default: - body = $"flesh {Mathf.Floor(GetFlesh())}/{m_capacity}\n" + - "[$KEY_Use] Feed it raw flesh"; + body = ModText.Get("rov_hover_trenta_flesh_feed_raw_flesh", Mathf.Floor(GetFlesh()), m_capacity); break; } diff --git a/JotunnModStub/Trenta/GroveBehaviour.cs b/JotunnModStub/Trenta/GroveBehaviour.cs index 64f3989..a40c1ce 100644 --- a/JotunnModStub/Trenta/GroveBehaviour.cs +++ b/JotunnModStub/Trenta/GroveBehaviour.cs @@ -318,34 +318,32 @@ namespace RacesOfValheim { if (!IsGrown()) { - return Localization.instance.Localize( - $"{TrentaConfig.GroveDisplayName} (growing, {MinutesLeft()} minutes left)"); + return ModText.Get("rov_hover_trenta_grove_growing", TrentaConfig.GroveDisplayName, MinutesLeft()); } // The honey line is here because it was missing, and its absence is why a grove that // was quietly producing nothing looked exactly like one that was working. - return Localization.instance.Localize( - $"{TrentaConfig.GroveDisplayName} ({TrentaConfig.FertilizerDisplayName} " + - $"{GetFertilizer()}/{TrentaConfig.GroveFertilizerCapacity}, honey {HoneyStatus()})\n" + - "[$KEY_Use] Feed it Fertilizer"); + return ModText.Get("rov_hover_trenta_grove_grown", TrentaConfig.GroveDisplayName, + TrentaConfig.FertilizerDisplayName, GetFertilizer(), TrentaConfig.GroveFertilizerCapacity, + HoneyStatus()); } /// How much honey is in the crate and how long until the next drop of it. private string HoneyStatus() { - if (m_honeyPrefab == null) return "none (no honey item found)"; + if (m_honeyPrefab == null) return ModText.Get("rov_hover_trenta_honey_none"); Inventory inventory = m_container != null ? m_container.GetInventory() : null; int stored = inventory != null ? CountHoney(inventory) : 0; string status = $"{stored}/{m_honeyCapacity}"; - if (stored >= m_honeyCapacity) return status + ", full"; + if (stored >= m_honeyCapacity) return ModText.Get("rov_hover_trenta_honey_full", status); long stamp = m_nview.GetZDO().GetLong(KeyHoneyTime, 0L); if (stamp == 0L || ZNet.instance == null) return status; double left = m_secPerHoney - (ZNet.instance.GetTime() - new DateTime(stamp)).TotalSeconds; - return status + $", next in {Mathf.Max(1, Mathf.CeilToInt((float)left / 60f))} min"; + return ModText.Get("rov_hover_trenta_honey_next", status, Mathf.Max(1, Mathf.CeilToInt((float)left / 60f))); } // ---------------------------------------------------------------- state diff --git a/JotunnModStub/Trol/TrolTotemBehaviour.cs b/JotunnModStub/Trol/TrolTotemBehaviour.cs index b567f9d..cf040b6 100644 --- a/JotunnModStub/Trol/TrolTotemBehaviour.cs +++ b/JotunnModStub/Trol/TrolTotemBehaviour.cs @@ -276,14 +276,14 @@ namespace RacesOfValheim private string Hover() { - string body = $"warbands {CountGroups()}/{TrolTotem.MaxTroops}"; + string body = ModText.Get("rov_hover_trol_warbands", CountGroups(), TrolTotem.MaxTroops); - if (!IsUpgraded()) body += "\n(a Yagluth drop in hand buys a king's head, and two more bands)"; + if (!IsUpgraded()) body += ModText.Get("rov_hover_trol_yagluth_drop_hand_buys_king"); // The roster lives in the window now, not in the hover - so this only has to get the player // to open it. The hold gesture it used to advertise was unreadable: it cycled faster than // anyone could see what was selected. - body += "\n[$KEY_Use] Call the warbands"; + body += ModText.Get("rov_hover_trol_call_warbands"); return Localization.instance.Localize($"{TrolTotem.PieceDisplayName} ({body})"); } From b555da99f266b9da2700290bb818bf347e950a9e Mon Sep 17 00:00:00 2001 From: kanym Date: Mon, 28 Sep 2026 13:55:45 +0200 Subject: [PATCH 007/216] feat(text): the Tame and Grab Log hover prompts come from translation files Co-Authored-By: Claude Opus 5.5 --- JotunnModStub/Aswid/AswidPatches.cs | 2 +- JotunnModStub/Translations/English/hover.json | 2 ++ JotunnModStub/Translations/Italian/hover.json | 2 ++ JotunnModStub/Trol/TrolLogWeapon.cs | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/JotunnModStub/Aswid/AswidPatches.cs b/JotunnModStub/Aswid/AswidPatches.cs index 9361df9..e2bb353 100644 --- a/JotunnModStub/Aswid/AswidPatches.cs +++ b/JotunnModStub/Aswid/AswidPatches.cs @@ -463,7 +463,7 @@ namespace RacesOfValheim // AswidConfig.TameKey) - the hint never matched the working key, and would have // gone stale again the moment that key was rebound. MainKey.ToString() reads back // whatever is actually bound. - __result += $"\n[{AswidConfig.TameKey.Value.MainKey}] Tame"; + __result += ModText.Get("rov_hover_aswid_tame", AswidConfig.TameKey.Value.MainKey); } } } diff --git a/JotunnModStub/Translations/English/hover.json b/JotunnModStub/Translations/English/hover.json index 9c09cb6..daaefdf 100644 --- a/JotunnModStub/Translations/English/hover.json +++ b/JotunnModStub/Translations/English/hover.json @@ -3,6 +3,7 @@ "rov_hover_aswid_dominate_cooldown_m": "[$KEY_Use] Dominate (Cooldown: $1m)", "rov_hover_aswid_follow": "[$KEY_Use] Follow", "rov_hover_aswid_stay": "[$KEY_Use] Stay", + "rov_hover_aswid_tame": "\n[$1] Tame", "rov_hover_butler_no_servant_stands_here_raise": "$1\nNo servant stands here.\n[$KEY_Use] Raise one", "rov_hover_butler_waiting": "Waiting.", "rov_hover_draugh_feed_flesh_or_draugr_s": "\n[$KEY_Use] Feed it flesh, or a draugr's head", @@ -44,6 +45,7 @@ "rov_hover_trenta_ready_empty": "ready: $1 $2\n[$KEY_Use] Empty it", "rov_hover_trenta_rotting_minutes_left": "rotting, $1 minutes left", "rov_hover_trol_call_warbands": "\n[$KEY_Use] Call the warbands", + "rov_hover_trol_grab_log": "\n[$1] Grab Log", "rov_hover_trol_warbands": "warbands $1/$2", "rov_hover_trol_yagluth_drop_hand_buys_king": "\n(a Yagluth drop in hand buys a king's head, and two more bands)", "rov_hover_ward_personal": "Personal", diff --git a/JotunnModStub/Translations/Italian/hover.json b/JotunnModStub/Translations/Italian/hover.json index d332961..01d1d9f 100644 --- a/JotunnModStub/Translations/Italian/hover.json +++ b/JotunnModStub/Translations/Italian/hover.json @@ -3,6 +3,7 @@ "rov_hover_aswid_dominate_cooldown_m": "[$KEY_Use] Domina (ricarica: $1m)", "rov_hover_aswid_follow": "[$KEY_Use] Segui", "rov_hover_aswid_stay": "[$KEY_Use] Resta", + "rov_hover_aswid_tame": "\n[$1] Addomestica", "rov_hover_butler_no_servant_stands_here_raise": "$1\nQui non c'è nessun servitore.\n[$KEY_Use] Fanne alzare uno", "rov_hover_butler_waiting": "In attesa.", "rov_hover_draugh_feed_flesh_or_draugr_s": "\n[$KEY_Use] Nutrilo di carne, o della testa di un draugr", @@ -44,6 +45,7 @@ "rov_hover_trenta_ready_empty": "pronto: $1 $2\n[$KEY_Use] Svuotala", "rov_hover_trenta_rotting_minutes_left": "sta marcendo, mancano $1 minuti", "rov_hover_trol_call_warbands": "\n[$KEY_Use] Chiama le bande da guerra", + "rov_hover_trol_grab_log": "\n[$1] Afferra il tronco", "rov_hover_trol_warbands": "bande da guerra $1/$2", "rov_hover_trol_yagluth_drop_hand_buys_king": "\n(un bottino di Yagluth in mano compra la testa di un re, e altre due bande)", "rov_hover_ward_personal": "Personale", diff --git a/JotunnModStub/Trol/TrolLogWeapon.cs b/JotunnModStub/Trol/TrolLogWeapon.cs index f315494..5480273 100644 --- a/JotunnModStub/Trol/TrolLogWeapon.cs +++ b/JotunnModStub/Trol/TrolLogWeapon.cs @@ -137,7 +137,7 @@ namespace RacesOfValheim if (rightItem != null && rightItem.m_dropPrefab != null && rightItem.m_dropPrefab.name.StartsWith("TrolWeapon_")) return; string key = TrolConfig.GrabLogKey.Value.MainKey.ToString(); - __result += $"\n[{key}] Grab Log"; + __result += ModText.Get("rov_hover_trol_grab_log", key); } } } From 83bade65cbb01b32a949b20280b801bfb0279d0f Mon Sep 17 00:00:00 2001 From: kanym Date: Mon, 28 Sep 2026 15:06:21 +0200 Subject: [PATCH 008/216] fix(trol): True Form no longer switches itself off as it comes on The plugin adds TrolRace itself, but Instance did not know that and built a second copy on first read, so two Updates read every key. Past Fader the True Form key is a toggle: one copy put the form on, the other saw it on in the same frame and took it off. The Trol grew and shrank back with no status. Awake now registers the plugin's copy and removes any other. FurlingRace had the same pattern, harmless there, and gets the same fix. Co-Authored-By: Claude Opus 5.5 --- JotunnModStub/Furling/FurlingRace.cs | 15 +++++++++++++++ JotunnModStub/Trol/TrolRace.cs | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/JotunnModStub/Furling/FurlingRace.cs b/JotunnModStub/Furling/FurlingRace.cs index bf33e7e..da3c59d 100644 --- a/JotunnModStub/Furling/FurlingRace.cs +++ b/JotunnModStub/Furling/FurlingRace.cs @@ -8,6 +8,21 @@ namespace RacesOfValheim public class FurlingRace : MonoBehaviour { private static FurlingRace _instance; + + // The plugin adds this component itself, so Instance must find that copy rather than build + // a second one on first read. Same fault as TrolRace's, where two Updates reading one key + // switched the True Form off as it came on; here the only per-frame work is idempotent, so + // it had no visible effect, but two copies of a race component is never intended. + private void Awake() + { + if (_instance != null && _instance != this) + { + Destroy(this); + return; + } + _instance = this; + } + public static FurlingRace Instance { get diff --git a/JotunnModStub/Trol/TrolRace.cs b/JotunnModStub/Trol/TrolRace.cs index 591ca5b..e1894ec 100644 --- a/JotunnModStub/Trol/TrolRace.cs +++ b/JotunnModStub/Trol/TrolRace.cs @@ -10,6 +10,24 @@ namespace RacesOfValheim public class TrolRace : MonoBehaviour { private static TrolRace _instance; + + // THE PLUGIN ADDS THIS COMPONENT ITSELF, in RacesOfValheim.Awake, and nothing used to tell + // Instance so. The first read of Instance - CreateModAssets, on every start - found _instance + // empty and built a second TrolRace on a GameObject of its own, and from then on two Updates + // read every key. At Fader and past it the True Form key is a toggle: one copy put the form + // on and began to grow, the other saw the form already on in the same frame, was not itself + // transforming, and took it straight off. The Trol grew and shrank back, with no status and + // - since past Fader there is none - no cooldown. + private void Awake() + { + if (_instance != null && _instance != this) + { + Destroy(this); + return; + } + _instance = this; + } + public static TrolRace Instance { get From 2c5079bf8ce7b24690013d2e3d3110648d070c61 Mon Sep 17 00:00:00 2001 From: kanym Date: Mon, 28 Sep 2026 15:06:22 +0200 Subject: [PATCH 009/216] fix(build): the mod's stations appear under Crafting in Valheim 1.0's build menu Valheim 1.0 lists pieces by Piece.m_usage tags. Jotunn sets only the old category, so a cloned piece kept its source's tags: the Crystal Golem and the Bound Sentry, cloned from guard_stone, landed under Decorations. A postfix on PieceManager.AddPiece now sets the tag from the category for every Hammer piece of this mod. Co-Authored-By: Claude Opus 5.5 --- JotunnModStub/PieceUsageTags.cs | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 JotunnModStub/PieceUsageTags.cs diff --git a/JotunnModStub/PieceUsageTags.cs b/JotunnModStub/PieceUsageTags.cs new file mode 100644 index 0000000..d72d926 --- /dev/null +++ b/JotunnModStub/PieceUsageTags.cs @@ -0,0 +1,42 @@ +using HarmonyLib; +using Jotunn.Configs; +using Jotunn.Entities; +using Jotunn.Managers; + +namespace RacesOfValheim +{ + /// + /// Puts every Hammer piece of this mod under the right entry of Valheim 1.0's build menu. + /// + /// The 1.0 menu lists pieces by Piece.m_usage, a set of tags (Crafting, Decor, Defense...), and + /// no longer by the old m_category alone. Jotunn's PieceConfig.Category still sets m_category and + /// leaves m_usage untouched, so a cloned piece keeps the tags of whatever it was cloned from. The + /// Crystal Golem and the Bound Sentry are cloned from guard_stone, a decoration, and turned up + /// under Decorations while every other race station sat under Crafting only because their own + /// source pieces happened to be crafting ones. + /// + /// One patch rather than a line at each of the eighteen registrations: every piece goes through + /// PieceManager.AddPiece, and Jotunn has already applied the config's category by then, so the + /// tag is read off that. Other mods' pieces and the cultivator's are left alone. + /// + [HarmonyPatch(typeof(PieceManager), nameof(PieceManager.AddPiece))] + public static class PieceUsageTags + { + public static void Postfix(CustomPiece customPiece) + { + if (customPiece?.Piece == null || customPiece.SourceMod == null) return; + if (customPiece.SourceMod.GUID != RacesOfValheim.PluginGUID) return; + if (customPiece.PieceTable != PieceTables.Hammer) return; + + switch (customPiece.Piece.m_category) + { + case Piece.PieceCategory.Crafting: + customPiece.Piece.m_usage = Piece.UsageTagFlags.Crafting; + break; + case Piece.PieceCategory.Misc: + customPiece.Piece.m_usage = Piece.UsageTagFlags.Misc; + break; + } + } + } +} From 1bd09ed31d072c5b8efdcc5229cc1364ba8abf96 Mon Sep 17 00:00:00 2001 From: kanym Date: Mon, 28 Sep 2026 18:50:54 +0200 Subject: [PATCH 010/216] feat(text): merchants, troops and the hive's shelf come from translation files The faction merchants' 90 jokes, their generic lines and their names now read from merchants.json. Merchant names use the game's own creature tokens where one matches, so they arrive translated in every language Valheim ships; the Dverg keeps a key of its own, since vanilla's token reads "Dvergr Rogue". The Dvergar and Trol troop names and terms, and the Sverm hive's goods, refusals, stage names and brood kinds, follow. Their panels fill TMP texts themselves, so they localize the names where they draw them. The jokes have English text only for now. Co-Authored-By: Claude Opus 5.5 --- JotunnModStub/Dvergar/DvergarBanco.cs | 10 +- JotunnModStub/Dvergar/DvergarBancoStore.cs | 9 +- .../Factions/FactionMerchantCatalog.cs | 24 +-- .../Factions/FactionMerchantJokes.cs | 180 +++++++++--------- .../Factions/FactionMerchantSetup.cs | 6 +- JotunnModStub/Sverm/SvermBrood.cs | 8 +- JotunnModStub/Sverm/SvermHive.cs | 2 +- JotunnModStub/Sverm/SvermHiveGoods.cs | 58 +++--- JotunnModStub/Sverm/SvermHiveStage.cs | 9 +- .../Translations/English/merchants.json | 133 +++++++++++++ .../Translations/Italian/merchants.json | 43 +++++ JotunnModStub/Trol/TrolTotem.cs | 10 +- JotunnModStub/Trol/TrolTotemStore.cs | 7 +- 13 files changed, 332 insertions(+), 167 deletions(-) create mode 100644 JotunnModStub/Translations/English/merchants.json create mode 100644 JotunnModStub/Translations/Italian/merchants.json diff --git a/JotunnModStub/Dvergar/DvergarBanco.cs b/JotunnModStub/Dvergar/DvergarBanco.cs index 98559ee..34ab389 100644 --- a/JotunnModStub/Dvergar/DvergarBanco.cs +++ b/JotunnModStub/Dvergar/DvergarBanco.cs @@ -99,7 +99,7 @@ namespace RacesOfValheim { new Troop { - Id = "escort", Display = "Escort", Price = 400, NeedsUpgrade = false, Icon = "TrophyDvergr", + Id = "escort", Display = "$rov_troop_dvergar_escort", Price = 400, NeedsUpgrade = false, Icon = "TrophyDvergr", Members = new[] { new KeyValuePair("Dverger", 1), @@ -108,7 +108,7 @@ namespace RacesOfValheim }, new Troop { - Id = "yard_patrol", Display = "Yard Patrol", Price = 700, NeedsUpgrade = false, Icon = "TrophyDvergr", + Id = "yard_patrol", Display = "$rov_troop_dvergar_yard_patrol", Price = 700, NeedsUpgrade = false, Icon = "TrophyDvergr", Members = new[] { new KeyValuePair("Dverger", 2), @@ -117,7 +117,7 @@ namespace RacesOfValheim }, new Troop { - Id = "fire_crew", Display = "Fire Crew", Price = 1000, NeedsUpgrade = false, Icon = "TrophyDvergr", + Id = "fire_crew", Display = "$rov_troop_dvergar_fire_crew", Price = 1000, NeedsUpgrade = false, Icon = "TrophyDvergr", Members = new[] { new KeyValuePair("Dverger", 1), @@ -127,7 +127,7 @@ namespace RacesOfValheim }, new Troop { - Id = "runic_crew", Display = "Runic Crew", Price = 1500, NeedsUpgrade = true, Icon = "TrophyDvergr", + Id = "runic_crew", Display = "$rov_troop_dvergar_runic_crew", Price = 1500, NeedsUpgrade = true, Icon = "TrophyDvergr", Members = new[] { new KeyValuePair("Dverger", 2), @@ -137,7 +137,7 @@ namespace RacesOfValheim }, new Troop { - Id = "ash_guard", Display = "Ash Guard", Price = 2000, NeedsUpgrade = true, Icon = "TrophySeekerBrute", + Id = "ash_guard", Display = "$rov_troop_dvergar_ash_guard", Price = 2000, NeedsUpgrade = true, Icon = "TrophySeekerBrute", Members = new[] { new KeyValuePair("DvergerAshlands", 2), diff --git a/JotunnModStub/Dvergar/DvergarBancoStore.cs b/JotunnModStub/Dvergar/DvergarBancoStore.cs index e225ae0..a313f86 100644 --- a/JotunnModStub/Dvergar/DvergarBancoStore.cs +++ b/JotunnModStub/Dvergar/DvergarBancoStore.cs @@ -123,14 +123,14 @@ namespace RacesOfValheim else Jotunn.Logger.LogWarning($"[Dvergar] No icon on '{troop.Icon}' for {troop.Display}; the row " + "keeps whatever the cloned element was showing."); - element.transform.Find("name").GetComponent().text = troop.Display; + element.transform.Find("name").GetComponent().text = Localization.instance.Localize(troop.Display); // The DISCOUNTED price, because that is what will actually leave the player's pocket. TMP_Text price = FindDescendant(element.transform, "price"); if (price != null) price.text = DvergarBanco.PriceFor(troop).ToString(); UITooltip tooltip = element.GetComponent(); - if (tooltip != null) tooltip.Set(troop.Display, Composition(troop), gui.m_tooltipAnchor, default(Vector2)); + if (tooltip != null) tooltip.Set(Localization.instance.Localize(troop.Display), Composition(troop), gui.m_tooltipAnchor, default(Vector2)); string id = troop.Id; element.GetComponent private static readonly ShopDefinition UlvShop = new ShopDefinition { - DisplayName = "Ulv", + DisplayName = "$enemy_ulv", JokeCategory = JokeLupoLicantropo, Items = WithDefaults(new List { @@ -203,7 +203,7 @@ namespace RacesOfValheim private static readonly ShopDefinition FenringShop = new ShopDefinition { - DisplayName = "Fenring", + DisplayName = "$enemy_fenring", JokeCategory = JokeLupoLicantropo, Items = WithDefaults(new List { @@ -216,7 +216,7 @@ namespace RacesOfValheim private static readonly ShopDefinition CultistShop = new ShopDefinition { - DisplayName = "Cultist", + DisplayName = "$enemy_fenringcultist", JokeCategory = JokeStrega, Items = WithDefaults(new List { @@ -228,7 +228,7 @@ namespace RacesOfValheim private static readonly ShopDefinition DvergShop = new ShopDefinition { - DisplayName = "Dverg", + DisplayName = "$rov_merchant_dverg_name", JokeCategory = JokeNano, Items = WithDefaults(new List { @@ -241,7 +241,7 @@ namespace RacesOfValheim private static readonly ShopDefinition DraugrShop = new ShopDefinition { - DisplayName = "Draugr", + DisplayName = "$enemy_draugr", JokeCategory = JokeNonMortoZombie, Items = WithDefaults(new List { @@ -266,7 +266,7 @@ namespace RacesOfValheim private static readonly ShopDefinition SkeletonShop = new ShopDefinition { - DisplayName = "Skeleton", + DisplayName = "$enemy_skeleton", JokeCategory = JokeScheletro, Items = WithDefaults(new List { @@ -284,7 +284,7 @@ namespace RacesOfValheim private static readonly ShopDefinition GhostShop = new ShopDefinition { - DisplayName = "Ghost", + DisplayName = "$enemy_ghost", JokeCategory = JokeFantasma, Items = WithDefaults(new List { @@ -295,7 +295,7 @@ namespace RacesOfValheim private static readonly ShopDefinition WraithShop = new ShopDefinition { - DisplayName = "Wraith", + DisplayName = "$enemy_wraith", JokeCategory = JokeFantasma, Items = WithDefaults(new List { diff --git a/JotunnModStub/Factions/FactionMerchantJokes.cs b/JotunnModStub/Factions/FactionMerchantJokes.cs index ca811e9..8c38aaa 100644 --- a/JotunnModStub/Factions/FactionMerchantJokes.cs +++ b/JotunnModStub/Factions/FactionMerchantJokes.cs @@ -11,120 +11,120 @@ namespace RacesOfValheim { [FactionMerchantCatalog.JokeScheletro] = new[] { - "What do you call a skeleton who never does his chores? Lazy bones.", - "Why did the skeleton quit his job? His heart wasn't in it.", - "What skeleton was the first emperor of France? Napoleon Bone-aparte.", - "Who is the world's most famous skeleton detective? Sherlock Bones.", - "What did the French skeletons say before eating their dinner? Bone appetit!", - "What do skeletons always order when they go to a restaurant? Spare ribs.", - "How do skeletons call each other? On their tele-bone.", - "What's a skeleton's favorite fruit? Bone-ana!", - "Why are skeletons bad at lying? You can see right through them!", - "Why don't skeletons fight each other? They don't have the guts.", + "$rov_joke_scheletro_01", + "$rov_joke_scheletro_02", + "$rov_joke_scheletro_03", + "$rov_joke_scheletro_04", + "$rov_joke_scheletro_05", + "$rov_joke_scheletro_06", + "$rov_joke_scheletro_07", + "$rov_joke_scheletro_08", + "$rov_joke_scheletro_09", + "$rov_joke_scheletro_10", }, [FactionMerchantCatalog.JokeNonMortoZombie] = new[] { - "When do zombies go to sleep? When they are dead tired.", - "What streets do zombies live on? Dead ends.", - "Where do zombies go sailing? Lake Eerie.", - "What do you call a zombie in pajamas? The sleepwalking dead.", - "How are zombies like computers? They use mega-bites!", - "Why did the zombie lose his lawsuit? He had no leg to stand on!", - "Why did the zombie eat a light bulb? Because he wanted a light snack.", - "Why don't zombies eat clowns? Because they taste funny!", - "Why did the zombie go to school? To improve his brainpower.", - "Zombies are hopeless romantics, seeking their ghoul-mate.", + "$rov_joke_nonmortozombie_01", + "$rov_joke_nonmortozombie_02", + "$rov_joke_nonmortozombie_03", + "$rov_joke_nonmortozombie_04", + "$rov_joke_nonmortozombie_05", + "$rov_joke_nonmortozombie_06", + "$rov_joke_nonmortozombie_07", + "$rov_joke_nonmortozombie_08", + "$rov_joke_nonmortozombie_09", + "$rov_joke_nonmortozombie_10", }, [FactionMerchantCatalog.JokeFantasma] = new[] { - "Why was the ghost lonely? It had no-body.", - "What's the most useless room in a house for a ghost? A living room.", - "What's a ghost's favourite cheese? Ghoul-da cheese.", - "What's a ghost's favourite food? Boo-rritos.", - "What's a ghost's favourite dessert? I-scream.", - "What's a ghost's favourite game? Hide and Shriek.", - "What do you call a ghost with a broken leg? A hoblin goblin.", - "What happens when a ghost gets lost in the fog? He is mist.", - "Ghosts love elevators because it lifts their spirits.", - "Why did the ghost cross the road? Because it was a poultry-geist.", + "$rov_joke_fantasma_01", + "$rov_joke_fantasma_02", + "$rov_joke_fantasma_03", + "$rov_joke_fantasma_04", + "$rov_joke_fantasma_05", + "$rov_joke_fantasma_06", + "$rov_joke_fantasma_07", + "$rov_joke_fantasma_08", + "$rov_joke_fantasma_09", + "$rov_joke_fantasma_10", }, [FactionMerchantCatalog.JokeTroll] = new[] { - "Why do trolls love bridges? They're always crossing into new territory.", - "Why did the troll get a bad grade? He was always under the bridge of understanding.", - "Trolls don't watch TV - they stream mischief.", - "Trolls love parties - they bring the bridge snacks.", - "Trolls hate Mondays - they bridge the gap to Friday.", - "Where do trolls keep their money? Under the bridge, of course.", - "What's a troll's favorite candy? Bridge bars.", - "Why did the troll go to school? To bridge the knowledge gap.", - "What's a troll's favorite movie? The Bridge Runner.", - "What makes a troll laugh? Someone taking it seriously.", + "$rov_joke_troll_01", + "$rov_joke_troll_02", + "$rov_joke_troll_03", + "$rov_joke_troll_04", + "$rov_joke_troll_05", + "$rov_joke_troll_06", + "$rov_joke_troll_07", + "$rov_joke_troll_08", + "$rov_joke_troll_09", + "$rov_joke_troll_10", }, [FactionMerchantCatalog.JokeNano] = new[] { - "A dwarf who loved gardening had a real green thumbelina.", - "Dwarves make excellent bakers; their scone courses are always the shortest.", - "Why do dwarfs make great secret agents? They can really keep things low-key.", - "A dwarf walks into a bar and hits his head - the bar was set too low.", - "Why are dwarfs so good at math? Because it's the little things that count.", - "I saw a dwarf climbing down a prison wall - it was a little condescending.", - "What do dwarfs use to fight trolls? Short swords.", - "What's a dwarf warrior's motto? Small but deadly.", - "A dwarf opened a bakery because he kneaded dough at his level.", - "What do you call a dwarf who can be invisible? A short circuit!", + "$rov_joke_nano_01", + "$rov_joke_nano_02", + "$rov_joke_nano_03", + "$rov_joke_nano_04", + "$rov_joke_nano_05", + "$rov_joke_nano_06", + "$rov_joke_nano_07", + "$rov_joke_nano_08", + "$rov_joke_nano_09", + "$rov_joke_nano_10", }, [FactionMerchantCatalog.JokeLupoLicantropo] = new[] { - "Why did the werewolf laugh while chewing on the skeleton? He got to the funny bone.", - "Why did the werewolf need to talk with the skeleton? He had a bone to pick with him.", - "A what-to-wear-wolf.", - "My werewolf skills are claw-some.", - "'Howl'-oween, hands down - a werewolf's favorite holiday.", - "Why don't werewolves use cell phones? Because they prefer to roam.", - "Why did the werewolf sit in the corner? He didn't want to be spotted.", - "Why don't werewolves gossip? They can't keep a straight paw.", - "You're fur-ociously awesome.", - "Howl you doin' tonight?", + "$rov_joke_lupolicantropo_01", + "$rov_joke_lupolicantropo_02", + "$rov_joke_lupolicantropo_03", + "$rov_joke_lupolicantropo_04", + "$rov_joke_lupolicantropo_05", + "$rov_joke_lupolicantropo_06", + "$rov_joke_lupolicantropo_07", + "$rov_joke_lupolicantropo_08", + "$rov_joke_lupolicantropo_09", + "$rov_joke_lupolicantropo_10", }, [FactionMerchantCatalog.JokeStrega] = new[] { - "Resting witch face.", - "Hag a nice day.", - "What do you call a mage in the desert? A sand-witch.", - "What happens to witches who break the rules at school? They get ex-spelled.", - "What do witches put in their hair? Scare spray.", - "Why did three witches call in the plumber? Hubble, bubble, toilet trouble.", - "Why couldn't the little witch read her spellbook? It was written in curse-ive.", - "Why did the witch become a lawyer? She wanted to practice witchcraft.", - "Witches don't fart. They cast smells.", - "A witch tells the time by looking at her witch watch.", + "$rov_joke_strega_01", + "$rov_joke_strega_02", + "$rov_joke_strega_03", + "$rov_joke_strega_04", + "$rov_joke_strega_05", + "$rov_joke_strega_06", + "$rov_joke_strega_07", + "$rov_joke_strega_08", + "$rov_joke_strega_09", + "$rov_joke_strega_10", }, [FactionMerchantCatalog.JokeLegnoFalegname] = new[] { - "Carpenters nail it every time: that's their true calling.", - "I told my saw a joke: it couldn't handle the cut.", - "I dated a carpenter once: it was a solid relationship.", - "Carpenters have great timing: they always measure up.", - "My friend builds furniture: he really wood make you laugh.", - "A good carpenter never quits: he just saws what he started.", - "I asked the wood if it was okay: it said, 'I'm board.'", - "I made a joke about a piece of wood, but it was too plane.", - "How do trees access the internet? They just log on!", - "Why did the plank cross the road? To get to the other siding!", + "$rov_joke_legnofalegname_01", + "$rov_joke_legnofalegname_02", + "$rov_joke_legnofalegname_03", + "$rov_joke_legnofalegname_04", + "$rov_joke_legnofalegname_05", + "$rov_joke_legnofalegname_06", + "$rov_joke_legnofalegname_07", + "$rov_joke_legnofalegname_08", + "$rov_joke_legnofalegname_09", + "$rov_joke_legnofalegname_10", }, [FactionMerchantCatalog.JokeGoblin] = new[] { - "Those goblin fingers are dexter-gnome-us.", - "Why did the goblin break the vase? He wanted to smash expectations.", - "That goblin really gnome-napped my sandwich.", - "Just goblin around.", - "They love orc-strating trouble.", - "If a goblin smiles at you, check your pockets.", - "Why don't goblins shower? They prefer natural grime.", - "What's a goblin's favorite sport? Lootball.", - "How do goblins shop? Five-finger discount only.", - "What's a goblin's password? 'MineMineMine!'", + "$rov_joke_goblin_01", + "$rov_joke_goblin_02", + "$rov_joke_goblin_03", + "$rov_joke_goblin_04", + "$rov_joke_goblin_05", + "$rov_joke_goblin_06", + "$rov_joke_goblin_07", + "$rov_joke_goblin_08", + "$rov_joke_goblin_09", + "$rov_joke_goblin_10", }, }; } diff --git a/JotunnModStub/Factions/FactionMerchantSetup.cs b/JotunnModStub/Factions/FactionMerchantSetup.cs index abe283a..6c973db 100644 --- a/JotunnModStub/Factions/FactionMerchantSetup.cs +++ b/JotunnModStub/Factions/FactionMerchantSetup.cs @@ -16,9 +16,9 @@ namespace RacesOfValheim private static readonly string[] GenericGreets = { "..." }; private static readonly string[] GenericGoodbye = { "..." }; - private static readonly string[] GenericStartTrade = { "What do you need?" }; - private static readonly string[] GenericBuy = { "Deal." }; - private static readonly string[] GenericSell = { "Thanks." }; + private static readonly string[] GenericStartTrade = { "$rov_merchant_start_trade" }; + private static readonly string[] GenericBuy = { "$rov_merchant_buy" }; + private static readonly string[] GenericSell = { "$rov_merchant_sell" }; public static void Postfix(Character __instance) { diff --git a/JotunnModStub/Sverm/SvermBrood.cs b/JotunnModStub/Sverm/SvermBrood.cs index be162e4..a77e0ac 100644 --- a/JotunnModStub/Sverm/SvermBrood.cs +++ b/JotunnModStub/Sverm/SvermBrood.cs @@ -51,10 +51,10 @@ namespace RacesOfValheim /// public static readonly List Roster = new List { - new Kind { Id = "brood", Display = "Brood", Source = "SeekerBrood", Icon = "TrophySeeker", Price = 100f, Stage = 1, Cooldown = 60f }, - new Kind { Id = "seeker", Display = "Seeker", Source = "Seeker", Icon = "TrophySeeker", Price = 250f, Stage = 2, Cooldown = 150f }, - new Kind { Id = "soldier", Display = "Soldier", Source = "SeekerBrute", Icon = "TrophySeekerBrute", Price = 500f, Stage = 3, Cooldown = 300f }, - new Kind { Id = "gjall", Display = "Gjall", Source = "Gjall", Icon = "TrophyGjall", Price = 1000f, Stage = 4, Cooldown = 600f, SpawnHeight = 10f }, + new Kind { Id = "brood", Display = "$rov_troop_sverm_brood", Source = "SeekerBrood", Icon = "TrophySeeker", Price = 100f, Stage = 1, Cooldown = 60f }, + new Kind { Id = "seeker", Display = "$rov_troop_sverm_seeker", Source = "Seeker", Icon = "TrophySeeker", Price = 250f, Stage = 2, Cooldown = 150f }, + new Kind { Id = "soldier", Display = "$rov_troop_sverm_soldier", Source = "SeekerBrute", Icon = "TrophySeekerBrute", Price = 500f, Stage = 3, Cooldown = 300f }, + new Kind { Id = "gjall", Display = "$rov_troop_sverm_gjall", Source = "Gjall", Icon = "TrophyGjall", Price = 1000f, Stage = 4, Cooldown = 600f, SpawnHeight = 10f }, }; private static int CapOf(string id) diff --git a/JotunnModStub/Sverm/SvermHive.cs b/JotunnModStub/Sverm/SvermHive.cs index 5470162..cc30a09 100644 --- a/JotunnModStub/Sverm/SvermHive.cs +++ b/JotunnModStub/Sverm/SvermHive.cs @@ -468,7 +468,7 @@ namespace RacesOfValheim // serialised m_hoverOffset, which is 0 unless the prefab sets one, so 0 is vanilla behaviour. public float GetHoverOffset() => 0f; - public string GetHoverName() => SvermHiveStage.NameOf(SvermHiveStage.Of(transform)); + public string GetHoverName() => Localization.instance.Localize(SvermHiveStage.NameOf(SvermHiveStage.Of(transform))); private ZNetView nview; private float nextSweep; diff --git a/JotunnModStub/Sverm/SvermHiveGoods.cs b/JotunnModStub/Sverm/SvermHiveGoods.cs index 7ba51e6..6284a2d 100644 --- a/JotunnModStub/Sverm/SvermHiveGoods.cs +++ b/JotunnModStub/Sverm/SvermHiveGoods.cs @@ -68,13 +68,11 @@ namespace RacesOfValheim StageUpgrade(3, "TrophySeekerBrute"), StageUpgrade(4, "TrophySeekerQueen"), - Star(1, "Surrenal Glands", 800f, "TrophySeeker", - "Every troop hatched from now on is born with one star.\n\n" + - "It does nothing for the ones already walking around: what is born is born."), + Star(1, ModText.Get("rov_sverm_good_glands_name"), 800f, "TrophySeeker", + ModText.Get("rov_sverm_good_glands_desc")), - Star(2, "Hyperplasia", 1600f, "TrophySeekerQueen", - "Every troop hatched from now on is born with two stars.\n\n" + - "The colony has to have grown the glands first."), + Star(2, ModText.Get("rov_sverm_good_hyperplasia_name"), 1600f, "TrophySeekerQueen", + ModText.Get("rov_sverm_good_hyperplasia_desc")), }; foreach (SvermBrood.Kind kind in SvermBrood.Roster) shelf.Add(Troop(kind)); @@ -94,23 +92,20 @@ namespace RacesOfValheim return new Good { Id = "blistertick", - Name = SvermBlisterTick.DisplayName, + Name = Localization.instance.Localize(SvermBlisterTick.DisplayName), Price = SvermConfig.TickPrice, Icon = "TrophyTick", - Description = "Buys a PERMANENT slot in the colony. What stands in it runs at whatever " + - "the colony is fighting and bursts, and thirty seconds later the nest " + - "grows another one - no egg, no biomass, forever.\n\n" + - "The blast spares you, your tames and the rest of the colony.", + Description = ModText.Get("rov_sverm_good_tick_desc"), Refusal = hive => { int slots = SvermBlisterTick.SlotsOf(hive.transform); if (slots >= SvermConfigManagement.BlisterTick) { - return $"The colony already keeps {slots} of them."; + return ModText.Get("rov_sverm_refusal_keeps", slots); } - if (SvermBroodEggs.Count(hive.transform) < 1) return "No brood egg ready."; + if (SvermBroodEggs.Count(hive.transform) < 1) return ModText.Get("rov_sverm_refusal_no_egg"); return null; }, @@ -143,20 +138,17 @@ namespace RacesOfValheim return new Good { Id = "stage" + target, - Name = SvermHiveStage.NameOf(target), + Name = Localization.instance.Localize(SvermHiveStage.NameOf(target)), Price = SvermHiveStage.PriceToLeave(from), Icon = icon, - Description = $"Grows the nest into a {SvermHiveStage.NameOf(target)}: it holds " + - $"{SvermHiveStage.Capacity(target):0} biomass instead of " + - $"{SvermHiveStage.Capacity(from):0}, and stands half again as tall.\n\n" + - "It costs this stage's whole tankful, so it leaves the hive all but " + - "empty. Grow or field an army - never both in the same breath.", + Description = ModText.Get("rov_sverm_good_stage_desc", SvermHiveStage.NameOf(target), + SvermHiveStage.Capacity(target).ToString("0"), SvermHiveStage.Capacity(from).ToString("0")), Refusal = hive => { int stage = SvermHiveStage.Of(hive.transform); - if (stage > from) return "Already grown past this."; - if (stage < from) return $"The nest has to be a {SvermHiveStage.NameOf(from)} first."; + if (stage > from) return ModText.Get("rov_sverm_refusal_grown_past"); + if (stage < from) return ModText.Get("rov_sverm_refusal_stage_first", SvermHiveStage.NameOf(from)); return null; }, @@ -187,8 +179,8 @@ namespace RacesOfValheim Refusal = hive => { int have = SvermBroodStars.Of(hive.transform); - if (have >= stars) return "The colony already breeds like this."; - if (have < stars - 1) return "One star at a time."; + if (have >= stars) return ModText.Get("rov_sverm_refusal_already_breeds"); + if (have < stars - 1) return ModText.Get("rov_sverm_refusal_one_star"); return null; }, @@ -208,25 +200,23 @@ namespace RacesOfValheim return new Good { Id = "troop_" + kind.Id, - Name = kind.Display, + Name = Localization.instance.Localize(kind.Display), Price = kind.Price, Icon = kind.Icon, - Description = $"Hatches a {kind.Display}, bound to this nest: it follows when you ask, " + - $"walks home when you let it go, and mends itself.\n\n" + - $"Costs one brood egg as well as the biomass. At most {kind.Cap} of them alive at once.", + Description = ModText.Get("rov_sverm_good_troop_desc", kind.Display, kind.Cap), Refusal = hive => { int stage = SvermHiveStage.Of(hive.transform); if (stage < kind.Stage) { - return $"The nest has to be a {SvermHiveStage.NameOf(kind.Stage)} first."; + return ModText.Get("rov_sverm_refusal_stage_first", SvermHiveStage.NameOf(kind.Stage)); } int alive = SvermBrood.CountAlive(hive, kind); - if (alive >= kind.Cap) return $"The colony is already keeping {alive} of them."; + if (alive >= kind.Cap) return ModText.Get("rov_sverm_refusal_keeping", alive); - if (SvermBroodEggs.Count(hive.transform) < 1) return "No brood egg ready."; + if (SvermBroodEggs.Count(hive.transform) < 1) return ModText.Get("rov_sverm_refusal_no_egg"); return null; }, @@ -265,7 +255,7 @@ namespace RacesOfValheim /// public static string RefusalFor(Good good, SvermHiveBehaviour hive) { - if (good == null || hive == null) return "No hive."; + if (good == null || hive == null) return ModText.Get("rov_sverm_refusal_no_hive"); string ownRefusal = good.Refusal != null ? good.Refusal(hive) : null; if (ownRefusal != null) return ownRefusal; @@ -274,11 +264,11 @@ namespace RacesOfValheim if (waitingSeconds > 0L) { return waitingSeconds >= 60L - ? $"The hive is still working on the last one ({waitingSeconds / 60}m)." - : $"The hive is still working on the last one ({waitingSeconds}s)."; + ? ModText.Get("rov_sverm_refusal_working_m", waitingSeconds / 60) + : ModText.Get("rov_sverm_refusal_working_s", waitingSeconds); } - if (SvermBiomass.Bank(hive.transform) < good.Price) return "Not enough biomass in the bank."; + if (SvermBiomass.Bank(hive.transform) < good.Price) return ModText.Get("rov_msg_sverm_not_enough_biomass_bank"); return null; } diff --git a/JotunnModStub/Sverm/SvermHiveStage.cs b/JotunnModStub/Sverm/SvermHiveStage.cs index 1ccbb8a..09f8b32 100644 --- a/JotunnModStub/Sverm/SvermHiveStage.cs +++ b/JotunnModStub/Sverm/SvermHiveStage.cs @@ -27,12 +27,13 @@ namespace RacesOfValheim public const int Last = 4; /// The four names from section 2. The piece is registered under the first one. + /// Translation tokens, not text: localize them wherever they are shown. public static readonly string[] Names = { - "Brood Mound", - "Gorged Hive", - "Nesting Spire", - "Hive Citadel", + "$rov_piece_sverm_broodmound_name", + "$rov_sverm_stage_gorgedhive", + "$rov_sverm_stage_nestingspire", + "$rov_sverm_stage_hivecitadel", }; public static int Of(Transform nest) diff --git a/JotunnModStub/Translations/English/merchants.json b/JotunnModStub/Translations/English/merchants.json new file mode 100644 index 0000000..3b40204 --- /dev/null +++ b/JotunnModStub/Translations/English/merchants.json @@ -0,0 +1,133 @@ +{ + "rov_joke_fantasma_01": "Why was the ghost lonely? It had no-body.", + "rov_joke_fantasma_02": "What's the most useless room in a house for a ghost? A living room.", + "rov_joke_fantasma_03": "What's a ghost's favourite cheese? Ghoul-da cheese.", + "rov_joke_fantasma_04": "What's a ghost's favourite food? Boo-rritos.", + "rov_joke_fantasma_05": "What's a ghost's favourite dessert? I-scream.", + "rov_joke_fantasma_06": "What's a ghost's favourite game? Hide and Shriek.", + "rov_joke_fantasma_07": "What do you call a ghost with a broken leg? A hoblin goblin.", + "rov_joke_fantasma_08": "What happens when a ghost gets lost in the fog? He is mist.", + "rov_joke_fantasma_09": "Ghosts love elevators because it lifts their spirits.", + "rov_joke_fantasma_10": "Why did the ghost cross the road? Because it was a poultry-geist.", + "rov_joke_goblin_01": "Those goblin fingers are dexter-gnome-us.", + "rov_joke_goblin_02": "Why did the goblin break the vase? He wanted to smash expectations.", + "rov_joke_goblin_03": "That goblin really gnome-napped my sandwich.", + "rov_joke_goblin_04": "Just goblin around.", + "rov_joke_goblin_05": "They love orc-strating trouble.", + "rov_joke_goblin_06": "If a goblin smiles at you, check your pockets.", + "rov_joke_goblin_07": "Why don't goblins shower? They prefer natural grime.", + "rov_joke_goblin_08": "What's a goblin's favorite sport? Lootball.", + "rov_joke_goblin_09": "How do goblins shop? Five-finger discount only.", + "rov_joke_goblin_10": "What's a goblin's password? 'MineMineMine!'", + "rov_joke_legnofalegname_01": "Carpenters nail it every time: that's their true calling.", + "rov_joke_legnofalegname_02": "I told my saw a joke: it couldn't handle the cut.", + "rov_joke_legnofalegname_03": "I dated a carpenter once: it was a solid relationship.", + "rov_joke_legnofalegname_04": "Carpenters have great timing: they always measure up.", + "rov_joke_legnofalegname_05": "My friend builds furniture: he really wood make you laugh.", + "rov_joke_legnofalegname_06": "A good carpenter never quits: he just saws what he started.", + "rov_joke_legnofalegname_07": "I asked the wood if it was okay: it said, 'I'm board.'", + "rov_joke_legnofalegname_08": "I made a joke about a piece of wood, but it was too plane.", + "rov_joke_legnofalegname_09": "How do trees access the internet? They just log on!", + "rov_joke_legnofalegname_10": "Why did the plank cross the road? To get to the other siding!", + "rov_joke_lupolicantropo_01": "Why did the werewolf laugh while chewing on the skeleton? He got to the funny bone.", + "rov_joke_lupolicantropo_02": "Why did the werewolf need to talk with the skeleton? He had a bone to pick with him.", + "rov_joke_lupolicantropo_03": "A what-to-wear-wolf.", + "rov_joke_lupolicantropo_04": "My werewolf skills are claw-some.", + "rov_joke_lupolicantropo_05": "'Howl'-oween, hands down - a werewolf's favorite holiday.", + "rov_joke_lupolicantropo_06": "Why don't werewolves use cell phones? Because they prefer to roam.", + "rov_joke_lupolicantropo_07": "Why did the werewolf sit in the corner? He didn't want to be spotted.", + "rov_joke_lupolicantropo_08": "Why don't werewolves gossip? They can't keep a straight paw.", + "rov_joke_lupolicantropo_09": "You're fur-ociously awesome.", + "rov_joke_lupolicantropo_10": "Howl you doin' tonight?", + "rov_joke_nano_01": "A dwarf who loved gardening had a real green thumbelina.", + "rov_joke_nano_02": "Dwarves make excellent bakers; their scone courses are always the shortest.", + "rov_joke_nano_03": "Why do dwarfs make great secret agents? They can really keep things low-key.", + "rov_joke_nano_04": "A dwarf walks into a bar and hits his head - the bar was set too low.", + "rov_joke_nano_05": "Why are dwarfs so good at math? Because it's the little things that count.", + "rov_joke_nano_06": "I saw a dwarf climbing down a prison wall - it was a little condescending.", + "rov_joke_nano_07": "What do dwarfs use to fight trolls? Short swords.", + "rov_joke_nano_08": "What's a dwarf warrior's motto? Small but deadly.", + "rov_joke_nano_09": "A dwarf opened a bakery because he kneaded dough at his level.", + "rov_joke_nano_10": "What do you call a dwarf who can be invisible? A short circuit!", + "rov_joke_nonmortozombie_01": "When do zombies go to sleep? When they are dead tired.", + "rov_joke_nonmortozombie_02": "What streets do zombies live on? Dead ends.", + "rov_joke_nonmortozombie_03": "Where do zombies go sailing? Lake Eerie.", + "rov_joke_nonmortozombie_04": "What do you call a zombie in pajamas? The sleepwalking dead.", + "rov_joke_nonmortozombie_05": "How are zombies like computers? They use mega-bites!", + "rov_joke_nonmortozombie_06": "Why did the zombie lose his lawsuit? He had no leg to stand on!", + "rov_joke_nonmortozombie_07": "Why did the zombie eat a light bulb? Because he wanted a light snack.", + "rov_joke_nonmortozombie_08": "Why don't zombies eat clowns? Because they taste funny!", + "rov_joke_nonmortozombie_09": "Why did the zombie go to school? To improve his brainpower.", + "rov_joke_nonmortozombie_10": "Zombies are hopeless romantics, seeking their ghoul-mate.", + "rov_joke_scheletro_01": "What do you call a skeleton who never does his chores? Lazy bones.", + "rov_joke_scheletro_02": "Why did the skeleton quit his job? His heart wasn't in it.", + "rov_joke_scheletro_03": "What skeleton was the first emperor of France? Napoleon Bone-aparte.", + "rov_joke_scheletro_04": "Who is the world's most famous skeleton detective? Sherlock Bones.", + "rov_joke_scheletro_05": "What did the French skeletons say before eating their dinner? Bone appetit!", + "rov_joke_scheletro_06": "What do skeletons always order when they go to a restaurant? Spare ribs.", + "rov_joke_scheletro_07": "How do skeletons call each other? On their tele-bone.", + "rov_joke_scheletro_08": "What's a skeleton's favorite fruit? Bone-ana!", + "rov_joke_scheletro_09": "Why are skeletons bad at lying? You can see right through them!", + "rov_joke_scheletro_10": "Why don't skeletons fight each other? They don't have the guts.", + "rov_joke_strega_01": "Resting witch face.", + "rov_joke_strega_02": "Hag a nice day.", + "rov_joke_strega_03": "What do you call a mage in the desert? A sand-witch.", + "rov_joke_strega_04": "What happens to witches who break the rules at school? They get ex-spelled.", + "rov_joke_strega_05": "What do witches put in their hair? Scare spray.", + "rov_joke_strega_06": "Why did three witches call in the plumber? Hubble, bubble, toilet trouble.", + "rov_joke_strega_07": "Why couldn't the little witch read her spellbook? It was written in curse-ive.", + "rov_joke_strega_08": "Why did the witch become a lawyer? She wanted to practice witchcraft.", + "rov_joke_strega_09": "Witches don't fart. They cast smells.", + "rov_joke_strega_10": "A witch tells the time by looking at her witch watch.", + "rov_joke_troll_01": "Why do trolls love bridges? They're always crossing into new territory.", + "rov_joke_troll_02": "Why did the troll get a bad grade? He was always under the bridge of understanding.", + "rov_joke_troll_03": "Trolls don't watch TV - they stream mischief.", + "rov_joke_troll_04": "Trolls love parties - they bring the bridge snacks.", + "rov_joke_troll_05": "Trolls hate Mondays - they bridge the gap to Friday.", + "rov_joke_troll_06": "Where do trolls keep their money? Under the bridge, of course.", + "rov_joke_troll_07": "What's a troll's favorite candy? Bridge bars.", + "rov_joke_troll_08": "Why did the troll go to school? To bridge the knowledge gap.", + "rov_joke_troll_09": "What's a troll's favorite movie? The Bridge Runner.", + "rov_joke_troll_10": "What makes a troll laugh? Someone taking it seriously.", + "rov_merchant_buy": "Deal.", + "rov_merchant_dverg_name": "Dverg", + "rov_merchant_sell": "Thanks.", + "rov_merchant_start_trade": "What do you need?", + "rov_sverm_good_glands_desc": "Every troop hatched from now on is born with one star.\n\nIt does nothing for the ones already walking around: what is born is born.", + "rov_sverm_good_glands_name": "Surrenal Glands", + "rov_sverm_good_hyperplasia_desc": "Every troop hatched from now on is born with two stars.\n\nThe colony has to have grown the glands first.", + "rov_sverm_good_hyperplasia_name": "Hyperplasia", + "rov_sverm_good_stage_desc": "Grows the nest into a $1: it holds $2 biomass instead of $3, and stands half again as tall.\n\nIt costs this stage's whole tankful, so it leaves the hive all but empty. Grow or field an army - never both in the same breath.", + "rov_sverm_good_tick_desc": "Buys a PERMANENT slot in the colony. What stands in it runs at whatever the colony is fighting and bursts, and thirty seconds later the nest grows another one - no egg, no biomass, forever.\n\nThe blast spares you, your tames and the rest of the colony.", + "rov_sverm_good_troop_desc": "Hatches a $1, bound to this nest: it follows when you ask, walks home when you let it go, and mends itself.\n\nCosts one brood egg as well as the biomass. At most $2 of them alive at once.", + "rov_sverm_refusal_already_breeds": "The colony already breeds like this.", + "rov_sverm_refusal_grown_past": "Already grown past this.", + "rov_sverm_refusal_keeping": "The colony is already keeping $1 of them.", + "rov_sverm_refusal_keeps": "The colony already keeps $1 of them.", + "rov_sverm_refusal_no_egg": "No brood egg ready.", + "rov_sverm_refusal_no_hive": "No hive.", + "rov_sverm_refusal_one_star": "One star at a time.", + "rov_sverm_refusal_stage_first": "The nest has to be a $1 first.", + "rov_sverm_refusal_working_m": "The hive is still working on the last one ($1m).", + "rov_sverm_refusal_working_s": "The hive is still working on the last one ($1s).", + "rov_sverm_stage_gorgedhive": "Gorged Hive", + "rov_sverm_stage_hivecitadel": "Hive Citadel", + "rov_sverm_stage_nestingspire": "Nesting Spire", + "rov_troop_dvergar_ash_guard": "Ash Guard", + "rov_troop_dvergar_escort": "Escort", + "rov_troop_dvergar_fire_crew": "Fire Crew", + "rov_troop_dvergar_runic_crew": "Runic Crew", + "rov_troop_dvergar_seal_price": "List price $1 - your seal takes it to $2.", + "rov_troop_dvergar_terms": "They answer the follow command, knit their own wounds shut, keep your truce with the mountain's dvergr, drop nothing, and do not come back. A dead crew is money spent.", + "rov_troop_dvergar_yard_patrol": "Yard Patrol", + "rov_troop_sverm_brood": "Brood", + "rov_troop_sverm_gjall": "Gjall", + "rov_troop_sverm_seeker": "Seeker", + "rov_troop_sverm_soldier": "Soldier", + "rov_troop_trol_goblin_band": "Fuling War Band", + "rov_troop_trol_goblin_patrol": "Fuling Patrol", + "rov_troop_trol_greydwarf_patrol": "Greydwarf Patrol", + "rov_troop_trol_terms": "They answer the follow command, knit their own wounds shut, drop nothing, and do not come back. A dead warband is money spent.", + "rov_troop_trol_troll": "Troll", + "rov_troop_trol_troll_summoned": "Staff Troll" +} diff --git a/JotunnModStub/Translations/Italian/merchants.json b/JotunnModStub/Translations/Italian/merchants.json new file mode 100644 index 0000000..2c9fc31 --- /dev/null +++ b/JotunnModStub/Translations/Italian/merchants.json @@ -0,0 +1,43 @@ +{ + "rov_merchant_buy": "Affare fatto.", + "rov_merchant_dverg_name": "Dverg", + "rov_merchant_sell": "Grazie.", + "rov_merchant_start_trade": "Di cosa hai bisogno?", + "rov_sverm_good_glands_desc": "Da ora ogni truppa che si schiude nasce con una stella.\n\nNon cambia niente per quelle che già camminano: ciò che è nato è nato.", + "rov_sverm_good_glands_name": "Ghiandole surrenali", + "rov_sverm_good_hyperplasia_desc": "Da ora ogni truppa che si schiude nasce con due stelle.\n\nPrima la colonia deve aver sviluppato le ghiandole.", + "rov_sverm_good_hyperplasia_name": "Iperplasia", + "rov_sverm_good_stage_desc": "Fa crescere il nido fino a $1: contiene $2 di biomassa invece di $3, ed è alto una volta e mezza.\n\nCosta l'intera riserva di questo stadio, quindi lascia l'alveare quasi vuoto. Cresci o schiera un esercito: mai entrambe le cose insieme.", + "rov_sverm_good_tick_desc": "Compra un posto PERMANENTE nella colonia. Ciò che lo occupa corre contro chiunque la colonia stia combattendo ed esplode, e trenta secondi dopo il nido ne fa crescere un altro: niente uovo, niente biomassa, per sempre.\n\nL'esplosione risparmia te, le tue creature addomesticate e il resto della colonia.", + "rov_sverm_good_troop_desc": "Fa schiudere: $1, legato a questo nido. Ti segue quando glielo chiedi, torna a casa quando lo lasci andare e si ripara da solo.\n\nCosta un uovo della covata oltre alla biomassa. Al massimo $2 vivi alla volta.", + "rov_sverm_refusal_already_breeds": "La colonia si riproduce già così.", + "rov_sverm_refusal_grown_past": "Già cresciuto oltre questo stadio.", + "rov_sverm_refusal_keeping": "La colonia ne sta già tenendo $1.", + "rov_sverm_refusal_keeps": "La colonia ne tiene già $1.", + "rov_sverm_refusal_no_egg": "Nessun uovo della covata pronto.", + "rov_sverm_refusal_no_hive": "Nessun alveare.", + "rov_sverm_refusal_one_star": "Una stella alla volta.", + "rov_sverm_refusal_stage_first": "Prima il nido deve diventare: $1.", + "rov_sverm_refusal_working_m": "L'alveare sta ancora lavorando all'ultimo ($1m).", + "rov_sverm_refusal_working_s": "L'alveare sta ancora lavorando all'ultimo ($1s).", + "rov_sverm_stage_gorgedhive": "Alveare rigonfio", + "rov_sverm_stage_hivecitadel": "Cittadella dell'alveare", + "rov_sverm_stage_nestingspire": "Guglia del nido", + "rov_troop_dvergar_ash_guard": "Guardia di cenere", + "rov_troop_dvergar_escort": "Scorta", + "rov_troop_dvergar_fire_crew": "Squadra del fuoco", + "rov_troop_dvergar_runic_crew": "Squadra runica", + "rov_troop_dvergar_seal_price": "Prezzo di listino $1: il tuo sigillo lo porta a $2.", + "rov_troop_dvergar_terms": "Rispondono al comando di seguirti, si ricuciono da soli le ferite, rispettano la tua tregua con i dvergr della montagna, non lasciano bottino e non tornano. Una squadra morta è denaro speso.", + "rov_troop_dvergar_yard_patrol": "Ronda del cortile", + "rov_troop_sverm_brood": "Covata", + "rov_troop_sverm_gjall": "Gjall", + "rov_troop_sverm_seeker": "Cercatore", + "rov_troop_sverm_soldier": "Soldato", + "rov_troop_trol_goblin_band": "Banda da guerra Fuling", + "rov_troop_trol_goblin_patrol": "Pattuglia Fuling", + "rov_troop_trol_greydwarf_patrol": "Pattuglia di nani grigi", + "rov_troop_trol_terms": "Rispondono al comando di seguirti, si ricuciono da soli le ferite, non lasciano bottino e non tornano. Una banda morta è denaro speso.", + "rov_troop_trol_troll": "Troll", + "rov_troop_trol_troll_summoned": "Troll del bastone" +} diff --git a/JotunnModStub/Trol/TrolTotem.cs b/JotunnModStub/Trol/TrolTotem.cs index 9187631..99f94c9 100644 --- a/JotunnModStub/Trol/TrolTotem.cs +++ b/JotunnModStub/Trol/TrolTotem.cs @@ -93,7 +93,7 @@ namespace RacesOfValheim { new Troop { - Id = "greydwarf_patrol", Display = "Greydwarf Patrol", Price = 400, NeedsUpgrade = false, Icon = "TrophyGreydwarfBrute", + Id = "greydwarf_patrol", Display = "$rov_troop_trol_greydwarf_patrol", Price = 400, NeedsUpgrade = false, Icon = "TrophyGreydwarfBrute", Members = new[] { new KeyValuePair("Greydwarf", 4), @@ -103,17 +103,17 @@ namespace RacesOfValheim }, new Troop { - Id = "troll", Display = "Troll", Price = 700, NeedsUpgrade = false, Icon = "TrophyForestTroll", + Id = "troll", Display = "$rov_troop_trol_troll", Price = 700, NeedsUpgrade = false, Icon = "TrophyForestTroll", Members = new[] { new KeyValuePair("Troll", 1) } }, new Troop { - Id = "troll_summoned", Display = "Staff Troll", Price = 900, NeedsUpgrade = false, Icon = "TrophyForestTroll", + Id = "troll_summoned", Display = "$rov_troop_trol_troll_summoned", Price = 900, NeedsUpgrade = false, Icon = "TrophyForestTroll", Members = new[] { new KeyValuePair("Troll_Summoned", 1) } }, new Troop { - Id = "goblin_patrol", Display = "Fuling Patrol", Price = 1400, NeedsUpgrade = true, Icon = "TrophyGoblinBrute", + Id = "goblin_patrol", Display = "$rov_troop_trol_goblin_patrol", Price = 1400, NeedsUpgrade = true, Icon = "TrophyGoblinBrute", Members = new[] { new KeyValuePair("Goblin", 4), @@ -123,7 +123,7 @@ namespace RacesOfValheim }, new Troop { - Id = "goblin_band", Display = "Fuling War Band", Price = 2000, NeedsUpgrade = true, Icon = "TrophyGoblin", + Id = "goblin_band", Display = "$rov_troop_trol_goblin_band", Price = 2000, NeedsUpgrade = true, Icon = "TrophyGoblin", Members = new[] { new KeyValuePair("Goblin", 4), diff --git a/JotunnModStub/Trol/TrolTotemStore.cs b/JotunnModStub/Trol/TrolTotemStore.cs index 2bb61f1..c361c1e 100644 --- a/JotunnModStub/Trol/TrolTotemStore.cs +++ b/JotunnModStub/Trol/TrolTotemStore.cs @@ -128,13 +128,13 @@ namespace RacesOfValheim else Jotunn.Logger.LogWarning($"[Trol] No icon on '{troop.Icon}' for {troop.Display}; the row keeps " + "whatever the cloned element was showing."); - element.transform.Find("name").GetComponent().text = troop.Display; + element.transform.Find("name").GetComponent().text = Localization.instance.Localize(troop.Display); TMP_Text price = FindDescendant(element.transform, "price"); if (price != null) price.text = troop.Price.ToString(); UITooltip tooltip = element.GetComponent(); - if (tooltip != null) tooltip.Set(troop.Display, Composition(troop), gui.m_tooltipAnchor, default(Vector2)); + if (tooltip != null) tooltip.Set(Localization.instance.Localize(troop.Display), Composition(troop), gui.m_tooltipAnchor, default(Vector2)); string id = troop.Id; element.GetComponent