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:
parent
14648aaf62
commit
4b5d60d4b6
9 changed files with 170 additions and 35 deletions
|
|
@ -35,7 +35,7 @@ namespace RacesOfValheim
|
|||
name = "SE_TrolTrueForm";
|
||||
m_name = "True Form";
|
||||
m_tooltip = "You have unleashed your inner troll!";
|
||||
m_ttl = 60f; // 1 minute duration
|
||||
m_ttl = TrolConfig.TrueFormDuration.Value;
|
||||
|
||||
GameObject itemPrefab = PrefabManager.Cache.GetPrefab<GameObject>("Stone");
|
||||
if (itemPrefab != null)
|
||||
|
|
@ -57,7 +57,7 @@ namespace RacesOfValheim
|
|||
name = "SE_TrolTrueFormCooldown";
|
||||
m_name = "True Form Cooldown";
|
||||
m_tooltip = "You are exhausted from your True Form.";
|
||||
m_ttl = 600f; // 10 minutes cooldown
|
||||
m_ttl = TrolConfig.TrueFormCooldown.Value;
|
||||
|
||||
GameObject itemPrefab = PrefabManager.Cache.GetPrefab<GameObject>("Stone");
|
||||
if (itemPrefab != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue