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.2.tar.gz
(11.6 kB
view hashes)
Built Distribution
Close
Hashes for dota2monitor-0.0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88753dcfad54d2690ca7eb7c8288e35b58350485fa18deed01bf6b1c96ebd3a4 |
|
MD5 | 8f3a69a389cd10f949ed0ea350f2dc40 |
|
BLAKE2b-256 | f0562766b7a185654d89447b88028772b460a3f2466a24854b0cc449a0789fe6 |