feat(trol): make ability numbers and keybinds BepInEx-configurable

Adds TrolConfig.cs, following the established per-race pattern: one
Configuration Manager section per topic (Passive Combat, Throw Rock,
True Form, Log Weapon, Farming), plus the two ability keybinds (Throw
Rock, True Form). Defaults match the previous hardcoded constants
exactly.

Fixes a real sync risk found while wiring it: True Form's scale (2.0
normal / 2.5 at tier 7+) was hardcoded independently in two places - the
local transform routine in TrolRace and the remote-player sizing postfix
in TrolPatches. Both now read the same TrolConfig.TrueFormScaleNormal/
TrueFormScaleAdvanced, so a retuned value can no longer make a Trol one
size to themselves and another size to everyone else.

Tier-gate thresholds and the small hardcoded "normal size by tier" table
(1.2/1.25/1.30) stay untouched, same boundary drawn for every other
race's progression data.

Config sections stay bound alphabetically by race (Aswid, Draugh,
Dvergar, Fenrir, Furling, Skadi, Skeleton, Trenta, Trol) in
RacesOfValheim.Awake() - this is the last of the nine.
This commit is contained in:
kanym 2026-08-06 15:34:05 +02:00
commit 4b5d60d4b6
9 changed files with 170 additions and 35 deletions

View file

@ -35,6 +35,7 @@ namespace RacesOfValheim
SkadiConfig.Bind(Config);
SkeletonConfig.Bind(Config);
TrentaConfigManagement.Bind(Config);
TrolConfig.Bind(Config);
harmony.PatchAll();
gameObject.AddComponent<FenrirRace>();
gameObject.AddComponent<SkadiRace>();