按键绑定和自助式自动热键脚本

0 点赞
Way of the Hunter
转载

AutoHotkey is recommended to make the most of this guide. This guide is for users who have peripherals beyond a QWERTY keyboard. COLEMAK and DVORAK users rejoice, this is the Godhand It is sad that nobody at NRG had 15 minutes to talk to ChatGPT and give us this functionality with the in-game settings. Shame on them. Preamble TLDR; <physical button i push>::<WotH Default Keybind> NOTE: ALL KEYBINDS BY DEFAULT ARE COMMENTED OUT TO AVOID SYNTAX ERRORS AT RUNTIME. DUPLICATE KEY REMAPS WILL CAUSE ERRORS. example: ; Toggle head torch del::h ; Press "h" to toggle the head torch. ... ; Toggle lights on/off del::h If you use the same movement keys for driving or have otherwise similar cases, you only need to remap the physical key once. Seemingly redundant clauses are included for people using multiple gaming peripherals. Ignore all all angle brackets, < , >, in this guide. They are only visual representations for keys a user chooses. Each keybind you wish to customize must first have the semicolon, ;, removed. ∴ ; Open hunting map ;Tab::Tab becomes ; Open hunting map <bind>::Tab When restoring a default bind, either delete the whole clause for that bind (easy, destructive), or, Simply comment out that entire clause (easy, non-destructive). ∴ ; Open hunting map <bind>::Tab changes to ; Open hunting map ;<bind>::Tab Meat and Tatos ; Way of the Hunter - PC controls - Default Keybindings - keyboard ; Requires AutoHotkey v2.0 ; This script provides default key mappings, with each output key assigned as intended in the game. ; To use: Edit this script to change the key mappings, save it with a .ahk extension, and run it using AutoHotkey. ; --------- #Persistent ; Keep the script running SetTitleMatchMode 1 ; Allow partial matches for window titles ; --- MAIN LOOP --- SetTimer CheckGameWindow, 120 ; Check every 120 milliseconds if the game window is active ; --- FUNCTION TO CHECK GAME WINDOW --- CheckGameWindow() { ; Check if the "WayOfTheHunter" window is active if !WinActive("WayOfTheHunter") { Suspend, On ; Suspend all hotkeys } else { Suspend, Off ; Resume hotkeys if the game window is active } } ; --- GENERAL --- ; Open hunting map ;tab::tab ; Toggle objectives ;o::o ; Toggle photo mode ;p::p ; --- ON FOOT --- ; Movement and other on-foot controls ; Forward ;w::w ; Left ;a::a ; Backward ;s::s ; Right ;d::d ; Jump ;space::space ; Speed up ;lshift::lshift ; Slow down ;lctrl::lctrl ; Toggle auto-walk ;f::f ; Interact ;e::e ; Activate hunter sense ;q::q ; Place/remove exploration marker ;x::x ; Toggle head torch ;h::h ; Change stance ;c::c ; Select next equipment ;wheelup::wheelup ; Select previous equipment ;wheeldown::wheeldown ; Next firearm ;u::u ; Next caller ;y::y ; Next gear ;j::j ; Reload ;r::r ; --- EQUIPMENT --- ; Equipment handling controls ; Aim down sights / Use secondary action ;rbutton::rbutton ; Fire ;lbutton::lbutton ; Hold breath ;lshift::lshift ; Zoom in ;wheelup::wheelup ; Zoom out ;wheeldown::wheeldown ; Zeroing up ;up::up ; Zeroing down ;down::down ; Exit stand ;e::e ; --- INVENTORY --- ; Inventory control shortcuts ; Primary weapon ;1::1 ; Secondary weapon ;2::2 ; Gear 1 ;4::4 ; Gear 2 ;5::5 ; Gear 3 ;6::6 ; Caller 1 ;7::7 ; Caller 2 ;8::8 ; Caller 3 ;9::9 ; --- VEHICLE --- ; Vehicle control mappings ; Throttle (move forward) ;w::w ; Brake (move backward) ;s::s ; Steer left ;a::a ; Steer right ;d::d ; Handbrake ;space::space ; Toggle lights on/off ;h::h ; Use horn ;r::r ; Leave vehicle ;e::e ; Change vehicle camera ;c::c ; Radio ;v::v ; Change station ;x::x ; Activate hunter sense ;q::q ; --- PHOTO MODE --- ; Camera controls in photo mode ; Move camera / Rotate camera ;rbutton::rbutton ; Move forward ;w::w ; Move backward ;s::s ; Move left ;a::a ; Move right ;d::d ; Move faster ;lshift::lshift ; Move slower ;lctrl::lctrl ; Raise camera ;space::space ; Lower camera ;c::c ; --------- ; END OF SCRIPT ; --------- ; Save this file with a .ahk extension, and double-click it to run. ; Use the AutoHotkey system tray icon to pause, reload, or exit the script. ; Make sure to test changes by reloading the script (right-click the tray icon -> Reload) after editing. Thoughts head empty.. chatGPT is OP. i have also been doing this with other games to avoid the headaches from lazy tech bro development cycles.