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
|
|
@ -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[]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue