Since I took part in
This discussion, and I had already made a script to play Hengband, I decided to take a second to modify it and voila, here I am.
Some of you probably don't know what GlovePIE is. And that's a big shame. Because you see, we can safely say DROD is a little bit obscure and underrated especially among the casual "
3 dims good, 2 dims bad"
people (the opposite of "
3 dims good, 2 dims better"
humans). Even though we know and love DROD, there are people who, without a second of thought, would say "
Logic games SUCK!"
or "
What the funk? No 3D? Dude, we are no longer in prehistoric you know?"
, but quite probably in less polite and more trollish way. That's because, you see, DROD is a wine tester, true sommelier, the best of its kind, and we are wine, in different states of "
growth"
. You don't have to be old to be ready for DROD, but you have to be good enough to like it (or rather be liked by it).
GlovePIE is quite similar. It's also quite underrated and not too popular, even though it works magic just like DROD does but in a different way.
You see, GlovePIE is a program, which, through scripting or simple gui, allows you to emulate ALL kinds of input AND output - starting from keyboards, mouses and joypads, going through stuff like wiimote and finishing on VRGloves and other similar funky stuff.
That would be it as for the introductory speech
.
Originally I created this script to play one 7DRL, because I have a notebook, didn't have numpad then (but I bought one already) and playing on the function Numpad was literally bleh
.
That is why I downloaded GlovePIE and wrote a script. After that I evolved it into more advanced script for Hengband, and just a few minuts ago I turned it into DROD script.
It is by no means perfect, unfortunately, but I bet you want to try it already, eh? Ok. First of all you have to get the
GlovePIE.
Once you unzip it somewhere you like, open the program and copy the code into it.
For 8 Buttoned pads - 1-4 front buttons, 5-8 shoulders:
Click here to view the secret text
×
/*
I am assuming you are using 8 button Pad, with shoulderpads being numbered 5-8,
with left shoulders 5 and 7 and right shoulders 6 and 8.
If you don't, ask on DROD topic so I can prepare you an alternate version, or
DIY if you want to.
CONTROLS:
First you select direction with D-Pad, and then use Button 1 or 2 to move.
Button 1 works just like regular keyboard would. When you hold 1 it is as if
you hold respective button on the keyboard.
Button 2, however, is the "instant run" button. When you hold it you immediately
'run' and can run all over the place. It's fun to run away from/around serpents.
Button 4 is Undo.
Buttons 5, 7 are Rotation CCW
Buttons 6, 8 are Rotation CW
This setup assumes you have default keyboard controls set - Numpad, Q W and Backspace
*/
if not var.INIT{
var.CURDIR=5
var.NEWDIR=0
var.HELD=false
var.RELEASED=true
var.BUTT=1
var.INIT=true
var.BREAKFIVE=false
}
if Joystick.pov1up && Joystick.pov1left{
var.NEWDIR=7
}elseif Joystick.pov1up && Joystick.pov1right{
var.NEWDIR=9
}elseif Joystick.pov1down && Joystick.pov1right{
var.NEWDIR=3
}elseif Joystick.pov1down && Joystick.pov1left{
var.NEWDIR=1
}elseif Joystick.pov1right{
var.NEWDIR=6
}elseif Joystick.pov1down{
var.NEWDIR=2
}elseif Joystick.pov1left{
var.NEWDIR=4
}elseif Joystick.pov1up{
var.NEWDIR=8
}else{
var.NEWDIR=5
}
if Joystick.Button5 or Joystick.Button7{
Keyboard.Q=1
} else {
Keyboard.Q=0
}
if Joystick.Button6 or Joystick.Button8{
Keyboard.W=1
} else {
Keyboard.W=0
}
if Joystick.Button4{
Keyboard.BackSpace=1
} else {
Keyboard.BackSpace=0
}
if var.CURDIR!=var.NEWDIR{
if var.HELD and var.BUTT==2{
if var.CURDIR==1{
Keyboard.NUMPAD1=0
} else if var.CURDIR==2{
Keyboard.NUMPAD2=0
} else if var.CURDIR==3{
Keyboard.NUMPAD3=0
}else if var.CURDIR==4{
Keyboard.NUMPAD4=0
}else if var.CURDIR==5{
Keyboard.NUMPAD5=0
}else if var.CURDIR==6{
Keyboard.NUMPAD6=0
}else if var.CURDIR==7{
Keyboard.NUMPAD7=0
}else if var.CURDIR==8{
Keyboard.NUMPAD8=0
}else if var.CURDIR==9{
Keyboard.NUMPAD9=0
}
var.BREAKFIVE=true
var.CURDIR=var.NEWDIR
} else {
var.CURDIR=var.NEWDIR
var.HELD=false
var.RELEASED=false
}
}
if Joystick.Button1==1 xor Joystick.Button2==1{
if Joystick.Button1==1 then var.BUTT=1
if Joystick.Button2==1 then var.BUTT=2
if var.RELEASED{
var.HELD=true
}
} else {
var.HELD=false
var.RELEASED=true
var.BREAKFIVE=false
}
if var.HELD{
if var.CURDIR==1{
if var.BUTT==1{
Keyboard.NUMPAD1=1
} elseif var.BUTT==2
if Keyboard.NUMPAD1==1{
Keyboard.NUMPAD1=0
} else {
Keyboard.NUMPAD1=1
}
}
} else {
Keyboard.NUMPAD1=0
}
//-----------------------------
if var.CURDIR==2{
if var.BUTT==1{
Keyboard.NUMPAD2=1
} elseif var.BUTT==2
if Keyboard.NUMPAD2==1{
Keyboard.NUMPAD2=0
} else {
Keyboard.NUMPAD2=1
}
}
} else {
Keyboard.NUMPAD2=0
}
//-----------------------------
if var.CURDIR==3{
if var.BUTT==1{
Keyboard.NUMPAD3=1
} elseif var.BUTT==2
if Keyboard.NUMPAD3==1{
Keyboard.NUMPAD3=0
} else {
Keyboard.NUMPAD3=1
}
}
} else {
Keyboard.NUMPAD3=0
}
//-----------------------------
if var.CURDIR==4{
if var.BUTT==1{
Keyboard.NUMPAD4=1
} elseif var.BUTT==2
if Keyboard.NUMPAD4==1{
Keyboard.NUMPAD4=0
} else {
Keyboard.NUMPAD4=1
}
}
} else {
Keyboard.NUMPAD4=0
}
//-----------------------------
if var.CURDIR==5{
if var.BUTT==1{
Keyboard.NUMPAD5=1
} elseif var.BUTT==2
if Keyboard.NUMPAD5==1{
Keyboard.NUMPAD5=0
} elseif var.BREAKFIVE==false{
Keyboard.NUMPAD5=1
}
}
} else {
Keyboard.NUMPAD5=0
}
//-----------------------------
if var.CURDIR==6{
if var.BUTT==1{
Keyboard.NUMPAD6=1
} elseif var.BUTT==2
if Keyboard.NUMPAD6==1{
Keyboard.NUMPAD6=0
} else {
Keyboard.NUMPAD6=1
}
}
} else {
Keyboard.NUMPAD6=0
}
//-----------------------------
if var.CURDIR==7{
if var.BUTT==1{
Keyboard.NUMPAD7=1
} elseif var.BUTT==2
if Keyboard.NUMPAD7==1{
Keyboard.NUMPAD7=0
} else {
Keyboard.NUMPAD7=1
}
}
} else {
Keyboard.NUMPAD7=0
}
//-----------------------------
if var.CURDIR==8{
if var.BUTT==1{
Keyboard.NUMPAD8=1
} elseif var.BUTT==2
if Keyboard.NUMPAD8==1{
Keyboard.NUMPAD8=0
} else {
Keyboard.NUMPAD8=1
}
}
} else {
Keyboard.NUMPAD8=0
}
//-----------------------------
if var.CURDIR==9{
if var.BUTT==1{
Keyboard.NUMPAD9=1
} elseif var.BUTT==2
if Keyboard.NUMPAD9==1{
Keyboard.NUMPAD9=0
} else {
Keyboard.NUMPAD9=1
}
}
} else {
Keyboard.NUMPAD9=0
}
//-----------------------------g
} else {
Keyboard.NUMPAD1=0
Keyboard.NUMPAD2=0
Keyboard.NUMPAD3=0
Keyboard.NUMPAD4=0
Keyboard.NUMPAD5=0
Keyboard.NUMPAD6=0
Keyboard.NUMPAD7=0
Keyboard.NUMPAD8=0;
Keyboard.NUMPAD9=0
}
Plug your favorite joypad, wait a couple of seconds for your OS to notice it, hit Play, open DROD and Play!
It works for me, but might take some time to get used to
. If you have any suggestions/feedback, then bring it on!
____________________________
My website