warvulture

This commit is contained in:
Ferdinando 2026-08-11 19:29:58 +02:00
commit 1c4b20bb06
13 changed files with 1671 additions and 142 deletions

View file

@ -59,6 +59,41 @@ namespace RacesOfValheim
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";
@ -128,6 +163,109 @@ namespace RacesOfValheim
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 }));
EyeSizeMultiplier = config.Bind(eyes, "Eye Size Multiplier", 1f,
new ConfigDescription("Scales both sockets. 1 is the size the source creature wears them at.",
new AcceptableValueRange<float>(0.1f, 5f), new ConfigurationManagerAttributes { Order = 80 }));
EyeForwardOffset = config.Bind(eyes, "Eye Forward Offset", 0f,
new ConfigDescription("Moves both eyes out of (or into) the face. 0 leaves them where the source creature wears them.",
new AcceptableValueRange<float>(-0.1f, 0.1f), new ConfigurationManagerAttributes { Order = 70 }));
EyeHeightOffset = config.Bind(eyes, "Eye Height Offset", 0f,
new ConfigDescription("Moves both eyes up or down the face.",
new AcceptableValueRange<float>(-0.1f, 0.1f), new ConfigurationManagerAttributes { Order = 69 }));
EyeSeparationOffset = config.Bind(eyes, "Eye Separation Offset", 0f,
new ConfigDescription("Pushes the two eyes apart (or together). Each moves away from the centre of the face, so this is half the change in the gap.",
new AcceptableValueRange<float>(-0.1f, 0.1f), 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", 0f,
new ConfigDescription("As above, around the second axis.",
new AcceptableValueRange<float>(-180f, 180f), new ConfigurationManagerAttributes { Order = 59 }));
EyeRotationZ = config.Bind(eyes, "Eye Rotation Z", 0f,
new ConfigDescription("As above, around the third axis.",
new AcceptableValueRange<float>(-180f, 180f), new ConfigurationManagerAttributes { Order = 58 }));
EyeSmoke = config.Bind(eyes, "Eye Smoke", true,
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 }));
}
}
}