Dota 2 Ability Draft Plus is a desktop overlay tool designed to provide players with valuable statistical insights during the Ability Draft phase of a Dota 2 game. It leverages real-time Machine Learning (ML) based image recognition and a locally stored database to display win rates for heroes and abilities, and suggests powerful ability combinations.
This project is currently focused on Windows. macOS/Linux support may be considered in the future.
- Real-time Data Insights During Draft:
- Displays hero and ability win rates upon hover.
- Suggests strong ability combinations from the current draft pool, with associated win rates.
- Highlights "Top Tier" abilities and hero models based on a consolidated score (winrate, value, pick order).
- Shows "OP Combinations" (pre-defined high-performing pairs) available in the current draft pool.
- ML-Powered Ability Recognition: Utilizes a TensorFlow.js model to accurately identify ability icons from the screen.
- Local Statistics Database: All statistical data (hero/ability win rates, synergy data) is stored in a local SQLite database, initially bundled with the application.
- Manual Data Updates: The Control Panel allows users to scrape and update the local database from Windrun.io for the latest statistics.
- Hero-Specific Context:
- When a user selects their hero ("My Spot"), the overlay can tailor suggestions and ability valuations.
- When a user selects a "My Model" hero, suggestions are filtered to focus on abilities.
- Feedback Mechanism: Allows users to "Take Snapshot" of ability icons if misidentified. These snapshots can be exported and shared (e.g., via Google Form or GitHub Issues) to help improve the ML model.
- Standalone Operation: Once data is updated, the overlay functions locally without needing a constant internet connection during gameplay.
- Non-Intrusive Design: Runs as an overlay, processing screen information without direct interaction with the Dota 2 game client. This means it relies solely on image recognition and its local database.
- Free to Use: No subscriptions or payments required.
- Download the Latest Release:
- Go to the Releases Page on GitHub.
- Download the
.exe
installer (e.g.,Ability-Draft-Plus-Setup-X.Y.Z.exe
) for a standard installation, or the portable.exe
(e.g.,Ability-Draft-Plus-Portable-X.Y.Z.exe
) for a standalone version. A.zip
version might also be available for manual extraction.
- Install:
- Installer (
.exe
): Run the installer and follow the on-screen instructions. A desktop shortcut will typically be created. - Portable Application (
.exe
): Simply run the downloaded executable from any folder. - Portable (
.zip
): Extract the contents of the.zip
file to a folder of your choice. RunAbility Draft Plus.exe
(or the similarly named main executable) from that folder.
- Installer (
- First Launch:
- On the first launch, the application will set up necessary files, including copying the bundled local database with pre-filled statistics.
The application has two main parts: the Control Panel (main window) and the Overlay (in-game).
This window appears when you start the application.
- Update Windrun Data (Optional but Recommended):
- The app includes a pre-filled database. For the latest stats from Windrun.io, click "Update Windrun Data (Full)". This can take a few minutes.
- The "Last updated" date shows the freshness of your local data.
- Select Screen Resolution:
- From the dropdown, select the screen resolution you use for Dota 2. This is critical for accurate ability recognition by the overlay.
- Activate Overlay:
- Once Dota 2 is running and you are in (or about to enter) the Ability Draft phase, click "Activate Overlay". The Control Panel will hide, and the transparent overlay will appear.
- Export Failed Samples:
- If the ML model misidentifies abilities, use the "Take Snapshot" feature in the overlay (see below). This button lets you export these saved images as a
.zip
file, which you can then share for model improvement.
- If the ML model misidentifies abilities, use the "Take Snapshot" feature in the overlay (see below). This button lets you export these saved images as a
The overlay provides in-game assistance once activated.
- Initial Scan:
- Once the Ability Draft screen is fully visible in Dota 2 (showing all heroes and abilities), click the "Initial Scan" button on the overlay (top-right).
- The app will analyze the screen to identify abilities in the pool and those already picked.
- Tooltips & Insights:
- After the scan, interactive hotspots appear over identified abilities and hero models.
- Hovering over these displays a tooltip with:
- Ability/Hero Name, Winrate, High Skill Winrate.
- ML prediction confidence (for abilities).
- Strong synergistic combinations (for abilities in the pool) with other available abilities.
- "Top Tier" abilities/models (based on a consolidated score) are highlighted with a shimmering border.
- Select Your Spot (Recommended):
- After the initial scan, "My Spot" buttons appear next to each of the 10 hero portrait areas.
- Click the "My Spot" button corresponding to your hero in the draft.
- Benefits:
- The overlay may provide more tailored "value" or "pick order" context for abilities if this feature is expanded.
- Abilities you pick will be distinctly highlighted.
- Top-tier ultimate suggestions may be filtered if you've already picked an ultimate.
- If you misclick, a "My Spot (Change)" button appears; click it to deselect, then choose the correct one.
- Set Model (Optional):
- After the initial scan, "My Model" buttons appear near the 12 hero models displayed in the center of the draft screen.
- Clicking this for one of the hero models will tailor "Top Tier" suggestions to focus only on abilities (filtering out other hero models from suggestions), assuming you want to build around that model's abilities.
- Click "My Model (Change)" to deselect.
- Rescan:
- After selecting "My Spot", "My Model", or if the draft state changes (abilities are picked), click "Rescan".
- This re-processes the screen, updating insights based on the current context.
- OP Combinations Window:
- If any pre-defined high-performing ("OP") two-ability combos are detected among available draft pool abilities, a window will appear (top-right). You can hide/show this.
- Take Snapshot (Feedback for ML):
- If you notice an ability is misidentified, click "Take Snapshot".
- This saves cropped images of all ability icons currently displayed to a local
failed-samples
folder. These can be exported via the Control Panel.
- Close Overlay:
- Press the
Esc
key or click the "X" button on the overlay to close it and return to the Control Panel.
- Press the
Control Panel
Overlay - Idle Mode
Overlay - Initial Scan Done
Overlay - Ability Winrates & Suggestions
Overlay - OP Combinations Warning Example
Overlay - Rescan with Selected Model and abilities, synergy suggestions
These instructions are primarily for Windows.
- Node.js: Install Node.js (includes npm). A version compatible with your project's Electron version is required (check
package.json
). - Python:
- Crucial for native module compilation (e.g.,
@tensorflow/tfjs-node
): Install Python 3.9.x, 3.10.x, or 3.11.x. Newer Python versions (3.12+) might cause build issues due to the removal ofdistutils
. - Ensure Python is added to your system's PATH or set the
PYTHON
environment variable correctly before building.
- Crucial for native module compilation (e.g.,
- C++ Build Tools (Windows):
- Recommended: Install Visual Studio (e.g., Community Edition) with the "Desktop development with C++" workload selected.
- Alternative:
npm install --global --production windows-build-tools
(from an Admin PowerShell/CMD), but this might install older tools.
- Git: For cloning the repository.
-
Clone the Repository:
git clone [https://github.com/tiarin-hino/ability-draft-plus.git](https://github.com/tiarin-hino/ability-draft-plus.git) cd ability-draft-plus
-
Set
PYTHON
Environment Variable (Windows - PowerShell Admin Example): Before runningnpm install
, ensurenode-gyp
(used for native module compilation) targets the correct Python version.# Replace with the actual path to your Python 3.9.x/3.10.x/3.11.x executable $env:PYTHON = "C:\Path\To\Your\Python3.9\python.exe" # Verify (optional): node -p "process.env.PYTHON"
This needs to be set for the terminal session where you run subsequent npm commands.
-
Install Dependencies:
npm install
This installs dependencies and should trigger
patch-package
if configured inpostinstall
. -
Build Native Modules & Apply Fix (Windows) Native modules must be compiled against Electron's Node.js version.
- Run the combined build script (ensure
PYTHON
environment variable is set):
npm run build:native
- This command first runs
rebuild-all
and then executesfix-tfjs
to correct the file layout for TensorFlow.
- The Problem: The build process for
@tensorflow/tfjs-node
sometimes incorrectly separates its two critical native files:tfjs_binding.node
and its dependency,tensorflow.dll
. They can end up in differentnapi-v...
subdirectories insidenode_modules/@tensorflow/tfjs-node/lib/
. For the module to load, both files must be in the same directory. - The Automated Fix (Recommended): The
npm run build:native
command automates the solution. After rebuilding the modules, it runs thescripts/fix-tfjs-node-build.js
script, which locates both separated files and copiestensorflow.dll
into the same directory astfjs_binding.node
. This is the recommended way to set up the project. - The Manual Fix: If you prefer to handle this manually instead of using the
build:native
script, follow these steps after runningnpm run rebuild-all
:- Navigate to the
node_modules/@tensorflow/tfjs-node/lib/
directory. - You will see one or more
napi-v...
folders. Find the folder that containstfjs_binding.node
. - Find the folder that contains
tensorflow.dll
. - Manually copy
tensorflow.dll
from its folder into the folder containingtfjs_binding.node
.
- Navigate to the
- Run the combined build script (ensure
-
Start the Application:
npm start
-
First Run - Data Setup:
- On the first launch from source, if the database doesn't exist in the user data path, the application will copy the bundled
dota_ad_data.db
. - The UI will indicate "Using bundled data." You can (and should) then use the "Update Windrun Data (Full)" button in the Control Panel to get the latest statistics.
- On the first launch from source, if the database doesn't exist in the user data path, the application will copy the bundled
main.js
: Electron main process. Handles app lifecycle, IPC, database, ML orchestration.index.html
&renderer.js
: UI and logic for the main Control Panel.overlay.html
&overlayRenderer.js
: UI and logic for the in-game transparent overlay.preload.js
: Securely exposes main process functionalities to renderers.src/
:database/
: SQLite database setup (setupDatabase.js
) and queries (queries.js
).scraper/
: Scripts for scraping data from Windrun.io (heroScraper.js
,abilityScraper.js
,abilityPairScraper.js
).imageProcessor.js
: Handles screen capture, icon cropping, and ML-based ability recognition.
scripts/
:fix-tfjs-node-build.js
: Post-build script to correct the file layout of the TensorFlow native module.prepare-app-config.js
: Script to inject environment variables into the app at build time.
model/tfjs_model/
: Contains the TensorFlow.js graph model (model.json
,.bin
files) andclass_names.json
.config/layout_coordinates.json
: Defines screen coordinates for UI elements at different resolutions.dota_ad_data.db
(root): The bundled SQLite database, copied to user data on first run.patches/
: Contains patches applied viapatch-package
(e.g., for@tensorflow/tfjs-node
).package.json
: Project dependencies, scripts, and build configuration.
- Database: The local SQLite database (
dota_ad_data.db
in your user data folder) is managed bysrc/database/setupDatabase.js
and populated/updated by the scraper scripts insrc/scraper/
. - ML Model: The ability recognition model is in
model/tfjs_model/
. - Coordinates: UI element coordinates for screen scraping are in
config/layout_coordinates.json
. These may need updates if the in-game Ability Draft UI changes significantly.
For bugs, feature requests, or other feedback:
- Please open an issue on the GitHub Issues page. Use the provided templates for bug reports or feature requests.
- For submitting misidentified ability icons (after using "Take Snapshot"), you can create an issue and attach the exported
.zip
file, or use the Google Form as mentioned in the application.
- Statistical data for heroes and abilities is primarily sourced from Windrun.io.
- This tool is a fan-made project and is not affiliated with Valve Corporation or Dota 2.