Hearthstone

Hearthstone game events.

Please read the overwolf.games.events documentation page to learn how to use Overwolf game events. 

Game ID

  • 9898

Sample app

Available Features:

  • scene_state
  • collection
  • decks

Info Updates

The Game Events Provider keeps an info DB with various information about the game state.
Updates about this information can be received as events by registering an event listener using overwolf.games.events.onInfoUpdates2()
It is also possible to get the current available information using overwolf.games.events.getInfo()

Feature Information
collection
Category Key Values Notes Since Version
game_info collection

The current cards collection of the local player.

  • The “collection”  data is available as soon as the player logins into Hearthstone.
  • The collection is getting updated when the user adds/removes a card.

Example for cards “collection”:

{ CS2_065: "{"id" : "CS2_065", "count" : "1", "premiumCount" : "0" }",
  CS1_113: "{"id" : "CS1_113", "count" : "2", "premiumCount" : "0" }",
  NEW1_011: "{"id" : "NEW1_011", "count" : "2", "premiumCount" : "0" }",
  EX1_131: "{"id" : "EX1_131", "count" : "1", "premiumCount" : "2" }",
  CS2_121: "{"id" : "CS2_121", "count" : "2", "premiumCount" : "0" }",
  …
}

“Card” structure:

{
  "id" : "card_id" ,
  "count" : "int" , 
  "premiumCount" : "int"
}  
  • “id” – The card’s id
  • “count” – The amount of regular cards
  • “premiumCount” – The amount of premium (golden) cards

 

 

 117.1.1
scene_state
Category Key Values Notes Since Version
game_info scene_state

 The current game scene.

 

Can be one of the following:

  •  scene_startup
  • scene_login
  • scene_hub
  • scene_gameplay
  • scene_collectionmanager
  • scene_packopening
  • scene_tournament
  • scene_friendly
  • scene_fatal_error
  • scene_draft
  • scene_credits
  • scene_reset
  • scene_adventure
  • scene_tavern_brawl
  117.1.1
decks
Category Key Values Notes Since Version

decks

deck_id

The “decks” feature provides data about the currently “visible” decks. Decks are “visible” when the local player starts a new game (during the “deck selection” screen) or when the local player enters the “My Collection” screen.

The following data is being provided for each deck:

  • Deck name / id
  • Deck cards (array of cards)

“Card” structure:

{
  "id" : "card_id" ,
  "count" : "int" , 
  "premiumCount" : "int"
}  
  • “id” – The card’s id
  • “count” – The amount of regular cards
  • “premiumCount” – The amount of premium (golden) cards

 

Example for a “deck” info-update structure:

{"feature":"decks","category":"decks","key":"Basic Shaman",
"value":"{\"deck_id\":\"Basic Shaman\",
\"cards\":[{\"id\":\"CS1_042\",\"count\":\"1\",\"premiumCount\":\"0\"},
{\"id\":\"CS2_103\",\"count\":\"1\",\"premiumCount\":\"0\"},
...
{\"id\":\"LOOT_413\",\"count\":\"2\",\"premiumCount\":\"0\"},
{\"id\":\"UNG_923\",\"count\":\"1\",\"premiumCount\":\"0\"}],
\"deck_key\":\"deck_0\"}"} 

 

Arena Decks

“Arena Deck” (unlike a standard deck), will be updated each time the local player chooses a card during the Arena Draft phase.

   119.1.1

selected_deck

selected_deck

The selected deck.

The following data is being provided when the local player selects a deck:

  • “deck_id”
  • “deck_name”
  • “class_skin” – Deck image name

Example for a “selected deck” structure:

{"feature":"decks","category":"selected_deck","key":"selected_deck","value":
"{\"deck_id\" : \"706741699\", \"deck_name\" : \"Basic Shaman\", \"class_skin\" : \"Thrall\" }
   119.1.1
match
Category Key Values Notes Since Version
playersInfo localPlayer
  • name” – name of local player
  • standardRank” – The rank of the player in Constructed, in Standard mode (int)
  • standardLegendRank” – The rank of the player in Constructed, in Standard mode, once he reached Legend (int)
  • wildRank” – The rank of the player in Constructed, in Wild mode (int)
  • wildLegendRank” – The rank of the player in Constructed, in Wild mode, once he reached Legend (int)
  • cardBackId” – the ID of the card back used in the current game (int)
  • cardId” – the ID of the card representing the hero (string)
{"playersInfo":{"localPlayer":"{\"name\":\"ччггтуычб\",\"standardRank\":25,\"standardLegendRank\":0,
\"wildRank\":25,\"wildLegendRank\":0,\"cardBackId\":0,\"cardId\":\"HERO_02\"}"}
  123.0.1
playersInfo opponent
  • name” – name of the opponent
  • standardRank” – The rank of the player in Constructed, in Standard mode (int)
  • standardLegendRank” – The rank of the player in Constructed, in Standard mode, once he reached Legend (int)
  • wildRank” – The rank of the player in Constructed, in Wild mode (int)
  • wildLegendRank” – The rank of the player in Constructed, in Wild mode, once he reached Legend (int)
  • cardBackId” – the ID of the card back used in the current game (int)
  • cardId” – the ID of the card representing the hero (string)
{"playersInfo":{"opponent":"{\"name\":\"ПсевдоРыцарь\",\"standardRank\":25,\"standardLegendRank\":0,
\"wildRank\":25,\"wildLegendRank\":0,\"cardBackId\":0,\"cardId\":\"HERO_02\"}"}
   123.0.1

Events

Feature Information
 match  
Event Event Data Fired when Notes Since Version
match_start

mode

{"name":"match_start","data":"standard"}
 match starts   0.123.0.1
match_end  null  match ends    0.123.0.1