chore(logging): strip the AswidDebug tracing and silence the visual hider

The [AswidDebug] logging shipped in 1.3.8 wrote a line per aura tick per enemy
in radius, four times a second while channelling, plus a line for every devour
attempt and every inedible kill. It filled BepInEx's log for anyone playing an
Aswid. Genuine failure warnings are kept and retagged [Aswid]; the F8
consume-nearest-mob test patch goes with it.

PlayerVisualHider.Diagnostics is off now that transformed bodies are confirmed
hidden. It is a static rather than a const so flipping it back does not leave
the guarded calls unreachable.

The 1.3.9 changelog also records the logging removal, and that remote Skadi
flight now works for observers - the second of the two known issues left open
in 1.3.8, confirmed in multiplayer.
This commit is contained in:
kanym 2026-08-02 19:07:38 +02:00
commit c3a3bd2864
4 changed files with 11 additions and 72 deletions

View file

@ -615,48 +615,6 @@ namespace RacesOfValheim
}
}
[HarmonyPatch(typeof(Player), "Update")]
public static class Aswid_Debug_F8_Patch
{
public static void Postfix(Player __instance)
{
if (__instance == Player.m_localPlayer && UnityEngine.Input.GetKeyDown(UnityEngine.KeyCode.F8))
{
Jotunn.Logger.LogInfo("[AswidDebug] F8 pressed! Finding nearest mob to consume...");
Character nearest = null;
float minDist = 10f;
foreach (Character c in Character.GetAllCharacters())
{
if (c != __instance && c.GetHealth() > 0)
{
float dist = UnityEngine.Vector3.Distance(__instance.transform.position, c.transform.position);
if (dist < minDist)
{
minDist = dist;
nearest = c;
}
}
}
if (nearest != null)
{
Jotunn.Logger.LogInfo($"[AswidDebug] Consuming {nearest.name} via F8!");
AswidRace.TryConsumeMob(nearest, nearest.GetMaxHealth());
HitData hit = new HitData();
hit.m_damage.m_damage = 99999f;
hit.m_hitType = HitData.HitType.Undefined;
hit.m_attacker = __instance.GetZDOID();
nearest.ApplyDamage(hit, true, false);
}
else
{
Jotunn.Logger.LogInfo("[AswidDebug] No mob found near player to consume.");
}
}
}
}
[HarmonyPatch(typeof(Character), "Damage")]
public static class Aswid_Damage_Patch
{
@ -695,16 +653,9 @@ namespace RacesOfValheim
}
// On-death Devour
if (__state > 0f && __instance.GetHealth() <= 0f)
if (__state > 0f && __instance.GetHealth() <= 0f && physDamage > 0f)
{
Jotunn.Logger.LogInfo($"[AswidDebug] {__instance.name} died. __state: {__state}, CurrentHP: {__instance.GetHealth()}");
Jotunn.Logger.LogInfo($"[AswidDebug] Attacker is local Aswid player. Checking damage type...");
if (physDamage > 0f)
{
Jotunn.Logger.LogInfo($"[AswidDebug] Calling TryConsumeMob for {__instance.name}");
AswidRace.TryConsumeMob(__instance, __instance.GetMaxHealth());
}
AswidRace.TryConsumeMob(__instance, __instance.GetMaxHealth());
}
}
}

View file

@ -116,7 +116,7 @@ namespace RacesOfValheim
// If Jotunn failed to clone because the base prefab doesn't exist, ItemDrop will be null
if (customItem == null || customItem.ItemDrop == null)
{
Jotunn.Logger.LogWarning($"[AswidDebug] Failed to clone base prefab '{baseFoodPrefab}' for {foodName}. Falling back to 'CookedMeat'.");
Jotunn.Logger.LogWarning($"[Aswid] Failed to clone base prefab '{baseFoodPrefab}' for {foodName}. Falling back to 'CookedMeat'.");
customItem = new Jotunn.Entities.CustomItem(foodName, "CookedMeat", config);
}
}
@ -907,14 +907,9 @@ namespace RacesOfValheim
if (currentHp > 0 && currentHp <= maxHp * 0.20f && !c.IsBoss())
{
Jotunn.Logger.LogInfo($"[AswidDebug] Aura Execution TRIGGERED on {c.name}! HP: {currentHp}/{maxHp}");
totalDamage = currentHp * 2f; // Lethal damage for execute
TryConsumeMob(c, maxHp, true); // Automatically devour when executed, bypassing cooldown
}
else
{
Jotunn.Logger.LogInfo($"[AswidDebug] Aura normal tick on {c.name}. HP: {currentHp}/{maxHp}");
}
HitData hd = new HitData();
hd.m_damage.m_damage = totalDamage;
@ -939,17 +934,14 @@ namespace RacesOfValheim
{
if (!DevourEnabled) return;
Jotunn.Logger.LogInfo($"[AswidDebug] TryConsumeMob called for {c.name}");
if (!bypassCooldown && Time.time - lastConsumeTime < 5f)
{
Jotunn.Logger.LogInfo($"[AswidDebug] TryConsumeMob aborted: Cooldown active. Time.time={Time.time}, lastConsumeTime={lastConsumeTime}");
return; // Cooldown active
}
string cleanName = c.name.Replace("(Clone)", "").Trim();
string customFoodName = "AswidFood_" + cleanName;
Jotunn.Logger.LogInfo($"[AswidDebug] Looking for foodPrefab: {customFoodName}");
GameObject foodPrefab = Jotunn.Managers.ItemManager.Instance.GetItem(customFoodName)?.ItemPrefab;
// Fallback to PrefabManager cache if ItemManager doesn't find it
@ -961,7 +953,6 @@ namespace RacesOfValheim
// Fallback to RawMeat if no specific custom item was generated (e.g. mob not in trophy map)
if (foodPrefab == null)
{
Jotunn.Logger.LogWarning($"[AswidDebug] TryConsumeMob aborted: foodPrefab '{customFoodName}' is null in ObjectDB!");
return; // Mob is not edible
}
@ -980,7 +971,6 @@ namespace RacesOfValheim
if (addedItem != null)
{
Jotunn.Logger.LogInfo($"[AswidDebug] Successfully added {addedItem.m_shared.m_name} to virtual inventory. Attempting UseItem...");
lastConsumeTime = Time.time;
// UseItem natively plays animation and consumes it.
@ -991,8 +981,6 @@ namespace RacesOfValheim
if (successfullyEaten)
{
Jotunn.Logger.LogInfo($"[AswidDebug] Item was successfully eaten from virtual inventory via EatFood!");
// Show the Vae Victis message in the center of the screen
Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Vae Victis");
Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, "$msg_ate " + addedItem.m_shared.m_name);
@ -1000,14 +988,12 @@ namespace RacesOfValheim
// Vae Victis XP logic - similar to Dead Raiser
Player.m_localPlayer.RaiseSkill(Skills.SkillType.BloodMagic, 1f);
}
else
{
Jotunn.Logger.LogInfo($"[AswidDebug] Item was NOT eaten (likely stomach full). It will disintegrate with virtual inventory.");
}
// If it was not eaten the stomach was full: the item disintegrates with
// the virtual inventory, so there is nothing to clean up.
}
else
{
Jotunn.Logger.LogWarning($"[AswidDebug] Failed to add item to virtual inventory!");
Jotunn.Logger.LogWarning($"[Aswid] Failed to add '{customFoodName}' to the virtual inventory.");
}
}
}

View file

@ -17,9 +17,9 @@ namespace RacesOfValheim
/// </summary>
public class PlayerVisualHider : MonoBehaviour
{
// TEMPORARY: tracing for the transform-visibility work. Flip to false once multiplayer
// transforms are confirmed good, along with the rest of the debug logging in 1.3.9.
public const bool Diagnostics = true;
// Tracing for the hide/show paths. Off by default; flip to true if a transformed body
// ever shows up again and the log should name which path did it.
public static bool Diagnostics = false;
// VisEquipment rebuilds item visuals whenever gear changes and they come back visible, so
// the hidden set has to be re-swept rather than applied once.

View file

@ -148,8 +148,10 @@ Please write to us on my Discord server: **https://discord.gg/gbBEK2VTE**
**v1.3.9**
- **Skadi / Aswid**: Returning to human form no longer replays the spawn animation. Every dragon form, Bat Form and Mist Form used to drop you back into the get-up-off-the-ground clip you see when joining a world, because hiding the human body also switched off its animator - and Unity restarts an animator from its first state when it comes back. The body is now hidden without ever being switched off, so you return standing, mid-stride, in whatever pose you were already in.
- **Multiplayer**: A transformed Skadi's dragon now *moves* for everyone else. Other players saw the right model frozen in its idle pose, gliding around without ever beating a wing or taking a step; the remote copy now follows the flying, grounded and running states of the player it belongs to.
- **Multiplayer**: Remote Skadi flight works. A flying dragon used to be dragged down to the terrain on everyone else's screen no matter what altitude was actually being sent; other players now see you in the air where you really are. This and the Trol sizing below were the two known issues left open in 1.3.8.
- **Multiplayer**: Remote Trol sizing is fixed - the 1.3.8 known issue. Other players now see a Trol at the size their progression and True Form actually call for, easing smoothly between sizes instead of never updating at all.
- **Aswid**: Food buffs now survive death. Feeding is the whole of the Aswid diet, and losing every buff on a corpse run hit them far harder than a race that eats bread. Bukeperries still clear food normally when you want the slots back.
- **General**: Removed the `[AswidDebug]` logging that shipped in 1.3.8. It wrote a line for every aura tick on every enemy in radius, four times a second while channelling, and filled the BepInEx log for anyone playing an Aswid. Genuine failure warnings are kept.
- **Aswid**: Surtlings and Bears joined the menu, and the Greydwarf family finally has real nutrition - Greylings 20 HP, Greydwarves 25, Shamans 30 and Brutes 60, the last for a full 30 minutes. Health regeneration from prey now scales with how nourishing it was instead of being a flat trickle from everything.
**v1.3.8**