Script for navigating parser games using the number pad

Hi everyone.
For many years I’ve wondered if it’d be possible to enter in directions in parser games by using the number pad as a compass rose or d-pad.
When I used to play discworld MUD, another player incorporated my idea into a set of scripts to assist blind players. For me it was a tremendous help for visualising the game world as I obviously can’t use mapping tools.
I couldn’t find a similar system for parser based IF, so I decided to create one myself.

I haven’t uploaded it anywhere yet as it’s extremely rough and I’ve only tested it on my PC, but here’s a brief description of what I’ve done so far.
It’s written as an AHK script and is currently set up to work with Windows frotz, Windows Glulxe and HTML Tads (the main interpreters I use.)
With the game window active and NumLock turned on, you can use the Number pad as a d-pad. All 8 compass directions have been implemented, e.g. 8 for north, 6 for east, 2 for South, 4 for west, etc. I have also assigned up and down to NumPad Minus and NumPad Plus, respectively.
Currently the script will press enter after typing in a direction. I could also set it up to just type in directions if you need to combine multiple directions into one command.
if anyone would like to test or work with me on improving it, feel free to contact me.

All the Best,
Kara

8 Likes

Oh, that’s a very clever idea. Nice! AHK is a great tool for that kind of thing.

1 Like

Thanks Josh.

Yes, AHK is perfect for this, and it seems fairly easy for me to grasp considering I’m not much of a programmer. I also like that you can compile scripts into executable files.

1 Like

Wouldn’t minus for up and plus for down make more sense? Not semantically of course, but the minus key is above the plus key. :confused:

1 Like

Around 1987 I had the DOS version of Planetfall. The interpreter needed the ANSI.SYS driver loaded for screen effects anyway, so I added to the AUTOEXEC.BAT on that floppy some ANSI commands for redefining the arrow keys in just this way–except Insert/0 was U, and Delete/. was D. I also made the 5 do Z.
I hadn’t thought about that in a long time.

2 Likes

Oops, I didn’t proofread my original post enough. The script works exactly like you said.

2 Likes

Adventuron games also let you use Shift + arrow keys for navigation. Not for diagonal directions though.

1 Like

Beyond Zork (1987) had support for numeric keypad navigation on some systems, but it seems the idea didn’t catch on.

EDIT: Interestingly, it used 5 for both UP and DOWN, but if you were in a location with exits in both those directions or neither, it would offer the kind-of useless WALK AROUND instead.

Very cool! I would also suggest 5 for in and 0 for out.

1 Like

I did thus recently for Quest 5.8. It involves capturing keycodes. http://textadventures.co.uk/forum/samples/topic/nflpws1hekyls5q-evjkoq/key-macros

I implemented this system, along with @bikibird’s 5/0 suggestion, in my ECTOComp game. :slight_smile:

What do you think about having CMD/CTRL-Z issue an UNDO command?

1 Like

This is built in to Quest 6.

I used 5 for LOOK, and . for WAIT.

Wouldn’t minus for up and plus for down make more sense? Not semantically of course, but the minus key is above the plus key.

Is this the general consensus? I did it the other way around, as + makes more sense for up, but it is early days for Quest 6, and I can change it to conform to the standard.

How about / and * for IN and OUT (which I have not done)?

1 Like

I’ve decided that I’d like to release this script to the public, but I’m not sure how to go about it. I assume I’d be best sticking it up on the if-archive and linking to it from somewhere?
I just wrote it mainly for my own use and thought that other people may find it as useful, so any suggestions are welcome.
Many thanks in advance.

I haven’t forgotten about this thing. What with one thing and another I haven’t been in much of a coding mood, but I felt inspired yesterday and added a few things and fixed a couple of problems with it that were bugging me, and cobbled together a Readme.
I feel like I’m pretty much ready to release it, but first I’d like some of you to test it, because there’s bound to be something I’ve missed or could do better.
If you’d like to give it a try, please pm me.
Unfortunately it’s Windows only as it’s written in AutoHotkey.
Thanks in advance.