Crate dota

Crate dota 

Source
Expand description

Game State Integration with Dota 2.

Provides a Server that listens for JSON events sent by Dota 2. Enabling game state integration requires:

  1. Creating a .cfg [configuration file] in the Dota 2 game configuration directory.
  2. Running Dota 2 with the -gamestateintegration [launch option].

The configuration file can have any name name, but must be prefixed by gamestate_integration_. For example, gamestate_integration_test.cfg would be located:

  • In Linux: ~/.steam/steam/steamapps/common/dota 2 beta/game/dota/cfg/gamestate_integration_test.cfg
  • In Windows: D:\Steam\steamapps\common\dota 2 beta\dota\cfg\gamestate_integration_test.cfg

Here’s a sample configuration file:

“dota2-gsi Configuration” { “uri” “http://127.0.0.1:53000/” “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” “abcdefghijklmopqrstuvxyz123456789” } }

Note the URI used in the configuration file must be the same URI used with a ServerBuilder.


  1. Details on configuration file: https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration 

  2. Available launch options: https://help.steampowered.com/en/faqs/view/7d01-d2dd-d75e-2955 

Modules§

components
handlers

Structs§

Server
A Server that handles game state integration requests.
ServerBuilder
ServerError

Enums§

GameStateIntegrationError

Traits§

Handler
Trait for any async function or struct that can be used to handle game state integration events.

Functions§

get_content_length_from_headers
Extract Content-Length value from a list of HTTP headers.
process
Process a game state integration request.

Type Aliases§

HandlerResult