Undertale

Undertale

Robin 3 Sep 2018 @ 5:00pm
How to use custom controls in UNDERTALE
So, I've got myself a working script that'll let me rebind undertales controls to anything I want, and I figured I would share.

First, you'll need to install AutoHotkey. A link is provided here: AutoHotkey download page. [autohotkey.com]

Next, right click on your desktop/in a folder and select New > AutoHotkey Script. Once it's there, right click the file and select Edit Script (Though I have Notepad++ installed and select to Edit weith Notepad++, so that works too). After that, paste this code into it:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #HotkeyInterval 1000 ; Prevent Script from bugging out when you press the keys too quickly in succession. Esc::ExitApp ; Exit script with Escape key ^!s::Suspend ; Suspend script with Ctrl+Alt+S w::Up s::Down a::Left d::Right LButton::z RButton::x MButton::c

The default Undertale controls are Arrow Keys, Z, X, & C. This script rebinds that to WASD, Left Click, Right Click, and Middle Click. It also shuts down the script when the Escape key is pressed, and suspends it when you press Ctrl + Alt + S. This is important if you want to use the mouse, as rebinding Undertale's controls to mouse buttons will disable you from using the mouse buttons normally unless you use the shortcut to suspend the script or press Esc to shut the script down. So you can activate the script, suspend it with the shortcut, open Undertale, and then reenable the script by using the shortcut again. It's a bit complicated, but you should get used to it fairly quickly.

You can rebind the controls to anything you want now. A full list of keys for AutoHotkey is found here: List Of Keys [autohotkey.com]

Keep the keys on the right the same, those are Undertale's default controls. Change the ones on the left to rebind the control that key corresponds to. Same applies to the ExitApp and Suspend hotkeys.

Lastly, you can change this script so that it will only be active if you have Undertale as the active window. you can do this by putting:

#IfWinActive UNDERTALE

Above #HotkeyInterval 1000. This makes working with the script much easier, as you don't constantly have to suspend and unsuspend the script when switching between windows and such, HOWEVER, it will make it impossible for you to use the mouse to control the game. Trust me, I tried. Undertale doesn't look for or receive any input from the mouse, so if the script is taking its inputs from what the game gets, it will never get any mouse buttons being triggered. You have to have the script receiving input from the desktop, or PC itself, or whereever. I'm no master of this stuff, I just know that if you make the script only active when you are actually playing Undertale, you can't rebind controls to youer mouse, while if you leave it as is and have the script always active and just resort to suspending and unsuspending the script to switch between windows, you can rebind to mouse controls.

So yeah, it's kinda complicatd to setup and get used to, but once you do, it's really nice to have your preffered controls.
Terakhir diedit oleh Robin; 3 Sep 2018 @ 5:01pm
< >
Menampilkan 1-15 dari 35 komentar
thx
JustPawel 30 Agu 2020 @ 1:57am 
thank you, very epic
also my left arrow key doesnt work
Terakhir diedit oleh JustPawel; 30 Agu 2020 @ 2:02am
muck 20 Okt 2020 @ 10:03pm 
it dint work
Twisted_Code 20 Nov 2020 @ 12:52pm 
nifty. I was going to try and write an AutoHotkey script like this, but since you've already done it, I think I'll just tweak yours to suit my needs. Thanks!

Fun fact, you can make hotkeys window-specific by using #If directives... highly recommended for hotkeys that you don't need to be system-wide.
The window name gets changed frequently during the Photoshop Flowey boss, though.
Twisted_Code 20 Nov 2020 @ 12:59pm 
Diposting pertama kali oleh Vex:
it dint work
The instructions look fine to me. Are you sure you did everything as described?
1. Install AutoHotkey
2. Create the script file and save the code to it
3. Double-click the script file
Should be that simple unless something went wrong...
Diposting pertama kali oleh (Edgy) Asriel Dreemurr:
The window name gets changed frequently during the Photoshop Flowey boss, though.
there's probably still a way you can catch it with one of the title modes, though I don't know for sure as I've never fought them (thanks for the spoiler tag by the way, though I already know a lot of the game spoilers thanks to the Internet... and in particular my own indulgent self-spoiling via the wiki)

even if you can't catch it by window title, try using the window handle or executable name
Terakhir diedit oleh Twisted_Code; 20 Nov 2020 @ 1:00pm
Diposting pertama kali oleh Twisted_Code:
Diposting pertama kali oleh Vex:
it dint work
The instructions look fine to me. Are you sure you did everything as described?
1. Install AutoHotkey
2. Create the script file and save the code to it
3. Double-click the script file
Should be that simple unless something went wrong...
Diposting pertama kali oleh (Edgy) Asriel Dreemurr:
The window name gets changed frequently during the Photoshop Flowey boss, though.
there's probably still a way you can catch it with one of the title modes, though I don't know for sure as I've never fought them (thanks for the spoiler tag by the way, though I already know a lot of the game spoilers thanks to the Internet... and in particular my own indulgent self-spoiling via the wiki)

even if you can't catch it by window title, try using the window handle or executable name
I have seen people have issues with AHK during that boss in particular so it might be something to look into.
Diposting pertama kali oleh (Edgy) Asriel Dreemurr:
Diposting pertama kali oleh Twisted_Code:
there's probably still a way you can catch it with one of the title modes, though I don't know for sure as I've never fought them (thanks for the spoiler tag by the way, though I already know a lot of the game spoilers thanks to the Internet... and in particular my own indulgent self-spoiling via the wiki)

even if you can't catch it by window title, try using the window handle or executable name
I have seen people have issues with AHK during that boss in particular so it might be something to look into.
worst-case scenario, edit the script before the fight starts and reload, I guess? I still think
ahk_exe UNDERTALE.exe
should be able to grab the right window consistently, tho
Terakhir diedit oleh Twisted_Code; 20 Nov 2020 @ 1:05pm
TrippyWippy 30 Des 2020 @ 5:20pm 
Yeah, How do I change the script so it works when the window name changes?
I can't beat the game anymore because THE STUPID WINDOW NAME KEEPS CHANGING AND I ♥♥♥♥ WITH ARROWS
How can I change the controls to my liking? I want to have I as up, J as left, K as down, and L as right, how can I do this?
just gonna use the ♥♥♥♥♥♥ arrows lmao
Stefexikon 17 Jul 2021 @ 2:19am 
Runs perfectly, thx so much, my heart is filled with determination <3
Just a tip for all the beginners, I was messing around for 5 mins because I had the problem that I could activate the script but was still caught in the windows folder and could not access the game.

Therefore, for beginners:
Run the script (double click)
Press Ctrl+Alt+S to suspend for one hot second (or three, your choice)
Click the Undertale window
Unsuspend the Hotkey (Reactivates it and you can play)
Criggle 25 Jul 2021 @ 7:39am 
Could somebody explain to me how I'm meant to create this file, I really don't get it Im on windows just in case it only works on a specific software
Diposting pertama kali oleh (Edgy) Asriel Dreemurr:
Diposting pertama kali oleh Twisted_Code:
The instructions look fine to me. Are you sure you did everything as described?
1. Install AutoHotkey
2. Create the script file and save the code to it
3. Double-click the script file
Should be that simple unless something went wrong...

there's probably still a way you can catch it with one of the title modes, though I don't know for sure as I've never fought them (thanks for the spoiler tag by the way, though I already know a lot of the game spoilers thanks to the Internet... and in particular my own indulgent self-spoiling via the wiki)

even if you can't catch it by window title, try using the window handle or executable name
I have seen people have issues with AHK during that boss in particular so it might be something to look into.

Hey I used the Script And did the Instructions. It works yet I cannot click therefor I cannot Open The Undertale Window
Criggle 27 Jul 2021 @ 12:41pm 
Diposting pertama kali oleh YaBoiMarshYT:
Could somebody explain to me how I'm meant to create this file, I really don't get it Im on windows just in case it only works on a specific software
nvm
< >
Menampilkan 1-15 dari 35 komentar
Per halaman: 1530 50