Creates Macros that work every time! Vastly improved behavior and features!
Based on Work by TannerReynolds Icons from nvigneux
HELLDIVERS ON URGENT DEPLOYMENT IN DIRE NEED, GO TO "TL;DR, also known as: This Nerd Stuff is Booooring, Dude" BELOW!
Stratagema is a program that creates a series of rust projects that each compile into a stratagem executable, one per stratagem. Why? Because the AdvancedLauncher Streamdeck Plugin has some advanced features that can be used to give:
- A Cooldown indicator for each stratagem button (a green light that goes away when the stratagem is available again)
- Automatic stratagem icon assignment for each stratagem button, high res icons, all current stratagems included.
- The ability to use the new longpress feature to cancel the cooldown timer by terminating the stratagem executable.
- Can be updated/rebuilt by anybody who has stratagema.exe and the supplied dependency files in this repository.
On execution a stratagem executable will:
- Hold the control key
- Type Stratagem using WASD by default, or arrow keys if you supply the command line arg "arrows"
- Release the control key
- Wait for the Stratagem's cooldown time (this lets AdvancedLauncher display a green light while the stratagem is on cooldown)
- Terminate itself
(stratagem cooldown time is set to the minimum cooldown in seconds based on full superdestroyer upgrades, these can be changed in "commands.txt" and then new macros can be built with those new cooldown times)
Why one executable per stratagem instead of TannerReynold's macro engine's all-in-one exe? Doing so enables the above features through the Advanced Launcher Streamdeck plugin.
- Download this repo.
- Download and Install ImageMagick
- Run "cargo build --release" in the downloaded repo directory.
- target/release will be created and will contain stratagema.exe and all required files to continue.
- Assuming all needed files are in place and imagemagick is installed...
- Go to "Icons" folder in target/release and run "converticons.bat" in there.
- Run stratagema.exe in target/release, it generates projects in the generated_commands folder that will be created if not present, and copies one ico file to each project folder within, it also copies "build_projects.bat" to generated_commands.
- Go to generated_commands folder and run "build_projects.bat" in there, it will traverse the folders for you and build each project.
- Find your compiled stratagem macro executables in the "macro_release" folder which will be made in the parent folder of "generated_commands"
- Move the compiled stratagem macro exectuables, to a better path for regular use, I use "C:\stratagema"
- Admire your pretty stratagem macro executables and their amazing icons thanks to nvigenux.
- Use either macro keys with app launcher function or streamdeck to run stratagem macro exe files. icon on exe file is usually used automatically by most supporting software when LCD macro keys or streamdeck is used.
When new stratagems come out, commands.txt can be updated to include them, alongside an identically named 256x256 PNG being placed in the icons directory, once that is done, running stratagema.exe will refresh the generated_commands folder to include these new stratagem projects, you can then pick up from step 6 above to build those fresh stratagems.
format is straightforward, one stratagem per line, example first line:
machine_gun|saswd|410
stratagem name, I suggest no spaces or other special characters
pipe character
stratagem code in wasd (to use arrows, do not change here, use 'arrows' in the program Arguments)
pipe character
cooldown time in seconds, rounded to the nearest whole second
You do not want or need to build anything, you're okay with possibly not having every single stratagem as of the current date.
- Download "generated_commands.zip" from "Releases" to the right, and put the exe files in "C:\stratagema"
- Proceed to "AdvancedLauncher Modification" below, then to "Using In Streamdeck"
- Have fun :D These were built using the contents of this github repo, you don't get good grades if you don't show your work! These MIGHT not be up to date when you read this, last build was 28/05/2025.
IF you are in any way concerned about downloading 70+ executable files, I would reccomend that you submit the link to generated_commands.zip in the releases section, to virustotal.com, I have done so before every release myself all files have come back clean from every single vendor.
Update: One or two Vendors are marking these releases as malicious, please check the release notes for more information about this and how to verify you're not getting malicious software.
You are also free to download this repository, peruse the contents and rebuild everything from scratch.
This mod to AdvancedLauncher will allow you to type in the name of your stratagem exe files, very convenient.
-
Go to the Elgato Streamdeck store and find AdvancedLauncher by BarRaider, Install it.
-
Close the Elgato streamdeck software.
-
Go to Start, Run
-
Put in "%appdata%\elgato\StreamDeck\Plugins\com.barraider.advancedlauncher.sdPlugin\PropertyInspector"
-
Open Launcher.html in a Text Editor, preferably Notepad++ or Notepad
-
Go to line 20, it should look like this:
<input class="sdpi-item-value sdProperty sdFile" type="file" id="application" accept="*" oninput="setSettings()">
- Replace it with the following:
<input class="sdpi-item-value sdProperty" id="application" accept="*" oninput="setSettings()">
- Save the file.
- Relaunch Elgato Streamdeck and you will now be able to type in the "Application" path box when you use AdvancedLauncher.
- Drag an AdvancedLauncher Widget to your current profile and then select it, go to the inspector down the bottom.
- Click in the Application text box and type in the path to the stratagem macro you want. for example, "C:\stratagema\ems_mortar.exe"
- Assuming the executables were compiled correctly and have their icons, the icon should change to the stratagem icon.
- Tick "Run In Background", "Show Dot if process is Running", "Kill All Existing Instances" and "Limit Number of Instances Running"
- Change "Long Press" to "Kill Existing Process", if you use a stratagem at the end of a round, long press will reset the button and kill the cooldown timer, convenient!
- If you want to use arrows instead of WASD for stratagems, put "arrows" in the Arguments box.
- If you did all that correctly, you should now have a big beautiful official looking stratagem button which will show a green light while the stratagem is on cooldown.
- To add more stratagems, just copy your already configured advancedlauncher widget and then change the name of the executable in the Application box to whichever stratagem you want, I like to keep my stratagema folder up next to the Elgato app so I can refer to it.
Developed with the assistance of ChatGPT o4, intermittently, from December 2024 to February 2025.
This is a great demo of how versatile rust has become under windows, however, I am not a native rust programmer.
- One per stratagem so the process can be tracked by advancedlauncher for cooldown timer purposes
- Unix philosophy, do one thing, do it well, break things up into one tool per purpose.
- Why bother with code, when a filesystem already provides the structure I need?
- You have to admit that a rust program that makes rust projects that each compile into a unique parameterised windows executable complete with a full set of windows icons is pretty damned cool.
This is the only official source of this particular software. Please do not accept alternative sources of this particular software, for your own safety. Please link here rather than redistributing, as this will cut down on potential for abuse/malware. Everything here is open and free to be inspected, the intention is that people can confirm what they are downloading is not malware. Credit for any contributing code or IP has been given and linked to at the top of this file.
HellDivers and HellDivers 2 are the property of Arrowhead Studios and by extension, Sony I do not claim ownership over anything derived from their IP, copyright, or trademarks.