GsValheimStatsClientFix
Unofficial fix for GsValheimStatsClient 0.2.12 on Valheim 1.0. Restores kills, deaths, creature kills, crafts, materials and per-life stats, which report zero because Valheim moved the player profile
模組介紹 作者原文
GsValheimStatsClientFix
An unofficial compatibility patch for GsValheimStatsClient 0.2.12 on Valheim 1.0.
Verified against Valheim 1.0.7 and 1.0.12, whose player-profile layouts are identical.
Not affiliated with, endorsed by, or supported by cproudlock, the author of GsValheimStatsClient. Please do not report problems with this patch to them.
This mod does nothing on its own
It has no features. It is a patch for another mod, and it requires
GsValheimStatsClient 0.2.12 to be installed. Without that client it loads,
logs one warning, and stops. Installing it by itself accomplishes nothing.
What is broken, and what this fixes
GsValheimStatsClient reads Valheim's player profile by reflection, using field
names from before Valheim 1.0. Valheim changed that layout: m_playerStats
became an array of per-difficulty records, and the enemy-kill, craft and pickup
dictionaries moved onto the record. The client's lookups now silently return
nothing, with no error, so these fields are always 0 or empty:
kills · bossKills · deaths · stats · creatureKills · crafts · materials · pickups · currentLifeKills · currentLifeSec
This patch replaces the client's two profile-reading methods with versions that
read the 1.0.7 layout. It changes nothing else.
Weapon damage, boss damage, DPS, hardest hit and skills were never affected by
this bug and are untouched.
What to expect after installing
Both of these are one-off, expected, and appear on whatever dashboard you post to.
- Lifetime totals appear in one jump. The stats above were being reported as
zero, not withheld — so on the first snapshot after installing, your true
lifetime totals arrive all at once. On a dashboard that charts values over time
this looks like a single enormous spike. It is not a data error, and it settles
after that first snapshot.
- The current-life baseline resets once, for some characters. While the
reads were broken, the client recorded "this life started at 0 kills and 0
seconds" for every new life. Left alone, your next death would be recorded as a
single life spanning your entire history — permanently, because the client only
ever raises your longest-life and best-kills-before-death records.
So on the first login after installing, a character whose saved baseline is zero
and that has died at least once has its current life restarted from that
moment. You will see this in your log:
life baseline reset: baseline was zero (...) on a character that has died (Deaths=N),...
A character that has never died is left alone — its zero baseline is the
genuine start of its one continuous life, and resetting it would throw away real
progress:
life baseline left alone:... this character has never died (Deaths=0)...
The cost of the reset is the untracked portion of one life in progress. Your
lifetime totals, kills, deaths and per-weapon stats are not affected.
Version guard
This patch rewrites two private methods and reads three private fields inside
GsValheimStatsClient. None of that is a stable contract, so it refuses to guess.
- Client missing, or any version other than exactly 0.2.12 — logs a warning,
patches nothing, stands down.
- Valheim's profile layout not as expected — checked at startup by name; on
any mismatch it names each missing member, patches nothing, and stands down.
- Any patch fails to apply — every patch is rolled back, so the client is
never left half-patched.
- A read fails while playing — that read falls back to the client's original
code and logs once. Failure degrades to the client's current behaviour; it
never produces partial data that looks correct.
If a newer GsValheimStatsClient fixes this upstream, this patch will stand down
by itself, because the version will no longer be 0.2.12. Uninstall it at that
point.
Verifying it worked
Look in BepInEx\LogOutput.log for:
GsValheimStatsClientFix 1.0.0 patched GsValheimStatsClient 0.2.12 for Valheim 1.0.12.
first successful profile read: N stats, N creatures, N crafts, N pickups, Deaths
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: