- Game events API
Please read the overwolf.games.events documentation page to learn how to use Overwolf game events.
Due to a recent update in Dota 2 for Overwolf apps to work correctly, you will need to inform your users to add under Launch Options the following command line:
-gamestateintegration
- More details here
To know which user is already using this command line parameter, you should use the overwolf.games.getGameInfo()
API, where you will get this parameter in the response under gameInfo --> GameInfo --> ProcessCommandLine.
Sample Apps
Available Features
- gep_internal
- game_state
- game_state_changed
- match_state_changed
- match_detected
- daytime_changed
- clock_time_changed
- ward_purchase_cooldown_changed
- match_ended
- kill
- assist
- death
- cs
- xpm
- gpm
- gold
- hero_leveled_up
- hero_respawned
- hero_buyback_info_changed
- hero_boughtback
- hero_health_mana_info
- hero_status_effect_changed
- hero_attributes_skilled
- hero_ability_skilled
- hero_ability_used
- hero_ability_cooldown_changed
- hero_ability_changed
- hero_item_cooldown_changed
- hero_item_changed
- hero_item_used
- hero_item_consumed
- hero_item_charged
- match_info
- roster
- party
- hero_pool
- me
- game
- damage
Game events status
It is highly recommended to communicate errors and warnings to your app users.
Check here the game events status. OR - easily check the game events status from your app, using our API.
gep_internal
Info Updates
key | Category | Values | Notes | Since GEP Ver. |
---|---|---|---|---|
gep_internal | gep_internal | Local + Public version number | See notes | 143.0 |
gep_internal note
Data Example:
{"info":{"gep_internal":{"version_info":"{"local_version":"157.0.1","public_version":"157.0.1","is_updated":true}"}},"feature":"gep_internal"}
game_state
Events
Event | Event Data | Fired When | Notes | Since GEP Ver. |
---|---|---|---|---|
new_game | null | Match started | See notes | 77.3 |
game_over | null | Match ended | See notes | 77.3 |
new_game note
Data Example:
{"events":[{"name":"new_game","data":""}]}
game_over note
Data Example:
{"events":[{"name":"game_over","data":""}]}
game_state_changed
Events
Event | Event Data | Fired When | Notes | Since GEP Ver. |
---|---|---|---|---|
game_state_changed |
| See notes | 77.3 |
game_state_changed note
- game_state – Can be ‘playing’, ‘idle’ or ‘spectating’. Idle is when there isn’t a game being played or spectated.
- match_state – The internal match state. See ‘match_state_changed’ event for more info.
- match_id (not available for ‘idle’): The id of the match.
- player_steam_id (not available for ‘idle’): Steam id of the local player.
Fired when:
The user starts playing, begins spectating or stops playing. Note that simply bringing up the menu is not enough to trigger the ‘idle’ event – an active game (played or spectated) must be closed.
Data Example:
{"events":[{"name":"game_state_changed","data":"{"game_state": "playing", "match_state": "DOTA_GAMERULES_STATE_INIT", "match_id": "0", "player_steam_id": "76561197971316549", "player_team": "radiant"}"}]}
match_state_changed
Info Updates
key | Category | Values | Notes | Since GEP Ver. |
---|---|---|---|---|
match_state_changed | game | Current match state | See notes | 77.3 |
Events
Event | Event Data | Fired When | Notes | Since GEP Ver. |
---|---|---|---|---|
match_state_changed | Check notes | See notes | 77.3 |
match_state note
List of possible values:
match_state – One of the following:
- DOTA_GAMERULES_STATE_WAIT_FOR_PLAYERS_TO_LOAD
- DOTA_GAMERULES_STATE_HERO_SELECTION
- DOTA_GAMERULES_STATE_STRATEGY_TIME
- DOTA_GAMERULES_STATE_PRE_GAME
- DOTA_GAMERULES_STATE_GAME_IN_PROGRESS
- DOTA_GAMERULES_STATE_POST_GAME
- DOTA_GAMERULES_STATE_TEAM_SHOWCASE
Event example:
{"events":[{"name":"match_state_changed","data":"{ "match_state": "DOTA_GAMERULES_STATE_HERO_SELECTION"}"}]}
Info example:
{"feature":"match_state_changed","category":"game","key":"match_state","value":"DOTA_GAMERULES_STATE_HERO_SELECTION"}
Fired when:
The internal game match state has changed.
- DOTA_GAMERULES_STATE_WAIT_FOR_PLAYERS_TO_LOAD – Shown during the pre-game “Waiting for loaders” screen.
- DOTA_GAMERULES_STATE_HERO_SELECTION – Shown during the hero selection screen.
- DOTA_GAMERULES_STATE_PRE_GAME – Shown when the game begins, before the battle horn is heard.
- DOTA_GAMERULES_STATE_GAME_IN_PROGRESS – Shown when the horn sounds to open the match.
- DOTA_GAMERULES_STATE_POST_GAME – Shown during the post-game screen.
- DOTA_GAMERULES_STATE_TEAM_SHOWCASE
match_detected
Events
Event | Event Data | Fired When | Notes | Since GEP Ver. |
---|---|---|---|---|
match_detected | Check notes | See notes | 77.3 |
match_detected note
This feature is not available at the momentEvent Data:
- gameMode – One of the supported game modes.
- playersInfo – An array of 10 players' information with the following fields:
- faction – Radiant/Dire
- isLocalPlayer – True if this is the local player's information, false otherwise.
- playerIndex – The index of this player (0 – 9, left to right).
- steamId – Steam Id of the player.
Fired when:
As soon as 10 players have accepted a match, right after the 'accept' button is clicked by all. Supported game modes:
- AllPick
- AllPickRanked
- SingleDraft
- RandomDraft
- AllRandom
- LeastPlayed
- LimitedHeroes
- CaptainsMode
- CaptainsDraft
daytime_changed
Events
Event | Event Data | Fired When | Notes | Since GEP Ver. |
---|---|---|---|---|
daytime_changed | Check notes | See notes | 77.3 |
daytime_changed note
Event Data:
- daytime – True if it is current daytime, false otherwise.
- clock_time – The number of seconds from when the game clocked shows (0:00). It can be negative during the Pre-Game phase.
- nightstalker_night – True if it is currently a Night Stalker ultimate night.
Fired when:
The game transitions between daytime and night time.
Data Example:
{"events":[{"name":"daytime_changed","data":"{ "daytime": true, "clock_time": -89, "nightstalker_night": false}"}]}
clock_time_changed
Events
Event | Event Data | Fired When | Notes | Since GEP Ver. |
---|---|---|---|---|
clock_time_changed | Same as ‘map_daytime_changed’. | Fired every second | 77.3 |
clock_time_changed note
{"events":[{"name":"clock_time_changed","data":"{ "daytime": true, "clock_time": -89, "nightstalker_night": false}"}]}
ward_purchase_cooldown_changed
Events
Event | Event Data | Fired When | Notes | Since GEP Ver. |
---|---|---|---|---|
ward_purchase_cooldown_changed | Check notes | Fired every second where wards are on cooldown. | See notes | 77.3 |
ward_purchase_cooldown_changed note
Event Data:
- ward_purchase_cooldown – The remaining store cooldown in seconds before a ward is available for purchase again.
Data Example:
{"events":[{"name":"ward_purchase_cooldown_changed","data":"{"ward_purchase_cooldown":128}"}]}