[v1.3.0+] Roguelike Keybindings

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[v1.3.0+] Roguelike Keybindings

#1 Post by Zizzo »

So I was reading a… *ahem* spirited discussion of the game, and it happened that some of the commenter's complaints were neatly solved by some of my own addons, :mrgreen: which inspired me to think I ought to write an addon for another of the commenter's complaints:
NomiFromDCSS wrote:No vikeys unless you manually map them and move all those shortcuts around.
I, of course, did that manual remapping myself lo these many years ago, but I can see the use of an addon that makes that process easier for new players.

Now, I'm pretty sure I've worked out how to do the actual modifications to the keybindings from an addon; there are a couple points, though, on which I'm seeking advice:
  • What's the right UI interface? At first I was thinking of a toggle button added to the keybindings dialog, but a game option might be less complicated. Either way, it would be the change from "off" to "on" or vice versa that would trigger the keybind modifications.
  • It's been so long that I no longer remember what the original keybindings for the movement keys were, or what other keybindings I had to change because they collided with the roguelike keys. :oops:
Last edited by Zizzo on Sun May 27, 2018 2:22 am, edited 1 time in total.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.3.0+] Roguelike Keybindings

#2 Post by Zizzo »

Okay, after grubbing around in all the keybinding-related data files, I think I've tracked down all the keys I need to change, so as promised, I present my new Roguelike Keybindings addon. I ultimately decided to go with a game option ("UI | Roguelike keybindings", unsurprisingly), as a button on the keybinding dialog would be too complex.

[Now, as noted in the option description, the actual "installed" vs. "uninstalled" state isn't really relevant; it's the act of actually changing the setting from "uninstalled" to "installed" that installes the new keybindings. We Apologize for the Inconvenience.™]

For reference, here's all the keybindings we touch:
  • Move left: h (RL) vs. Keypad4 (dflt)
  • Move right: l (RL) vs. Keypad6 (dflt)
  • Move up: k (RL) vs. Keypad8 (dflt)
  • Move down: j (RL) vs. Keypad2 (dflt)
  • Move diagonally left and up: y (RL) vs. Keypad7 (dflt)
  • Move diagonally right and up: u (RL) vs. Keypad9 (dflt)
  • Move diagonally left and down: b (RL) vs. Keypad1 (dflt)
  • Move diagonally right and down: n (RL) vs. Keypad3 (dflt)
  • Stay for a turn: Comma (RL) vs. Keypad5 (dflt)
  • Run left: Shift-h (RL) vs. Shift-Keypad4 (dflt)
  • Run right: Shift-l (RL) vs. Shift-Keypad6 (dflt)
  • Run up: Shift-k (RL) vs. Shift-Keypad8 (dflt)
  • Run down: Shift-j (RL) vs. Shift-Keypad2 (dflt)
  • Run diagonally left and up: Shift-y (RL) vs. Shift-Keypad7 (dflt)
  • Run diagonally right and up: Shift-u (RL) vs. Shift-Keypad9 (dflt)
  • Run diagonally left and down: Shift-b (RL) vs. Shift-Keypad1 (dflt)
  • Run diagonally right and down: Shift-n (RL) vs. Shift-Keypad3 (dflt)
  • Attack left: Ctrl-H (RL) vs. Ctrl-Keypad4 (dflt)
  • Attack right: Ctrl-L (RL) vs. Ctrl-Keypad6 (dflt)
  • Attack up: Ctrl-K (RL) vs. Ctrl-Keypad8 (dflt)
  • Attack down: Ctrl-J (RL) vs. Ctrl-Keypad2 (dflt)
  • Attack diagonally left and up: Ctrl-Y (RL) vs. Ctrl-Keypad7 (dflt)
  • Attack diagonally right and up: Ctrl-U (RL) vs. Ctrl-Keypad9 (dflt)
  • Attack diagonally left and down: Ctrl-B (RL) vs. Ctrl-Keypad1 (dflt)
  • Attack diagonally right and down: Ctrl-N (RL) vs. Ctrl-Keypad3 (dflt)
  • Show message log: Ctrl-M (RL) vs. h (dflt)
  • Show quests: Ctrl-Q (RL) vs. j (dflt)
  • Look around: x (RL) vs. l (dflt)
  • Use items: a (RL) vs. u (dflt)
  • Toggle movement mode: Shift-V (RL) vs. Shift-B (dflt)
  • Show Lua console: Alt-L (RL) vs. Ctrl-L (dflt)
  • Lock tooltip in place: Alt-Shift-L (RL) vs. Shift-L (dflt)
  • Lock tooltip in place while comparing items: Alt-Ctrl-Shift-L (RL) vs. Ctrl-Shift-L (dflt)
[Technical notes:]

Code: Select all

Hooks:
  GameOptions:generateList [to add our game option]
"Blessed are the yeeks, for they shall inherit Arda..."

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.3.0+] Roguelike Keybindings

#3 Post by Doctornull »

This mod saved me.

The new braindead auto-swap Temporal Warden was unplayable without a numpad, until I found this mod.

On behalf of all laptop players out there: thank you.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: [v1.3.0+] Roguelike Keybindings

#4 Post by Doctornull »

I just pulled ToME (via Steam) onto a new laptop, and this addon -- even though I'm subscribed -- didn't get installed nor auto-pulled.

zOmnibus *did* get auto-pulled.

This makes me think you need to do something to let Steam know that your stuff works with newer versions of the game, so it can auto-pull wonderful things like this addon.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.3.0+] Roguelike Keybindings

#5 Post by Zizzo »

Doctornull wrote:This makes me think you need to do something to let Steam know that your stuff works with newer versions of the game, so it can auto-pull wonderful things like this addon.
(shrug) Possibly, but I have no idea what that something might be.
"Blessed are the yeeks, for they shall inherit Arda..."

snj
Low Yeek
Posts: 5
Joined: Sun Dec 01, 2019 5:18 am

Re: [v1.3.0+] Roguelike Keybindings

#6 Post by snj »

Doctornull wrote:This mod saved me.

The new braindead auto-swap Temporal Warden was unplayable without a numpad, until I found this mod.

On behalf of all laptop players out there: thank you.
You know, you just reminded me why I bought this particular laptop: the numpad.

But, more to your second point, I don't use Steam, and none of zizzo's addons auto-update on any setting. It's something I've had to deal with recently and I thought I'd just mention it since it seems to be timely. I do want to say that I blame the addon updater itself instead of the addon dev for this clearly unintended behavior.

My wild guess about my problem is that tome may look for the file as indexed by filename to see if an addon has been updated. When a new file is created in an addon (to append the "version" number without eliminating the old versions), tome doesn't recognize that anything has changed because the old file still exists and is unchanged. Without native support for keeping old versions, I don't see what else zizzo could do other than have the file without version number be overwritten with the latest version of the addon, and then upload old versions with an appended version number. Then again, I don't know the guts of tome's systems in any detail, so it's just a wild guess.

That also doesn't really speak to the particular problem you're having with Steam. I guess it could be that the "profile" directory is saved to steam cloud, and that this is where the list of active addons is stored independently of the actual contents of the addons directory that is in the game directory proper. Steam could just being getting told to look at the addons list in the profile directory rather than the contents of the addons directory. So Steam knows that you're subscribed to an addon, and it sees the addons in the "active" list, and it just assumes the addon's downloaded and running. But then running tome should remove the not-installed addons from the list of active addons, which means Steam should go and get them... unless that info isn't getting to Steam cloud because tome is letting Steam manage workshop-listed addons. Maybe?

I dunno. I'm bored and talking out of my ass because I enjoy speculating aimlessly about peoples' software problems. You'd have to get Darkgod in to speak to the mechanical details.

Post Reply