A small application that does computer vision based draft detection, queries hotsdraft.com for best picks/bans, and draws overlay with results.
This works purely based on screenshots and does not read or modify the games memory, therefore in my belief, is a perfectly legal application in terms of Blizzard T&C.
Sadly this has only been tested on 4k resolution, but in theory should work on a smaller resolution as well. Font sizes might need adjusting.
- Python 3+
- Tesseract
You can download a packaged binary available in the releases page This ships all required libraries other than Tessaract, which you still need to install externally and make sure it's at the right path.
If you don't trust the binary, you can always run it yourself:
- Install Python 3+
- Install Tesseract. Tesseract application should be at "C:\Program Files\Tesseract-OCR\tesseract.exe" or the path in
detection.py
should be modified. - Clone the repo
- Run
pip install -r requirements.txt
to install required libraries - Run
python hotsdraft_overlay/runner.py
- Once in draft, use
F8
to toggle visibility of the overlay. UseF7
to refresh the suggestions.
I suggest using PyCharms IDE which seems to have sensible type completion for Python 3.
If you want to work on features that work on image processing, you can swap WindowCanvas for ScreenshotCanvas which works off screenshots being fed from a directory. There are a few debug flags left in detection code to display subrectangles produced screenshot slicing code.
If you are working on developing a new layout, I suggest you switch to a ScreenshotCanvas, uncomment the line in runner.py
redirecting application flow into run_in_layout_build_mode
. Pressing F8
in that mode reloads the file with the layout code and re-renders it.
- Heroes with portraits with little features (lookin at you Malthael) sometimes fail to be detected
- As of 2020-03-19, hotsdraft.com does not include Deathwing
- Break the DraftSuggestionLayout into multiple smaller layouts to be composable:
- Layout for pick suggestion names only
- Layout for ban suggestion names only
- Layout for trait display for picks
- Layout for trait display for bans
- Implement Qt based a tray icon, which would allow you to configure the application.
- Add support for preferred role selection when submitting requests to hotsdraft.com.
- Add support for including pre-picks as ally picked heroes when checking suggestions.
- Move map detection to use SIFT oppose to Tessaract to speed up lookup/accuracy and remove a binary dependency.
- Add support for auto-detection/auto-display when in draft. This should be done after 5 is done, effectively only in draft when found a valid map. This would also enable auto-hide when draft finishes. Enables auto-refreshing.