feat(eyes): female eye defaults from playtest
The female slider values dialled in on screen for the Dvergar, Alfar and Aswid become the defaults of their Eyes Position sections, so a fresh install lands on the tuned faces. The Sverm keeps zeros: its helmet hides the eyes.
This commit is contained in:
parent
8b2b5180ed
commit
20c12724fd
1 changed files with 30 additions and 16 deletions
|
|
@ -7,7 +7,8 @@ namespace RacesOfValheim
|
|||
/// Hand placement for every race that hangs eyes on the face: one "Eyes Position - race"
|
||||
/// section each, with a female and a male set, because the two bodies put their painted eyes
|
||||
/// in different places (PlayerFace). Every value is a delta on the placement the race's own
|
||||
/// code computes, so all zeros (and size 1) is the shipped look.
|
||||
/// code computes: all zeros (and size 1) is the code's own placement, and the female
|
||||
/// defaults below are the corrections found in game on top of it.
|
||||
///
|
||||
/// Local, never synced (ConfigSync): it only changes how this client draws faces.
|
||||
/// </summary>
|
||||
|
|
@ -38,10 +39,23 @@ namespace RacesOfValheim
|
|||
|
||||
public static void Bind(ConfigFile config)
|
||||
{
|
||||
BindRace(config, AlfarConfig.RaceId, true);
|
||||
BindRace(config, "Aswid", true);
|
||||
BindRace(config, DvergarConfig.RaceId, false);
|
||||
BindRace(config, SvermConfig.RaceId, false);
|
||||
// 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.
|
||||
BindRace(config, AlfarConfig.RaceId, true,
|
||||
new Defaults { Separation = 0.006f, RotX = -17.524f });
|
||||
BindRace(config, "Aswid", true,
|
||||
new Defaults { Forward = -0.001f, Height = 0.001f, Separation = 0.006f, Size = 1.061f,
|
||||
RotX = -4.543f, RotY = -1.514f, RotZ = -4.543f });
|
||||
BindRace(config, DvergarConfig.RaceId, false,
|
||||
new Defaults { Forward = -0.011f, Separation = 0.005f, Size = 1.616f });
|
||||
BindRace(config, SvermConfig.RaceId, false, new Defaults());
|
||||
}
|
||||
|
||||
/// <summary>Starting values for one body's sliders.</summary>
|
||||
private sealed class Defaults
|
||||
{
|
||||
public float Forward, Height, Separation, RotX, RotY, RotZ;
|
||||
public float Size = 1f;
|
||||
}
|
||||
|
||||
/// <summary>The sliders for the body this player is wearing right now.</summary>
|
||||
|
|
@ -51,43 +65,43 @@ namespace RacesOfValheim
|
|||
return pair[PlayerFace.IsFemale(player) ? 1 : 0];
|
||||
}
|
||||
|
||||
private static void BindRace(ConfigFile config, string race, bool rotation)
|
||||
private static void BindRace(ConfigFile config, string race, bool rotation, Defaults female)
|
||||
{
|
||||
string section = SectionPrefix + race;
|
||||
tunings[race] = new[]
|
||||
{
|
||||
BindBody(config, section, "Male", rotation, 100),
|
||||
BindBody(config, section, "Female", rotation, 200),
|
||||
BindBody(config, section, "Male", rotation, 100, new Defaults()),
|
||||
BindBody(config, section, "Female", rotation, 200, female),
|
||||
};
|
||||
}
|
||||
|
||||
private static Tuning BindBody(ConfigFile config, string section, string body, bool rotation, int order)
|
||||
private static Tuning BindBody(ConfigFile config, string section, string body, bool rotation, int order, Defaults d)
|
||||
{
|
||||
// Female first in the list: Order sorts high to low.
|
||||
Tuning t = new Tuning();
|
||||
|
||||
t.Forward = config.Bind(section, body + " Forward", 0f,
|
||||
t.Forward = config.Bind(section, body + " Forward", d.Forward,
|
||||
new ConfigDescription($"{body} characters: moves both eyes out of (+) or into (-) the face, in metres.",
|
||||
new AcceptableValueRange<float>(-0.05f, 0.05f), new ConfigurationManagerAttributes { Order = order + 9 }));
|
||||
t.Height = config.Bind(section, body + " Height", 0f,
|
||||
t.Height = config.Bind(section, body + " Height", d.Height,
|
||||
new ConfigDescription($"{body} characters: moves both eyes up (+) or down (-), in metres.",
|
||||
new AcceptableValueRange<float>(-0.05f, 0.05f), new ConfigurationManagerAttributes { Order = order + 8 }));
|
||||
t.Separation = config.Bind(section, body + " Separation", 0f,
|
||||
t.Separation = config.Bind(section, body + " Separation", d.Separation,
|
||||
new ConfigDescription($"{body} characters: pushes the eyes apart (+) or together (-), in metres. Each eye moves by this much.",
|
||||
new AcceptableValueRange<float>(-0.03f, 0.03f), new ConfigurationManagerAttributes { Order = order + 7 }));
|
||||
t.Size = config.Bind(section, body + " Size", 1f,
|
||||
t.Size = config.Bind(section, body + " Size", d.Size,
|
||||
new ConfigDescription($"{body} characters: scales both eyes. 1 is the default size.",
|
||||
new AcceptableValueRange<float>(0.2f, 3f), new ConfigurationManagerAttributes { Order = order + 6 }));
|
||||
|
||||
if (rotation)
|
||||
{
|
||||
t.RotationX = config.Bind(section, body + " Rotation X", 0f,
|
||||
t.RotationX = config.Bind(section, body + " Rotation X", d.RotX,
|
||||
new ConfigDescription($"{body} characters: tilts both eyes up or down, in degrees.",
|
||||
new AcceptableValueRange<float>(-90f, 90f), new ConfigurationManagerAttributes { Order = order + 5 }));
|
||||
t.RotationY = config.Bind(section, body + " Rotation Y", 0f,
|
||||
t.RotationY = config.Bind(section, body + " Rotation Y", d.RotY,
|
||||
new ConfigDescription($"{body} characters: turns the eyes toward the temples (+) or the nose (-), in degrees. Mirrored between the two eyes.",
|
||||
new AcceptableValueRange<float>(-90f, 90f), new ConfigurationManagerAttributes { Order = order + 4 }));
|
||||
t.RotationZ = config.Bind(section, body + " Rotation Z", 0f,
|
||||
t.RotationZ = config.Bind(section, body + " Rotation Z", d.RotZ,
|
||||
new ConfigDescription($"{body} characters: raises (+) or lowers (-) the outer corners, in degrees. Mirrored between the two eyes.",
|
||||
new AcceptableValueRange<float>(-90f, 90f), new ConfigurationManagerAttributes { Order = order + 3 }));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue