feat(eyes): male per-eye defaults from playtest

Male Aswid, Alfar and Dvergar eye values dialled in on screen become the
defaults of their Eyes Position sections, so male faces no longer start from
the untuned code placement.
This commit is contained in:
kanym 2026-10-27 17:44:49 +01:00
commit f7a4494b39

View file

@ -42,23 +42,32 @@ namespace RacesOfValheim
public static void Bind(ConfigFile config)
{
// Female defaults dialled in on screen (playtest, 2026-10-27). The male ones are
// still the code's own placement; the Sverm's helmet hides its eyes, so it keeps it.
// Defaults dialled in on screen (playtest, 2026-10-27), per eye: female left, female
// right, male left, male right. The Sverm's helmet hides its eyes, so it keeps the
// code's own placement.
BindRace(config, AlfarConfig.RaceId, true,
new Defaults { Separation = 0.006f, RotX = -17.524f },
new Defaults { Separation = 0.015f, RotX = -17.524f });
new Defaults { Separation = 0.015f, RotX = -17.524f },
new Defaults(),
new Defaults { Separation = 0.009f });
BindRace(config, "Aswid", true,
new Defaults { Forward = -0.006f, Height = -0.010f, Separation = 0f, Size = 1.314f,
RotX = -14.279f, RotY = -5.841f, RotZ = -1.298f },
new Defaults { Forward = -0.006f, Height = -0.012f, Separation = 0.011f, Size = 1.324f,
RotX = 1.947f, RotY = 3.245f, RotZ = 4.544f });
RotX = 1.947f, RotY = 3.245f, RotZ = 4.544f },
new Defaults { Height = -0.005f, Separation = -0.005f, Size = 1.273f,
RotX = 6.49f, RotY = 4.544f, RotZ = 4.544f },
new Defaults { Forward = -0.002f, Height = -0.005f, Separation = 0.004f, Size = 1.444f,
RotZ = 6.49f });
BindRace(config, DvergarConfig.RaceId, false,
new Defaults { Forward = -0.011f, Separation = 0.005f, Size = 1.616f },
new Defaults { Forward = -0.015f, Separation = 0.013f, Size = 1.616f });
new Defaults { Forward = -0.015f, Separation = 0.013f, Size = 1.616f },
new Defaults { Forward = -0.003f, Size = 1.05f },
new Defaults { Forward = -0.004f, Separation = 0.005f });
BindRace(config, SvermConfig.RaceId, false, new Defaults(), new Defaults());
BindRace(config, SvermConfig.RaceId, false, new Defaults(), new Defaults(), new Defaults(), new Defaults());
}
/// <summary>Starting values for one eye's sliders.</summary>
@ -79,15 +88,16 @@ namespace RacesOfValheim
return set[(PlayerFace.IsFemale(player) ? 2 : 0) + (side < 0f ? 0 : 1)];
}
private static void BindRace(ConfigFile config, string race, bool rotation, Defaults femaleLeft, Defaults femaleRight)
private static void BindRace(ConfigFile config, string race, bool rotation,
Defaults femaleLeft, Defaults femaleRight, Defaults maleLeft, Defaults maleRight)
{
string section = SectionPrefix + race;
// Female first in the list, left before right: Order sorts high to low.
tunings[race] = new[]
{
BindEye(config, section, "Male", "Left", rotation, 200, new Defaults()),
BindEye(config, section, "Male", "Right", rotation, 100, new Defaults()),
BindEye(config, section, "Male", "Left", rotation, 200, maleLeft),
BindEye(config, section, "Male", "Right", rotation, 100, maleRight),
BindEye(config, section, "Female", "Left", rotation, 400, femaleLeft),
BindEye(config, section, "Female", "Right", rotation, 300, femaleRight),
};