chore(release): v1.4.19 - eye height, remote forms, food refresh, faction retaliation
Race body scale moved the model and not the camera: Character.m_eye hangs off the unscaled root, so a Trol or a Dvergar changed height for everyone but themselves. RaceEyeHeight moves the eye by whatever scale the Visual is wearing, for every player, so aim rays follow too. Remote copies of a Fenrir form had no one writing to their Animator and stood in the controller's default state, sliding. RemoteFenrirAnimator mirrors the four local behaviours off the player's own replicated animator, the way RemoteSkadiAnimator already did for Skadi. Player.Food.m_time is time remaining, not time elapsed: the Aswid, Trenta and Draugh repeat-meal branches all set it to 0 and expired the slot they meant to renew, and left the nutrition values stale. RaceFoodRefresh does what vanilla's own branch does, in one place instead of three. The Trenta prefix now reports __result, or a working refresh would have renewed the slot without consuming the seed. Aswid devour was gated by one timestamp shared by every corpse, so a pack killed at once fed the player once; it is now per corpse, floored at a second, and a refused meal says $msg_nomore. MonsterAI.UpdateTarget discards any target IsEnemy refuses, so a truced mob could not retaliate at all - it stood still or fled. RaceGrudge records the hit on the AI owner's client and both truce postfixes stand down for that pair. The Aswid drain and the Skadi frost aura now skip kin, as the Skeleton's fire aura already did, or an always-on aura would hold every truce permanently broken. Faction sets matched exact prefab names with families half-listed: added Skeleton_NoArcher and Draugr_Ranged to the Swamp, Greyling to the Black Forest. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
5f74c57e72
commit
834d6647fd
18 changed files with 525 additions and 56 deletions
|
|
@ -20,12 +20,14 @@ namespace RacesOfValheim
|
|||
{
|
||||
public static ConfigEntry<bool> HostilityEnabled;
|
||||
public static ConfigEntry<bool> MerchantsEnabled;
|
||||
public static ConfigEntry<float> GrudgeDuration;
|
||||
|
||||
// Null-safe, defaulting to ON, for the same reason WarVultureConfig guards its own reads:
|
||||
// a patch that somehow runs before Bind() should behave like the shipped default rather
|
||||
// than throw. Awake() binds before harmony.PatchAll(), so this should never fire.
|
||||
public static bool Hostility => HostilityEnabled?.Value ?? true;
|
||||
public static bool Merchants => MerchantsEnabled?.Value ?? true;
|
||||
public static float GrudgeSeconds => GrudgeDuration?.Value ?? 60f;
|
||||
|
||||
public static void Bind(ConfigFile config)
|
||||
{
|
||||
|
|
@ -44,8 +46,18 @@ namespace RacesOfValheim
|
|||
"per-race passives in RaceHostilityManager - Fenrir's wolves, Aswid's " +
|
||||
"progression list, the Draugh's undead, the Trenta's Black Forest, the Sverm's " +
|
||||
"invertebrates. Switching this off gives those five races up along with the " +
|
||||
"faction truce. Hitting a mob still starts a fight either way: retaliation runs " +
|
||||
"through BaseAI.OnDamaged, which no truce has a say over."));
|
||||
"faction truce. Hitting a mob still starts a fight: see Faction grudge below, " +
|
||||
"which is what makes that true."));
|
||||
|
||||
GrudgeDuration = config.Bind(factions, "Faction grudge", 60f,
|
||||
new ConfigDescription("Seconds a creature stays angry at a player of its own faction who hit it. " +
|
||||
"Without this the truce is absolute in both directions: MonsterAI.UpdateTarget " +
|
||||
"throws away any target BaseAI.IsEnemy calls a non-enemy, so a truced mob could " +
|
||||
"not fight back even after being struck - it stood still, or fled because it " +
|
||||
"was hurt and had no enemy it was allowed to have. The grudge is per attacker " +
|
||||
"and per creature, on whichever machine runs that creature's AI. 0 restores the " +
|
||||
"old absolute truce.",
|
||||
new AcceptableValueRange<float>(0f, 600f)));
|
||||
|
||||
MerchantsEnabled = config.Bind(factions, "Faction merchants", true,
|
||||
new ConfigDescription("Certain mobs of your own faction can be traded with - 'E - Talk' opens a shop " +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue