AHK script for WASD keys ++ in Southern Storm

Post new mods and scenarios here.

Moderator: MOD_Flashpoint

Post Reply
User avatar
Shadrach
Posts: 762
Joined: Tue Oct 16, 2001 8:00 am
Location: Oslo, Norway
Contact:

AHK script for WASD keys ++ in Southern Storm

Post by Shadrach »

In FC Red Storm I used a AutoHotkey script to overcome some of the limitations of the UI. I have modified it to work for Southern Storm. Even if the UI in FCSS is a huge improvement, there are still some things that bother me. For one thing, I prefer WASD key map scrolling over using the mouse/numpad. I also prefer to keep the most used commands around the left of the keyboard to allow for quick access without having to use some of the "clunky" combos requiring both hands.

Since AHK now is at version 2 and scripts need to be updated I have scripts for both versions. You can run AHKv1 scripts in v2, but just using v2 is recommended.

The scripts are here:
AHK v2: https://raw.githubusercontent.com/Pathd ... gns-V2.ahk
AHK v1: https://raw.githubusercontent.com/Pathd ... paigns.ahk

Download and run it in AHK. It will detect if the game is running and only applies the hotkeys when it's active and focused. If you're familiar with AHK you know the score, otherwise please read:
https://www.autohotkey.com/docs/v2/Tutorial.htm
https://www.howtogeek.com/56481/the-beg ... ey-script/

You can examine the script for what keys are used and of course edit it - if you know what you're doing :mrgreen:

Some notes:
  • Hitting the Pause/Break key will stop the script, in case you're having trouble with it.
  • You can navigate context menus using WASD/Arrows (nice at times).
  • Space is used as Enter, making it possible to activate context menu options as well as closing some info dialogs.
  • Q/E opens the Unit Dashboard/Subunit Inspector which is really effective.
  • I have added specific commands that only trigger when certain dialogs are active, this to allow for toggling and Esc to close them.
  • The mapping of "|" (for Log) might need to be changed for whatever your keyboard has left of the "1" key. For a US kb I think it's tilde (~)?
  • There might be issues with non-standard kb layouts, but I'm not using any special keys (except for the "|" mentioned above).
  • The game does have some "focus issues" that causes dialogs to lose input focus at times. I suspect the map hex hover feature. So sometimes you need to make sure the dialog is actually active (by clicking in it for instance) and sometimes it requires two presses to close, for some reason...
This is a very personal setup for me, but hopefully it turns out to be useful to more people than just me 8-)

Let me know of any issues or problems - even suggestions or improvements - I'm far from an AHK guru and so limited to what I can accomplish (mostly just hotkey overrides...)
Last edited by Shadrach on Sat Dec 16, 2023 1:50 pm, edited 6 times in total.
OUW (Order of the Upgrade Wars)
Image
There are folks out there with way too much time on their hands.
- Norm Koger
User avatar
Shadrach
Posts: 762
Joined: Tue Oct 16, 2001 8:00 am
Location: Oslo, Norway
Contact:

Re: AHK script for WASD keys ++ in Southern Storm

Post by Shadrach »

Addendum
To launch the game along with the script and avoid having to keep AHK running at all times or starting it manually, I use this short batch file:

Code: Select all

@echo off
REM Launch Flashpoint Campaigns and AHK script
REM ==========================================
set game_dir="f:\Games\Flashpoint Campaigns Southern Storm"
set game_exe="FlashpointCampaigns.exe"
set ahk_dir="d:\bin\Autohotkey"
set ahk_script="%DOCUMENTS%\Settings\Autohotkey\FlashpointCampaigns.ahk"

REM Start AHK and load script
start "" %ahk_dir%\AutoHotkey.exe /r %ahk_script%

REM Check if running and start the game
cd /d %game_dir%
tasklist | find /I %game_exe% >nul || start "" %game_dir%\%game_exe%
It basically launches AHK pointing to the script, then checks if the game is already running and launches it.
Change the set commands to point to your game/AHK installations and the script path.
Last edited by Shadrach on Mon Nov 21, 2022 6:48 pm, edited 1 time in total.
OUW (Order of the Upgrade Wars)
Image
There are folks out there with way too much time on their hands.
- Norm Koger
theWombat
Posts: 67
Joined: Sat Sep 11, 2004 11:22 am

Re: AHK script for WASD keys ++ in Southern Storm

Post by theWombat »

Wow, batch files in 2022! Thanks for this mod; it's a cool and useful addition. Brings back memories though of writing batch files to set memory allocation, shadow BIOS, install mouse drivers, etc. Shades of 1995!
User avatar
CapnDarwin
Posts: 9515
Joined: Sat Feb 12, 2005 3:34 pm
Location: Newark, OH
Contact:

Re: AHK script for WASD keys ++ in Southern Storm

Post by CapnDarwin »

I have messed with adding overlay toggles to my Loupe Deck, and other Stream desks and some keyboards and mice have assignable buttons that players could use.
OTS is looking forward to Southern Storm getting released!

Cap'n Darwin aka Jim Snyder
On Target Simulations LTD
User avatar
Shadrach
Posts: 762
Joined: Tue Oct 16, 2001 8:00 am
Location: Oslo, Norway
Contact:

Re: AHK script for WASD keys ++ in Southern Storm

Post by Shadrach »

theWombat wrote: Sun Nov 20, 2022 12:29 pm Wow, batch files in 2022! Thanks for this mod; it's a cool and useful addition. Brings back memories though of writing batch files to set memory allocation, shadow BIOS, install mouse drivers, etc. Shades of 1995!
Underneath all that "user friendly" fluff, it's still the same old engine :lol:

Although these days batch files are called "Command Scripts" and usually have the "cmd" extension...
OUW (Order of the Upgrade Wars)
Image
There are folks out there with way too much time on their hands.
- Norm Koger
User avatar
HobbesACW
Posts: 508
Joined: Fri Feb 20, 2004 12:36 pm
Location: UK

Re: AHK script for WASD keys ++ in Southern Storm

Post by HobbesACW »

Thanks so much for the script shadrach. I can't see the point in hotkeys that require two hands - it's quicker to use the mouse and menus. This is great!

Chris
User avatar
Shadrach
Posts: 762
Joined: Tue Oct 16, 2001 8:00 am
Location: Oslo, Norway
Contact:

Re: AHK script for WASD keys ++ in Southern Storm

Post by Shadrach »

If anyone's still interested I updated the scripts in the first post to be compatible with the release of AHK v2.
OUW (Order of the Upgrade Wars)
Image
There are folks out there with way too much time on their hands.
- Norm Koger
Post Reply

Return to “Mods and Scenarios”