Skip to content

Game statistics guide

Wesley edited this page Aug 9, 2026 · 6 revisions

Game statistics guide

Game statistics show account badges such as rank or level. Definitions come from GameStats.json, with optional overrides in {UserData}/GameStats.custom.json.

This page covers the file format. For which provider each statistic actually comes from, what is sent to it, and how to turn it off, see Game statistics sources.

Current built-in definitions:

  • Apex Legends
  • Counter-Strike 2
  • Overwatch

File layout

{
  "StatsDefinitions": {
    "Counter-Strike 2": { }
  },
  "PlatformCompatibilities": {
    "Steam": [ "Counter-Strike 2", "Apex Legends" ],
    "BattleNet": [ "Overwatch" ]
  }
}

StatsDefinitions describes each game. PlatformCompatibilities decides which games appear on each platform's accounts.

Per-game keys

Key Use
UniqueId Short internal id
Indicator Small label before stats
ProcessName Refresh while this process is running
Url Request URL with {VarName} placeholders
RequestCookies Optional cookie header
Attribution Provider image/link shown in UI ("Hidden": true credits nothing)
Vars User-entered or autofilled variables
Collect Stats to fetch and display

Attribution marked "Hidden": true is left out of the credits list entirely — for a first-party source that needs no crediting, such as ranks read from Steam itself. Keep the block rather than deleting it: a variant with no Attribution inherits the previous one's logo. Fallbacks inherit Hidden like any other key, so one that does want crediting states "Hidden": false.

Vars

Example:

"SteamId": {
  "Autofill": "%ACCOUNTID%",
  "Display": "Steam Account ID",
  "Placeholder": "7656119xxxxxxxxxx"
}
  • Autofill can use account data such as %ACCOUNTID%.
  • Transform pipelines are supported, for example %ACCOUNTUSERNAME%|ReplaceLast('_','-').
  • Display is the label shown in the configuration modal.

Collect entries

Key Use
Source json or html
Path gjson path or XPath
Reducer Optional post-processing
DisplayAs HTML template, where %x% is the raw value
DisplayFormat Format such as commaNumber
DisplayPlaceholders Colors or text from value ranges
ImageFromPath / ImageCacheDir Download and cache stat images
NoDisplayIf Hide a stat when the value matches
ToggleText Label in account stat toggles
Tooltip Hover text on the stat in the account list
GameRunningTTL Refresh interval while the game is running

Tooltip takes plain text, or i18n:<Key> to translate it into the language the app is running in. An unknown key shows the key itself, so a typo is visible:

"CompRank": {
  "ToggleText": "Competitive Rank",
  "Tooltip": "i18n:Tooltip_Cs2CompetitiveRank"
}

JSON source

"LVL": {
  "Source": "json",
  "Path": "level",
  "DisplayAs": "LVL %x%",
  "NoDisplayIf": "0"
}

Used by Apex Legends and Counter-Strike 2 definitions.

HTML source

"SR": {
  "Source": "html",
  "Path": "//div[@class='rating']",
  "Select": "innerText",
  "DisplayAs": "SR %x%"
}

Used when there is no stable JSON API.

User workflow

  1. Open a compatible platform account page.
  2. Click the stats icon on an account row.
  3. Fill required variables or accept autofill.
  4. Choose which stats to show.
  5. Let stats refresh on timer or while the game process runs.

Stats categories can be disabled in platform Settings.

Custom definitions

Create:

{UserData}/GameStats.custom.json

Use the same shape as GameStats.json. Custom definitions merge at runtime.

Responsible use

Stats can call third-party websites or APIs. Before submitting new public scrapers, contact maintainers so request volume and attribution can be checked.

Code references

File Role
internal/basic/game_stats.go Fetch, parse, cache
internal/basic/game_stats_live.go Refresh while a game runs
internal/basic/var_transforms.go Autofill and transforms
embed_gamestats.go Embed default JSON

Clone this wiki locally