feat(alfar): v1.6.0 - the Alfar, an eleventh race

Grey, tall and thin, with black eyes. Eitr is armour and fuel (shield,
diet, soft fall, levitation), Heimkall sends a lethal blow home at one
health every 20 minutes. Caster powers from Skrid to the archon
Sameining, with on-screen cooldowns. Automated base around the
Ljoskjarne: drones, three constructs, crystals, Ljosgard, Prismavard.
Compendium page in EN/IT/RU.

README: New in block, race section, progression, station line, changelog.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Ferdinando 2026-10-25 17:38:28 +01:00
commit 3f8cf1ee27
48 changed files with 7779 additions and 16 deletions

View file

@ -9,7 +9,7 @@ namespace RacesOfValheim
{
private static readonly string[] Races =
{
"Aswid", "Fenrir", "Skadi", "Skeleton", "Furling", "Trol", "Draugh", "Dvergar", "Trenta", "Sverm"
"Aswid", "Fenrir", "Skadi", "Skeleton", "Furling", "Trol", "Draugh", "Dvergar", "Trenta", "Sverm", "Alfar"
};
/// <summary>
@ -81,6 +81,10 @@ namespace RacesOfValheim
{
GenerateSvermText(knownTexts, state);
}
else if (currentRace == AlfarConfig.RaceId)
{
GenerateAlfarText(knownTexts, state);
}
// The War Vulture is not a racial power and does not belong inside any one race's
// generator: it is an item whose access list is a config entry. Appended here, once,
@ -119,6 +123,57 @@ namespace RacesOfValheim
knownTexts[key] = sb.ToString();
}
/// <summary>
/// The Alfar's entry: what the body does, the powers as the bosses open them, and the Nexus.
/// Every number is read from the config, so the page cannot promise what the game does not do.
/// </summary>
private static void GenerateAlfarText(Dictionary<string, string> knownTexts, int state)
{
StringBuilder sb = new StringBuilder();
string F0(float v) => v.ToString("0");
string F1(float v) => v.ToString("0.#");
string Key(BepInEx.Configuration.ConfigEntry<BepInEx.Configuration.KeyboardShortcut> entry) => entry.Value.MainKey.ToString();
sb.AppendLine(ModText.Get("rov_compendium_alfar_the_alfar_light"));
sb.AppendLine(ModText.Get("rov_compendium_alfar_eitr_shield", F0(AlfarConfig.ShieldRate.Value * 100f), F1(AlfarConfig.ConductiveMultiplier.Value)));
sb.AppendLine(ModText.Get("rov_compendium_alfar_diet"));
sb.AppendLine(ModText.Get("rov_compendium_alfar_soft_fall"));
sb.AppendLine(ModText.Get("rov_compendium_alfar_levitation", F1(AlfarPowerConfig.LevitationCostPerSecond.Value)));
sb.AppendLine(ModText.Get("rov_compendium_alfar_heimkall", F0(AlfarConfig.HeimkallMinutes.Value), F0(AlfarConfig.HeimkallMinutesAfterYagluth.Value), F0(AlfarConfig.HeimkallMinutesAfterFader.Value), F0(AlfarConfig.HeimkallInvulnerableSeconds.Value)));
sb.AppendLine(ModText.Get("rov_compendium_alfar_powers"));
if (state >= AlfarPowerConfig.SkridState)
{
sb.AppendLine(ModText.Get("rov_compendium_alfar_skrid", Key(AlfarPowerConfig.SkridKey), F0(AlfarPowerConfig.SkridDistance.Value), F0(AlfarPowerConfig.SkridCooldown.Value)));
sb.AppendLine(ModText.Get("rov_compendium_alfar_grafvaettir", Key(AlfarPowerConfig.GrafvaettirKey), F0(AlfarPowerConfig.GrafSeconds.Value), AlfarPowerConfig.GrafStone.Value, AlfarPowerConfig.GrafFlint.Value, F0(AlfarPowerConfig.GrafCooldown.Value)));
}
if (state >= AlfarPowerConfig.UtsogState)
sb.AppendLine(ModText.Get("rov_compendium_alfar_utsog", F0(AlfarPowerConfig.UtsogPercent.Value * 100f)));
if (state >= AlfarPowerConfig.KallState)
sb.AppendLine(ModText.Get("rov_compendium_alfar_kall", Key(AlfarPowerConfig.KallKey), F0(AlfarPowerConfig.KallRadius.Value), F0(AlfarPowerConfig.KallCooldown.Value)));
if (state >= AlfarPowerConfig.LjosstormState)
sb.AppendLine(ModText.Get("rov_compendium_alfar_ljosstorm", Key(AlfarPowerConfig.LjosstormKey), F0(AlfarPowerConfig.StormRadius.Value), F0(AlfarPowerConfig.StormSeconds.Value), F0(AlfarPowerConfig.StormCooldown.Value)));
if (state >= AlfarPowerConfig.GeisliState)
sb.AppendLine(ModText.Get("rov_compendium_alfar_geisli", Key(AlfarPowerConfig.GeisliKey), F0(AlfarPowerConfig.BeamRange.Value), F0(AlfarPowerConfig.BeamMaxSeconds.Value)));
if (state >= AlfarPowerConfig.KyrrState)
sb.AppendLine(ModText.Get("rov_compendium_alfar_kyrr", Key(AlfarPowerConfig.KyrrKey), F0(AlfarPowerConfig.StasisSeconds.Value), F0(AlfarPowerConfig.StasisBossSeconds.Value)));
if (state >= AlfarPowerConfig.SameiningState)
sb.AppendLine(ModText.Get("rov_compendium_alfar_sameining", Key(AlfarPowerConfig.SameiningKey), F0(AlfarPowerConfig.ArchonThreshold.Value * 100f), F0(AlfarPowerConfig.ArchonSeconds.Value)));
if (state < AlfarPowerConfig.SameiningState)
sb.AppendLine(ModText.Get("rov_compendium_alfar_more_to_come"));
sb.AppendLine(ModText.Get("rov_compendium_alfar_nexus_title"));
sb.AppendLine(ModText.Get("rov_compendium_alfar_nexus", F0(AlfarNexusConfig.NexusRadius.Value), F1(AlfarNexusConfig.NexusDensityKm2.Value), AlfarNexusConfig.NexusBronze.Value));
sb.AppendLine(ModText.Get("rov_compendium_alfar_drones", AlfarNexusConfig.DroneCap.Value, AlfarNexusConfig.DroneBronze.Value));
sb.AppendLine(ModText.Get("rov_compendium_alfar_constructs", AlfarNexusConfig.NeistCap.Value, AlfarNexusConfig.EldingCap.Value, AlfarNexusConfig.SteinCap.Value));
sb.AppendLine(ModText.Get("rov_compendium_alfar_crystals", AlfarNexusConfig.CrystalCap.Value, AlfarNexusConfig.UpgradeCrystals.Value));
sb.AppendLine(ModText.Get("rov_compendium_alfar_ljosgard"));
sb.AppendLine(ModText.Get("rov_compendium_alfar_towers"));
knownTexts[PageKey("Alfar")] = sb.ToString();
}
/// <summary>
/// The Sverm's entry, in two halves because the race is two halves: a body that grows on its
/// own, and a colony that has to be built. Figures are read from the live rules and from the