Mods / Player Death Counter

Tags: #Other
Author: SiiMeR
Side: Both
Created: Apr 6th at 2:28 PM
Last modified: Apr 6th at 2:29 PM
Downloads: 68
Follow Unfollow 4

Latest release (for outdated Vintage Story v1.20.3 - v1.20.7):
deathcounter_1.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

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.0.0 68 Apr 6th at 2:29 PM Show deathcounter_1.0.0.zip 1-click install

0 Comments (oldest first | newest first)

 (edit comment delete)