Skip to content

VeXHarbinger/HDTPluginTemplate

Repository files navigation

Important Preface!!!

If you want to use the template, it's easier to get it on the visual studio marketplace.
This project builds the VSIX extension that installs the template and will alert you of updates.
You can of course clone the repository, and I'll be adding the TemplateProjectProject to Git just as soon as I refine the build process.

Purpose

This project should help jump start your development of your own plug-in for the Hearthstone Deck Tracker
Once you create a new project, you should be 100% ready to test the default functionality. Just seeing this basic window pop-up should help you begin your development with confidence.

Example Plug-In Display

The example functionality shows the card name and artist name when you mouse over a card in your hand.

Helpful Plug-Ins

Development

Configuration

  • It does come with the lib files but you should make sure to get the latest versions of HDT and HearthDb
    • Copy them to the lib folder
    • Verify the project reference versions
  • Set Plug-in Assembly Version
  • Press Ctrl+W,T to see the ToDo list. Make sure to delete any example functionality you don't want to keep

Versions

Create a Build Event

You can create a build event in the project's properties to publish your plug-in .dll into your HDT plug-in folder.
This way you can just do a debug build and then fire up your HDT to test it out.
Remember, you have to restart HDT after you build a new .dll to clean out the old version from the session memory.

if $(ConfigurationName) == Debug ( copy "$(TargetDir)$(ProjectName).*" "%AppData%\HearthstoneDeckTracker\Plugins" /y )

Debugging

You can attach your VS debugger to a running HDT session by pressing Ctrl+Alt+P, then select HearthstoneDeckTracker from the list of running processes.
You can press Shift+Alt+P to reattach to the process after the first debugging session to skip the selection window.

Attach To Process

Remember to click the Show Threads in Source (or ensure it's enabled) once the debugger starts

Show Threads In Source

Localization

In the StringsResource.resx file you can enter the user visible text that should be translated.
AutoResxTranslator is an amazing and helpful tool.

Publishing

What to remember to do when publishing

  • Remember to set your VS Build to release
  • Open your bin\release folder,
  • Right Click on ONLY your plugin.dll and select compress to zip
  • If there are additional .dll files in this folder, make sure all of the project references have the local copy setting, set to False
  • .dlls from NuGet Packages will be in here, just ignore them.

Links

Documentation

Acknowledgments

Wanted to say thanks for the great work they did to pave the way for me.

Stats

GitHub Latest GitHub All Downloads