DARK SOULS™ II: Scholar of the First Sin

DARK SOULS™ II: Scholar of the First Sin

View Stats:
AHK script to fix mouse click delay (and use extra mouse buttons)
Hello,

DS2 SOTFS: mouse + keyboard

Problem: very noticeable delay when attacking / blocking, due to a shockingly poorly designed "double clicking" feature of the game. (May he who programmed that turn hollow !)

In-game solution: "disable double clicking = on" in the options.

Problem to that solution: after each game reboot, though the setting is still set to "on", it is actually disabled. (!!!! On second thought, "he who programmed that" was probably *already* hollow. Nothing else adequately explains this level of incompetence. ) You have set it to off then on again for it to work. It's reeally tedious to do manually.

Solution: I made a script to do all the menu navigation for that in one keypress. After starting the game, I just press F11. (AHK script; AHK = Auto Hot Key; you need to install AHK separately. Google it.)

Note: the script only blindly outputs a sequence of keys, it does not know what it's doing; if the initial conditions are not exactly as expected, for instance you are already in the menu, the sequence of keys may do something unexpected. Do not move the mouse at all during the execution of the sequence: it may shift the focus to somewhere else and result in unexpected settings being changed.

Note2: I use E for confirm and TAB for cancel. If your bindings are different (I don't think tab is the default; IIRC the defaults are enter and backspace; YMMV), adapt the script accordingly, under F11::. Read the sequence of keys before running the script for the first time, and make sure it matches what you do manually; if not, adapt it.

Note3: the script assumes the setting has already been turned to on previously; you must therefore turn it on manually the first time you play.


The rest of the script binds extra mouse buttons to keys so that you can use the buttons in game even if they are not recognised by the game (or is there is delay) -- remove the parts that you are not interested in. Part of this aspect comes from a keybind script for DS3 that I downloaded from somewhere; don't remember original source.

Hope it helps someone else :-)


; ---------- DARK SOULS 2 KEYBINDS -----------
; make sure that your hotkeys are the same as in the video

; * = extra modifiers ignored (wildcard)
; ~ = sends hotkey as soon as pressed, not released


; Hotkeys will only work if DS2 is the active window
#IfWinActive ahk_class DarkSouls2

; Holds each key down for 30ms to allow game to register
SetKeyDelay,, 30
;SetMouseDelay 30

; Target lock switch
;~*WheelUp:: Send j
;~*WheelDown:: Send l

; Menu
*F1::Backspace

;~*RButton::Send {RButton}
;~*LButton::h

~*XButton1::p
~*XButton2::l

~*MButton::u

F11::
{
Send {Esc}
Sleep 100
Send {Left}
Sleep 100
Send {Left}
Sleep 100
Send {E}
Sleep 100
Send {Down}
Sleep 100
Send {Down}
Sleep 100
Send {Left}
Sleep 100
Send {Left}
Sleep 100
Send {Tab}
Sleep 100
Send {Tab}
Sleep 300
Send {Left}
Sleep 300
Send {E}
Sleep 500
Send {Esc}
}

#IfWinActive

; F12::ExitApp




Last edited by Gamall Wednesday Ida; Jan 11, 2020 @ 4:25am
< >
Showing 1-4 of 4 comments
SkacikPL Jan 11, 2020 @ 3:09pm 
You can just use this and not bother with AHK:
https://www.nexusmods.com/darksouls2/mods/856
Originally posted by 🔰SkacikPL🗾:
You can just use this and not bother with AHK:
https://www.nexusmods.com/darksouls2/mods/856

Very neat; I didn't know about it. Thanks for making it.

Consider always distributing such utilities with source code. There is no reason not to. You even already have a github for such things...

Regarding AHK, it is needed regardless if you want to use extra mouse buttons, which few console ports ever support. Thus AHK is something that anyone playing Mouse+KB should look into at some point IMO, and not just a "bother".
Last edited by Gamall Wednesday Ida; Jan 12, 2020 @ 1:21am
SKii Oct 18, 2022 @ 11:27am 
Near 3 years later I wanna say thank you for making this. The mod mentioned above didn't work for me and it seems others as well. Was gonna make an AHK script myself but I took one last dive through the forums to see if anyone had done it before and you've saved me the trouble.
I'm glad to hear it's been useful to someone.

Have fun :)
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Jan 11, 2020 @ 4:21am
Posts: 4