Game Events Provider (GEP)
The Overwolf Game Events Provider (GEP) is a part of the Overwolf API and provides apps with Live Game Data for supported games. Game data consists of two different kinds of data, Game events (also known as Live Game events) and Game Info (also known as Game info events).
GEP for Overwolf Electron is currently being rolled out on a per game basis. Contact us if you want events for a game that isn't currently in the supported games list.
-
Not all games are available in the PROD environment. For a list of games in the PROD and DEV environments, see Electron Games Support.
-
All supported games that are not in the PROD environment, are in the DEV environment and are updated regularly.
-
Connect your app to the DEV environment using the command line argument
--owepm-packages-url=https://electronapi-qa.overwolf.com/packages. -
You must tell your DevRel once when you are ready to go live so that the game can be moved to PROD.
-
After the game has been moved to PROD, you need to remove the command line argument
--owepm-packages-url=https://electronapi-qa.overwolf.com/packagesfrom your app.
Game events
Game events are real-time events that occur during game play. When a specific change of state occurs during game play an event is triggered containing specif data about that event. Game events are not stored and you will need to have a listener configured to ensure that you catch them. Each supported game has a list of specific supported events.
Example Game Event
{
"name": "player_killed",
"data": {
"username": "TestUser"
}
}
Game Info Updates
Game info updates describes persistent game data which updates during game play. These messages are sent in real time and are stored in a dictionary which can be queried at any time using the specific game events API. In addition, info updates are triggered whenever the data of a relevant Game Info item changes.
Game info includes data such as player data, match data, and more. Each supported game has a list of specific supported game info.
Resetting Game Info Updates fields
Resetting game info fields are important because info updates are only triggered when Game Info values change. This may lead to instances where game info could be outdated and therefore unreliable for detecting game state. The following example shows how its possible that game info may not be updated.
Game info reset example
In games that keep score, the score Game Info field is set to 0 at the beginning of every match.
...
"score": 0
...
It is possible that the player didn't increase his score by the time the match ended. This means that the player's score is still 0.
As a result, when the next match starts and the score will be reset to 0, an [infoUpdated][#game-info-updates] will not be triggered. This results from a the score field not updating.
To ensure that an infoUpdated event is triggered, the score field will be set to an illegal, consistent, meaningless value. This way when the score field is reset to 0 at the start of the next match (indicating a change from the illegal value), the infoUpdated event will be triggered.
...
"score": null
...
When the next match starts, the score will change from null to 0, triggering an info updates update.
...
"score": 0
...