Key bindings?

May 7, 2014, 4:23 pm
#1
giant mushroom


Joined: May 7, 2014
Posts: 2
How do I modify the key bindings in IVAN? I'm on a laptop and don't have a number pad, and would love to use NetHack keys... But I can't find a config file, or any options to change it.
May 7, 2014, 5:05 pm
#2
Joined: Feb 20, 2012
Posts: 231
The ivan.cfg file (also accessible from option 3 on the main menu or the '\' key in-game) has an "Alternate Direction Keys" option, that binds the movement keys to the 8 keys surrounding the letter 'i' (7,8,9,u,o,j,k,l). It will rebind any command that uses one of those keys appropriately.

Alternatively, you could directly remap the movement keys in the game.cpp source file, but you'd need to recompile the game afterwards, which IMO is more of a hassle than just getting used to the preset keys.
May 7, 2014, 6:21 pm
#3
giant mushroom


Joined: May 7, 2014
Posts: 2
That is rather unfortunate. There is no active codebase for IVAN is there? I suppose if I'm going to go through that kind of trouble I could just put in a keybinding option...
May 7, 2014, 7:01 pm
#4
Joined: Dec 11, 2008
Posts: 1,770
May 8, 2014, 12:07 pm
#5
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,134
Does anyone have a spec for what the key bindings should be? Like a map from IVAN to NetHack?
May 8, 2014, 2:07 pm
#6
Joined: Apr 2, 2014
Location: North Tyris
Posts: 615
I must say that I find the alternate key binding to be very comfortable. Especially in comparsion to e.g. 123456789 direction keys, as I also play on a laptop with no number pad.
May 8, 2014, 2:23 pm
#7
Joined: Feb 20, 2012
Posts: 231
red_kangaroo wrote
I must say that I find the alternate key binding to be very comfortable. Especially in comparsion to e.g. 123456789 direction keys, as I also play on a laptop with no number pad.

I'm quite fond of them as well. This way I don't have to move my hands to press any of the keys on the right side of the keyboard.

Warheck, I believe it's hjkl for horizontal/vertical movement, and yubn for diagonal movement. So for IVAN you'd want the following:

Game.cpp
cint game::MoveAbnormalCommandKey[] = { 'y','k','u','h','l','b','j','n','.' };
May 8, 2014, 2:51 pm
#8
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,134
Could probably add a NetHack option to ivanconfig. At the moment it's a true/false question which is susequently and succinctly handled by game::GetMoveCommandKey() in game.cpp

We could get the user to scroll through a list of pre-cooked key bindings (NetHack, alternative...).
The other way would be to make it so the player can change their preferences for what keys they want to use. Offers a lot more flexibility, but a good way to break the game unless a function is created that checks the validity of the key binding options at the time of selection.
May 9, 2014, 8:13 pm
#9
Joined: Feb 20, 2012
Posts: 231
Warheck wrote
We could get the user to scroll through a list of pre-cooked key bindings (NetHack, alternative...).

I added a NetHack keymap that works this way (you can toggle between Normal, Alternative, and NetHack). I considered trying to port over the custom binding options from k8IVAN, but that could get messy, and honestly, who wants to remap that many commands? The movement controls seem to be the only things people have preferences for anyways (I've never seen anyone say "I wish the vomit key was 'm' instead of 'V'").
May 10, 2014, 3:25 am
#10
Joined: Apr 2, 2014
Location: North Tyris
Posts: 615
Pent wrote
(I've never seen anyone say "I wish the vomit key was 'm' instead of 'V'").

I wish (D)rink was (q)uaff instead. (Seriously, I have dropped healing liquid several times when it could have killed me.)
May 10, 2014, 8:37 am
#11
Joined: Feb 20, 2012
Posts: 231
red_kangaroo wrote
I wish (D)rink was (q)uaff instead. (Seriously, I have dropped healing liquid several times when it could have killed me.)

But if you used 'q' to drink then it would be even more disastrous when you accidentally hit capslock/shift.
Jump to