An Aswid could take wing in the middle of a fight. Taking bat form is now refused until Combat Lock seconds (default 2.5, 0 turns it off) after the local player last lost health. Health is compared around Character.ApplyDamage, so direct hits and fire, poison and bleeding ticks all count, and a fully blocked or absorbed hit does not. Turning back from bat form is never blocked.
487 lines
41 KiB
C#
487 lines
41 KiB
C#
using UnityEngine;
|
|
using BepInEx.Configuration;
|
|
|
|
namespace RacesOfValheim
|
|
{
|
|
/// <summary>
|
|
/// Every tunable number and keybind behind the Aswid's abilities, bound as BepInEx ConfigEntry
|
|
/// so they show up in Configuration Manager without touching code - see
|
|
/// CONFIGURATION-MANAGER-HOWTO.md. Bound once, from RacesOfValheim.Awake(). One section per
|
|
/// topic (matches SkadiConfig's layout) rather than one shared section, so each shows up as
|
|
/// its own entry in Configuration Manager's category list.
|
|
///
|
|
/// Tier-gate thresholds (which progression state unlocks Mist Form, Eclipse, or which mob a
|
|
/// given tier can tame) are left as-is, same boundary drawn for Skadi's progression table -
|
|
/// these are a differently-shaped piece of config (per-tier unlock tables, not flat values).
|
|
/// </summary>
|
|
public static class AswidConfig
|
|
{
|
|
// ─── Keybinds ──────────────────────────────────────────────────────────
|
|
// Defaults match today's fixed inputs exactly, so nobody's controls change until they
|
|
// open Configuration Manager (or the .cfg) and rebind one on purpose.
|
|
public static ConfigEntry<KeyboardShortcut> BatFormKey;
|
|
public static ConfigEntry<KeyboardShortcut> MistFormKey;
|
|
public static ConfigEntry<KeyboardShortcut> EclipseKey;
|
|
public static ConfigEntry<KeyboardShortcut> TameKey;
|
|
public static ConfigEntry<KeyboardShortcut> ToggleDevourKey;
|
|
|
|
// ─── Passive combat (scales with progression state, doubles at night) ────
|
|
public static ConfigEntry<float> DamageBonusPerState;
|
|
public static ConfigEntry<float> ArmorBonusPerState;
|
|
public static ConfigEntry<float> SpeedBonusPerState;
|
|
public static ConfigEntry<float> NightMultiplier;
|
|
public static ConfigEntry<float> BloodMagicSkillGainMultiplier;
|
|
public static ConfigEntry<float> SurtlingFormDamageBonus;
|
|
|
|
// ─── Stamina ─────────────────────────────────────────────────────────────
|
|
// The race used to have infinite stamina. Now it has a large pool that grows with each
|
|
// boss, on top of what its devoured food gives - added, never assigned, so stamina mods
|
|
// still stack.
|
|
public static ConfigEntry<float> BaseStaminaBonus;
|
|
public static ConfigEntry<float> StaminaBonusPerState;
|
|
public static ConfigEntry<float> StaminaCostMultiplier;
|
|
|
|
// ─── Weaknesses ──────────────────────────────────────────────────────────
|
|
// The Discord reports said the race had no real downsides. Each weakness has its own
|
|
// switch, so a single player can drop one; on a server the host's values win.
|
|
public static ConfigEntry<bool> SunlightEnabled;
|
|
public static ConfigEntry<float> SunHealthRegenPenalty;
|
|
public static ConfigEntry<float> SunStaminaRegenPenalty;
|
|
public static ConfigEntry<float> SunSpeedPenalty;
|
|
public static ConfigEntry<float> SunHealthLossPerSecond;
|
|
public static ConfigEntry<float> SunHealthFloor;
|
|
public static ConfigEntry<bool> FireWeaknessEnabled;
|
|
public static ConfigEntry<float> FireWeakness;
|
|
public static ConfigEntry<bool> FaderRemovesFireWeakness;
|
|
public static ConfigEntry<bool> PierceWeaknessEnabled;
|
|
public static ConfigEntry<float> PierceWeakness;
|
|
|
|
// ─── Running Water ─────────────────────────────────────────────────────
|
|
// Lore says a vampire cannot cross running water unaided (Dagaz's report). Swimming costs
|
|
// more, and open water - sea, river or lake - burns, swimming or flying over it; a boat
|
|
// carries you, which the lore allows, though the camera still sways on board. The camera sway is a per-player comfort choice and stays local
|
|
// (ConfigSync's "camera sway" key part).
|
|
public static ConfigEntry<bool> RunningWaterEnabled;
|
|
public static ConfigEntry<bool> WaterOceanOnly;
|
|
public static ConfigEntry<float> SwimStaminaMultiplier;
|
|
public static ConfigEntry<float> SeaHealthLossPerSecond;
|
|
public static ConfigEntry<float> SeaStaminaDrainPerSecond;
|
|
public static ConfigEntry<float> SeaHealthFloor;
|
|
public static ConfigEntry<bool> SeaCameraSway;
|
|
public static ConfigEntry<float> SeaCameraSwayStrength;
|
|
|
|
// ─── Bat Form ────────────────────────────────────────────────────────────
|
|
// The bat flies on the same directed flight as the Skadi's drakes (DirectedFlight.cs),
|
|
// with its own numbers. It used to fly on vanilla's debug-fly flag: 50 m/s, free, blind
|
|
// to carry weight, and ignored by every monster until AswidBatAggro lied to six vanilla
|
|
// methods about it. The old flight came back as Free Flight, for players who want it
|
|
// (building tall); AswidBatForm holds the aggro patches it needs.
|
|
public enum EncumberedMode { Allowed, Blocked }
|
|
public enum BatFlightRuleMode { PlayerChoice, AlwaysStaminaFlight, AlwaysFreeFlight }
|
|
|
|
public static ConfigEntry<bool> FreeBatFlight;
|
|
public static ConfigEntry<BatFlightRuleMode> BatFlightRule;
|
|
|
|
/// <summary>Which flight a bat taken now gets: the server's rule first, then the player's own pick.</summary>
|
|
public static bool UsesFreeBatFlight()
|
|
{
|
|
switch (BatFlightRule.Value)
|
|
{
|
|
case BatFlightRuleMode.AlwaysStaminaFlight: return false;
|
|
case BatFlightRuleMode.AlwaysFreeFlight: return true;
|
|
default: return FreeBatFlight.Value;
|
|
}
|
|
}
|
|
|
|
public static ConfigEntry<float> BatTurnSpeed;
|
|
public static ConfigEntry<float> BatGlideSpeed;
|
|
public static ConfigEntry<float> BatBoostSpeed;
|
|
public static ConfigEntry<float> BatSprintSpeed;
|
|
public static ConfigEntry<float> BatReverseSpeed;
|
|
public static ConfigEntry<float> BatLiftoffSpeed;
|
|
public static ConfigEntry<float> BatHoverSeconds;
|
|
public static ConfigEntry<float> BatPoweredStaminaPerSecond;
|
|
public static ConfigEntry<float> BatSprintStaminaPerSecond;
|
|
public static ConfigEntry<EncumberedMode> BatEncumbered;
|
|
public static ConfigEntry<float> BatEncumberedExtraCost;
|
|
public static ConfigEntry<float> BatMaxDuration;
|
|
public static ConfigEntry<float> BatDurationPerState;
|
|
public static ConfigEntry<float> BatCooldown;
|
|
public static ConfigEntry<float> BatCombatLock;
|
|
|
|
// ─── Vampiric Aura (passive, always active) ──────────────────────────────
|
|
public static ConfigEntry<float> AuraTickInterval;
|
|
public static ConfigEntry<float> AuraRadiusDay;
|
|
public static ConfigEntry<float> AuraRadiusNight;
|
|
public static ConfigEntry<float> AuraBaseDamage;
|
|
public static ConfigEntry<float> AuraBloodMagicScaling;
|
|
public static ConfigEntry<float> AuraExecuteThreshold;
|
|
public static ConfigEntry<bool> AuraInBatForm;
|
|
public static ConfigEntry<int> BatAuraUnlockState;
|
|
|
|
// ─── Superhuman Senses (tier 5+ passive) ─────────────────────────────────
|
|
public static ConfigEntry<float> SensesRadius;
|
|
public static ConfigEntry<float> SensesRefreshInterval;
|
|
public static ConfigEntry<float> SensesLightRange;
|
|
public static ConfigEntry<float> SensesLightIntensity;
|
|
|
|
// ─── Eclipse (tier 6+ ability) ────────────────────────────────────────
|
|
public static ConfigEntry<float> EclipseCooldown;
|
|
public static ConfigEntry<float> EclipseCastTime;
|
|
public static ConfigEntry<float> EclipseDuration;
|
|
|
|
// ─── Devour ────────────────────────────────────────────────────────────
|
|
public static ConfigEntry<float> DevourCooldown;
|
|
// What a devoured creature feeds - see AswidRace.ApplyFoodBalance.
|
|
public static ConfigEntry<float> DevourHealthMultiplier;
|
|
public static ConfigEntry<float> DevourStaminaShare;
|
|
public static ConfigEntry<float> EarlyStaminaShare;
|
|
public static ConfigEntry<float> FoodCapBase;
|
|
public static ConfigEntry<float> FoodCapPerBiome;
|
|
|
|
// ─── Domination (tier 6+ ability, native Interact key) ───────────────────
|
|
public static ConfigEntry<float> EnslaveCooldown;
|
|
public static ConfigEntry<float> ThrallLifetime;
|
|
|
|
// ─── Eyes ──────────────────────────────────────────────────────────────
|
|
// The Aswid wears the vanilla skeleton's eye lights (AswidVisuals), and where a borrowed
|
|
// object sits on a borrowed rig is not something to get right by reasoning about it. All
|
|
// of these read live, so they can be dragged in Configuration Manager while looking at the
|
|
// face. Once the pose settles they could collapse back into constants, the same way the
|
|
// mandible's did - but unlike the mandible these are worth keeping, because the source
|
|
// creature and the colour are genuine preferences.
|
|
public static ConfigEntry<string> EyeSourceModel;
|
|
public static ConfigEntry<int> EyeFinalStage;
|
|
public static ConfigEntry<float> EarlyEyeColorRed;
|
|
public static ConfigEntry<float> EarlyEyeColorGreen;
|
|
public static ConfigEntry<float> EarlyEyeColorBlue;
|
|
public static ConfigEntry<float> EarlyEyeGlowStrength;
|
|
public static ConfigEntry<float> EyeColorRed;
|
|
public static ConfigEntry<float> EyeColorGreen;
|
|
public static ConfigEntry<float> EyeColorBlue;
|
|
public static ConfigEntry<float> EyeGlowStrength;
|
|
public static ConfigEntry<float> EyeSizeMultiplier;
|
|
public static ConfigEntry<float> EyeForwardOffset;
|
|
public static ConfigEntry<float> EyeHeightOffset;
|
|
public static ConfigEntry<float> EyeSeparationOffset;
|
|
public static ConfigEntry<float> EyeRotationX;
|
|
public static ConfigEntry<float> EyeRotationY;
|
|
public static ConfigEntry<float> EyeRotationZ;
|
|
public static ConfigEntry<bool> EyeSmoke;
|
|
public static ConfigEntry<bool> EyeFlatColorShader;
|
|
|
|
// ─── Claws of the Beast ────────────────────────────────────────────────
|
|
// The tint the Bjorn claw is worn at (AswidClaws). Config rather than a constant because
|
|
// "almost black" is a look and not a number, and it multiplies the model's own texture, so
|
|
// what a given value looks like depends on the model. Reads live.
|
|
public static ConfigEntry<float> ClawTintRed;
|
|
public static ConfigEntry<float> ClawTintGreen;
|
|
public static ConfigEntry<float> ClawTintBlue;
|
|
|
|
public static void Bind(ConfigFile config)
|
|
{
|
|
const string keybinds = "Aswid - Keybinds";
|
|
BatFormKey = config.Bind(keybinds, "Bat Form", new KeyboardShortcut(KeyCode.G),
|
|
new ConfigDescription("Transform into (or revert from) a Bat, tier 2+ (night only) / tier 3+ (any time)."));
|
|
MistFormKey = config.Bind(keybinds, "Mist Form Toggle", new KeyboardShortcut(KeyCode.H),
|
|
new ConfigDescription("Become (or revert from) mist, tier 7+."));
|
|
EclipseKey = config.Bind(keybinds, "Cast Eclipse", new KeyboardShortcut(KeyCode.J),
|
|
new ConfigDescription("Casts Eclipse, tier 6+. Fails silently at night."));
|
|
TameKey = config.Bind(keybinds, "Tame", new KeyboardShortcut(KeyCode.U),
|
|
new ConfigDescription("Tames the creature under your cursor, if your tier allows it."));
|
|
ToggleDevourKey = config.Bind(keybinds, "Toggle Devour Ability", new KeyboardShortcut(KeyCode.I),
|
|
new ConfigDescription("Turns the Vampiric Aura and the automatic Devour-on-kill behavior on or off together. Turn this off before talking to Haldor/Hildir - the aura does not recognize traders and will attack them."));
|
|
|
|
const string combat = "Aswid - Passive Combat";
|
|
DamageBonusPerState = config.Bind(combat, "Damage Bonus Per State", 2f,
|
|
new ConfigDescription("Flat physical damage added to equipped weapons, per progression state.", new AcceptableValueRange<float>(0f, 10f)));
|
|
ArmorBonusPerState = config.Bind(combat, "Armor Bonus Per State", 1f,
|
|
new ConfigDescription("Flat armor added, per progression state.", new AcceptableValueRange<float>(0f, 10f)));
|
|
SpeedBonusPerState = config.Bind(combat, "Speed Bonus Per State", 0.01f,
|
|
new ConfigDescription("Move/jump speed multiplier added, per progression state (0.01 = 1%).", new AcceptableValueRange<float>(0f, 0.1f)));
|
|
NightMultiplier = config.Bind(combat, "Night Multiplier", 2f,
|
|
new ConfigDescription("Multiplies the speed, armor, damage, and lifesteal bonuses above while it is night.", new AcceptableValueRange<float>(1f, 5f)));
|
|
BloodMagicSkillGainMultiplier = config.Bind(combat, "Blood Magic Skill Gain Multiplier", 2f,
|
|
new ConfigDescription("Multiplies how fast the Blood Magic skill levels up.", new AcceptableValueRange<float>(0.5f, 5f)));
|
|
SurtlingFormDamageBonus = config.Bind(combat, "Surtling Form Damage Bonus", 30f,
|
|
new ConfigDescription("Flat damage added to every attack once the tier 8 Surtling form is unlocked.", new AcceptableValueRange<float>(0f, 100f)));
|
|
|
|
const string stamina = "Aswid - Stamina";
|
|
BaseStaminaBonus = config.Bind(stamina, "Base Stamina Bonus", 25f,
|
|
new ConfigDescription("Max stamina added on top of the game's base 75 and your food, before any boss.", new AcceptableValueRange<float>(0f, 300f)));
|
|
StaminaBonusPerState = config.Bind(stamina, "Stamina Bonus Per State", 10f,
|
|
new ConfigDescription("Max stamina added per progression state (8 at Fader).", new AcceptableValueRange<float>(0f, 50f)));
|
|
StaminaCostMultiplier = config.Bind(stamina, "Stamina Cost Multiplier", 1f,
|
|
new ConfigDescription("Multiplies every stamina cost: sprinting, swimming, attacks, blocking. 1 is the normal cost, 0.5 half. There is no infinite setting on purpose; set the bonuses above high instead.", new AcceptableValueRange<float>(0.1f, 2f)));
|
|
|
|
const string weak = "Aswid - Weaknesses";
|
|
SunlightEnabled = config.Bind(weak, "Sunlight", true,
|
|
new ConfigDescription("Weakens you by day while you stand under open sky. A roof (the same test as the game's Sheltered status), a dungeon, the Swamp, the Mistlands, the night and your own Eclipse all shield you.", null));
|
|
SunHealthRegenPenalty = config.Bind(weak, "Sunlight Health Regen Penalty", 0.5f,
|
|
new ConfigDescription("Health regeneration lost in sunlight. 0.5 = half.", new AcceptableValueRange<float>(0f, 1f)));
|
|
SunStaminaRegenPenalty = config.Bind(weak, "Sunlight Stamina Regen Penalty", 0.25f,
|
|
new ConfigDescription("Stamina regeneration lost in sunlight. 0.25 = a quarter.", new AcceptableValueRange<float>(0f, 1f)));
|
|
SunSpeedPenalty = config.Bind(weak, "Sunlight Speed Penalty", 0.1f,
|
|
new ConfigDescription("Movement speed lost in sunlight. 0.1 = 10% slower.", new AcceptableValueRange<float>(0f, 0.9f)));
|
|
SunHealthLossPerSecond = config.Bind(weak, "Sunlight Health Loss Per Second", 0.5f,
|
|
new ConfigDescription("Health the sun burns away each second. 0 turns it off.", new AcceptableValueRange<float>(0f, 10f)));
|
|
SunHealthFloor = config.Bind(weak, "Sunlight Health Floor", 0.3f,
|
|
new ConfigDescription("The sun stops burning at this fraction of your max health, so it weakens you but never kills you. 0.3 = 30%.", new AcceptableValueRange<float>(0f, 1f)));
|
|
FireWeaknessEnabled = config.Bind(weak, "Fire Weakness", true,
|
|
new ConfigDescription("Fire, burning included, hurts more.", null));
|
|
FireWeakness = config.Bind(weak, "Fire Weakness Amount", 0.25f,
|
|
new ConfigDescription("Extra fire damage taken. 0.25 = 25% more. Resistance meads and armour still reduce it.", new AcceptableValueRange<float>(0f, 2f)));
|
|
FaderRemovesFireWeakness = config.Bind(weak, "Fader Removes Fire Weakness", true,
|
|
new ConfigDescription("Defeating Fader, the boss that grants the Surtling form, ends the fire weakness.", null));
|
|
PierceWeaknessEnabled = config.Bind(weak, "Pierce Weakness", true,
|
|
new ConfigDescription("Pierce damage (arrows, spears, stakes) hurts more. Mist Form's immunity still wins.", null));
|
|
PierceWeakness = config.Bind(weak, "Pierce Weakness Amount", 0.2f,
|
|
new ConfigDescription("Extra pierce damage taken. 0.2 = 20% more.", new AcceptableValueRange<float>(0f, 2f)));
|
|
|
|
const string water = "Aswid - Running Water";
|
|
RunningWaterEnabled = config.Bind(water, "Running Water", true,
|
|
new ConfigDescription("Swimming costs more stamina, and open water - the sea, rivers, lakes - hurts you while you swim in it or fly over it. Standing on, steering or sitting in a boat protects you. Wading, docks and bridges are safe.", null));
|
|
WaterOceanOnly = config.Bind(water, "Ocean Only", false,
|
|
new ConfigDescription("Limits the burn, the drain and the camera sway to the Ocean biome, leaving rivers and lakes alone. The swim stamina cost applies everywhere either way.", null));
|
|
SwimStaminaMultiplier = config.Bind(water, "Swim Stamina Multiplier", 2f,
|
|
new ConfigDescription("Multiplies the stamina swimming costs, anywhere. At 0 stamina the game's own drowning starts. Around 5 and up, swimming any distance is no longer possible.", new AcceptableValueRange<float>(1f, 10f)));
|
|
SeaHealthLossPerSecond = config.Bind(water, "Open Water Health Loss Per Second", 1f,
|
|
new ConfigDescription("Health open water burns away each second.", new AcceptableValueRange<float>(0f, 20f)));
|
|
SeaStaminaDrainPerSecond = config.Bind(water, "Open Water Stamina Drain Per Second", 2f,
|
|
new ConfigDescription("Stamina open water drains each second, on top of what swimming or flying costs.", new AcceptableValueRange<float>(0f, 30f)));
|
|
SeaHealthFloor = config.Bind(water, "Open Water Health Floor", 0.1f,
|
|
new ConfigDescription("The water's burn stops at this fraction of your max health. Drowning, once your stamina runs out, has no floor.", new AcceptableValueRange<float>(0f, 1f)));
|
|
SeaCameraSway = config.Bind(water, "Camera Sway", true,
|
|
new ConfigDescription("The camera rolls gently while you are out on the water, on a boat too, as if seasick. Local: each player chooses for themselves.", null));
|
|
SeaCameraSwayStrength = config.Bind(water, "Camera Sway Strength", 1f,
|
|
new ConfigDescription("How far the camera rolls. 1 is about 4 degrees. Local.", new AcceptableValueRange<float>(0f, 3f)));
|
|
|
|
const string batform = "Aswid - Bat Form";
|
|
FreeBatFlight = config.Bind(batform, "Free Bat Flight", false,
|
|
new ConfigDescription("Off: Stamina Flight, the settings below. On: the old Free Flight, up to 50 m/s with no stamina cost and no weight limit; Jump rises, Left Ctrl sinks. Your own choice, unless the server's Bat Flight Rule forces one. Takes effect the next time you become a bat."));
|
|
BatFlightRule = config.Bind(batform, "Bat Flight Rule", BatFlightRuleMode.PlayerChoice,
|
|
new ConfigDescription("Server rule. PlayerChoice: each player's Free Bat Flight setting decides. AlwaysStaminaFlight / AlwaysFreeFlight: every bat flies that way. On a server only the host's or the server's value counts."));
|
|
// Same controls as the Skadi's drake: aim with the camera, W beats forward, Shift
|
|
// sprints, S beats backwards, and letting go hovers briefly before gliding down.
|
|
BatTurnSpeed = config.Bind(batform, "Turn Speed", 180f,
|
|
new ConfigDescription("Degrees per second the bat turns towards where you aim.", new AcceptableValueRange<float>(30f, 720f)));
|
|
BatGlideSpeed = config.Bind(batform, "Glide Speed", 6f,
|
|
new ConfigDescription("Speed while gliding down with no key held, in m/s.", new AcceptableValueRange<float>(0f, 30f)));
|
|
// Not "Flight Speed": that key held the old debug-fly multiplier, and an existing .cfg
|
|
// would load its 1 here as one metre per second.
|
|
BatBoostSpeed = config.Bind(batform, "Boost Speed", 13f,
|
|
new ConfigDescription("Speed while holding W, in m/s. Costs the powered stamina below.", new AcceptableValueRange<float>(0f, 60f)));
|
|
BatSprintSpeed = config.Bind(batform, "Sprint Speed", 24f,
|
|
new ConfigDescription("Speed while holding W and Shift, in m/s. Costs the sprint stamina on top. The old bat flew at 50.", new AcceptableValueRange<float>(0f, 80f)));
|
|
BatReverseSpeed = config.Bind(batform, "Reverse Speed", 8f,
|
|
new ConfigDescription("Speed while holding S, in m/s. Costs the powered stamina.", new AcceptableValueRange<float>(0f, 40f)));
|
|
BatLiftoffSpeed = config.Bind(batform, "Liftoff Speed", 9f,
|
|
new ConfigDescription("Climb speed out of water, in m/s. Always free, so a bat that touches the sea can still leave it.", new AcceptableValueRange<float>(0f, 30f)));
|
|
BatHoverSeconds = config.Bind(batform, "Hover Seconds", 3f,
|
|
new ConfigDescription("How long the bat holds its height after the last powered beat before it starts to glide down.", new AcceptableValueRange<float>(0f, 30f)));
|
|
BatPoweredStaminaPerSecond = config.Bind(batform, "Flight Stamina Per Second", 3f,
|
|
new ConfigDescription("Stamina per second while holding W or S. Out of stamina, the bat can only glide. 0 makes flight free, like the drake's.", new AcceptableValueRange<float>(0f, 60f)));
|
|
BatSprintStaminaPerSecond = config.Bind(batform, "Sprint Stamina Per Second", 12f,
|
|
new ConfigDescription("Extra stamina per second while sprinting, on top of the flight cost.", new AcceptableValueRange<float>(0f, 60f)));
|
|
BatEncumbered = config.Bind(batform, "While Encumbered", EncumberedMode.Allowed,
|
|
new ConfigDescription("Allowed: the bat flies while you carry too much, at the extra stamina cost below. Blocked: you cannot take bat form while encumbered, and a bat that becomes encumbered in the air can only glide down.", null));
|
|
BatEncumberedExtraCost = config.Bind(batform, "Encumbered Extra Stamina Cost", 0.15f,
|
|
new ConfigDescription("With 'Allowed' above: how much more flight and sprint cost while encumbered. 0.15 = 15% more.", new AcceptableValueRange<float>(0f, 1f)));
|
|
BatMaxDuration = config.Bind(batform, "Max Duration", 0f,
|
|
new ConfigDescription("Seconds the bat form lasts before you turn back on your own. 0 means no limit: stamina is the limit.", new AcceptableValueRange<float>(0f, 3600f)));
|
|
BatDurationPerState = config.Bind(batform, "Duration Per State", 0f,
|
|
new ConfigDescription("Seconds added to the max duration per progression state. Does nothing while the max duration is 0.", new AcceptableValueRange<float>(0f, 600f)));
|
|
BatCooldown = config.Bind(batform, "Cooldown", 0f,
|
|
new ConfigDescription("Seconds after leaving bat form before you can take it again. 0 means none.", new AcceptableValueRange<float>(0f, 3600f)));
|
|
BatCombatLock = config.Bind(batform, "Combat Lock", 2.5f,
|
|
new ConfigDescription("Seconds after you last lost health (a hit, or a tick of fire, poison or bleeding) before you can take bat form. Turning back from bat form is never blocked. 0 means none.", new AcceptableValueRange<float>(0f, 30f)));
|
|
|
|
const string aura = "Aswid - Vampiric Aura";
|
|
AuraTickInterval = config.Bind(aura, "Tick Interval", 0.25f,
|
|
new ConfigDescription("Seconds between aura damage/lifesteal ticks.", new AcceptableValueRange<float>(0.05f, 2f)));
|
|
AuraRadiusDay = config.Bind(aura, "Radius (Day)", 3f,
|
|
new ConfigDescription("Meters from the player that the aura drains during the day.", new AcceptableValueRange<float>(1f, 20f)));
|
|
AuraRadiusNight = config.Bind(aura, "Radius (Night)", 6f,
|
|
new ConfigDescription("Meters from the player that the aura drains at night.", new AcceptableValueRange<float>(1f, 20f)));
|
|
AuraBaseDamage = config.Bind(aura, "Base Damage", 1f,
|
|
new ConfigDescription("Damage per tick before the Blood Magic skill bonus, at human form's 0.5x multiplier.", new AcceptableValueRange<float>(0f, 20f)));
|
|
AuraBloodMagicScaling = config.Bind(aura, "Blood Magic Damage Scaling", 5f,
|
|
new ConfigDescription("Extra damage per tick at 100 Blood Magic skill (scales linearly from 0).", new AcceptableValueRange<float>(0f, 20f)));
|
|
AuraExecuteThreshold = config.Bind(aura, "Execute Threshold", 0.20f,
|
|
new ConfigDescription("Non-boss enemies at or below this fraction of max health are executed by the aura instead of merely damaged.", new AcceptableValueRange<float>(0f, 1f)));
|
|
AuraInBatForm = config.Bind(aura, "Active In Bat Form", false,
|
|
new ConfigDescription("Lets the aura drain while you are a bat from the start, as it did before. Off: the bat has no aura until the unlock state below.", null));
|
|
BatAuraUnlockState = config.Bind(aura, "Bat Form Unlock State", 7,
|
|
new ConfigDescription("The progression state at which the bat gets its aura back (7 = The Queen). 0 means never, so only the setting above can turn it on.", new AcceptableValueRange<int>(0, 8)));
|
|
|
|
const string senses = "Aswid - Superhuman Senses";
|
|
SensesRadius = config.Bind(senses, "Detection Radius", 100f,
|
|
new ConfigDescription("Meters within which nearby creatures are marked, tier 5+.", new AcceptableValueRange<float>(10f, 300f)));
|
|
SensesRefreshInterval = config.Bind(senses, "Refresh Interval", 1f,
|
|
new ConfigDescription("Seconds between detection sweeps.", new AcceptableValueRange<float>(0.2f, 5f)));
|
|
SensesLightRange = config.Bind(senses, "Marker Light Range", 10f,
|
|
new ConfigDescription("Range of the light placed on a detected creature.", new AcceptableValueRange<float>(1f, 30f)));
|
|
SensesLightIntensity = config.Bind(senses, "Marker Light Intensity", 2f,
|
|
new ConfigDescription("Intensity of the light placed on a detected creature.", new AcceptableValueRange<float>(0.1f, 10f)));
|
|
|
|
const string eclipse = "Aswid - Eclipse";
|
|
EclipseCooldown = config.Bind(eclipse, "Cooldown", 900f,
|
|
new ConfigDescription("Seconds between casts.", new AcceptableValueRange<float>(0f, 3600f)));
|
|
EclipseCastTime = config.Bind(eclipse, "Cast Time", 2f,
|
|
new ConfigDescription("Seconds the player is rooted while casting.", new AcceptableValueRange<float>(0f, 10f)));
|
|
EclipseDuration = config.Bind(eclipse, "Duration", 60f,
|
|
new ConfigDescription("Seconds the forced night lasts.", new AcceptableValueRange<float>(5f, 600f)));
|
|
|
|
const string devour = "Aswid - Devour";
|
|
DevourCooldown = config.Bind(devour, "Consume Cooldown", 5f,
|
|
new ConfigDescription("How long one body stays drunk-dry, in seconds. A single death is reported to the devour more than once - by two damage patches, by the aura's execute, by a thrall's kill - and this is the window that keeps those from feeding you twice off the same corpse. It is per body, not per player: killing a whole pack at once devours every one of them. One second is used as the floor, so no corpse feeds you twice even at 0.", new AcceptableValueRange<float>(0f, 60f)));
|
|
DevourHealthMultiplier = config.Bind(devour, "Health Multiplier", 0.9f,
|
|
new ConfigDescription("Scales the health every devoured creature feeds you. 1 is the old amount.", new AcceptableValueRange<float>(0f, 2f)));
|
|
DevourStaminaShare = config.Bind(devour, "Stamina Share", 0.10f,
|
|
new ConfigDescription("Fraction of that health turned into stamina instead, for creatures past the Black Forest. 0.1 = 10%.", new AcceptableValueRange<float>(0f, 1f)));
|
|
EarlyStaminaShare = config.Bind(devour, "Early Creature Stamina Share", 0.60f,
|
|
new ConfigDescription("The same, for Meadows and Black Forest creatures. Above 0.5 they feed more stamina than health. Set it equal to the one above to treat every creature alike.", new AcceptableValueRange<float>(0f, 1f)));
|
|
FoodCapBase = config.Bind(devour, "Food Health Cap Base", 15f,
|
|
new ConfigDescription("Creatures with no hand-set meal feed half their health. That is capped at this plus the per-biome value times the biome's number (Meadows 1 ... Deep North 8). With the defaults: Black Forest 45, Mountains 75, Plains 90.", new AcceptableValueRange<float>(0f, 150f)));
|
|
FoodCapPerBiome = config.Bind(devour, "Food Health Cap Per Biome", 15f,
|
|
new ConfigDescription("See the base cap above.", new AcceptableValueRange<float>(0f, 50f)));
|
|
|
|
// Jotunn's server sync assigns Value, which fires SettingChanged, so the server's
|
|
// numbers reach the foods the same way a local drag does.
|
|
foreach (var entry in new[] { DevourHealthMultiplier, DevourStaminaShare, EarlyStaminaShare, FoodCapBase, FoodCapPerBiome })
|
|
{
|
|
entry.SettingChanged += (_, __) => AswidRace.ApplyAllFoodBalance();
|
|
}
|
|
|
|
const string domination = "Aswid - Domination";
|
|
EnslaveCooldown = config.Bind(domination, "Enslave Cooldown", 900f,
|
|
new ConfigDescription("Seconds between dominating a creature, tier 6+.", new AcceptableValueRange<float>(0f, 3600f)));
|
|
ThrallLifetime = config.Bind(domination, "Thrall Lifetime", 60f,
|
|
new ConfigDescription("Seconds a dominated thrall survives before it dies on its own.", new AcceptableValueRange<float>(10f, 600f)));
|
|
|
|
BindEyes(config);
|
|
BindClaws(config);
|
|
}
|
|
|
|
/// <summary>
|
|
/// The Claws of the Beast. Only their colour is tunable: everything about how they behave
|
|
/// is shared with the Fenrir's and the Sverm's, and a race that could quietly retune its
|
|
/// own claw damage would defeat the point of balancing the three against one yardstick.
|
|
/// </summary>
|
|
private static void BindClaws(ConfigFile config)
|
|
{
|
|
const string claws = "Aswid - Claws";
|
|
|
|
ClawTintRed = config.Bind(claws, "Claw Tint Red", 0.12f,
|
|
new ConfigDescription("Multiplied into the claw model's own colours. All three near zero is what makes them read as almost black.",
|
|
new AcceptableValueRange<float>(0f, 1f), new ConfigurationManagerAttributes { Order = 30 }));
|
|
ClawTintGreen = config.Bind(claws, "Claw Tint Green", 0.11f,
|
|
new ConfigDescription("As above, green channel.",
|
|
new AcceptableValueRange<float>(0f, 1f), new ConfigurationManagerAttributes { Order = 29 }));
|
|
ClawTintBlue = config.Bind(claws, "Claw Tint Blue", 0.13f,
|
|
new ConfigDescription("As above, blue channel. A shade above the other two keeps the black cold rather than muddy.",
|
|
new AcceptableValueRange<float>(0f, 1f), new ConfigurationManagerAttributes { Order = 28 }));
|
|
}
|
|
|
|
/// <summary>
|
|
/// The eye lights. Everything here is read every frame by AswidVisuals, so a slider moves
|
|
/// the eyes while you are looking at them - no relog, no equipment change.
|
|
///
|
|
/// The offsets are deltas on the pose the source creature authored its own eyes at, which
|
|
/// is why they all default to zero: zero means "exactly where the game's skeleton wears
|
|
/// them", and that is already the right place for a face on this rig.
|
|
/// </summary>
|
|
private static void BindEyes(ConfigFile config)
|
|
{
|
|
const string eyes = "Aswid - Eyes";
|
|
|
|
EyeSourceModel = config.Bind(eyes, "Eye Source Model", "Skeleton",
|
|
new ConfigDescription(
|
|
"Which creature's eye lights to wear. The plain skeleton's are smaller and dimmer than the poison one's; Hildir's are its own. Changing this rebuilds the pair.",
|
|
new AcceptableValueList<string>("Skeleton", "Skeleton_Poison", "Skeleton_Hildir"),
|
|
new ConfigurationManagerAttributes { Order = 100 }));
|
|
|
|
EyeFinalStage = config.Bind(eyes, "Eye Final Stage", 8,
|
|
new ConfigDescription("The progression state at which the eyes turn red. Below it they burn the spectral green set out just under here; 8 is Fader, the last one.",
|
|
new AcceptableValueRange<int>(1, 8), new ConfigurationManagerAttributes { Order = 95 }));
|
|
|
|
EarlyEyeColorRed = config.Bind(eyes, "Early Eye Colour Red", 0.08f,
|
|
new ConfigDescription("Red channel of the pre-final tint. Near zero: what little there is only keeps the green from reading as pure cyan.",
|
|
new AcceptableValueRange<float>(0f, 8f), new ConfigurationManagerAttributes { Order = 94 }));
|
|
EarlyEyeColorGreen = config.Bind(eyes, "Early Eye Colour Green", 1.4f,
|
|
new ConfigDescription("Green channel of the pre-final tint - the one doing the work.",
|
|
new AcceptableValueRange<float>(0f, 8f), new ConfigurationManagerAttributes { Order = 93 }));
|
|
EarlyEyeColorBlue = config.Bind(eyes, "Early Eye Colour Blue", 0.5f,
|
|
new ConfigDescription("Blue channel of the pre-final tint. A third of the green is what makes it read as cold and spectral rather than as a leaf.",
|
|
new AcceptableValueRange<float>(0f, 8f), new ConfigurationManagerAttributes { Order = 92 }));
|
|
EarlyEyeGlowStrength = config.Bind(eyes, "Early Eye Glow Strength", 0.8f,
|
|
new ConfigDescription("How bright the green burns. Deliberately below the red's, so arriving at the last stage is a visible change and not just a hue swap.",
|
|
new AcceptableValueRange<float>(0f, 3f), new ConfigurationManagerAttributes { Order = 91 }));
|
|
|
|
EyeColorRed = config.Bind(eyes, "Eye Colour Red", 2f,
|
|
new ConfigDescription("Red channel of the final-stage tint. Past 1 is HDR, which is what the bloom pass needs to make it glow rather than merely be red.",
|
|
new AcceptableValueRange<float>(0f, 8f), new ConfigurationManagerAttributes { Order = 90 }));
|
|
EyeColorGreen = config.Bind(eyes, "Eye Colour Green", 0.05f,
|
|
new ConfigDescription("Green channel of the final-stage tint. Near zero is what keeps a bright red from washing out to pink.",
|
|
new AcceptableValueRange<float>(0f, 8f), new ConfigurationManagerAttributes { Order = 89 }));
|
|
EyeColorBlue = config.Bind(eyes, "Eye Colour Blue", 0.02f,
|
|
new ConfigDescription("Blue channel of the final-stage tint. Near zero, same reason as green.",
|
|
new AcceptableValueRange<float>(0f, 8f), new ConfigurationManagerAttributes { Order = 88 }));
|
|
EyeGlowStrength = config.Bind(eyes, "Eye Glow Strength", 1f,
|
|
new ConfigDescription("How bright the final-stage red burns - the single knob for it, since the hue is already pure. Expect a floor: below the bloom threshold the eyes stop glowing and become flat dots.",
|
|
new AcceptableValueRange<float>(0f, 3f), new ConfigurationManagerAttributes { Order = 87 }));
|
|
|
|
// ─── Ranges are deliberately wide ────────────────────────────────
|
|
// These started at +/-0.1 m and 0.1-5x, on the assumption that the borrowed sockets
|
|
// land close to right and only need nudging. They do not, and a slider that cannot
|
|
// reach the correct value is worse than no slider - it looks like the setting does not
|
|
// work. Wide enough to dig the pair out of the skull from any starting point, and to
|
|
// find the right size by eye when the source model's own scale does not transfer.
|
|
// Every one of these is live: the eye ticker reapplies them each frame, so a drag in
|
|
// Configuration Manager moves them while you watch.
|
|
|
|
// ─── The defaults below were found in game, not derived ──────────
|
|
// The borrowed sockets do not arrive on the face by themselves: their authored pose
|
|
// and scale belong to the Skeleton's own rig and none of it transfers cleanly to a
|
|
// player armature (see AswidVisuals.BuildEyes for what does and does not carry over).
|
|
// Four attempts to compute the remainder each missed, so it was dialled in on screen
|
|
// instead and the answer written down here. That is what these seven numbers are - a
|
|
// measurement, not a taste. Treat them as the working baseline: a fresh install lands
|
|
// on a correct face, and the sliders are then free to be about taste again.
|
|
//
|
|
// The -180 on Z is the honest shape of it: the socket arrives upside down relative to
|
|
// the player's head bone, and this is the half turn that rights it.
|
|
|
|
EyeSizeMultiplier = config.Bind(eyes, "Eye Size Multiplier", 1.1f,
|
|
new ConfigDescription("Scales both sockets. 1 is the size the source creature wears them at.",
|
|
new AcceptableValueRange<float>(0.01f, 50f), new ConfigurationManagerAttributes { Order = 80 }));
|
|
|
|
EyeForwardOffset = config.Bind(eyes, "Eye Forward Offset", 0.013f,
|
|
new ConfigDescription("Moves both eyes out of (or into) the face, in metres. Positive is forward, out of the skull.",
|
|
new AcceptableValueRange<float>(-0.5f, 0.5f), new ConfigurationManagerAttributes { Order = 70 }));
|
|
EyeHeightOffset = config.Bind(eyes, "Eye Height Offset", 0.004f,
|
|
new ConfigDescription("Moves both eyes up or down the face, in metres. Positive is up.",
|
|
new AcceptableValueRange<float>(-0.5f, 0.5f), new ConfigurationManagerAttributes { Order = 69 }));
|
|
EyeSeparationOffset = config.Bind(eyes, "Eye Separation Offset", 0.007f,
|
|
new ConfigDescription("Pushes the two eyes apart (or together), in metres. Each moves away from the centre of the face, so this is half the change in the gap.",
|
|
new AcceptableValueRange<float>(-0.5f, 0.5f), new ConfigurationManagerAttributes { Order = 68 }));
|
|
|
|
EyeRotationX = config.Bind(eyes, "Eye Rotation X", 0f,
|
|
new ConfigDescription("Turns both eyes on the spot. Only matters if the borrowed socket is flat enough to be seen edge-on.",
|
|
new AcceptableValueRange<float>(-180f, 180f), new ConfigurationManagerAttributes { Order = 60 }));
|
|
EyeRotationY = config.Bind(eyes, "Eye Rotation Y", 22.068f,
|
|
new ConfigDescription("As above, around the second axis - but MIRRORED: the left eye turns the opposite way, so the pair toes in or out together instead of both pointing off the same shoulder.",
|
|
new AcceptableValueRange<float>(-180f, 180f), new ConfigurationManagerAttributes { Order = 59 }));
|
|
EyeRotationZ = config.Bind(eyes, "Eye Rotation Z", -180f,
|
|
new ConfigDescription("As above, around the third axis. The default half turn is what rights the borrowed socket, which arrives upside down on a player's head bone.",
|
|
new AcceptableValueRange<float>(-180f, 180f), new ConfigurationManagerAttributes { Order = 58 }));
|
|
|
|
EyeSmoke = config.Bind(eyes, "Eye Smoke", false,
|
|
new ConfigDescription("Lights the smoke the creature carries inside its own sockets and leaves switched off. Tinted to match the eyes, so it turns with them at the last stage.",
|
|
null, new ConfigurationManagerAttributes { Order = 50 }));
|
|
EyeFlatColorShader = config.Bind(eyes, "Eye Flat Colour Shader", false,
|
|
new ConfigDescription("Escape hatch: if the borrowed material refuses the red tint, this repaints the sockets with a plain colour shader instead - guaranteed red, but the socket loses its own texture. Changing this rebuilds the pair.",
|
|
null, new ConfigurationManagerAttributes { Order = 49 }));
|
|
}
|
|
}
|
|
}
|