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

@ -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.");
}
}
}