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 <noreply@anthropic.com>
This commit is contained in:
kanym 2026-09-26 20:30:03 +02:00
commit b0d18b0654
61 changed files with 606 additions and 200 deletions

View file

@ -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);