Dota2Monitor allows you to use GameState Integration Monitoring to track events happening in Dota 2 matches.
Project description
Dota2Monitor
Dota2Monitor allows you to use GameState Integration Monitoring to track events happening in Dota 2 matches.
Installation
You can install Dota2Monitor using pip:
pip install dota2monitor
Usage
- Place the file gamestate_integration_monitor.cfg into ~\SteamLibrary\steamapps\common\dota 2 beta\game\dota\cfg\gamestate_integration.
"Dota 2 Integration Configuration"
{
"uri" "http://localhost:666/"
"timeout" "5.0"
"buffer" "0.1"
"throttle" "0.1"
"heartbeat" "30.0"
"data"
{
"provider" "1"
"map" "1"
"player" "1"
"hero" "1"
"abilities" "1"
"items" "1"
"buildings" "0"
"draft" "0"
"events" "1"
"previously" "0"
}
}
- Add the following code snippet to monitor events:
from dota2monitor.server import Dota2Monitor
from dota2monitor.models import ListeningEvents
def custom_lvl_up_notify():
print('New level!')
def custom_death_notify():
print('Dead!')
def custom_smoked_notify():
print('Smoked!')
if __name__ == '__main__':
monitor = Dota2Monitor()
monitor.event_manager.add_event_listener("onDeath", custom_death_notify)
monitor.event_manager.add_event_listener(ListeningEvents.LVL_UP, custom_lvl_up_notify)
monitor.event_manager.add_event_listener(ListeningEvents.SMOKED, custom_smoked_notify)
monitor.run(port = 666)
Contributing
Feel free to contribute by submitting pull requests or raising issues.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dota2monitor-0.0.0.3.tar.gz.
File metadata
- Download URL: dota2monitor-0.0.0.3.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
585b129a9f0857eae0266976520dc5b5b940915f54d2f6d2a735b608ef59431e
|
|
| MD5 |
ecc8c39c578bc30a1b758acf07d88641
|
|
| BLAKE2b-256 |
123c05ed4dcda98231a36895c49d460049a3bf2e8f3c188d468aa4b9841ee063
|
File details
Details for the file dota2monitor-0.0.0.3-py3-none-any.whl.
File metadata
- Download URL: dota2monitor-0.0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
beb3f0a0f78d5372647ca704356449439d39a585deb3ac94aaecd4ac51c0b76e
|
|
| MD5 |
657f051af32c3ed77ec353af486c9510
|
|
| BLAKE2b-256 |
691f74dbcfe7e75bc2c540af65656b23d246725af72b6302734e4b3caa566c2d
|