Helldivers 2: Stratagem Macro [Script]

This Helldivers 2 guide provides an AutoHotKey Macro script for instantly calling in Stratagems with one keybind.

This Helldivers 2 Stratagem Macro guide provides an AutoHotKey script for instantly calling in Stratagems with one keybind.

Macro for Stratagem Calls in Helldivers 2

Helldivers 2 Stratagem Macro

This quick stratagem using macro was created by s4bb4th. You can check out his GitHub profile from the link below. Don’t forget to check out how to unlock the stratagems in the game and all the stratagem button codes here.

List of Default Keybinds:

  • Numpad0: Reinforce
  • Numpad1: Stalwart
  • Numpad2: Orbital Precision Strike
  • Numpad3: Orbital 120MM HE Barrage
  • Numpad4: Gatling Sentry
  • Numpad7: Resupply

How to Use Stratagem Macro

  1. Download:
    • Get the GitHub repo here.
    • Install required software dependencies.
  2. Installation:
    • Download AutoHotKey.
    • Also, get Notepad++.
    • Download the file HellDivers2Macro.ahk from the GitHub repository.

Configuration Helldivers 2 Macro Script

Right-click the .ahk script file and open it with Notepad++.

The script is divided into three sections:

  • Headers: No changes required.
  • Keybindings:
    • Format: 'KEY-NAME::METHOD-NAME()'
    • Example: 'Numpad7::RESUPPLY()'

Stratagem Format:

METHOD-NAME() {
    SendInput, {LControl Down}
    Sleep 25
    SendInput, {Blind}{ARROW-KEY-1 Down}
    Sleep 25
    SendInput, {Blind}{ARROW-KEY-1 Up}
    Sleep 25
    SendInput, {Blind}{ARROW-KEY-2 Down}
    Sleep 25
    SendInput, {Blind}{ARROW-KEY-2 Up}
    Sleep 25
    SendInput, {Blind}{ARROW-KEY-3 Down}
    Sleep 25
    SendInput, {Blind}{ARROW-KEY-3 Up}
    Sleep 25
    SendInput, {LControl Up}
    return
}

Stratagem Example:

OrbitalPrecisionStrike() {
    SendInput, {LControl Down}
    Sleep 25
    SendInput, {Blind}{Right Down}
    Sleep 25
    SendInput, {Blind}{Right Up}
    Sleep 25
    SendInput, {Blind}{Right Down}
    Sleep 25
    SendInput, {Blind}{Right Up}
    Sleep 25
    SendInput, {Blind}{Up Down}
    Sleep 25
    SendInput, {Blind}{Up Up}
    Sleep 25
    SendInput, {LControl Up}
    return
}

How to Run Script

Save any changes made to the .ahk script. Double-click the file to run it using AutoHotKey software.

The script is now active. Return to your game and press a keybind to test.

Important Notes for the Macro

  • By default, the script uses ARROW KEYS for stratagem calls, not WASD.
    • You can change this by replacing ‘ARROW-KEY-1’ with ‘W’, ‘A’, ‘S’, or ‘D’ in the script.
  • The script operates only when WASD is not actively being pressed.
    • Release WASD, press the bind, and then resume pressing WASD.
  • The script will hold Ctrl and trigger the stratagem for you.
    • You don’t need to hold Ctrl yourself, but you’ll have to throw the stratagem.
  • Note that any delay less than 35ms may cause errors when triggering longer combinations.
  • The provided script contains definitions for only a few stratagems, bound to the keypad by default.

While I’ve developed many .ahk scripts, this one was particularly tricky to debug. It represents my first functional product and is far from optimal or complete.

Leave a Comment

Your email address will not be published. Required fields are marked *