Skip to content

Creating Plugins

Epix edited this page Apr 5, 2015 · 25 revisions

(v0.10.0+, plugins are still a work in progress)

Creating a Plugin:

  1. Create new Class Library
  2. Add a reference to Hearthstone Deck Tracker.exe
  3. Implement Plugins.IPlugin
  4. ?
  5. Profit

IPlugin: (the maybe not so obvious things)

  • ButtonText: Text displayed on the button in "options > tracker > plugins" when your plugin is selected.
  • MenuItem: The MenuItem added to the "Plugins" main menu. Return null to not add one.
  • OnUpdate(): Currently called every ~100ms.

Basics: API

  • API.GameEvents: All sorts of draw, play, game start/end events.
  • API.DeckManagerEvents: Events related to deck creation, deletion, etc.
  • These will be more added over time.

Basics: Where to start

  • Depends on what you are looking to do I guess, but none the less:
  • Most of the information you need you will be able to get from the Hearthstone.Game class.
  • Hearthstone.Game.Entities has information about everything in a game, from card locations (hand, board) to health and what card a card was last affected by. You may want to have a look at Enums.Hearthstone.GAME_TAGfor this.