ScriptHookWar3 Complete Guide 2026: Install, Build API, and Mod Warcraft 3
Your ScriptHookWar3 ASI file is not loading because you used the 64-bit ASI Loader on a 32-bit game. Warcraft 3 1.20e is 32-bit. The F5 hotkey does nothing because the timer code offset is wrong for your version. The CallFn template compiles but crashes because you passed a lambda without C++14 enabled.
This dedicated Axeetech guide fixes every installation build and API problem, so you stop guessing and start injecting.

Also on Axeetech: Best Roblox Executor Scripts | Grow A Garden Keyless Scripts |
What Is ScriptHookWar3
ScriptHookWar3 is an ASI plugin for Warcraft 3 created by developer seven-mile. It executes Jass native functions via C++ at runtime without modifying map files. The plugin uses DLL injection through an ASI Loader to hook into the running Warcraft 3 process.
This script is similar to HKE Script Inject but uses modern C++ instead of Jass or VJass. It supports Warcraft 3 version 1.20e officially. Other versions are adaptable with offset modifications. The project is open source on GitHub with a community fork by xingzhuangli.
The core architecture uses C++ templates for type-safe Jass native calling, lambda callbacks for trigger actions, and OOP wrapper classes for Jass objects like players, units, and groups. A built-in NativeTrainer provides cheat functionality through an in-game menu.
Quick Start Download and Install ScriptHookWar3
Step 1: Install an ASI Loader
ScriptHookWar3 requires an ASI Loader to inject into Warcraft 3. The ASI Loader is a DLL proxy that loads .asi plugin files into the game process.

Download ThirteenAG Ultimate ASI Loader from GitHub, for Warcraft 3 1.20e, which is a 32-bit use the x86 version. The loader file is named dinput8.dll or winmm.dll. Place this DLL file directly into your Warcraft 3 game directory, where war3.exe is located.
Alternative option: Silent’s ASI Loader works for older executables if ThirteenAG fails.
Step 2: Download ScriptHookWar3
Official repository: github.com/seven-mile/ScriptHookWar3 Community fork: github.com/xingzhuangli/ScriptHookWar3

Download the latest release .asi file from the Releases section. Alternatively, clone the repository and build from source using the build instructions below.
Step 3: Place and Launch
Put ScriptHookWar3.asi in your Warcraft 3 root directory. Some ASI Loaders also support a scripts or plugins subfolder. Launch Warcraft 3 1.20e. Press F5 to open the NativeTrainer menu. If the menu appears, installation is successful.
How to Build Script Hook War3 from Source
Prerequisites
Visual Studio 2019 or later with C++ desktop development workload installed. CMake 3.20 or later. Git for Windows.
Clone and Configure
Open Command Prompt or PowerShell. Run: git clone https://github.com/seven-mile/ScriptHookWar3.git. Navigate to the cloned directory. Run: cmake -B build This generates Visual Studio project files in the build directory.
Build and Output
Open the generated ScriptHookWar3.sln in Visual Studio. Select the Release configuration and x86 platform. Build the solution. The output file ScriptHookWar3.asi appears in build/Release/.

Common Build Errors and Fixes
Missing Windows SDK: Install via Visual Studio Installer under Individual Components. CMake not found: Add CMake to your PATH environment variable or use the CMake GUI. 32-bit 64-bit mismatch: Ensure x86 target platform. Warcraft 3 1.20e is 32-bit and cannot load 64-bit ASI files.
ScriptHookWar 3 NativeTrainer Built-In Cheats
NativeTrainer is the built-in cheat menu that requires no coding knowledge. Press F5 to open the main menu. Navigate with arrow keys. Select options with Enter.
The arrow left key triggers instant building completion for selected structures. This is the fastest way to test base building without waiting for construction timers.

Menu options include Add Gold, Add Lumber, Unit Modifications, and Hero XP. These modify game state through direct Jass native calls. No configuration files are needed for basic NativeTrainer usage.
ScriptHookWar 3 API Calling Jass Native Functions
The CallFn Template
CallFn is the core template function for calling Jass natives from C++. The syntax is CallFn<ReturnType>

This provides a type-safe C++ wrapper around Jass native functions. The template resolves the native function address at runtime and marshals arguments correctly.
Examples: CallFn<JassPlayer><JassGroup><void>
Complete CallFn Reference Table
| Return Type | Function Name | Parameters | Description |
|---|---|---|---|
| JassPlayer | Player | int playerId | Get player by ID |
| JassGroup | CreateGroup | none | Create empty unit group |
| void | GroupEnumUnitsSelected | JassGroup, JassPlayer, bool | Fill group from selection |
| JassUnit | FirstOfGroup | JassGroup | Get first unit in group |
| bool | IsUnitType | JassUnit, int | Check unit type flags |
| void | AddHeroXP | JassUnit, int, bool | Add experience to hero |
| void | DisplayTimedTextToPlayer | JassPlayer, float, float, float, string | Show timed message |
| JassTrigger | CreateTrigger | none | Create new trigger |
| JassTriggerAction | TriggerAddAction | JassTrigger, lambda | Add C++ lambda callback |
| JassEvent | TriggerRegisterPlayerChatEvent | JassTrigger, JassPlayer, string, bool | Chat event binding |
C++ Lambda Callbacks
ScriptHookWar 3 supports C++ lambda expressions in TriggerAddAction. This replaces the traditional callback argument system with modern C++ closures.

Example: auto act = CallFn<JassTriggerAction>
The lambda captures no variables by default. Use capture lists for external state. This feature requires C++14 or later.
ScriptHookWar 3 OOP Wrapper Classes

JassPlayer
JassPlayer::LocalPlayer() is a static method returning the local player object. GetSelectedUnits() returns a JassGroup containing the player’s current selection. SetState(PLAYER_STATE, value) and GetState(PLAYER_STATE) modify and read player resources like gold and lumber.
JassUnit and JassHero
SetMoveSpeed(float) modifies unit movement speed. SetScale(float) changes unit visual size. FirstUnit() from JassGroup returns the first unit for iteration. Implicit bool conversion allows null checks without explicit comparison.
JassGroup
FirstUnit() returns JassUnit. Enumeration support allows range-based for loops in C++11 and later.
ScriptHookWar 3 Menu Creator API
Creating Nested Menus
ScriptMenu is the class for creating in-game menus. Declare ScriptMenu mainMenu and ScriptMenu subMenu. Use AddSubMenuButton(“Label”, targetMenu) to create nested navigation. Use AddActionButton(“Label”, lambda) for immediate actions. Use AddSwitchButton(“OffLabel”, “OnLabel”, offLambda, onLambda) for toggle options.

Complete Menu Example
Resource submenu: Add Money button calls gold addition lambda. Add Lumber button calls lumber addition lambda. Selected Unit submenu: Scale Up toggle increases unit scale. Scale Down toggle decreases unit scale. Navigation: Return to Parent button exits submenu. Exit Menu button closes NativeTrainer.
Menu Best Practices
Use static ScriptMenu instances to prevent memory issues. Keep lambdas short and focused on single actions. Test the menu flow extensively before distribution to other players.
ScriptHookWar 3 vs HKE Script Inject Comparison
| Feature | ScriptHookWar 3 | HKE Script |
|---|---|---|
| Language | C++ | Jass or VJass |
| Injection Method | Runtime ASI | Map-based |
| Map Modification Required | No | Yes |
| Callback Support | C++ Lambda | Jass Functions |
| OOP Wrappers | Yes | No |
| Menu API | Built-in NativeTrainer | Manual Implementation |
| Version Support | 1.20e officially expandable | Multiple versions |
| Learning Curve | C++ Knowledge Required | Jass Knowledge Required |

Adapting ScriptHookWar 3 to Other Versions
Finding Timer Code Offset
Use Cheat Engine to scan for timer-related values in the Warcraft 3 1.20e executable. Look for consistent patterns that identify the timer code location. Apply this offset to newer version binaries. The timer code is essential for ScriptHookWar 3 hooking.
Finding Native Function Pool
Warcraft 3 1.20e uses a linear array structure for native function pointers. Version 1.3 and later use a binary search tree structure. Adapting to 1.3 plus requires additional traversal logic for BST navigation.
Version Support Status
Table

| Version | Status | Difficulty |
|---|---|---|
| 1.20e | Officially supported | Easy |
| 1.26a | Adaptable with offsets | Medium |
| 1.27b | Adaptable with offsets | Medium |
| 1.28 | Adaptable with BST logic | Hard |
| 1.29 plus | Not tested | Unknown |
| Reforged | Not compatible | Very Hard due to x64 and new engine |
Troubleshooting ScriptHookWar 3
| Error | Cause | Fix |
|---|---|---|
| ASI not loading | Wrong ASI Loader version | Use x86 loader for 1.20e 32-bit |
| F5 does nothing | Wrong game version | Ensure Warcraft 3 1.20e is running |
| Menu not appearing | ASI Loader not installed | Place dinput8.dll or winmm.dll in game folder |
| Crash on callback | Lambda capture issue | Check lambda syntax use C++14 minimum |
| Build fails | Missing Windows SDK | Install via Visual Studio Installer |
| CallFn returns null | Wrong function name | Check exact spelling from common.j |

Frequently Asked Questions
Is ScriptHookWar 3 safe for Battlenet?
No. Use offline or LAN only. Battlenet Warden may detect ASI injection and flag your account.
Can I use ScriptHookWar 3 with Reforged?
No. Reforged uses 64-bit engine architecture and a different game engine. ScriptHookWar 3 is 32-bit only.
Do I need to know C++ to use ScriptHookWar 3?
For NativeTrainer cheats no. For custom scripts and menus yes.
What is the difference between ScriptHookWar 3 and HKE?
ScriptHookWar 3 is runtime C++ injection via ASI. HKE is map-based Jass injection requiring map modification.
Can I run multiple ASI plugins?
Yes. ThirteenAG Ultimate ASI Loader supports multiple .asi files simultaneously.
How do I change the F5 hotkey?
Modify the keyboard manager in the source code or use an external key remapper like AutoHotkey.
Will ScriptHookWar 3 work on Linux or Wine?
Untested. ASI Loader may work with Wine DLL overrides but no guarantees.
Is the project still maintained?
Last update was 2022. Community forks exist. A C++20 Modules refactor is planned but not released.
Final Thoughts and Quick Reference
Bookmark this guide for API reference. Join Warcraft 3 modding communities for support. Contribute to GitHub if you adapt ScriptHookWar 3 to new versions.
Quick Reference Cheat Sheet
Install: ASI Loader plus ScriptHookWar3.asi in game folder Launch: Start Warcraft 3 1.20e press F5 Instant build: Arrow left key Add gold: NativeTrainer menu then Resources then Add Money Custom script: Include ScriptHookWar 3 headers use CallFn compile to .asi Menu: ScriptMenu with AddSubMenuButton AddActionButton AddSwitchButton Callback: Lambda in TriggerAddAction OOP: JassPlayer::LocalPlayer() JassHero for selected units.
Is a freelance tech writer based in the East Continent, is quite fascinated by modern-day gadgets, smartphones, and all the hype and buzz about modern technology on the Internet. Besides this a part-time photographer and love to travel and explore. Follow me on. Twitter, Facebook Or Simply Contact Here. Or Email: info@axeetech.com