StatTracker

[Reusable] StatTracker v2.13

I give permission for this addon to be reused, modified, or ported by anyone
  1. Yes
I understand my submission will be rejected if it does not follow forum rules, Submissions guidelines, and/or file name conventions
  1. Yes
StatTracker : Multiplayer Time Records, ELO, and Skin/Map Usage data suite

For server owners with a limited amount of character slots and custom map pool, it's important to know what content your players are actually using and enjoy. StatTracker aims to record data to allow you to review what is and what isn't popular, on top of providing data backed features to add to the player experience.

All data is saved to the server's luafiles folder, letting owners view data from inside and outside of the game.

v2.1 - Scorekeeper has been integrated into StatTracker
There is no longer a need to run both of these addons at the same time.

Important setup note!
Make sure StatTracker is loaded after your load your game mode mods, and make sure those game mode mods are always loaded on the server. StatTracker will lose data for those modes if these steps are not followed!

What data is saved?
  • Number of races, and 1st, 2nd, and 3rd place finishes
  • KartScore, an ELO system, with split data categories for Vanilla races, Juicebox races, DriftNitro races, Elimination races, and Combi races
  • The player's total accumulated score while playing on the server (Scorekeeper)
  • A record of character use for each player
  • How many times they've landed hits with items, and how many times they've been spun out, exploded, squished, or hit themselves/hit a map hazard
  • An estimated total playtime on the server (in game data only)

  • Number of completed races
  • An RTV total, marking incomplete races skipped by server owner intervention, or by Hostmod vote.
  • Map record times, with split records for Vanilla races, Juicebox races, and DriftNitro races. Record times also note the player's name and current skin for display on the game HUD.

  • Total number of races a character was used in.
  • A "weighted" number of uses, to prevent one player's heavy use of one character from skewing perception of how popular a character may actually be.

There are no addon dependencies, but StatTracker takes into consideration a couple of different addons right out of the box. Find more information about specific addons and console commands further down.

For players, some data is displayed directly on the game HUD -

Server record map time
bestTime.png


A new record time popup after the race is over (with the character's power item sound clip!)
rTime.png


Changes to the player's KartScore (ELO system) at the end of the race
KS.png


StatTracker.cfg is created in the player's luafiles folder with commands that lets them hide any of these features.

Strongly Recommended

Hostmod - While not required, the ability for players to vote skip maps is a very strong indicator of what maps they absolutely dread playing. It's also an incredible tool overall, allowing the ability to host multiple game type addons on one server, which StatTracker can take into consideration.

Well Supported

Juicebox and DriftNitro - These mods dramatically change the flow of the game, and as such, have separated track record and KartScore categories in the recorded data.

Elimination and Combi - These modes have KartScore, but do not support record times at the moment.

Reduced Data Recording Capabilities

These addons modify the in game timer, so by default they do not record KartScore or a map's record time.

Please shoot me a message via Discord (Montblanc#2569) if you are using an addon not listed here that alters the in game timer. Map records will be corrupted if StatTracker encounters one it does not recognize.

Admin Only
  • st_enabled
    • Enables/Disables all LUA hook functions of StatTracker
      • 1 - on (default), 0 - off
  • st_enableks
    • Enables/Disables the KartScore functions of StatTracker
      • 1 - on (default), 0 - off
  • st_enablerecords
    • Enables/Disables the map record functions of StatTracker
      • 1 - on (default), 0 - off
  • st_silentmode
    • Determines the level of StatTracker visibility to players
      • 0 - all elements visible (default)
      • 1 - HUD elements are forced hidden
      • 2 - HUD elements are forced hidden, and players are unable to use in game console commands to see data.
  • st_wiperemovedaddons
    • Prevents the once per server restart data maintenance from deleting data related to content that has since been removed from the server
      • 0 (default) - No data is deleted during maintenance
      • 1 - References to removed skins & maps are scrubbed from the data files during maintenance
  • st_clearmaprecord
    • Wipes time records for the specified map
    • Usage : st_clearmaprecord MAPXX
    • The deletions are made instantly, make sure not to typo the map ID.
  • sk_setscore
    • Manually sets a player's score to the specified total
    • Usage: sk_setscore "Player Name" 999
    • Target player must be in game for this to work
  • st_enableskintracking
    • Enables/Disables skin tracking functions
      • 1 - on (default), 0 - off
      • This disables saving of Skincounter.txt and pSkinUse.txt
  • st_enablemapcounttracking
    • Enables/Disables map play count tracking
      • 1 - on (default), 0 - off
      • This disables saving of Mapdata.txt, not time records.
  • st_enabletimerecordtracking
    • Enables/Disables map time record tracking
      • 1 - on (default), 0 - off
      • This disables saving of EasyRecords.txt & NormalRecords.txt & HardRecords.txt
  • st_enableplayertracking
    • Enables/Disables player data tracking
      • 1 - on (default), 0 - off
      • This disables saving of Playerdata.txt
  • st_enablescorekeeper
    • Enables/Disables scorekeeper functionality
      • 1 - on (default), 0 - off
      • This disables saving of scorekeeper.txt
Player Commands
  • st_recordpopup
    • Shows/Hides the new record time popup at the end of a race.
      • 1 - on (default), 0 - off
    • This command is available in the generated stattracker.cfg file
  • st_showks
    • Shows/Hides KartScore updates at the end of a race
      • 1 - on (default), 0 - off
    • This command is available in the generated stattracker.cfg file
  • st_showtime
    • Shows/Hides the map record time under the current race time.
      • 1 - on (default), 0 - off
    • This command is available in the generated stattracker.cfg file
  • st_recordsound
    • Toggles skin gloat sounds that play when a new time record is achieved.
      • 1 - on (default), 0 - off
  • st_playerdata [player name or command]
    • In game lookup command to find player data.
    • All available uses:
      • st_playerdata
        • Displays the requesting player's data on the server
      • st_playerdata [player name]
        • Displays the entered player's data on the server
      • st_playerdata lobby
        • Lists each player currently playing, their KartScore, and their total wins
      • st_playerdata top
        • Shows a top 10 list of all players with the most race wins
      • st_playerdata top ks
        • Shows a top 10 list of all players with the highest KartScore in the current mode
  • st_mapdata [map code or command]
    • In game lookup command to find map data
    • All available uses:
      • st_mapdata
      • Displays plays, RTVs, and map records for the current map
      • st_mapdata [map code]
      • Displays plays, RTVs, and map records for the requested map ID
      • st_mapdata top
      • Displays a top 10 list of the most played maps
      • st_mapdata bottom
      • Displays a top 10 list of the most RTV'd maps
  • st_skindata [skin ID or command]
    • In game look command to find character data
    • All available uses:
      • st_skindata
        • Displays weighted uses, total uses, and requesting player uses of the character the requesting player is currently using
      • st_skindata [skin ID]
        • Displays weighted uses, total uses, and requesting player uses of the character requested by ID
      • st_skindata top
        • Displays a top 10 list of the most used characters based on weighted uses.

All column names are in order from left to right.
Playerdata.txt
  • Player Name
  • Maps Played
  • Wins
  • Item Hits
  • Self Hits/Environmental Hits
  • Times Spun Out
  • Times Exploded
  • Times Squished
  • Second Places
  • Third Places
  • KartScore
  • Juicebox KartScore
  • DriftNitro KartScore
  • Elimination KartScore
  • Combi KartScore
Mapdata.txt
  • Map ID
  • Times Played
  • RTV Count
  • Full Map Name
Skincounter.txt
  • Internal Skin Name
  • Weighted Uses
  • Full Skin Name
  • Total Uses
EasyRecords.txt / NormalRecords.txt / HardRecords.txt
  • Map ID
  • Record Time (in game realtime variable)
  • Record holding player name
  • Record holding skin
  • Juicebox Record Time
  • Juicebox player name
  • Juicebox record skin
  • DriftNitro Record Time
  • DriftNitro player name
  • DriftNitro record skin
pSkinUse.txt
  • Player Name
  • Condensed skin use format
    • [internal skin ID] / [number of uses] |
    • EX: internal_skin_name/500|other_skin_name/123
Author
Onyo
Downloads
1,229
Views
6,075
Extension type
pk3
File size
18 KB
MD5 Hash
3db56ea860817ca0f08cefb2c0a20bdc
First release
Last update
Rating
4.50 star(s) 2 ratings

More resources from Onyo

Share this resource

Latest updates

  1. v2.13

    Fixed an issue where data files wouldn't save if StatTracker was loaded before or without...
  2. v2.12

    ALWAYS BACK UP YOUR DATA FILES BEFORE UPDATING Fixes various issues with Scorekeeper's scores...
  3. v2.11

    Fixed custom game mode pointers possibly throwing an error. (Reported by Galactice) Added...

Latest reviews

I always appreciate statistics or data in just about anything I do. I also love how we can compare to one another. If you value this, the mod is for you and your servers too! 10/10. Will keep an eye on this.
Upvote 1
Welcome to releases!
Upvote 0
Top