Dota 2 Setup - MrBean355/dota2-gsi GitHub Wiki

We need to set up the Dota 2 client so that it sends data to our program.

1. Add the launch option

Add the -gamestateintegration launch option to Dota 2 through Steam.

Note: Valve has mentioned that using Game State Integration may have a negative impact on the game's framerate. You may need to disable GSI (by removing the launch option) if your game is negatively affected.

2. Create a GSI config file

  1. Navigate to your Dota 2 installation folder, for example: C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta.
  2. Inside this folder, navigate to game\dota\cfg\gamestate_integration. Create the gamestate_integration folder if it doesn't exist already.
  3. Create a new text file inside this folder. The name must start with gamestate_integration_ and end with .cfg. For example: gamestate_integration_testing.cfg.
  4. Open this file in a text editor, and paste this content:
"Your description here"
{
    "uri"           "http://localhost:44444"
    "timeout"       "5.0"
    "buffer"        "0.5"
    "throttle"      "0.5"
    "heartbeat"     "30.0"
    "data"
    {
        "provider"      "1"
        "map"           "1"
        "player"        "1"
        "hero"          "1"
        "abilities"     "1"
        "items"         "1"
        "buildings"     "1"
        "draft"         "1"
        "wearables"     "1"
        "events"        "1"
    }
}
  1. Save and close the file.

Note: You can (and should) customize this configuration to meet your program's needs. Most of the default values from above will be fine. However, you should review the data section below, to choose which data you would like to receive from Dota.

  • uri - The URL and port that Dota will send the data to. This will probably be "http://localhost" in most cases, where your program will be running on the same machine as the Dota client. The port (44444) can be changed to any valid port number; just remember to use this same number when using the library!
  • timeout - If your program isn't running, Dota will timeout while trying to send data to the URL. The timeout is the duration (in seconds) that Dota waits before retrying the request.
  • buffer - Dota will collect events for this many seconds to report a bigger delta. This is not applicable for this library.
  • throttle - Tell Dota to wait this many seconds before sending another request, to avoid notifying the program when the game state changes too frequently.
  • heartbeat - Even if no game state change occurs (e.g. game is paused), this setting tells Dota to send a request so many seconds after the previous one.
  • data - Specify which game objects you would like to receive state updates for. You should set the ones you don't care about to "0", to save some processing power.
    • provider - General information about the Dota client (e.g. version).
    • map - Information about the Dota map (e.g. match ID, clock time).
    • player - Information about the players in the match (e.g. kills, deaths, assists).
    • hero - Information about the heroes in the match (e.g. health, mana).
    • abilities - Information about all of the heroes' abilities (e.g. level, cooldown).
    • items - Information about all of the heroes' items (e.g. name, cooldown).
    • buildings - Information about the teams' buildings (e.g. health).
    • draft - Information about the ongoing draft (e.g. picks, bans).
    • wearables - Information about the cosmetics equipped on the heroes (i.e. identifier).
    • events - Information about generic events that have recently happened (e.g. killing Roshan, players tipping).