Thank you @Az0iC0 for your AHK script :) I've took the liberty of updating it a bit and thought I'd share.
When you: - Launch my version of the AHK script, it will automatically launch Baldur's Gate 3 - Exit Baldur's Gate 3, it will automatically exit the AHK script
So it can easily be used to launch the game + AHK script, and terminate both game + AHK script gracefully as well.
Here is my version, for anyone interested, or if you'd like to include it in an official release: ; --- Define the game directory + exe to launch Bg3_Dir = C:\Games\Baldur's Gate 3\bin Bg3_Exe = bg3.exe
; --- Start the game and wait until its window appears Run, %Bg3_Dir%\%Bg3_Exe%, %Bg3_Dir%, , Bg3_Pid WinWait, ahk_pid %Bg3_Pid% WinActivate, ahk_pid %Bg3_Pid%
; --- Setup script exit when game closes WinWaitClose, ahk_pid %Bg3_Pid% ExitApp
Another method I use that works well for toggle camera rotate is this script from a deleted reddit user:
" Here's an example of how to toggle a key using the key itself; change the key on the first line to the key you'll be pressing, change the other three to the key you're wanting to hold: $m::;Physical key used to toggle If GetKeyState("m") ; If key to hold is already held Send {m Up} ; Release it Else ; Otherwise Send {m Down} ; Hold it Return ;End code block Same thing but all on one line: $m::Send % GetKeyState("m")?"{m Up}":"{m Down}""
Download and install AutoHotkey, then paste $m::Send % GetKeyState("m")?"{m Up}":"{m Down}" in notepad and save it as anything.ahk , where all the m's can be replaced by a key of your choice. Run the saved file when playing.
do i have to specifically run the script before i launch the game? for some reason it just refuses to work maybe cause i installed version 2 of AHK then installed version 1 when it said it needs it? am not sure why it just wont work
when you said "Complementing WASD Character Movement:" one thing I wanted to note was since the very foundation which is Nativeloader the main requirement for WASD move isn't getting updated and is starting to fail and glitch out causing for some people needs of constant redownloads of Nativeloader and all mods surrounding it will often need to be reinstalled entirely so maybe would implementing or adding an addition mod to this mod that does wasd move things on its own or something like that :3
This script was born out of a desire to address a common challenge faced by many players: the constant need to hold down the middle mouse button for camera control.
I recommend putting that on a side button (and combining it with the loot highlight toggle thing).
It's really very interesting, not everyone has a mouse with a button on the side of the mouse, but it's quite common, I might make a version with a button on the side buttone, thanks for the recommendation. (Done, New version added) Thanks to your insight I solved several inconsistency problems when entering combat, in fact it's much better with the side button
That quote of the Description points exasperatedly at the true solution: reversing the functionality of the button, making NOT holding down the button the default player behavior....
While using WASD Movement and Native Camera Tweaks, I simply rebound the Camera Rotate function to "Mouse X2", which the game recognizes, and so I hold that button down instead of the more delicate and difficult-to-depress button under the scroll wheel. I already use an AutoHotkey script for interval auto-saving.
I'm unsure if I want the camera to be locked rather than follow player orientation; perhaps a truer improvement would be to simply reverse the functionality and make not holding down the bound button result in the camera following the player and holding down the button the exception? That would likely require a Script Extender mod to implement rather an external AutoHotkey script.
Yes: this mod has been automatically quarantined and you need to see if you can address the reasons for this before anyone will be able to download it.
Test it and tell me how it worked on your computer, remember that there is now a version without the .exe of AutoHotkey, so you must download it from the official website to be able to run the script. https://www.autohotkey.com/
I made a version available without AutoHotkey but you should go to the official website to download it to be able to run the script, after testing tell me what you think and if you had any problems, the mod is not stable and it may behave differently depending on the computer. (Done, New version added) Make sure to read the mod description, as it is now no longer the middle button but the side button.
20 comments
I've took the liberty of updating it a bit and thought I'd share.
When you:
- Launch my version of the AHK script, it will automatically launch Baldur's Gate 3
- Exit Baldur's Gate 3, it will automatically exit the AHK script
So it can easily be used to launch the game + AHK script,
and terminate both game + AHK script gracefully as well.
Here is my version, for anyone interested, or if you'd like to include it in an official release:
; --- Define the game directory + exe to launch
Bg3_Dir = C:\Games\Baldur's Gate 3\bin
Bg3_Exe = bg3.exe
; --- Start the game and wait until its window appears
Run, %Bg3_Dir%\%Bg3_Exe%, %Bg3_Dir%, , Bg3_Pid
WinWait, ahk_pid %Bg3_Pid%
WinActivate, ahk_pid %Bg3_Pid%
; --- Setup script exit when game closes
WinWaitClose, ahk_pid %Bg3_Pid%
ExitApp
; --- Setup EasyCam hotkey
toggle := false
XButton1::
toggle := !toggle
if (toggle) {
SendInput, {XButton1 down}
Sleep, 150 ;
SendInput, {RButton down}
Sleep, 50 ;
SendInput, {RButton up}
Sleep, 20 ;
SendInput, {w down}
Sleep, 17 ;
SendInput, {w up}
} else {
SendInput, {XButton1 up}
}
return
"
Here's an example of how to toggle a key using the key itself; change the key on the first line to the key you'll be pressing, change the other three to the key you're wanting to hold:
$m::;Physical key used to toggle If GetKeyState("m") ; If key to hold is already held
Same thing but all on one line:Send {m Up} ; Release it
Else ; Otherwise
Send {m Down} ; Hold it
Return ;End code block
$m::Send % GetKeyState("m")?"{m Up}":"{m Down}"
"simply replace m for keybind of choice :)
$m::Send % GetKeyState("m")?"{m Up}":"{m Down}"
in notepad and save it as anything.ahk , where all the m's can be replaced by a key of your choice. Run the saved file when playing.maybe cause i installed version 2 of AHK then installed version 1 when it said it needs it?
am not sure why it just wont work
But yeah, toggle options are great. More options == betterer.
I'm unsure if I want the camera to be locked rather than follow player orientation; perhaps a truer improvement would be to simply reverse the functionality and make not holding down the bound button result in the camera following the player and holding down the button the exception? That would likely require a Script Extender mod to implement rather an external AutoHotkey script.