Mods / Player Death Counter
- Tags:
- Author:
- SiiMeR
- Side:
- Both
- Created:
- Apr 6th 2025 at 2:28 PM
- Last modified:
- Sep 10th 2025 at 10:12 AM
- Downloads:
- 319
-
Latest release (for Vintage Story 1.21.0 and 1.21.1, outdated):
deathcounter_2.0.0.zip 1-click install
This simple mod adds a player death counter. The data is stored in VintagestoryData/Playerdata/playerdata.json
The timestamp and the reason of death will be logged.
Example output:
[ { "PlayerUID": "g1U2RO0yyLzWikUwC6Jmuzw2", "RoleCode": "admin", "PermaPrivileges": [], "DeniedPrivileges": [], "PlayerGroupMemberShips": {}, "AllowInvite": true, "LastKnownPlayername": "SiiMeR", "CustomPlayerData": { "PlayerDeaths": "{\"Deaths\":[{\"Reason\":\"2025-04-06T14:02:51.5625090Z\",\"DeathTimestamp\":\"Suicide\"},{\"Reason\":\"2025-04-06T14:03:16.0012275Z\",\"DeathTimestamp\":\"Suicide\"},{\"Reason\":\"Suicide\",\"DeathTimestamp\":\"2025-04-06T14:10:24.7197629Z\"},{\"Reason\":\"Suicide\",\"DeathTimestamp\":\"2025-04-06T14:10:58.2122772Z\"},{\"Reason\":\"Suicide\",\"DeathTimestamp\":\"2025-04-06T14:14:52.3409945Z\"}],\"DeathCount\":5}" }, "ExtraLandClaimAllowance": 0, "ExtraLandClaimAreas": 0, "FirstJoinDate": "06/04/2025 13:59", "LastJoinDate": "06/04/2025 14:09", "LastCharacterSelectionDate": null }]I made this mod for the Chronicles of Time server. The server has a concept of notable and noble people. These people have 1 life and must self-report their death (after which they are free to create a new character). The admins will check deaths once per week. Storing the death info in this manner helps find out who exactly died.
You can use jq to get a list of players who died during the last 7 days:
jq --arg start "$(date -d '7 days ago' -u +'%Y-%m-%dT%H:%M:%SZ')" '.[] | select((.CustomPlayerData.PlayerDeaths | fromjson).Deaths | map(.DeathTimestamp >= $start) | any) | .LastKnownPlayername' playerdata.json| Mod Version | Mod Identifier | For Game version | Downloads | Released | Changelog | Download | 1-click mod install* |
|---|---|---|---|---|---|---|---|
| 2.0.0 | deathcounter | 169 | Sep 10th 2025 at 10:12 AM | deathcounter_2.0.0.zip | 1-click install | ||
|
* Updated for 1.21 | |||||||
| 1.0.0 | deathcounter | 150 | Apr 6th 2025 at 2:29 PM | deathcounter_1.0.0.zip | 1-click install | ||
|
Initial release | |||||||