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:
- Creating a
.cfg
configuration file in the Dota 2 game configuration directory. - 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\csgo\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” } }
Notice that the URI used in the configuration file must be the same URI used when creating a new GSIServer
.
Modules§
Structs§
- GSIServer
- A server that handles GameState Integration requests from Dota.
The URI used in the configuration file must be the same URI used when creating a new
GSIServer
.
Enums§
Traits§
- Game
State Handler - Trait implemented by handlers of Game State data.
Functions§
- get_
content_ length_ from_ headers - Extract Content-Length value from a list of HTTP headers.
- process
- Process a TcpStream. Ensures the stream’s contents can be parsed and returns an appropiate response to Dota.