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 <noreply@anthropic.com>
This commit is contained in:
parent
9bf144aedc
commit
b177c89c71
34 changed files with 405 additions and 142 deletions
|
|
@ -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<Image>();
|
||||
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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue