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