The Witcher 3
0 of 0

File information

Last updated

Original upload

Created by

Joz

Uploaded by

Joz13

Virus scan

Safe to use

13 comments

  1. SuperXibata
    SuperXibata
    • member
    • 0 kudos
    TY dude!! Simply incredible!
  2. Wolke7
    Wolke7
    • member
    • 0 kudos
    Hi, I'm using the up, daown, left and right keys for movement. I changed the script and it works, but I cannot stop walkting/running when pressing the XButton1 again - what am I doing wrong?

    /*--------------------------XButton1--------------------------
    Click once to start ore stop run/walk.
    Click twice to toggle beween running and walking.
    Keep it pressed down to sprint.
    */
    XButton1::
    keywait, XButton1, T0.20
    If errorlevel = 0
    {
    KeyWait, XButton1, D T0.20
    If errorlevel = 0
    {
    Sendevent, {control down}{control up}
    }
    else
    If errorlevel = 1
    {
    sleep, 10
    If (bAutorun = 0){
    Sendevent, {Up down}
    bAutorun++
    }Else{
    Sendevent, Up up}
    bAutorun--
    }
    }
    Return
    }
    else
    If errorlevel = 1
    {
    while GetKeyState("XButton1", "P")
    {
    SendEvent, {shift down}
    KeyWait, XButton1
    SendEvent, {shift up}
    }
    }
    return
    1. Wolke7
      Wolke7
      • member
      • 0 kudos
      Found my mistake, forgot a bracket:

      else
      If errorlevel = 1
      {
      sleep, 10
      If (bAutorun = 0){
      Sendevent, {Up down}
      bAutorun++
      }Else{
      Sendevent, {Up up}
      bAutorun--
      }
  3. Santus
    Santus
    • member
    • 0 kudos
    Thank you for this wonderful mod.
    I was using your script during my first play through with no problem at all but recently I revisited the game and decided to buy the expansion.
    Now I run the latest version of the game but the script doesn't work any more.
    I had an older version, removed it and installed the latest script but still nothing.
    Any advice on what to try next?

    thanks
  4. Heartwerk
    Heartwerk
    • premium
    • 0 kudos
    Hi there!

    I have no experience with scripts so I wanted to ask -- what part of the script should I edit to change the autorun key from the mouse thumb button to a different key? I don't have that button on my mouse, unfortunately.

    I'd love to be able to use this mod because my chronic pain issues means that holding down W for too long is actually physically painful, which is stupid as hell (but not as stupid as TW3 not already having an autorun. WHY).

    Sorry for asking for handholding here -- I'm super wary of diving in only to break something -- but if you're able to let me know which bits to edit so I can use this, I'd be really grateful!

    Do I just need to change all instances of Xbutton1? If I wanted to bind it to numlock, do I just change it to "numlock"? Or are there other bits I'd have to change?
  5. mrsatan
    mrsatan
    • member
    • 0 kudos
    I just want to add toggle mode to the witcher senses in my own input settings but I can't figure out how you did it by looking at the input settings you provide. Is it linked to the autohotkey program as well?
  6. alexisvx
    alexisvx
    • supporter
    • 0 kudos
    Great Script.
    Is there a way to make AHK accept the combo 'e' + LMOUSE to perform an action?

    What I basically want to do is the following:
    Press e and LMOUSE selects IGNI
    Press e and RMOUSE selects AXII etc...

    I have a scripts that works but it only works with modifier keys not 'normal' keys. I want to use normal keys because Witcher doesn't accept modifier keys.
    below my script that works in autohotkey but not ingame.


    <+LButton::
    if LShift_LButton_presses > 0
    {
    LShift_LButton_presses += 1
    SetTimer, KeyLShift_LButton, 300
    return
    }
    LShift_LButton_presses = 1
    SetTimer, KeyLShift_LButton, 300
    return

    KeyLShift_LButton:
    SetTimer, KeyLShift_LButton, off
    if LShift_LButton_presses = 1
    Send {5}
    else if LShift_LButton_presses = 2
    Send {5}{q}
    LShift_LButton_presses = 0
    return
  7. eleventeen
    eleventeen
    • premium
    • 2 kudos
    Very nice script.

    I'm pretty bad at AHK so this was useful.

    Though most of the defaults you had set up didn't work well:
    Double tap wasd to roll: Bad idea because the game already accepts double tap to do regular dodge, and actually the regular dodge is far superior in most situations, especially on high difficulty. Plus this cases conflicts, and if you move around very fast and try to attack as fast as possible - it causes heavy scripting, which overloads the scripts.

    EG: the game minimizes and ahk pops up complaining about too many HotkeysPerInterval.
    I fixed that by adding this:
    #MaxHotkeysPerInterval 250

    Oh yea issue before that:
    The script tries to the start the game if its not started already. Thats good in theory... But in practice its bad because:
    There are two main version of the game. Perhaps this one works for GOG? It doesn't work correctly for the steam version:
    Because it launches the exe directly - which since CDPR is cool, is DRM-free.. So it actually doesn't inject the steam overlay if you do that.. EG: You won't see achievements or get other steam features. I like those so had to disable that part. Not sure its possible to fix, because youd have to launch a .url, which i dunno if ahk can, and plus I just dont think its a good feature. Its simple enough to just run the script and if its set up perfect, it should be safe to keep running all the time anyways tell u uninstall the game. 1 click and done is pretty simple imo.

    Next:
    Quen then switch to a new sign in 1 click:
    I like this in concept and probably would of kept it.. Except it doesn't work reliably.

    Since signs require animations to activate, simply inputting the commands will not reliably work. If you are performign other actions at the time, the game has delays etc. I tried tweaking it to add delays - else it would often cast igni istead of quen. But the amount of delay I needed to reliably work every time (1200ms) was too high for my tastes, so I just changed my side keys to have one do quen and one do igni.

    I also find using the middle mouse button (bombs/xbow) to be awkward - its a wheel not a button.. Doesn't feel fast or right, so i swapped it to open inventory - and had to do this via the scripts, because the ingame functions are hardcoded - it lets you unlock them, but then they suffer from consolitus (hitting the key twice doesn't close the menu, sends you to the overview menu which isnt necessary on pc)

    So yea basically I changed everything lol.. But was still useful as I wasn't sure the best way to set up some functions.. So still used your template.. Heres my script:
    http://hastebin.com/yoqogeduhi.tex

    Since you seem very good at ahk i have a question though:
    Is it possible to make the script work ONLY for witcher3.exe?

    Would be useful because atm if I leave the script running, with game closed.. Its mostly ok, except when I visits websites that are titled "The Witcher 3 - X) - scripts on, so it breaks my mouse back/forward keys. (Aparently the function detecting the title is accepting partial matches..

    So to fix we'd want either it only to accept exact match, or
    force script only only when
    BOTH:
    IfWinActive and
    If ProcessExists (think this is a function)

    not sure how to code it combining both.

    And both would be ideal - so that I can still alt tab and use back/forward. (still wouldnt work on sites title the witcher 3 -, but otherwise superior)

    Thanks.
    1. Joz13
      Joz13
      • supporter
      • 1 kudos
      Quote:
      Since you seem very good at ahk i have a question though:
      Is it possible to make the script work ONLY for witcher3.exe?


      It should have done that in general. The problem was all about timing. In some cases my script was unable to write the variable that contained the window title of the game. And thus resulting in a blank or wrong variable. In you're case it was probably blank so there for the script send it's input to any/all active windows. In the new version I build in a second delay while the game is loading in to system ram. It should be resolved now.

      The #IfWinActive directive will ensure that operations will only be send to the window specified in its parameters. I use a group for that since it's more flexible and IfWin unfortunately still do not support variable names.

      If you want to learn ahk then the help file is you're friend. Read it, read it again and when done, read it once more.
    2. eleventeen
      eleventeen
      • premium
      • 2 kudos
      Nah the script gets the correct window title on my machine. As it works correctly in most cases, just not all.

      The issue is that the way #IfWinActive works is it detects if the window titles matches:
      X*

      Giving many websites with info on The Witcher 3 title their site - The Witcher 3 - .. The script will also match chrome (which uses website titles for its programs titlebar.

      Rather than "X" (not sure if the #IfWinActive will accept quotes for an exact match)

      So without actually checking if the exe is running, it's not enough to simply match the titlebar.

      Logitech gaming software does it correctly, so I might just set up my macros with that instead.. But I do want to learn more ahk since I think overall its more powerful than logitechs software (and less crashy).
  8. TesaPlus
    TesaPlus
    • premium
    • 69 kudos
    Thank you for doing this. Autohotkey is cool. I have been using it for ages for a number of purposes / games. Well done.
  9. Filmguy93
    Filmguy93
    • supporter
    • 11 kudos
    So is 'ForModdedKeyMapping' for actual modded key mappings or just edited keys?
    1. Joz13
      Joz13
      • supporter
      • 1 kudos
      You don't NEED to use the changed key map if you don't want to use it! But...the script that goes with it depends on some key's changed in the tweaked file. Thus rendering some functions in my script useless. E.g. the toggled focus with tab.