Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

The Dowsing Rod requires you to spam the use (F) key while looking for deep arrowheads. Spamming keys sucks. You wouldn't really need it if sound was enough clue to go on (the PS2 version made your controller rumble when in position), but it turns out it's not.

AutoHotKey should be able to make it much easier on my fingers. Something such as this should suffice:

$f::
While GetKeyState("f","P")
 Send f
return

It works in all places but Psychonauts. I've tried the SendPlay, the SendInput, the SendMode Play, the SetKeyDelay workarounds suggested here to no avail.

How can I make searching with the dowsing rods less tedious?

share|improve this question
    
I played it on the Xbox, so I can't help. But, thank you for reminding me about this game. One of the best platformers ever... –  Fluttershy Dec 26 '11 at 21:08
    
Have you tried looking at the wiki? autohotkey.com/wiki/index.php?title=Autofire –  Krazer Dec 26 '11 at 21:22
    
This is just a wild guess really, but maybe you need to handle DirectInput or Xinput to get AHK working in Psychonauts. See autohotkey.com/forum/topic39091.html and autohotkey.net/~Lexikos/XInput.ahk for examples. –  bkzland Dec 27 '11 at 2:40

3 Answers 3

I tried a different approach with the "automatic shooting" function that JoyToKey offers, but the problem seems to be in Psychonauts itself. While it does register keys remapped through JoyToKey, it does not accept repeated inputs without registering a release of the button you pressed.

This led me to the idea to send raw input events, which works. In this AHK example I just assigned the hotkey CTRL-r to make Raz jump 20 times.

^r::
Loop 20
{
    Send {Space down}
    Sleep 10
    Send {Space up}
    Sleep 1000
}
return

Should work with any other key as well.

share|improve this answer
    
All three of the answers probably have working scripts, but this answer differs in that it specifically outlines the mechanism of the solution. –  NiteCyper May 31 '13 at 13:49

I finally got it to work

loop
{
^#f::
If getkeystate("f")
    send {f up}
else
    loop
        {
        send {f down}
        sleep 20
        send {f up}
        sleep 20
        if getkeystate("f")
            break
        }
return
}
share|improve this answer

I have the Mac version of Psychonauts, so I used Sikuli as the scripting engine, which works on both Windows and Mac. Sikuli uses Python as its scripting language.

This script presses F every 0.12 seconds until either 30 seconds has passed or you stop the script with C. You can configure it by changing the values of the constants at the top.

# Psychonauts: repeat F to collect deep arrowheads

APP_NAME = "Psychonauts"
KEY_TO_MASH = "f"
TIME_TO_RUN = 30*1 + 00
TIME_OF_PRESS = 0.02
TIME_OF_WAIT = 0.10

def holdKeyForTime(key, time):
    keyDown(key)
    wait(time)
    keyUp(key)

def mainAction():
    time_to_run = TIME_TO_RUN
    time_of_press = TIME_OF_PRESS
    time_of_wait = TIME_OF_WAIT
    time_per_press = time_of_press + time_of_wait
    num_presses = time_to_run / time_per_press

    for i in range(num_presses):
        holdKeyForTime(KEY_TO_MASH, time_of_press)
        wait(time_of_wait)

App.focus(APP_NAME); wait(1)
mainAction()


# full docs: http://doc.sikuli.org/
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.