fix(skeleton): make the progression real, and say so in the compendium

Four separate faults were behind one player report.

The tier table had drifted a long way from the published progression. Poison
immunity arrived at Bonemass instead of Eikthyr, auto-stun at The Queen instead
of The Elder, and lifesteal jumped 20/30/40 where the description promises a
climb in fives from 5% to 35%. Rewritten to match the description tier for tier,
which is the copy players actually read.

Poison immunity never worked even at the tier that granted it. SE_SkeletonStats
built its damage modifiers in Setup, which runs once when the effect is applied -
at spawn, before any boss has fallen - and nothing ever asked again, so the
modifiers stayed frozen at tier 1 for the whole session. Everything else the race
does re-reads the rules per hit, which is why only the modifiers looked broken.
They are now rebuilt when the tier actually changes.

Max health was whatever three scaled sausages happened to add up to. A Skeleton
cannot eat, so the race fakes three permanent foods to carry the tier bonus -
sound enough for regeneration, which Valheim drives off the food list, but the
number the game reads is Food.m_health, recomputed every second from the burn
curve, and anything that leaves those foods partly burnt or one short quietly
costs health. A Bonemass Skeleton had 95 where the table promises 165. The foods
stay for regeneration; the total is now overwritten at Player.GetTotalFoodValue,
which has exactly one caller and decides the number outright.

Skeleton Secrets was a one-line placeholder returning the same sentence at every
tier - never written rather than broken. It now unfolds tier by tier, and opens
by naming the standing the race believes it is on, so the next player who kills a
boss and sees nothing change can tell a tier that failed to advance from an
unlock that failed to fire.

The charred model moves from Fader to Moder, where the description asks for a
fire skeleton, and summons stay skeletons at both tiers rather than turning
charred at Fader. Both are one-line reverts if the old look is preferred.
This commit is contained in:
kanym 2026-08-05 16:33:27 +02:00
commit 5ef7a102da
4 changed files with 177 additions and 37 deletions

View file

@ -299,9 +299,77 @@ namespace RacesOfValheim
knownTexts["Skadi Secrets"] = sb.ToString();
}
/// <summary>
/// This was a one-line placeholder that returned the same sentence at every tier, which is
/// why players reported that "Skeleton Secrets never populates after bosses" - it was never
/// written, rather than broken. It now unfolds tier by tier with the real numbers, the way
/// the Skadi entry above does.
/// </summary>
private static void GenerateSkeletonText(Dictionary<string, string> knownTexts, int state)
{
knownTexts["Skeleton Secrets"] = "The secrets of the crypt will be revealed soon...";
var rules = SkeletonProgression.GetRules(state);
float health = SkeletonProgression.GetMaxHealthBonus(state);
int lifesteal = Mathf.RoundToInt(rules.LifestealPercent * 100f);
StringBuilder sb = new StringBuilder();
sb.AppendLine("The Secrets of the Crypt\n");
// Says out loud which tier the race thinks it is on. A player who has killed a boss and
// seen nothing change can read this line back and know immediately whether the tier
// failed to advance or the unlock itself is broken.
sb.AppendLine(state <= BossProgressionManager.MinState
? "You stand at the first of eight standings; no boss has yet fallen to your reckoning.\n"
: $"You stand at the {state} of eight standings, earned by the fall of {BossProgressionManager.GetBossNameForState(state)}.\n");
sb.AppendLine("[Base Passive] Undead Diet:");
sb.AppendLine($"No hunger moves you and no meal can help you - mortal food is nothing to dry bones. In its place the dead grow strong as their betters fall: you carry +{health:0} Maximum Health at your present standing. Nor does effort tire you; you have no stamina to spend at all.\n");
sb.AppendLine("[Base Passive] Bones and Blades:");
sb.AppendLine("Blades and points find little to cut in you and do half their work, but a hammer's weight finds everything, and hurts you the more for it.\n");
if (state >= 2)
{
sb.AppendLine("[Eikthyr Unlock] The Green Rot:");
sb.AppendLine($"Poison has nothing left to poison - it cannot touch you at all - and your bones take on its sickly cast. Every blow you land returns {lifesteal}% of what it deals in physical harm to your own frame.\n");
}
if (state >= 3)
{
sb.AppendLine("[The Elder Unlock] The First Blow:");
sb.AppendLine("The first strike out of the dark staggers whatever it lands upon. The dead may do this once every 5 seconds.\n");
}
if (state >= 4)
{
sb.AppendLine("[Bonemass Unlock] Rotten Touch:");
sb.AppendLine("What you strike, you sicken - every blow carries 20 Poison damage of its own.\n");
}
if (state >= 5)
{
sb.AppendLine("[Moder Unlock] Charred Bones:");
sb.AppendLine("Your frame blackens and burns, and the fire clings to you: everything near enough to feel it is scorched. Your wounds also close faster than bone has any right to.\n");
}
if (state >= 6)
{
sb.AppendLine("[Yagluth Unlock] Risen Again:");
sb.AppendLine("A killing blow no longer ends you. You are made whole where you stand - and then the dark magic must gather itself for 5 minutes before it will do so again.\n");
}
if (state >= 7)
{
sb.AppendLine("[The Queen Unlock] The Crypt Answers:");
sb.AppendLine($"Every enemy you put down rises to fight for you, up to {rules.MaxSummons} at your side at once.\n");
}
if (state >= 8)
{
sb.AppendLine("[Fader Unlock] A Host of Your Own:");
sb.AppendLine($"{rules.MaxSummons} of the dead now follow you, and {lifesteal}% of the harm you deal comes back as your own strength.\n");
}
knownTexts["Skeleton Secrets"] = sb.ToString();
}
private static void GenerateFurlingText(Dictionary<string, string> knownTexts, int state, Player player)