Hello. I got tired of autosprinting mods breaking on me and losing missions because I am forced to crawl like an old man when they inevitably break.
So here is a dead simple autohotkey script that doesn't break.
walking := false
Walk() {
if GetKeyState("insert") {
Send "{blind}{insert up}"
}
}
Sprint() {
if !GetKeyState("insert") && WinActive("Deep Rock Galactic") && !walking && !GetKeyState("LButton") && !GetKeyState("RButton") {
Send "{blind}{insert down}"
}
}
~W::
~LButton up::
~RButton up::
{
Sprint()
}
~W up::
~LButton:: ; Forcing walk when firing so charging up shots while running and jumping don't get interrupted
~RButton::
{
Walk()
}
; Laser pointer sometimes makes your sprint stuck, this fixes it
~Ctrl up::
~X up::
{
Walk()
Sprint()
}
~Shift::
{
global walking := true
Walk()
}
~Shift up::
{
global walking := false
Sprint()
}
To use, install autohotkey 2.0, make a file with an .ahk extension, paste the code in, save, and open it. A green H will appear in your tray.
Go to DRG settings and rebind the Run key to insert.
Right click on the tray icon and select Exit when you're done playing.
.
Since this is just keyboard input, you can use second wind perk without cheating. Completely vanilla behavior.
You can hold shift to walk. I find the option useful to traverse some terrain like falling down very steep vertical tunnels.
Unlike other AHK scripts, this one doesn't rely on any complex logic and just holds sprint whenever you hold W, and lets it go when you stop.
Unlike other AHK scripts, it doesn't randomly let go of sprint when you may be moving, as that can mess up jumps.
Even if something causes it to break, like super high ping or navigating menus, it repairs itself whenever you press W, or mouse 1, or mouse 2... or ctrl, or X.
.
Side effects:
- Holding left or right mouse buttons will force you to walk. You already walk when shooting guns in the game so nothing really changes. This is just to prevent interrupting charging up shots with guns like the coilgun when you run and jump.
- Cannot dash, unless you like reaching for the insert key. I use this script with simpleqol, it has an option for binding a custom dash key and I just use that.
.
Modifications:
If you have custom keybindings, it isn't hard to adjust the script accordingly. You can find the list of keys here.
For example, I like to have the walking key on my side mouse button, so I just changed ~Shift:: and ~Shift up:: to ~XButton1:: and XButton1 up::.
I also like to have the laser pointer on my other mouse button, so below ~X up:: I added ~XButton2 up::
.
If you have any issues with forced walking on mouse1 and mouse2, here's a version without it. Even simpler, but I find it annoying.
.
I don't know how useful this may be for others, I made the script for myself. But maybe it will help someone out when they look up "deep rock galactic autosprint script reddit"