RacesOfValheim/JotunnModStub/Sverm/SvermConfig.cs
Ferdinando 9a3ab78666 chore(release): v1.5.4 - Sverm troops keep their own place around the player and the boat
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-03 08:11:05 +02:00

596 lines
38 KiB
C#

using UnityEngine;
namespace RacesOfValheim
{
/// <summary>
/// Every tunable number the Sverm uses, in one place.
///
/// Same contract as DvergarConfig: nothing here is baked into the logic. SvermProgression reads
/// these to build its per-tier rules and the patches read the rules, never a literal. Retuning
/// the race means editing this file only.
///
/// Two of these numbers are NOT numbers but prefab names, and that is deliberate. The carapace
/// is worth "whatever the vanilla set of that biome is worth", and the claws hit for "whatever
/// the vanilla weapon hits for" - both read off ObjectDB at runtime rather than transcribed
/// here. A game patch that rebalances iron armour rebalances the Sverm with it, and nobody has
/// to remember that this file existed.
/// </summary>
public static class SvermConfig
{
// ─── Identity ────────────────────────────────────────────────────────
// Stored in m_customData["Race"] and on the ZDO, so renaming it after players have chosen
// the race would orphan their characters. See DvergarRace.MigrateLegacyRaceId for what
// that costs to undo.
public const string RaceId = "Sverm";
public const string StatsSE = "SE_SvermStats";
public const string RavagerSE = "SE_SvermRavagerForm";
public const string RavagerCdSE = "SE_SvermRavagerCooldown";
// Mirrors the ZDO key layout the other races use, so remote clients can work out the tier
// without having the local player's progression state.
public const string StateZdoKey = "RacesOfValheim_SvermState";
// ─── Damage taken ────────────────────────────────────────────────────
// Chitin burns and chitin cracks. Expressed as a plain multiplier rather than
// HitData.DamageModifier.Weak because that enum is discrete - Weak is a flat +50% and
// there is no rung at +40%. Applied in a Character.Damage prefix, the way Aswid, Draugh
// and Dvergar already scale damage.
public static readonly float BluntWeakness = 0.40f;
public static readonly float FireWeakness = 0.40f;
// Annealed Chitin: at Fader the weakness inverts. 0.40 means fire lands at 60% of its
// value, i.e. roughly one rung of DamageModifier.Resistant, arrived at by the same knob
// that hurt for eight tiers.
public const int AnnealedChitinState = 8;
public static readonly float FireResistanceAtFader = 0.40f;
// ─── Chitin Plating: the carapace ────────────────────────────────────
// Reference sets, one per progression state. The carapace is worth the SUM of these three
// pieces AT QUALITY 4, read from ObjectDB. Every name here was verified against the
// install's own SoftRef manifest, so a null means the game changed, not that we guessed.
//
// Index 0 is unused: progression states run 1..8 and indexing by state is worth one wasted
// slot to avoid an off-by-one in every caller.
public static readonly string[][] ArmorReferenceSets =
{
null, // unused
new[] { "ArmorLeatherChest", "ArmorLeatherLegs", "HelmetLeather" }, // 1
new[] { "ArmorBronzeChest", "ArmorBronzeLegs", "HelmetBronze" }, // 2 Eikthyr
new[] { "ArmorIronChest", "ArmorIronLegs", "HelmetIron" }, // 3 Elder
new[] { "ArmorWolfChest", "ArmorWolfLegs", "HelmetDrake" }, // 4 Bonemass
new[] { "ArmorPaddedCuirass", "ArmorPaddedGreaves", "HelmetPadded" }, // 5 Moder
new[] { "ArmorCarapaceChest", "ArmorCarapaceLegs", "HelmetCarapace" }, // 6 Yagluth
new[] { "ArmorFlametalChest", "ArmorFlametalLegs", "HelmetFlametal" }, // 7 Queen
new[] { "ArmorFlametalChest", "ArmorFlametalLegs", "HelmetFlametal" }, // 8 Fader
};
/// <summary>Quality the reference set is priced at. Valheim: armor + (q-1) * armorPerLevel.</summary>
public const int ArmorReferenceQuality = 4;
/// <summary>
/// Added on top at Fader only. There is no biome after the Ashlands to read a set from, so
/// state 8 is the one tier whose number is chosen rather than derived - and it is a flat
/// bonus rather than a multiplier precisely so it reads as "chosen" in the log.
/// </summary>
public static readonly float FaderArmorBonus = 10f;
/// <summary>Slots the carapace occupies and therefore forbids.</summary>
public static readonly ItemDrop.ItemData.ItemType[] SealedSlots =
{
ItemDrop.ItemData.ItemType.Chest,
ItemDrop.ItemData.ItemType.Legs,
ItemDrop.ItemData.ItemType.Helmet,
};
/// <summary>What the carapace LOOKS like, at every tier. The value changes, the shape does not.</summary>
public const string CarapaceChestVisual = "ArmorCarapaceChest";
public const string CarapaceLegsVisual = "ArmorCarapaceLegs";
public const string CarapaceHelmetVisual = "HelmetCarapace";
// ─── Chitin Claws ────────────────────────────────────────────────────
// FOUR near-identical names exist in the manifest and only some carry a recipe, so the
// prefab is resolved by trying them in order and logging which one answered. A wrong guess
// here fails soft and silently - two empty hands - which is exactly the failure this
// chain exists to make loud.
public static readonly string[] ClawPrefabFallbacks =
{
"FistBjornUndeadClaw",
"FistBjornClawUndead",
"FistUnbjornClaw",
"FistBjornClaw",
};
/// <summary>Length in METRES from the back of the hand to the tip. ModelBorrow sizes in metres.</summary>
public static readonly float ClawLength = 0.22f;
/// <summary>
/// Fraction of the vanilla weapon's quality-4 damage the bare hands hit for, per state.
/// State 7 is the ceiling - the real Chitin Claws - and state 8 adds fire on top rather than
/// going past it. Index 0 unused, as above.
/// </summary>
public static readonly float[] ClawDamagePercentByState =
{
0f, 0.35f, 0.45f, 0.55f, 0.70f, 0.85f, 0.95f, 1.00f, 1.00f
};
/// <summary>Fire added at Fader, as a fraction of the claws' physical total.</summary>
public static readonly float ClawFireFraction = 0.30f;
// ─── Insect Metabolism ───────────────────────────────────────────────
/// <summary>Raw meat is worth this much of its cooked counterpart.</summary>
public static readonly float RawMeatFraction = 0.70f;
/// <summary>Honey and royal jelly: bonus and duration both multiplied by this.</summary>
public static readonly float HoneyMultiplier = 2f;
/// <summary>Seeds become food from this state on (The Elder).</summary>
public const int SeedsEdibleState = 3;
// Royal jelly, made edible from scratch. These are the FINAL values, already doubled -
// they are not multiplied again by HoneyMultiplier.
public const string RoyalJellyPrefab = "RoyalJelly";
public static readonly float RoyalJellyHealth = 90f;
public static readonly float RoyalJellyStamina = 90f;
public static readonly float RoyalJellyEitr = 90f;
public static readonly float RoyalJellyDuration = 2400f;
public static readonly float RoyalJellyRegen = 5f;
// ─── Perk unlock states ──────────────────────────────────────────────
public const int MetabolicSurgeState = 2;
public const int VentralPouchesState = 2;
public const int GrindingMandiblesState = 3;
public const int SensoryAntennaeState = 3;
public const int VenomGlandsState = 4;
public const int AcidHemolymphState = 4;
public const int VestigialWingsState = 5;
public const int RavagerFormState = 6;
public const int EitrSacsState = 6;
public const int MajesticCarapaceState = 7;
public const int SurrenalGlandsState = 7;
public const int FullWingspanState = 7;
public const int CarapaceRegenState = 8;
// ─── Metabolic Surge (state 2) ───────────────────────────────────────
public static readonly float RunStaminaDiscount = 0.20f; // -20% on running
public static readonly float JumpStaminaDiscount = 0.20f;
public static readonly float JumpBonus = 0.15f; // +15% jump force
// ─── Ventral Pouches (state 2) ───────────────────────────────────────
public static readonly float CarryWeightBonus = 100f;
// ─── Sensory Antennae (state 3) ──────────────────────────────────────
// Passive and always on, so the radius is the only real brake on how many point lights can
// be alive at once. Raise it with that in mind.
public static readonly float AntennaeRadius = 30f;
public static readonly float AntennaeInterval = 2f;
public static readonly float AntennaeLightRange = 4f;
public static readonly float AntennaeLightIntensity = 1.4f;
// What each colour means, and the meaning is the whole feature: the Aswid's Auspex marks
// everything the same because it only asks "is something there". A chemical sense answers
// "what is it".
public static readonly Color AntennaeHostileColor = new Color(1f, 0.15f, 0.10f, 1f); // red
public static readonly Color AntennaePassiveColor = new Color(0.25f, 1f, 0.30f, 1f); // green
public static readonly Color AntennaeInvertebrateColor = new Color(1f, 0.90f, 0.20f, 1f); // yellow
public static readonly Color AntennaeKinColor = new Color(0.35f, 0.75f, 1f, 1f); // azure
// ─── Venom Glands (state 4) ──────────────────────────────────────────
/// <summary>Poison added to every blow, per state above the unlock.</summary>
public static readonly float VenomPerState = 6f;
// ─── Acid Hemolymph (state 4) ────────────────────────────────────────
/// <summary>Poison dealt back to whoever lands a melee blow, per state above the unlock.</summary>
public static readonly float HemolymphPerState = 5f;
public static readonly float HemolymphRange = 4f;
// ─── Dorsal Spines (state 5) / Full Crest (state 7) ──────────────────
// Wings were the first design and they lost on cost. Wing_gib turned out not to be a
// prefab at all - it is a child inside a death effect, reachable only by walking somebody
// else's hierarchy and hoping the parent list is right - and animated wings on a static
// mount never look like anything but a prop. A ribcage worn spine-up is STATIC by nature,
// it is a real prefab that resolves by name, and it reads as xenomorph spines rather than
// as a bird.
public const string SpinesPrefab = "UndeadBjornRibcage";
public static readonly float SpineSizeSmall = 0.315f; // metres, state 5-6 (0.45 * 0.7)
public static readonly float SpineSizeFull = 0.56f; // metres, state 7+ (0.80 * 0.7)
/// <summary>
/// Which bone they ride. Spine2 and ONLY Spine2 - no fallback chain.
///
/// The earlier version tried Spine2, then Spine1, then Spine, on the theory that a missing
/// bone should degrade rather than disappear. On this rig all three exist, so the fallback
/// never fired for the right reason and only ever meant "somewhere on the back, roughly" -
/// which is not good enough for a crest that was positioned by eye. One bone, or nothing.
///
/// It was Spine3 until this was caught: the player rig counts Spine, Spine1 and Spine2 and has
/// no Spine3, so the crest never mounted anywhere and the only trace was a warning in the log.
/// </summary>
public const string SpineBoneName = "Spine2";
// Found in game with the crest on screen. A ribcage is authored lying around a body, so
// standing it up out of a back is a quarter turn on two axes - not something anybody was
// going to derive on paper.
public static readonly float SpineRotationX = 0f;
public static readonly float SpineRotationY = -90f;
public static readonly float SpineRotationZ = 90f;
// No extra nudge by default - ApplySpines already centres the crest on the bone (half its
// own height each way) before this is added, which is what keeps the Full-Crest size from
// reaching up over the head the way basing the whole thing at the bone once did.
public static readonly float SpineOffsetY = 0f;
/// <summary>
/// What holds a falling Sverm up: the Mistlands' own fireflies, swarming under the body.
///
/// Note the capital F in the middle. "Fireflies" resolves to nothing and fails silently,
/// which is the whole reason every prefab name in this race is checked against the game's
/// manifest before it is written down.
/// </summary>
public const string GlideMotesPrefab = "FireFlies";
// ─── Eitr Sacs (state 6) ─────────────────────────────────────────────
/// <summary>Fraction of the eitr-weave set's regeneration the carapace gives back.</summary>
public static readonly float EitrRegenFraction = 0.50f;
public static readonly string[] EitrReferenceSet = { "ArmorMageChest", "ArmorMageLegs", "HelmetMage" };
// ─── Surrenal Glands (state 7) ───────────────────────────────────────
public static readonly float BodyScaleAtQueen = 1.10f;
// ─── Carapace Regeneration (state 8) ─────────────────────────────────
public static readonly float CarapaceRegenPerSecond = 0.5f;
// ─── Ravager Strain (state 6) ────────────────────────────────────────
// Replaces the old Stinger Morph (a Deathsquito flight form). Players found that form's
// glass-cannon trade too strong for what it cost; this is the opposite shape - no flight,
// no summons, and the fragility multiplier is gone, replaced by a straight armour buff.
// Same duration and cooldown as the form it replaces.
public const string RavagerCreature = "SeekerBrute";
public static readonly float RavagerDurationSeconds = 120f; // 2 minutes
public static readonly float RavagerCooldownSeconds = 300f; // 5 minutes
// The Brute's four real attack items, named and verified with `dumpelder SeekerBrute` in
// a live world - not guessed. Their numbers are read once by SvermRavagerAttacks and
// applied by hand in RavagerFormBehavior's own attack coroutines (Physics.OverlapSphere,
// the same method Fenrir and Skadi's forms already use); nothing here is cloned or
// equipped any more.
public const string RavagerBiteWeapon = "SeekerBrute_bite"; // slash 100, left click
public const string RavagerRamWeapon = "SeekerBrute_ram"; // blunt/chop/pickaxe 100, right click / G
public const string RavagerSlamWeapon = "SeekerBrute_groundslam"; // AoE stomp, blunt/chop/pickaxe 120-100-100, middle click
/// <summary>
/// The Brute's roar. type=None on the real creature - it lands no hit there - but the
/// item still carries real numbers (slash 80, chop 10) nobody ever wired to a hitbox.
/// Players asked for a use for it: a short-cooldown AoE around the player rather than a
/// forward swing, bound to G once G stopped being needed for anything else.
/// </summary>
public const string RavagerTauntWeapon = "SeekerBrute_Taunt";
/// <summary>
/// What the carapace's own armour value (SvermCarapace.GetArmor) is multiplied by while
/// the form is up. 2 means the tank doubles its damage reduction for the same two minutes
/// the old form spent being nearly one-shot by anything.
/// </summary>
public static readonly float RavagerArmorMultiplier = 2f;
// ─── The taunt (G) ───────────────────────────────────────────────────
/// <summary>Its own cooldown, short and separate from the main three attacks' own lock timing.</summary>
public static readonly float RavagerTauntCooldownSeconds = 10f;
/// <summary>Centred on the player, not projected forward like a swing - a roar goes out, not in.</summary>
public static readonly float RavagerTauntRadius = 3f;
// Candidates tried in order, same PlayEffect pattern MorphIn/MorphOutEffects already use:
// a wrong guess is silently skipped rather than an error. Not confirmed to exist - the
// Brute's own Attack effect slots were all empty when dumped, so if a roar sound exists
// at all it lives somewhere this file has not found yet.
public static readonly string[] RavagerTauntSoundEffects = { "sfx_seeker_brute_taunt", "sfx_seekerbrute_taunt", "sfx_seeker_taunt" };
// ─── Transformation effects ──────────────────────────────────────────
// The Seeker's own spawn and death bursts are the verified fallback - carried over from
// the old Stinger Morph, which used them successfully. A Brute-specific pair is tried
// first on the chance this build has one; PlayEffect already skips silently past any name
// that does not resolve, so a wrong guess here costs nothing. vfx_boar_death is the last
// resort because it is what the Aswid uses and is certain to exist.
public static readonly string[] RavagerMorphInEffects = { "fx_seeker_brute_spawn", "fx_seeker_spawn", "vfx_boar_death" };
public static readonly string[] RavagerMorphOutEffects = { "fx_seeker_brute_death", "fx_seeker_death", "vfx_boar_death" };
// ─── Palette ─────────────────────────────────────────────────────────
// Read off a Seeker Soldier. The exposed skin is almost black and matte: what makes the
// look is the CONTRAST against the amber plates, not the skin colour itself.
public static readonly Color SkinColor = Hex(0x24, 0x1B, 0x15);
public static readonly Color MembraneColor = Hex(0xB8, 0x5F, 0x5C);
/// <summary>
/// The tint ramp IS the visual progression. Same carapace silhouette at every tier, aged
/// by colour: pale washed sand, then full amber, then dark amber, then black with a red
/// burn at Fader. Zero new assets. Index 0 unused.
/// </summary>
/// <summary>
/// A YOUNG insect is not a small adult, and the ramp says so. The early tiers are violet -
/// the soft, pale, not-yet-hardened shell of something freshly moulted - and the amber of
/// the reference photograph is where the race ARRIVES rather than where it starts. The
/// last two tiers darken out of amber into near black, which is what gives Emberform's red
/// something to burn through.
///
/// Index 0 unused.
/// </summary>
public static readonly Color[] CarapaceTintByState =
{
Color.white,
Hex(0xB0, 0xA3, 0xC8), // 1 pale violet - newly moulted, soft
Hex(0x9B, 0x88, 0xB8), // 2
Hex(0x86, 0x70, 0x9F), // 3 violet, deepening
Hex(0x7C, 0x60, 0x79), // 4 mauve: the turn towards amber begins
Hex(0x8A, 0x62, 0x49), // 5
Hex(0x8B, 0x5E, 0x34), // 6 full amber - the colour of the photograph
Hex(0x4A, 0x32, 0x20), // 7 dark amber
Hex(0x14, 0x10, 0x0C), // 8 near black; Emberform adds the red
};
// ─── Emberform ───────────────────────────────────────────────────────
// The hue at full strength, dimmed by EmberGlowStrength below. Split in two for the same
// reason AswidVisuals splits its eye colour: the hue and the brightness are tuned against
// different things, and mixing them into one HDR value makes every adjustment a guess.
//
// The first version shipped this at (3.2, 0.30, 0.06) applied directly, and it came out
// blinding - which is the Aswid's lesson arriving late and at ten times the surface area.
// Two glowing spheres on a face can carry an HDR value past 3; a whole chest, both legs
// and a helmet cannot. Past the bloom threshold the extra brightness buys a bigger white
// area and LESS red, so the fix is downward, not sideways.
public static readonly Color EmberEmission = new Color(3.2f, 0.30f, 0.06f, 1f);
/// <summary>
/// How much of that hue actually reaches the material.
///
/// Tuned downward twice, in game, and the trend is the whole lesson: full HDR was blinding,
/// 0.25 was still too strong, and 0.0625 is where it stopped looking like a lamp. That puts
/// the red at 0.2 - well under the clip - which on a surface the size of a whole body is
/// plenty. Two glowing eyes and a glowing torso are not the same problem and do not take
/// the same number.
///
/// Live from the .cfg, because this is a number only an eye can settle.
/// </summary>
public static readonly float EmberGlowStrength = 0.0625f;
// Glowing eyes, same geometry as the Aswid's. Placement constants live in the head bone's
// own local space, which is why the state-7 +10% needs no special case: a child transform
// rides its parent's scale for free.
public static readonly Color EyeColor = new Color(3.4f, 0.12f, 0.08f, 1f);
public static readonly float EyeGlowStrength = 0.22f;
// ─── The colony (stub - see SvermHive when that half is written) ─────
/// <summary>Two nests per square mile. A square mile is 2.59 km2; the circle of equal area
/// has r = 908 m. The DEFAULT pair only - both are bound in SvermConfigManagement, and
/// SvermHive re-registers its density limit when either moves.</summary>
public static readonly float HiveDensityRadius = 908f;
public const int HiveDensityMax = 2;
/// <summary>The Elder. Before that the Sverm is a body and nothing else.</summary>
public const int HiveUnlockState = 3;
// ─── Colony caps ─────────────────────────────────────────────────────
// The DEFAULTS. What is actually enforced comes from SvermConfigManagement, which binds
// these into the .cfg so a machine that cannot carry nineteen creatures can say so without
// a rebuild. Nothing in this block is read directly by the game any more - the nest density
// above was the last exception and it is bound too now.
public const int CapBrood = 8;
public const int CapSeeker = 6;
public const int CapSoldier = 3;
public const int CapGjall = 2;
public const int CapBlisterTick = 10;
/// <summary>Two separate pools, nine workers alive at most. Farmers come from the infected
/// beehives, haulers from the nest after Bonemass, and neither can starve the other.</summary>
public const int CapFarmers = 6;
public const int CapHaulers = 3;
// ─── The aura and the beehives in it ─────────────────────────────────
public static readonly float HiveAuraRadius = 10f;
public const int HiveAuraBeehiveMax = 10;
/// <summary>Not every frame: it walks a sphere of colliders and nothing here is urgent.</summary>
public static readonly float HiveAuraSweepInterval = 5f;
/// <summary>How long a beehive must stand in the aura before the colony takes it.</summary>
public static readonly float BeehiveInfectionSeconds = 60f;
public static readonly float BeehiveSpeedMultiplier = 2f; // twice as fast
public static readonly float BeehiveCapacityMultiplier = 3f; // three times the honey
/// <summary>
/// Vanilla's own cap, written down because m_maxHoney is an instance field and by the time
/// we read it on a hive we may already have changed it. Multiplying what we find would
/// treble the trebled number on the next sweep.
/// </summary>
public const int BeehiveBaseMaxHoney = 4;
/// <summary>After Yagluth the colony makes royal jelly instead of honey.</summary>
public const int RoyalJellyHiveState = 6;
// The mark of a taken hive. SeekerEgg is a real prefab - unlike Wing_gib, which was not.
// The first pass shipped a 35 cm egg at 90 cm and nobody could see it: too small, and high
// enough above the hive's origin to float clear of the roof instead of sitting on it. Both
// numbers are in the .cfg now, because where a thing sits on another thing is decided by
// an eye and not by arithmetic.
public const string HiveEggPrefab = "SeekerEgg";
public static readonly float HiveEggSize = 0.55f; // metres
public static readonly float HiveEggHeight = 0.45f; // above the hive's own origin
/// <summary>The nest's own size. 0.75 is the quarter off that the first placement asked for.</summary>
public static readonly float HiveScale = 0.75f;
// ─── What the colony looks like from outside ─────────────────────────
// How big the swarm of flies and the green reek are on each thing that wears them. Metres,
// near enough - the holder is scaled by these and the particles ride it. Both are first
// guesses and both are in the .cfg, because nobody can settle a cloud of flies on paper.
public static readonly float NestVfxScale = 1.5f;
public static readonly float BeehiveVfxScale = 0.5f;
// The two hives bolted to the nest: the stomach at its foot, the market up top. Sizes are
// in metres and heights are metres up the trunk from the ground. Both sizes are also the
// width of the sphere you press, so a mouth that is too small is a mouth that is hard to
// point at as well as hard to see - the stomach is the bigger of the two because it is the
// one you use every time you come home.
public static readonly float StomachSize = 1.4f;
public static readonly float StomachHeight = 0f;
/// <summary>
/// The Hive Market bench's own scale. It is a BUILDING now, not a mouth on the nest.
///
/// Two heights were tried while it still hung on the trunk and neither could work: the
/// measured crown put it eight metres over the player's head, and the number that replaced
/// it lost to the zero already written in everyone's .cfg, which dropped it inside the
/// stomach's own sphere. A counter you raise where you like has no such argument to lose.
/// </summary>
public static readonly float MarketSize = 1.6f; // metres, the borrowed model's largest side
// ─── Seeker Worker ───────────────────────────────────────────────────
public const string WorkerDisplayName = "$rov_creature_sverm_worker_name";
public static readonly float WorkerScale = 0.5f;
public static readonly float WorkerHealthFraction = 0.5f;
public static readonly float WorkerDamageFraction = 0.5f;
/// <summary>One out of the nest on this timer, until the pool is full.</summary>
public static readonly float WorkerSpawnInterval = 120f;
/// <summary>Haulers only start after Bonemass.</summary>
public const int HaulerUnlockState = 4;
/// <summary>How far a worker reaches to mend, and how often it mends one thing.</summary>
public static readonly float WorkerRepairRange = 10f;
public static readonly float WorkerRepairInterval = 5f;
/// <summary>How far from its anchor a worker looks for chests.</summary>
public static readonly float WorkerChestRange = 3f;
/// <summary>How often a worker does a round of its trade.</summary>
public static readonly float WorkerRoundInterval = 4f;
/// <summary>Plants per infected beehive, once the farmer's job lands.</summary>
public const int PlantsPerBeehive = 15;
// ─── Biomass ─────────────────────────────────────────────────────────
public static readonly float BiomassTankBase = 1000f;
/// <summary>Section 10.1: 1000 / 1500 / 2000 / 2500 across the four stages.</summary>
public static readonly float BiomassTankPerStage = 500f;
/// <summary>
/// Headroom over the document's tank, on every stage: 1500 / 2000 / 2500 / 3000.
///
/// FOUND IN PLAY, and it is a real hole rather than a balance opinion. A stage costs exactly
/// the tankful of the stage below it, so with the tank and the price being the same number
/// the hive had to be full TO THE GRAM before it could grow - and it never was. Biomass
/// arrives in whole items: with three units of room left, a log worth five does not fit, so
/// the last few points can never be filled and the price is never reached.
///
/// The prices are untouched. This is the room above them.
/// </summary>
public static readonly float BiomassTankHeadroom = 500f;
public static readonly float WoodBiomassValue = 5f;
/// <summary>
/// How big the nest is at the last stage, as a multiple of how it was built.
///
/// SECTION 9 SAYS TRIPLE and triple was wrong on screen: the trunk measures about eight
/// metres as placed, so a Hive Citadel stood twenty-four metres tall and read as a bug
/// rather than as a building. 1.75 keeps the growth legible - each stage is visibly bigger
/// than the last - without the last one swallowing the base. In the .cfg because this is a
/// number only an eye can settle.
/// </summary>
public static readonly float HiveStageGrowth = 1.75f;
/// <summary>Section 20.4's day between purchases, in game days.</summary>
public static readonly float UpgradeCooldownDays = 1f;
// ─── Brood eggs and troops ───────────────────────────────────────────
/// <summary>Section 10.2: one egg every twenty seconds, five plus the stage in the clutch.</summary>
public static readonly float EggInterval = 20f;
public const int EggCapBase = 5;
/// <summary>How far a troop wanders from the nest when nobody is leading it.</summary>
public static readonly float TroopLeashRange = 12f;
/// <summary>
/// How far from home a troop will fight: the leash on the TARGET, not on the walk.
///
/// Set on the prefab as both m_alertRange and m_maxChaseDistance, and it has to be. Vanilla
/// drops a tame creature's target once the target is further than m_alertRange from its
/// patrol point (the nest, pinned by RaisedThrall) - read off MonsterAI.UpdateTarget - and the
/// troops used to inherit whatever the Seeker, Gjall and Tick prefabs carry, which is 9999 in
/// code. They hunted anything they could see. While a troop FOLLOWS, the patrol point is off
/// and the same range is measured from the player instead.
/// </summary>
public static readonly float TroopAlertRange = 25f;
/// <summary>
/// How far from its player a following troop stands, and how far it may fall behind before it
/// walks back to its place. Vanilla BaseAI.Follow sends every follower to the player's exact
/// position and stops it at three metres, so a squad piled onto one point, shoved each other
/// and shoved the player. See SvermTroopFollow.
/// </summary>
public static readonly float TroopFollowRadius = 4f;
/// <summary>How far past its place a troop may drift before it moves again - the hysteresis
/// that keeps a squad from jittering.</summary>
public static readonly float TroopFollowSlack = 3f;
/// <summary>How far from a boat's hull a following troop keeps, measured off the hull's
/// bounds. Close enough to be a bodyguard, far enough not to push the ship around.</summary>
public static readonly float TroopShipDistance = 5f;
/// <summary>Past this many metres from its player a following troop gives up the walk and
/// goes home to its nest.</summary>
public static readonly float TroopFollowGiveUp = 30f;
/// <summary>How long a troop outlives the nest that hatched it, in seconds.</summary>
public static readonly float TroopWitherSeconds = 60f;
/// <summary>How close a troop has to be to see whether its nest is still standing.</summary>
public static readonly float TroopHomeCheckRange = 25f;
// ─── Blister Tick ────────────────────────────────────────────────────
/// <summary>Section 12: fifty a slot, and the slot is permanent.</summary>
public static readonly float TickPrice = 50f;
/// <summary>How close it gets before it bursts, in metres.</summary>
public static readonly float TickBurstRange = 2.5f;
/// <summary>How long the nest waits before growing a replacement, in seconds.</summary>
public static readonly float TickRespawnSeconds = 30f;
/// <summary>From this nest stage on, the blast is the elite blob's. Section 12's two tiers.</summary>
public const int TickLateBlastStage = 3;
/// <summary>Only used if the blob projectiles are not in this build - see SvermBlisterTick.</summary>
public static readonly float TickFallbackDamage = 30f;
// ─── Medicine ────────────────────────────────────────────────────────
/// <summary>
/// Section 19.4: what a jar heals when it is given to one of the colony's insects instead of
/// eaten. They stopped counting as biomass to become this.
/// </summary>
public static readonly float HoneyHealing = 40f;
public static readonly float RoyalJellyHealing = 90f;
// No Venom Coil numbers. Section 13's turret was built, seen and rejected, so its price, its
// Bonemass gate and its scale are gone with it rather than left here looking pending.
/// <summary>
/// How much biomass moves from digestion into the spendable bank each second.
///
/// NOT A NUMBER FROM THE DESIGN DOCUMENT - the digestion is described there, its speed is
/// not. Five a second empties a full stage-one tank in a little over three minutes, which
/// is long enough that a hive cannot be filled and spent in the same breath and short
/// enough that nobody stands there waiting. It is in the .cfg because it is the first thing
/// a play test will want to argue with.
/// </summary>
public static readonly float BiomassDigestRate = 5f;
// ─── Helpers ─────────────────────────────────────────────────────────
private static Color Hex(int r, int g, int b)
{
return new Color(r / 255f, g / 255f, b / 255f, 1f);
}
}
}