Merge branch 'remove-sync-debug-logs' into main
This commit is contained in:
commit
ccafb1d02f
3 changed files with 12 additions and 41 deletions
|
|
@ -332,27 +332,27 @@ namespace RacesOfValheim
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.AppendLine("The Trol's Heritage\n");
|
sb.AppendLine("The Trol's Heritage\n");
|
||||||
|
|
||||||
sb.AppendLine($"Base Passive: Physical kills automatically consume enemies (if edible). You are natively 20% larger than a human with immense strength. You have +200 Max Carry Weight, gain +3 Armor per boss defeated, and carry a 4th food slot from your very first meal - no boss required.\n");
|
sb.AppendLine($"Base Passive: You are natively 20% larger than a human with immense strength. You have +200 Max Carry Weight, gain +3 Armor per boss defeated, and carry a 4th food slot from your very first meal - no boss required.\n");
|
||||||
|
|
||||||
if (state >= 1)
|
|
||||||
sb.AppendLine("Eikthyr Defeated: Increased XP gain for physical labor and blunt combat (Clubs, Unarmed, Axes, Pickaxes, WoodCutting).\n");
|
|
||||||
|
|
||||||
if (state >= 2)
|
if (state >= 2)
|
||||||
sb.AppendLine("The Elder Defeated: Unlocked Rock Throwing ability. +10% passive health regeneration.\n");
|
sb.AppendLine("Eikthyr Defeated: Increased XP gain for physical labor and blunt combat (Clubs, Unarmed, Axes, Pickaxes, WoodCutting).\n");
|
||||||
|
|
||||||
if (state >= 3)
|
if (state >= 3)
|
||||||
sb.AppendLine("Bonemass Defeated: +5% Size, +50 Carry Weight, +10 Damage to Clubs/Unarmed, +10 Rock Throwing Damage.\n");
|
sb.AppendLine("The Elder Defeated: Unlocked Rock Throwing ability. +10% passive health regeneration.\n");
|
||||||
|
|
||||||
if (state >= 4)
|
if (state >= 4)
|
||||||
sb.AppendLine("Moder Defeated: Unlocked True Form (Transformation ability).\n");
|
sb.AppendLine("Bonemass Defeated: +5% Size, +50 Carry Weight, +10 Damage to Clubs/Unarmed/Axes, +10 Rock Throwing Damage.\n");
|
||||||
|
|
||||||
if (state >= 5)
|
if (state >= 5)
|
||||||
sb.AppendLine("Yagluth Defeated: +5% Size, +50 Carry Weight, +10 Damage to Clubs/Unarmed, +5 Rock Throwing Damage. Unlocked 5th Food Slot.\n");
|
sb.AppendLine("Moder Defeated: Unlocked True Form (Transformation ability).\n");
|
||||||
|
|
||||||
if (state >= 6)
|
if (state >= 6)
|
||||||
sb.AppendLine("The Queen Defeated: Unlocked Log Weapon (in True Form, interact with trees to wield them as weapons). True Form size is massively increased.\n");
|
sb.AppendLine("Yagluth Defeated: +5% Size, +50 Carry Weight, +5 Damage to Clubs/Unarmed/Axes, +5 Rock Throwing Damage. Unlocked 5th Food Slot.\n");
|
||||||
|
|
||||||
if (state >= 7)
|
if (state >= 7)
|
||||||
|
sb.AppendLine("The Queen Defeated: Unlocked Log Weapon (in True Form, interact with trees to wield them as weapons). True Form size is massively increased.\n");
|
||||||
|
|
||||||
|
if (state >= 8)
|
||||||
sb.AppendLine("Fader Defeated: Your wielded trees can now instantly smash through the toughest materials in the Ashlands.\n");
|
sb.AppendLine("Fader Defeated: Your wielded trees can now instantly smash through the toughest materials in the Ashlands.\n");
|
||||||
|
|
||||||
knownTexts["Trol Secrets"] = sb.ToString();
|
knownTexts["Trol Secrets"] = sb.ToString();
|
||||||
|
|
|
||||||
|
|
@ -95,13 +95,6 @@ namespace RacesOfValheim
|
||||||
public const string StateKey = "RacesOfValheim_State";
|
public const string StateKey = "RacesOfValheim_State";
|
||||||
public const string TrueFormKey = "RacesOfValheim_TrolTrueForm";
|
public const string TrueFormKey = "RacesOfValheim_TrolTrueForm";
|
||||||
|
|
||||||
// Remote sync tracing. It used to fire on a 2-second timer for as long as a remote player
|
|
||||||
// existed, which in the main menu means forever: Player.m_localPlayer is null there, so the
|
|
||||||
// character-preview player counts as remote and the log never stopped. Keyed on the state
|
|
||||||
// it reports instead, so it still catches a remote player being sized wrongly - the reason
|
|
||||||
// it exists - without narrating a menu that is doing nothing.
|
|
||||||
private static string lastRemoteLogKey = "";
|
|
||||||
|
|
||||||
private static float ScaleForState(int state)
|
private static float ScaleForState(int state)
|
||||||
{
|
{
|
||||||
if (state >= 6) return 1.30f;
|
if (state >= 6) return 1.30f;
|
||||||
|
|
@ -152,19 +145,6 @@ namespace RacesOfValheim
|
||||||
targetScale = state >= 7 ? TrolConfig.TrueFormScaleAdvanced.Value : TrolConfig.TrueFormScaleNormal.Value;
|
targetScale = state >= 7 ? TrolConfig.TrueFormScaleAdvanced.Value : TrolConfig.TrueFormScaleNormal.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isLocal)
|
|
||||||
{
|
|
||||||
string logKey = $"{__instance.GetPlayerName()}|{race}|{zdoReady}|{state}|{isTrueFormActive}|{targetScale:F2}";
|
|
||||||
if (logKey != lastRemoteLogKey)
|
|
||||||
{
|
|
||||||
lastRemoteLogKey = logKey;
|
|
||||||
Jotunn.Logger.LogInfo(
|
|
||||||
$"[TrolSync] remote '{__instance.GetPlayerName()}' race='{race}' zdoReady={zdoReady} " +
|
|
||||||
$"state={state} trueForm={isTrueFormActive} target={targetScale:F2} " +
|
|
||||||
$"currentScale={visual.transform.localScale.x:F2} rootScale={__instance.transform.localScale.x:F2}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (race == "Trol")
|
if (race == "Trol")
|
||||||
{
|
{
|
||||||
// Local player has a coroutine that smooth-scales during the active transformation,
|
// Local player has a coroutine that smooth-scales during the active transformation,
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ namespace RacesOfValheim
|
||||||
private GameObject m_fireAuraVFX = null;
|
private GameObject m_fireAuraVFX = null;
|
||||||
private GameObject m_draughAuraVFX = null;
|
private GameObject m_draughAuraVFX = null;
|
||||||
private readonly SkeletonVisuals.HeadFlame m_skeletonHeadFlame = new SkeletonVisuals.HeadFlame();
|
private readonly SkeletonVisuals.HeadFlame m_skeletonHeadFlame = new SkeletonVisuals.HeadFlame();
|
||||||
private float m_lastFlightLog = 0f;
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
|
@ -245,14 +244,6 @@ namespace RacesOfValheim
|
||||||
{
|
{
|
||||||
body.useGravity = !flying;
|
body.useGravity = !flying;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Time.time - m_lastFlightLog > 2f)
|
|
||||||
{
|
|
||||||
m_lastFlightLog = Time.time;
|
|
||||||
Jotunn.Logger.LogInfo(
|
|
||||||
$"[SkadiSync] remote '{m_player.GetPlayerName()}' form='{currentForm}' flying={flying} " +
|
|
||||||
$"y={m_player.transform.position.y:F1} gravity={(body != null ? body.useGravity.ToString() : "no-body")}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RevertAllVisuals()
|
private void RevertAllVisuals()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue