[Guide] How to remap keys in Beelzebub

Diablo 1 HD, codename Belzebub - General forum.
Post Reply
aleeque
Posts: 27
Joined: 07 Mar, 2016 19:31

[Guide] How to remap keys in Beelzebub

Post by aleeque »

I was watching videos on Youtube of people playing the mod and noticed that many are manually selecting spells/skills by clicking because the F1...F8 buttons are hard to reach. Or, people clicking the inventory button instead of using the "I" hotkey for the same reason.

Well, there actually is a way to remap those keys conveniently, and it only takes a few minutes to set up. I'll now describe how to do so:

1) Google and download a program called "autohotkey". Install it.
2) After installing, right-click on your desktop and refresh it.
3) Right-click on your desktop again, then select New -> Autohotkey script.
4) Copy and paste the following code:

Code: Select all

#NoEnv  ;Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ;Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ;Ensures a consistent starting directory.

#IfWinActive, ahk_exe Belzebub.exe 

Now look at the last line. What it does is that the script ONLY runs when Diablo is active. That is, if you alt-tab out of the game, the script automatically pauses! So you don't have to do any manual actions - ever - once you've set it up. It's all completely automated.


5) Now, let's add some code that actually remaps a key. Let's say we want to change the inventory button from "I" to "B" (just an example). Add this line of code to the script:

Code: Select all

b::i
What this means is that the "B" button becomes the same as "I". Note that the "I" button STILL has the same functionality as before, i.e. you now have two buttons on your keyboard that summon the inventory window! However, if you add this line...

Code: Select all

i::b
...the "I" button now has the same functionality as "B" does. You remember that by default, "B" brings up the spellbook window. So after executing the script, your inventory and spellbook hotkeys have switched places.

6) Let's look at some more examples:

Code: Select all

y::w
w::F2
What does this do? Well, the first line of code makes the "Y" button do a weapon swap. The second line of code binds "W" to a spell hotkey ("F2" in this case). Another example:

Code: Select all

r::F4
F4::g
This binds "R" to a spell hotkey ("F4" in this case) and then binds "F4" to mod settings.


7) After you've configured the script, save it with a relevant name (such as diablo.ahk or whatever) and double-click it. This will automatically start Autohotkey.


P.S. if the mods find this guide useful, could it maybe get sticky'ed?
un86Rn
Posts: 44
Joined: 02 Sep, 2016 9:29

Post by un86Rn »

Confirmed, please sticky this and perhaps even add as a code update suggestion; I think it's extremely important to map the keys to the usual qweasd etc buttons, and all the other programs I've used screw up the keyboard in other apps and require a restart; very frustrating.

Also I would advise to implement a Cast call and not a Select call: i.e. Selecting teleport will make it available for casting, but Casting a teleport will leave the currently selected skill but cast a teleport with the mouse pointer value given.

So instead of switching to Golem or Teleport one can make one click and they are instantly cast. This will greatly improve the user interface and allow way better character performance. This would be useful for quite an array of skills.
Again, using the Select method, you have to first select Insanity and then cast it; using the Cast method you just punch the key and cast it straight away. Less micro needed, less frustration, more efficiency.
User avatar
andronnik
Posts: 241
Joined: 10 Mar, 2014 21:33
Location: Germany

Post by andronnik »

wow. I didn't try this program yet, but it seems to be very useful!

Especially if you are playing from an HP-Notebook, since most of their notebook have the problem that the F-keys (F1-F12) will get activated only in combination with the "Fn" key. If you just press F1-F12, without "Fn", then you could control the screen brightness, or volume or other functions. It was disturbing to always need to press 2 keys simultaneously to use the spells... But now i got an ACER and luckily it doesn't have this problem! :)
uRa!
un86Rn
Posts: 44
Joined: 02 Sep, 2016 9:29

Post by un86Rn »

I wish there was a graphic indicator of Golem's health level below his icon. That would really ease up some specific fights.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests