fix(compendium): rewrite every race entry against live game code
Most GenerateXText methods described mechanics that didn't match what
the code actually does, some invented stats that never existed. Went
race by race and rewrote each one off the real ConfigEntry/Progression
values, verifying tier gates, keybinds and numbers against the actual
patches rather than restating old prose.
- Aswid: rewritten from scratch. Invented Damage/Armor/Jump-per-state
multipliers that don't exist in AswidConfig; Bat Form, Eclipse and
Tame were missing entirely; the Vampiric Aura was described as a
shield-block channel in bat/mist form when it's actually passive and
always-on (toggled with 'I').
- Furling: was a placeholder ("will be revealed soon...") with only
tiers 5-8 written and a mojibake dash in the base passive. Filled in
Master of Shadows (tier 2), The Wickerman (tier 3) and Dance of the
Dead (tier 4), all missing.
- Trenta: had no compendium entry at all - no title, no branch, no
method. Written from scratch off TrentaConfig/TrentaConfigManagement.
Also fixed a real gameplay bug found while cross-checking: Thorns had
no tier gate and was live from tier 1 instead of Moder (tier 5), the
way its own doc comment and config grouping said it should be.
- Skadi/Skeleton: audited line by line, already accurate, untouched.
- Dvergar: one stale line (claimed 33% height reduction; the live
VisualScale is 22%).
- Draugh: substantial rewrite. Removed a "permanent Corpse Run" buff
that doesn't exist anywhere in the codebase, corrected base-tier
Poison (ordinary until Bonemass, not resistant from tier 1), fixed
the Human Meat trigger (any nearby player death, not humanoid
kills), fixed a false "no stamina to spend" claim, and added the
missing skeleton/draugr/ghost/wraith hostility exemption, Frost
immunity and stagger-crit unlocks.
This commit is contained in:
parent
10e55aff3e
commit
66cea69d33
2 changed files with 285 additions and 48 deletions
|
|
@ -16,7 +16,8 @@ namespace RacesOfValheim
|
|||
"Furling Secrets",
|
||||
"Trol Secrets",
|
||||
"Draugh Secrets",
|
||||
"Dvergar Secrets"
|
||||
"Dvergar Secrets",
|
||||
"Trenta Secrets"
|
||||
};
|
||||
|
||||
public static void UpdateCompendiumText(Player player)
|
||||
|
|
@ -72,20 +73,29 @@ namespace RacesOfValheim
|
|||
{
|
||||
GenerateDvergarText(knownTexts, state);
|
||||
}
|
||||
else if (currentRace == TrentaConfig.RaceId)
|
||||
{
|
||||
GenerateTrentaText(knownTexts, state);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads its figures straight out of the live rules rather than restating them, so the
|
||||
/// entry cannot drift from the code the way a hand-written percentage would.
|
||||
/// entry cannot drift from the code the way a hand-written percentage would. One prose
|
||||
/// figure had already drifted before this pass: the height reduction was hand-written as
|
||||
/// "a third shorter", left over from when DvergarConfig.VisualScale was 0.70 (-30%) - the
|
||||
/// comment on that field says it was "nudged up" to 0.78 (-22%) once it read too small on
|
||||
/// screen, and the compendium line was never updated to follow. Reads the live scale now.
|
||||
/// </summary>
|
||||
private static void GenerateDvergarText(Dictionary<string, string> knownTexts, int state)
|
||||
{
|
||||
DvergarProgression.DvergarRules rules = DvergarProgression.GetRules(state);
|
||||
int heightReductionPercent = Mathf.RoundToInt((1f - DvergarConfig.VisualScale) * 100f);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("The Dvergar's Craft\n");
|
||||
|
||||
sb.AppendLine($"[Base Passive] Small and Stubborn: You stand a third shorter than a human and carry {rules.HealthMalus:0.#} less health for it. The dvergr hood never leaves your head - wear whatever helm you please and keep every point of its protection, but the runes will always show you as one of the deep folk.\n");
|
||||
sb.AppendLine($"[Base Passive] Small and Stubborn: You stand {heightReductionPercent}% shorter than a human and carry {rules.HealthMalus:0.#} less health for it. The dvergr hood never leaves your head - wear whatever helm you please and keep every point of its protection, but the runes will always show you as one of the deep folk.\n");
|
||||
|
||||
sb.AppendLine($"[Base Passive] Runic Spark: The runes in your blood earth themselves through whatever you strike. Every blow you land carries +{rules.ElementalDamage:0.#} Lightning damage - a bonus that grows as each boss falls.\n");
|
||||
|
||||
|
|
@ -117,33 +127,65 @@ namespace RacesOfValheim
|
|||
knownTexts["Dvergar Secrets"] = sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rewritten off the live DraughConfig values, the way Fenrir's and Aswid's entries are.
|
||||
/// The base passive claimed innate Poison resistance that Draugh_Damage_Patch never
|
||||
/// grants at tier 1 - the real always-on modifiers are 20% Physical resistance and 50%
|
||||
/// extra Fire/Spirit damage taken, plus the infinite stamina Draugh shares with Skeleton
|
||||
/// and Aswid (Player_UseStamina_Patch) - none of which appeared here. "Slowly We Rot"
|
||||
/// claimed Wet immunity and faster swimming that SE_Wet_Setup_Patch does not grant; it
|
||||
/// only flips Wet's health regen positive and drops its stamina penalty. "Flesh and the
|
||||
/// Power It Holds" invented a "Corpse Run buff" that appears nowhere in the codebase and
|
||||
/// described Human Meat as a kill drop from humanoid enemies, when Draugh_DeathAura_Patch
|
||||
/// actually drops it from any player dying near a Draugh - and the real tier 4 unlock
|
||||
/// (Poison Immunity, a stagger crit bonus, no skill drain on death) was missing entirely.
|
||||
/// Tier 5 never mentioned Frost Immunity, which Draugh_Damage_Patch also grants at that
|
||||
/// tier alongside the frost nova on parry. Also given the "[Boss Unlock]" tier headers
|
||||
/// every other race's entry uses, which this one never had.
|
||||
/// </summary>
|
||||
private static void GenerateDraughText(Dictionary<string, string> knownTexts, int state, Player player)
|
||||
{
|
||||
int physResistPercent = Mathf.RoundToInt((1f - DraughConfig.PhysicalResistMultiplier.Value) * 100f);
|
||||
int fireSpiritWeakPercent = Mathf.RoundToInt((DraughConfig.FireSpiritWeaknessMultiplier.Value - 1f) * 100f);
|
||||
int wetRegenPercent = Mathf.RoundToInt((DraughConfig.WetHealthRegenMultiplier.Value - 1f) * 100f);
|
||||
int poisonOnHitPercent = Mathf.RoundToInt(DraughConfig.PoisonOnHitPercent.Value * 100f);
|
||||
int poisonSplashDamage = Mathf.RoundToInt(DraughConfig.PoisonSplashDamage.Value);
|
||||
int staggerCritPercent = Mathf.RoundToInt((DraughConfig.StaggerCritMultiplier.Value - 1f) * 100f);
|
||||
int deathAuraRadius = Mathf.RoundToInt(DraughConfig.DeathAuraRadius.Value);
|
||||
int northWindCooldown = Mathf.RoundToInt(DraughConfig.NorthWindCooldown.Value);
|
||||
int northWindRadius = Mathf.RoundToInt(DraughConfig.NorthWindRadius.Value);
|
||||
int northWindDamage = Mathf.RoundToInt(DraughConfig.NorthWindFrostDamage.Value);
|
||||
int undyingCooldownMinutes = Mathf.RoundToInt(DraughConfig.UndyingWillCooldown.Value / 60f);
|
||||
int eitrDrainPerSecond = Mathf.RoundToInt(DraughConfig.UndyingWillEitrDrainPerTick.Value / DraughConfig.UndyingWillTickInterval.Value);
|
||||
int swarmCount = DraughConfig.SwarmSpawnCount.Value;
|
||||
int swarmCooldown = Mathf.RoundToInt(DraughConfig.SwarmSpawnCooldown.Value);
|
||||
int stealBreathHealPercent = Mathf.RoundToInt(DraughConfig.StealBreathHealPercent.Value * 100f);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("The Draugh's Awakening\n");
|
||||
|
||||
sb.AppendLine("[Base Passive] Born Dead, Buried Alive: You are a decaying undead warrior. You have innate resistance to Poison, but are weak to Fire and Spirit damage. Your digestive system adapts to death, allowing you to consume raw and rotten meat (Neck tail, raw meat, entrails, ooze, etc.).\n");
|
||||
sb.AppendLine($"[Base Passive] Born Dead, Buried Alive: You take {physResistPercent}% less Physical (blunt/slash/pierce) damage, but Fire and Spirit strike you {fireSpiritWeakPercent}% harder. Skeletons, draugr, ghosts and wraiths no longer see you as prey. Your digestive system adapts to death, allowing you to consume raw and rotten meat (neck tail, raw meat, entrails, blood, etc.) - proper cooked food and berries disgust you and cannot be eaten.\n");
|
||||
|
||||
if (state >= 2)
|
||||
sb.AppendLine("Slowly We Rot (Passive): You are no longer hindered by water. You gain immunity to the Wet effect, your movement speed in water is greatly increased, and you passively regenerate health while wet or swimming.\n");
|
||||
|
||||
sb.AppendLine($"[Eikthyr Unlock] Slowly We Rot (Passive): Being Wet no longer saps your stamina regeneration, and it heals rather than does nothing for you - your health regenerates {wetRegenPercent}% faster while wet or swimming.\n");
|
||||
|
||||
if (state >= 3)
|
||||
sb.AppendLine("Toxic Trace (Passive): Your physical attacks are laced with the swamp's decay. Enemies struck by your physical weapons suffer additional poison damage over time.\n");
|
||||
|
||||
sb.AppendLine($"[The Elder Unlock] Rotting Edge (Passive/Parry): Your physical attacks are laced with the swamp's decay, adding poison damage worth {poisonOnHitPercent}% of the physical harm you deal. A successful parry also splashes {poisonSplashDamage} poison damage onto whoever you parried.\n");
|
||||
|
||||
if (state >= 4)
|
||||
sb.AppendLine("Flesh and the Power It Holds (Passive): Slaying humanoid enemies drops Human Meat. Consuming it grants incredible buffs. You also gain the Corpse Run buff permanently.\n");
|
||||
|
||||
sb.AppendLine($"[Bonemass Unlock] Undead Fortitude (Passive): Poison can no longer touch you at all. Striking a staggered enemy deals {staggerCritPercent}% more physical damage, and death no longer costs you skill experience. Should any player die within {deathAuraRadius}m of you, their fall leaves Human Meat behind - flesh only a Draugh can stomach.\n");
|
||||
|
||||
if (state >= 5)
|
||||
sb.AppendLine("At the Heart of Winter (Parry Effect): When you successfully parry an attack, you unleash a freezing nova of frost magic around you, pushing back and damaging enemies (20 second cooldown).\n");
|
||||
|
||||
sb.AppendLine($"[Moder Unlock] Grave Chill (Passive/Parry): Frost can no longer touch you at all. A successful parry now also unleashes a freezing nova, dealing {northWindDamage} Frost damage and pushing back everything within {northWindRadius}m of you - the nova has its own {northWindCooldown} second cooldown, separate from Rotting Edge's poison splash, which still fires on every parry.\n");
|
||||
|
||||
if (state >= 6)
|
||||
sb.AppendLine("Zombie Ritual (Passive Survival): When you take fatal damage, you do not die. Instead, you enter a ghostly state, becoming immune to all damage. While in this state, your Eitr drains rapidly. If your Eitr hits zero, you truly die.\n");
|
||||
|
||||
sb.AppendLine($"[Yagluth Unlock] Zombie Ritual (Passive Survival): When you take fatal damage, you do not die. Instead, you enter a ghostly state, immune to all damage, while your Eitr drains at {eitrDrainPerSecond} per second. If your Eitr hits zero before you are saved, you truly die. Once triggered, the ritual cannot save you again for {undyingCooldownMinutes} minutes.\n");
|
||||
|
||||
if (state >= 7)
|
||||
sb.AppendLine("Swarm of Terror (Retaliation): Whenever you are struck in melee combat, you automatically spawn 2 Seeker Broods to fight for you. They live for 9.5 seconds and have a 10 second cooldown.\n");
|
||||
|
||||
sb.AppendLine($"[The Queen Unlock] Swarm of Terror (Retaliation): Whenever you are struck in melee combat, you automatically spawn {swarmCount} Seeker Broods to fight for you. They live for {DraughConfig.SwarmBroodLifetime.Value:0.#} seconds, with a {swarmCooldown} second cooldown between spawns.\n");
|
||||
|
||||
if (state >= 8)
|
||||
sb.AppendLine("Steal Their Breath (Execution): While surviving in the 'Zombie Ritual' ghost state, scoring a killing blow on any enemy will instantly restore 25% of your maximum health, stop the Eitr drain, and save your life, bringing you fully back to the world of the living.\n");
|
||||
sb.AppendLine($"[Fader Unlock] Steal Their Breath (Execution): While surviving in the Zombie Ritual's ghost state, scoring a killing blow on any enemy will instantly restore {stealBreathHealPercent}% of your maximum health, stop the Eitr drain, and save your life, bringing you fully back to the world of the living.\n");
|
||||
|
||||
knownTexts["Draugh Secrets"] = sb.ToString();
|
||||
}
|
||||
|
|
@ -153,16 +195,16 @@ namespace RacesOfValheim
|
|||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("The Trol's Heritage\n");
|
||||
|
||||
sb.AppendLine($"Base Passive: Physical kills automatically consume enemies (if edible). You are natively 20% larger than a human with immense strength. You have +200 Max Carry Weight and gain +3 Armor per boss defeated.\n");
|
||||
sb.AppendLine($"Base Passive: Physical kills automatically consume enemies (if edible). You are natively 20% larger than a human with immense strength. You have +200 Max Carry Weight, gain +3 Armor per boss defeated, and carry a 4th food slot from your very first meal - no boss required.\n");
|
||||
|
||||
if (state >= 1)
|
||||
sb.AppendLine("Eikthyr Defeated: Increased XP gain for physical labor and blunt combat (Clubs, Unarmed, Axes, Pickaxes, WoodCutting).\n");
|
||||
|
||||
|
||||
if (state >= 2)
|
||||
sb.AppendLine("The Elder Defeated: Unlocked Rock Throwing ability. +10% passive health regeneration.\n");
|
||||
|
||||
|
||||
if (state >= 3)
|
||||
sb.AppendLine("Bonemass Defeated: +5% Size, +50 Carry Weight, +10 Damage to Clubs/Unarmed, +10 Rock Throwing Damage. Unlocked 4th Food Slot.\n");
|
||||
sb.AppendLine("Bonemass Defeated: +5% Size, +50 Carry Weight, +10 Damage to Clubs/Unarmed, +10 Rock Throwing Damage.\n");
|
||||
|
||||
if (state >= 4)
|
||||
sb.AppendLine("Moder Defeated: Unlocked True Form (Transformation ability).\n");
|
||||
|
|
@ -179,60 +221,133 @@ namespace RacesOfValheim
|
|||
knownTexts["Trol Secrets"] = sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rewritten off the live AswidConfig/AswidProgression values, the way Fenrir's and Skadi's
|
||||
/// entries are. The old text invented a Jump Bonus Per State that doesn't exist (jump actually
|
||||
/// rides the same SpeedBonusPerState as move speed, in AswidStatusEffects.UpdateStats), used
|
||||
/// state*3/state*5 multipliers that don't match ArmorBonusPerState=1/DamageBonusPerState=2, and
|
||||
/// described the Vampiric Aura as a shield-block channel in bat/mist form only - it is actually
|
||||
/// passive and always-on in every form (AswidRace.HandleVampiricAura), toggled with 'I'. Bat
|
||||
/// Form, Eclipse, and Tame were missing entirely.
|
||||
/// </summary>
|
||||
private static void GenerateAswidText(Dictionary<string, string> knownTexts, int state)
|
||||
{
|
||||
int spd = state * 3;
|
||||
int jmp = state * 3;
|
||||
int arm = state * 3;
|
||||
int dmg = state * 5;
|
||||
int arm = Mathf.RoundToInt(AswidConfig.ArmorBonusPerState.Value * state);
|
||||
int dmg = Mathf.RoundToInt(AswidConfig.DamageBonusPerState.Value * state);
|
||||
int spd = Mathf.RoundToInt(AswidConfig.SpeedBonusPerState.Value * state * 100f);
|
||||
int lifesteal = state * 2;
|
||||
int auraRadiusDay = Mathf.RoundToInt(AswidConfig.AuraRadiusDay.Value);
|
||||
int auraRadiusNight = Mathf.RoundToInt(AswidConfig.AuraRadiusNight.Value);
|
||||
int auraExecute = Mathf.RoundToInt(AswidConfig.AuraExecuteThreshold.Value * 100f);
|
||||
int sensesRadius = Mathf.RoundToInt(AswidConfig.SensesRadius.Value);
|
||||
int eclipseCooldownMin = Mathf.RoundToInt(AswidConfig.EclipseCooldown.Value / 60f);
|
||||
int eclipseDuration = Mathf.RoundToInt(AswidConfig.EclipseDuration.Value);
|
||||
int enslaveCooldownMin = Mathf.RoundToInt(AswidConfig.EnslaveCooldown.Value / 60f);
|
||||
int thrallLifetime = Mathf.RoundToInt(AswidConfig.ThrallLifetime.Value);
|
||||
int surtlingDmg = Mathf.RoundToInt(AswidConfig.SurtlingFormDamageBonus.Value);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("The Aswid's Curse\n");
|
||||
|
||||
sb.AppendLine($"[Base Passive] Benedictus et Afflictus:");
|
||||
sb.AppendLine($"Physical kills automatically consume enemies (Vae Victis) granting Blood Magic XP. Your physical stats scale progressively as you defeat Valheim's Bosses: +{arm} Armor, +{dmg} Damage, +{spd}% Speed, and +{jmp}% Jump. All your passive bonuses are doubled during the night. You can cast Blood Magic items with infinite Eitr, and your Blood Magic skill increases twice as fast.\n");
|
||||
sb.AppendLine("Vampiric Aura (Like a Bat out of Hell/Weight of Shadows Only): Block with your shield (Mouse 2) while in bat or mist form to channel an AoE magic damage aura against nearby enemies, healing for 20% of the damage dealt and converting them into food when they die.\n");
|
||||
if (state >= 1)
|
||||
{
|
||||
// Eikthyr - Base passives already covered
|
||||
}
|
||||
|
||||
sb.AppendLine("[Base Passive] Benedictus et Afflictus:");
|
||||
sb.AppendLine($"You take no fall damage, and physical kills automatically devour edible enemies (Vae Victis) for Blood Magic XP. Your physical stats scale with every boss you defeat: +{arm} Armor, +{dmg} Damage, +{spd}% Speed and Jump, and +{lifesteal}% Lifesteal on physical hits. All of these bonuses double during the night. You can cast Blood Magic items with infinite Eitr, and your Blood Magic skill rises {AswidConfig.BloodMagicSkillGainMultiplier.Value:0.#}x as fast.\n");
|
||||
|
||||
sb.AppendLine("Vampiric Aura (Passive, toggle with 'I'):");
|
||||
sb.AppendLine($"Always active, in every form, with no key to hold - only the on/off toggle. Drains a {auraRadiusDay}m radius by day, {auraRadiusNight}m by night, for magic damage that scales with your Blood Magic skill, healing you for the damage dealt. Enemies at or below {auraExecute}% health are executed outright. The aura hits for half in human form, full as a Bat, and double as Mist.\n");
|
||||
|
||||
if (state >= 2)
|
||||
sb.AppendLine("[Eikthyr Unlock] Bat Form ('G' Key, night only): Take the shape of a bat.\n");
|
||||
|
||||
if (state >= 2)
|
||||
sb.AppendLine("[Eikthyr Unlock] Tame ('U' Key): Tame a boar under your cursor.\n");
|
||||
|
||||
if (state >= 3)
|
||||
sb.AppendLine("[The Elder Unlock] Bat Form now answers by day as well as night.\n");
|
||||
|
||||
if (state >= 5)
|
||||
{
|
||||
sb.AppendLine("[Moder Unlock] Freezing Blood (Passive):");
|
||||
sb.AppendLine("You gain permanent immunity to the Freezing status (mountains/snowstorms) and Poison damage.\n");
|
||||
sb.AppendLine("[Moder Unlock] Auspex (Passive):");
|
||||
sb.AppendLine("You emit a 10-meter aura that reveals the presence of untamed creatures by wreathing them in ethereal flames.\n");
|
||||
sb.AppendLine("You gain permanent immunity to the Freezing status (mountains/snowstorms) and to Poison damage.\n");
|
||||
sb.AppendLine("[Moder Unlock] Superhuman Senses (Passive):");
|
||||
sb.AppendLine($"You sense every untamed creature within {sensesRadius}m, marking it with a telltale glow.\n");
|
||||
sb.AppendLine("[Moder Unlock] Tame ('U' Key): Wolves join the huntable list.\n");
|
||||
}
|
||||
|
||||
if (state >= 6)
|
||||
{
|
||||
sb.AppendLine("[Yagluth Unlock] Dominate (E Key):");
|
||||
sb.AppendLine("Press E on non-tameable, non-boss enemies to dominate them for 60 seconds (15-min cooldown). Dominated thralls fight alongside you and drop standard loot.\n");
|
||||
sb.AppendLine("[Yagluth Unlock] Eclipse ('J' Key, day only):");
|
||||
sb.AppendLine($"A {AswidConfig.EclipseCastTime.Value:0.#}-second cast that forces the night to fall around you for {eclipseDuration} seconds, letting you claim your night-doubled bonuses under the sun. Fails silently if it is already night. {eclipseCooldownMin}-minute cooldown.\n");
|
||||
sb.AppendLine("[Yagluth Unlock] Dominate (native Interact key):");
|
||||
sb.AppendLine($"Target a non-tameable, non-boss enemy to dominate it for {thrallLifetime} seconds ({enslaveCooldownMin}-min cooldown). Dominated thralls fight alongside you and drop standard loot.\n");
|
||||
sb.AppendLine("[Yagluth Unlock] Tame ('U' Key): Lox join the huntable list.\n");
|
||||
}
|
||||
|
||||
if (state >= 7)
|
||||
{
|
||||
sb.AppendLine("[The Queen Unlock] Weight of Shadows (H Key):");
|
||||
sb.AppendLine("You transform into an elusive mist. You become immune to physical and poison damage, but weak to fire, frost, and spirit. Your Vampiric Aura deals double damage, but you cannot attack or run. Sunrise breaks the transformation.\n");
|
||||
sb.AppendLine("[The Queen Unlock] Weight of Shadows ('H' Key, toggle):");
|
||||
sb.AppendLine("You transform into an elusive mist. You become immune to physical (blunt/slash/pierce) and poison damage, and take no fall damage, but you cannot attack, run, or jump. Your Vampiric Aura deals double damage while mist. Sunrise breaks the transformation.\n");
|
||||
}
|
||||
|
||||
if (state >= 8)
|
||||
{
|
||||
sb.AppendLine("[Fader Unlock] Asmund (Passive):");
|
||||
sb.AppendLine("Your hair and beard turn as dark as the abyss. You become 10% taller and gain a flat +30 to Physical Damage.\n");
|
||||
sb.AppendLine($"Your hair and beard turn as dark as the abyss. You become 10% taller and gain a flat +{surtlingDmg} Physical Damage.\n");
|
||||
sb.AppendLine("[Fader Unlock] Tame ('U' Key): Asksvin join the huntable list.\n");
|
||||
}
|
||||
|
||||
knownTexts["Aswid Secrets"] = sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This used to be a single hardcoded sentence, the same at every tier - the forms
|
||||
/// themselves (Wolf/Ulv/Fenring/Cultist, each gated by its own day/night and tier rules in
|
||||
/// FenrirProgression) never appeared here at all. Rewritten the way Skadi's entry is, off
|
||||
/// the live FenrirConfig values so it cannot drift from what TryTransformWithRules actually
|
||||
/// grants at each state.
|
||||
/// </summary>
|
||||
private static void GenerateFenrirText(Dictionary<string, string> knownTexts, int state)
|
||||
{
|
||||
int spd = state * 3;
|
||||
int jmp = state * 3;
|
||||
int arm = state * 3;
|
||||
int dmg = state * 5;
|
||||
knownTexts["Fenrir Secrets"] = $"The secrets of the pack will be revealed soon...\n\nBase Passive: Physical kills automatically consume enemies (if edible). Your physical stats scale progressively as you defeat Valheim's Bosses: +{arm} Armor, +{dmg} Damage, +{spd}% Speed, and +{jmp}% Jump.";
|
||||
int spd = Mathf.RoundToInt(FenrirConfig.SpeedBonusPerState.Value * state * 100f);
|
||||
int jmp = Mathf.RoundToInt(FenrirConfig.JumpBonusPerState.Value * state * 100f);
|
||||
int arm = Mathf.RoundToInt(FenrirConfig.ArmorBonusPerState.Value * state);
|
||||
int dmg = Mathf.RoundToInt(FenrirConfig.DamageBonusPerState.Value * state);
|
||||
int fall = Mathf.RoundToInt(-FenrirProgression.GetFallDamageModifier(state) * 100f);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("The Curse of the Pack\n");
|
||||
|
||||
sb.AppendLine($"[Base Passive] The Beast Within: Physical kills automatically consume edible enemies. Your physical stats scale with every boss you defeat: +{arm} Armor, +{dmg} Damage, +{spd}% Speed, +{jmp}% Jump, and -{fall}% Fall Damage.\n");
|
||||
|
||||
if (state >= 3)
|
||||
sb.AppendLine("[The Elder Unlock] Wolf Form ('G' Key, night only): Take the shape of a wolf. Faster and lighter on your feet, with three claw attacks of growing weight on Left, Right, and Middle Mouse.\n");
|
||||
|
||||
if (state >= 4)
|
||||
{
|
||||
sb.AppendLine("[Bonemass Unlock] Wolf Form now answers by day as well as night.\n");
|
||||
sb.AppendLine("[Bonemass Unlock] Ulv Form ('H' Key, night only): A heavier wolf shape - stronger bite attacks, still bound to the dark.\n");
|
||||
}
|
||||
|
||||
if (state >= 5)
|
||||
{
|
||||
sb.AppendLine("[Moder Unlock] 'G' now calls Ulv Form instead of Wolf, and answers by day as well as night.\n");
|
||||
sb.AppendLine("[Moder Unlock] Fenring Form ('H' Key, night only): Stand as a true Fenring - heavy claws and a leaping strike, and the strongest of the four shapes so far.\n");
|
||||
}
|
||||
|
||||
if (state >= 6)
|
||||
sb.AppendLine("[Yagluth Unlock] Cultist Form ('J' Key, night only): A robed shape that claws and channels fire. Lasts 1 minute, 10-minute cooldown.\n");
|
||||
|
||||
if (state >= 7)
|
||||
{
|
||||
sb.AppendLine("[The Queen Unlock] Fenring Form now answers by day as well as night.\n");
|
||||
sb.AppendLine("[The Queen Unlock] Cultist Form's cooldown falls to 5 minutes (still night only, still 1 minute).\n");
|
||||
}
|
||||
|
||||
if (state >= 8)
|
||||
sb.AppendLine("[Fader Unlock] Cultist Form now answers by day as well as night, and may be held as long as you wish.\n");
|
||||
|
||||
sb.AppendLine("Sunrise breaks any night-bound form early and leaves the beast too tired to change shape again for a short while after.\n");
|
||||
|
||||
knownTexts["Fenrir Secrets"] = sb.ToString();
|
||||
}
|
||||
|
||||
private static void GenerateSkadiText(Dictionary<string, string> knownTexts, int state)
|
||||
|
|
@ -372,13 +487,44 @@ namespace RacesOfValheim
|
|||
knownTexts["Skeleton Secrets"] = sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Was a placeholder ("will be revealed soon") with a mojibake dash baked into the base
|
||||
/// passive text and only the tier 5-8 entries actually written - Master of Shadows (tier 2,
|
||||
/// Eikthyr) and The Wickerman (tier 3, The Elder) were entirely missing, and Dance of the Dead
|
||||
/// (tier 4, Bonemass) wasn't mentioned at all. Filled in from FurlingPatches.cs/FurlingConfig.cs.
|
||||
/// </summary>
|
||||
private static void GenerateFurlingText(Dictionary<string, string> knownTexts, int state, Player player)
|
||||
{
|
||||
int runSpeed = Mathf.RoundToInt(FurlingConfig.RunSpeedBonus.Value * 100f);
|
||||
int weaponXp = Mathf.RoundToInt(FurlingConfig.WeaponSkillXPMultiplier.Value);
|
||||
int noiseRange = Mathf.RoundToInt(FurlingConfig.StealthNoiseRangeThreshold.Value);
|
||||
int fireResist = Mathf.RoundToInt((1f - FurlingConfig.WickermanFireResistMultiplier.Value) * 100f);
|
||||
int poisonResist = Mathf.RoundToInt((1f - FurlingConfig.PoisonResistMultiplier.Value) * 100f);
|
||||
int fireArrowDmg = Mathf.RoundToInt(FurlingConfig.FireArrowMinDamage.Value);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("The secrets of the hoard will be revealed soon...\n");
|
||||
sb.AppendLine("The Secrets of the Hoard\n");
|
||||
|
||||
sb.AppendLine("[Base Passive] Combat Mastery:");
|
||||
sb.AppendLine("All weapon and combat skills gain 2x XP permanently. You're short, but very fast  your movement speed is permanently increased by 10%.\n");
|
||||
sb.AppendLine($"All weapon and combat skills gain {weaponXp}x XP permanently. You're short, but very fast - your movement speed is permanently increased by {runSpeed}%.\n");
|
||||
|
||||
if (state >= 2)
|
||||
{
|
||||
sb.AppendLine("[Eikthyr Unlock] Master of Shadows (Passive):");
|
||||
sb.AppendLine($"Your footsteps and small movements no longer betray you - any noise you make within {noiseRange} meters goes unheard.\n");
|
||||
}
|
||||
|
||||
if (state >= 3)
|
||||
{
|
||||
sb.AppendLine("[The Elder Unlock] The Wickerman (Passive):");
|
||||
sb.AppendLine($"You take {fireResist}% less Fire damage and {poisonResist}% less Poison damage. Your arrows carry at least {fireArrowDmg} Fire damage of their own.\n");
|
||||
}
|
||||
|
||||
if (state >= 4)
|
||||
{
|
||||
sb.AppendLine("[Bonemass Unlock] Dance of the Dead (Passive):");
|
||||
sb.AppendLine("Every mead, potion, wine, bomb, or batch of ammunition you craft comes out doubled - one copy for the recipe, one for free.\n");
|
||||
}
|
||||
|
||||
if (state >= 5)
|
||||
{
|
||||
|
|
@ -412,6 +558,96 @@ namespace RacesOfValheim
|
|||
|
||||
knownTexts["Furling Secrets"] = sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Trenta had no compendium entry at all - no title in RaceTitles, no branch in
|
||||
/// UpdateCompendiumText, no method. Written from scratch off TrentaConfig/
|
||||
/// TrentaConfigManagement's live values and the tier gates in TrentaAbilities.cs/
|
||||
/// TrentaStatusEffects.cs/TrentaPatches.cs.
|
||||
/// </summary>
|
||||
private static void GenerateTrentaText(Dictionary<string, string> knownTexts, int state)
|
||||
{
|
||||
int stillness = Mathf.RoundToInt(TrentaConfig.PhotosynthesisStillnessSeconds);
|
||||
int healTicks = TrentaConfig.PhotosynthesisHealSeconds;
|
||||
int healPercent = Mathf.RoundToInt(TrentaConfig.PhotosynthesisHealPercentPerSecond * 100f);
|
||||
int restMinutes = Mathf.RoundToInt(TrentaConfig.PhotosynthesisRestBaseMinutes +
|
||||
TrentaConfig.PhotosynthesisRestMinutesPerBoss * (state - BossProgressionManager.MinState));
|
||||
int foodDuration = Mathf.RoundToInt(TrentaConfig.FoodDurationMultiplier);
|
||||
|
||||
int purpleRainRadius = Mathf.RoundToInt(TrentaConfig.PurpleRainRadius);
|
||||
int purpleRainHeal = Mathf.RoundToInt(TrentaConfig.PurpleRainHealAmount);
|
||||
int purpleRainPoison = Mathf.RoundToInt(TrentaConfig.PurpleRainPoisonDamage);
|
||||
int purpleRainCooldown = Mathf.RoundToInt(TrentaConfigManagement.PurpleRainCooldown.Value);
|
||||
int purpleRainMuspellCooldown = Mathf.RoundToInt(TrentaConfigManagement.MuspellPurpleRainCooldown.Value);
|
||||
|
||||
int lastStandBonus = Mathf.RoundToInt(TrentaConfig.LastStandMaxArmorBonus * 100f);
|
||||
int thornsPercent = Mathf.RoundToInt(TrentaConfig.ThornsReflectPercent * 100f);
|
||||
|
||||
int portalCooldownMin = Mathf.RoundToInt(TrentaConfig.PortalCooldown / 60f);
|
||||
int portalLifetime = Mathf.RoundToInt(TrentaConfig.PortalLifetime);
|
||||
|
||||
int hornetsDamage = Mathf.RoundToInt(TrentaConfig.HornetsNestDamagePerTick);
|
||||
int hornetsInterval = Mathf.RoundToInt(TrentaConfig.HornetsNestTickInterval);
|
||||
int hornetsRadius = Mathf.RoundToInt(TrentaConfig.HornetsNestEngageRadius);
|
||||
|
||||
int muspellStompDamage = Mathf.RoundToInt(TrentaConfig.MuspellStompDamage);
|
||||
int muspellSpikeDamage = Mathf.RoundToInt(TrentaConfig.MuspellSpikeDamage);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("The Secrets of the Heartwood\n");
|
||||
|
||||
sb.AppendLine("[Base Passive] Heartwood:");
|
||||
sb.AppendLine("Sap and heartwood conduct lightning and turn away the dead: you take half damage from Lightning and Spirit. But kindling burns and the woodsman's axe still bites - you take half again as much from Fire and Slash. Meat, fish, eggs and honey are nothing you can stomach; only what grows from the ground sustains you, and it does so for " + foodDuration + "x as long as it would a normal body.\n");
|
||||
|
||||
sb.AppendLine("[Base Passive] Photosynthesis:");
|
||||
sb.AppendLine($"Stand still in daylight, roof over nothing but sky, for {stillness} unbroken seconds, and roots take hold: {healTicks} ticks of healing follow, {healPercent}% of your maximum health apiece, along with a Rested buff lasting {restMinutes} minutes - longer with every boss you have felled.\n");
|
||||
|
||||
if (state >= TrentaConfig.EikthyrDefeatedState)
|
||||
{
|
||||
sb.AppendLine("[Eikthyr Unlock] Awakened Seeds (Passive):");
|
||||
sb.AppendLine("Every seed, cone, acorn and self-seeding mushroom you carry has woken up. Eat one on the spot and it consumes itself for the strongest meal its home biome has to offer, health or eitr as the biome favors, instead of sitting idle as planting stock.\n");
|
||||
}
|
||||
|
||||
if (state >= TrentaConfig.PurpleRainUnlockState)
|
||||
{
|
||||
sb.AppendLine("[The Elder Unlock] Purple Rain ('G' Key):");
|
||||
sb.AppendLine($"A spray of toxic pollen bursts out to {purpleRainRadius} meters: every ally caught in it is healed {purpleRainHeal}, every foe is poisoned for {purpleRainPoison}. {purpleRainCooldown}-second cooldown, shortened to {purpleRainMuspellCooldown} seconds while transformed into Muspell.\n");
|
||||
}
|
||||
|
||||
if (state >= TrentaConfig.BonemassDefeatedState)
|
||||
{
|
||||
sb.AppendLine("[Bonemass Unlock] Deep Roots (Passive):");
|
||||
sb.AppendLine("The swamp has nothing left to spoil in you. Poison cannot touch you, the Wet effect cannot land on you, and swimming costs no stamina at all.\n");
|
||||
}
|
||||
|
||||
if (state >= TrentaConfig.ModerDefeatedState)
|
||||
{
|
||||
sb.AppendLine("[Moder Unlock] Last Stand (Passive):");
|
||||
sb.AppendLine($"The closer you come to falling, the harder your bark grows: your armor rises by up to {lastStandBonus}% as your health drops toward zero.\n");
|
||||
sb.AppendLine("[Moder Unlock] Thorns (Passive):");
|
||||
sb.AppendLine($"Every hit you take returns {thornsPercent}% of its damage to whoever landed it.\n");
|
||||
}
|
||||
|
||||
if (state >= TrentaConfig.PortalUnlockState)
|
||||
{
|
||||
sb.AppendLine("[Yagluth Unlock] Homecoming Portal ('H' Key):");
|
||||
sb.AppendLine($"Open a linked pair of portals - one where you stand, one at your respawn point - for anyone to walk through, no ore or item carried against them. They fade after {portalLifetime} seconds. {portalCooldownMin}-minute cooldown.\n");
|
||||
}
|
||||
|
||||
if (state >= TrentaConfig.HornetsNestUnlockState)
|
||||
{
|
||||
sb.AppendLine("[The Queen Unlock] Hornet's Nest (Passive):");
|
||||
sb.AppendLine($"A swarm of hornets has made its home in your branches and never leaves. Any foe that comes within {hornetsRadius} meters is stung for {hornetsDamage} poison and pierce damage every {hornetsInterval} seconds until it breaks off or falls.\n");
|
||||
}
|
||||
|
||||
if (state >= TrentaConfig.MuspellUnlockState)
|
||||
{
|
||||
sb.AppendLine("[Fader Unlock] Muspell ('J' Key, toggle):");
|
||||
sb.AppendLine($"Take the shape of a young Elder, root and bramble given fury. Left Mouse stomps the ground for {muspellStompDamage} damage in a ring around you, Right Mouse looses a root-spike that pierces for {muspellSpikeDamage} - both rising with your Unarmed skill. Purple Rain still answers your call while transformed, on its shorter cooldown.\n");
|
||||
}
|
||||
|
||||
knownTexts["Trenta Secrets"] = sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(TextsDialog), "Setup")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue