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
dota2monitor-0.0.0.3.tar.gz
(11.7 kB
view hashes)
Built Distribution
Close
Hashes for dota2monitor-0.0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | beb3f0a0f78d5372647ca704356449439d39a585deb3ac94aaecd4ac51c0b76e |
|
MD5 | 657f051af32c3ed77ec353af486c9510 |
|
BLAKE2b-256 | 691f74dbcfe7e75bc2c540af65656b23d246725af72b6302734e4b3caa566c2d |