Skip to content

Real-time Dota2 broadcaster’s assistant integrates the live Steam API with Dota GSI to provide game metrics like GPM, XPM, kills, deaths, damage, buybacks, and more, enhancing commentary with insights on player performance and the in-game economy

License

Notifications You must be signed in to change notification settings

data-mission/dota2-cast-assist

Repository files navigation

MIT License LinkedIn


Logo
Generated by ChatGPT

Dota2-Cast-Assist

Fully deployed service with no need to code or run anything locally

Connects you directly to Dota 2 GSI from your browser, offering real-time stats and Steam API integration with minimal setup

Report Bug · Request Feature

About

Unlock the ultimate tool for Dota 2 broadcasters and spectators. This service delivers real-time game insights with zero hassle. By seamlessly converting raw GSI (Game State Integration) events into a ready-to-use format and enhancing them with live match data from the Steam API, it provides aggregated snapshots of game statistics through a powerful REST API. Elevate your broadcasts, captivate your audience, and simplify game data integration—all in one scalable solution designed for real-time performance.

How It Works

You'll need Steam and Dota2 installed. The service leverages Game State Integration (GSI), a feature Valve integrates into its games to enable real-time event tracking. While the official documentation references Counter-Strike, the same functionality applies to Dota 2:

CS

File Explorer

Once a special textual configuration file is placed in the required folder on your system, the service begins monitoring Dota 2 events in real time.

When you start watching a game in Dota 2, the service captures the live match data, processes it, and makes the current game statistics available through a REST API. By specifying a unique token, the service generates a dedicated page displaying aggregated game stats for easy access in a browser.

Usage

It’s never been easier as no installations or cloning needed.

All it takes is a quick setup with a text file, and you only need to do it once on the PC or laptop where you usually watch Dota 2 matches.

🛡 The file creation process is predefined by Valve, does not modify existing files on your laptop or PC, and is entirely secure

Follow these detailed instructions to complete the turn-key setup:

  1. You will need to generate your personal spectator's UUID (unique identifier). Go to a UUID Generator and keep it open. Below, we will need to copy a Version 4 UUID automatically generated for you. It's a 32-character hexadecimal string in this format, referred to as the token:

     xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    
  2. You will need to navigate to this folder:

  • on Windows use File Explorer:
    📁 C:\Program Files (x86)\Steam\steamapps\common\dota2 beta\game\dota\cfg

  • on Mac use Finder:
    📁 /Users/<your_user>/Library/Application Support/Steam/steamapps/common/dota 2 beta/game/dota/cfg

Some folders may be hidden, so use these hotkeys to make them visible:

  • on Windows, in File Explorer: Since there is no hotkey, please follow these instructions

  • on Mac, in Finder: press Command + Shift + .

  1. In that folder, create a new one named:
    📁 gamestate_integration

❗ It's important to use only this specific name for the new folder, as GSI will not work otherwise

  1. Next, create a new text file named 📄 gamestate_integration_dota2_cast_assist_gsi.cfg in the 📁 gamestate_integration folder:
  • on Windows: Open Notepad, create a new file, click "Save As", and in the Save As dialog, choose All files (*.*) for "Save as type" field. In the "File name" field, specify 📄 gamestate_integration_dota2_cast_assist_gsi.cfg. Make sure to select the 📁 gamestate_integration folder as the save location, then click "Save";

  • on Mac: Open a text editor, create a new text file, and save it in the 📁 gamestate_integration folder as 📄 gamestate_integration_dota2_cast_assist_gsi.cfg.

❗Windows users:
DO NOT CREATE THE FILE BY RIGHT-CLICKING IN FILE EXPLORER, as an additional extension *.cfg.txt will be added to the file, and the Dota 2 GSI server will not recognize it: File Explorer

ℹ️ If you want to name the file differently, use this format for the name: gamestate_integration_<your_name_split-by-hyphens-or_underscores>.cfg

  1. Save this content into the file:
"dota2-gsi Configuration"
{
    "uri"               "https://back-scratcher.scrapingmartians.com/dota2-gsi/dota2-event"
    "timeout"           "5.0"
    "buffer"            "0.1"
    "throttle"          "0.1"
    "heartbeat"         "30.0"
    "data"
    {
        "buildings"     "1"
        "provider"      "1"
        "map"           "1"
        "player"        "1"
        "hero"          "1"
        "abilities"     "1"
        "items"         "1"
        "draft"         "1"
        "wearables"     "1"
    }
    "auth"
    {
        "token"         "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
}

The only change you need to make is to replace xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with the UUID you copied from the UUID Generator page we left open

❗ It's important to keep the UUID in quotes in the file

🔐 Dota2-Cast-Assist uses HTTPS to ensure secure, encrypted communication with the Dota 2 client for reliable data transmission

  1. 💾 Do not forget to save the changes in the file. Everything is now ready to watch matches and get the GSI stats 🖥️
  2. Open (or re-launch Dota 2 if it was already open while you were setting up the configuration file) and choose to watch any match of your choice
  3. Open a spare browser and enjoy live match stats by visiting:
https://back-scratcher.scrapingmartians.com/dota2-gsi/live-match/stats?token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,

where you need to specify the same token as in the configuration file.

🎉 DONE! Refresh the page to access the real-time statistics of the game you are watching.

This is an example of the JSON the service currently provides.

(back to top)

Built With

The service is built in Python, deployed on Google Cloud Platform, and leverages the following frameworks and APIs:

  • FastAPI
  • Beam
  • Kubernetes
  • Poetry
  • GHA
  • SteamAPI

License

Distributed under the Apache-2.0 License. See LICENSE for more information.

Contact

Discord

Project Link: https://github.com/data-mission/dota2-cast-assist

Acknowledgments

(back to top)

About

Real-time Dota2 broadcaster’s assistant integrates the live Steam API with Dota GSI to provide game metrics like GPM, XPM, kills, deaths, damage, buybacks, and more, enhancing commentary with insights on player performance and the in-game economy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published