Grid Sage Forums

Cogmind => General Discussion => Topic started by: Shadowfury333 on September 16, 2017, 08:53:23 PM

Title: WASD movement in Cogmind
Post by: Shadowfury333 on September 16, 2017, 08:53:23 PM
I posted this on Reddit, but I figure I'd post here as well to get more feedback and testing.

I've been experimenting with AutoHotKey to use WASD (with chorded diagonals, so W+A moves northwest, S+D moves southeast, etc.) in several Roguelikes, including Cogmind. The code and compiled AHK script with example keybinds is on Github (https://github.com/dvr333/8-way-Roguelike-WASD/releases). Just put the commands.cfg in the appropriate folder with custom keybinds set up, run the AHK script, and it should work.

The only caveats are:

As for the rebinds, short version (anything not listed is unchanged):

    wasd - Movement/menu manipulation. Basically replaces numpad keys
    x - wait
    q - pick up item
    e - pick up and attach item
    c - look mode
    f - fire
    r - status
    z - item info (item under cursor (look mode)/player (otherwise))
    v - order ally
    Shift+Alt+1-4 - Coverage/Energy/Integrity/Matter modes
    Shift+Alt+g - Go naked
    Shift+Alt+f - Show volley range
    Shift+Alt+z - Intel toggle mode
    Shift+Alt+v - check ally orders
    Ctrl+PageUp/PageDown/End - Log manipulation (PageUp/PageDown/Home/End are used internally for diagonals)

Also, in case anyone is worried about accidental movement (it does use chorded diagonals, so s+d is southeast, for example. Meaning s -> s+d would be south -> southeast if not handled properly), there's a 67ms buffer where the script checks for a second key, so even sloppily going from one key to two keys will get the intended diagonal, though pianoing from one key to the next (i.e. releasing in between) will perform two cardinal movements. Going from chord to single key does seem to quickly shift from diagonal to cardinal, and I'm going to be testing that further to see if I can make sure release buffering works like press buffering can shift quickly from diagonal to cardinal, but it follows the same buffering rules as sloppily pressing two keys, so the issues should be rare. If issues come up, increase the amount of buffer frames in the ini file.