Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
PlayerStatsSync
Sends each player's character stats, plus damage dealt and taken, to your dedicated server as JSON files. Build your own leaderboards and player pages.
By SunPheonyx
| Date uploaded | a week ago |
| Version | 1.0.0 |
| Download link | SunPheonyx-PlayerStatsSync-1.0.0.zip |
| Downloads | 28 |
| Dependency string | SunPheonyx-PlayerStatsSync-1.0.0 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2360README
Player Stats Sync
Sends each player's character stats to your dedicated server and saves them as JSON files, so you can build leaderboards, player pages or Discord bots around them.
What it does
- Reads the stats Valheim already tracks for each character: kills, deaths and their causes, trees felled, distance travelled, pieces built, and about 200 more.
- Adds two stats the game doesn't track: damage dealt and damage taken. These count from when the mod is installed.
- Sends everything to the server every 60 seconds, and when a player logs out.
- Saves one file per player on the server.
This mod has no in-game screen. It collects the data, and you decide what to do with it.
Installation
Install it on the server and on each player who wants their stats recorded. Players without the mod can still join, they just won't get a stats file.
Stats files
The server writes one file per player to:
BepInEx/config/PlayerStatsSync/<platform-id>.json
{
"name": "Ragnar",
"character": "ragnar",
"updated": 1793480000,
"damage_done": 18342.5,
"damage_taken": 4210.2,
"stats": {
"EnemyKills": 412,
"Deaths": 27,
"Tree": 311
}
}
statsuses Valheim's ownPlayerStatTypenames, and leaves out anything at zero.updatedis a Unix timestamp.- File names contain the player's platform ID, so don't publish them as they are.
Good to know
- Character stats are lifetime totals across every world that character has played, not just your server.
- Damage dealt is the strength of the hit before the enemy's resistances. Damage taken is measured after armour.
- Damage is stored in the character file, so it follows the character.
- Stats are sent by each player's game, so they could be faked. It's built for groups of friends, not competitive servers.
CHANGELOG
Changelog
1.1.2
- Added a link to the GitHub repo, for bug reports and ideas. The mod itself hasn't changed.
1.1.1
- Plugin ID is now
SunPheonyx.PlayerStatsSync. Nothing else changes, and stats carry on as before.
1.1.0
- Stats files now count play on this server only. Characters already in a stats file keep their current numbers and build from there; new characters start from zero.
- Only the server needs this update.
- New icon.
1.0.0
- First release: sends character stats to the server, and adds damage dealt and damage taken.