Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Vi Keys Keybind  (Read 4597 times)

Podesta

  • Bay Watcher
    • View Profile
Vi Keys Keybind
« on: June 06, 2015, 04:39:13 pm »



For quite sometime now I'm stuck with an old laptop, and as such, most of my gaming have consisted of roguelikes. In the past I have never payed too much attention to the Adventure mode, but after playing essentially roguelikes for almost a year, I decided to check out the roguelike aspect of one of my favorite games. Much to my disappointment though there are no pre-configured keys for people either on the laptop, or that simply learned/love/prefer to use the vi keys while playing roguelikes, which is ok, but I was quite surprised that absolutely nobody have changed the controls for the vi keys, or at least, not shared.

So, I've decided to take matters into my own hands, and edit the commands for those of us that want to play Dwarf Fortress Adventure Mode with the vi keys. For those not familiar the control scheme changes the movement from the numpad keys/Arrow keys to 'yuhjklbn', looking something like that:

  y  k  u     7  8  9
   \ | /        \ | /
  h-  -l      4- 5 -6
   / | \        / | \
  b  j  n     1  2  3
 vi-keys    numpad

All the keybinds are defined in the file interface.txt located inside the folder DwarFortress/data/init. In this file it is defined what every single keystroke does, in absolutely every single screen of the game, which is extremely powerful and awesome, I mean, you can change anything, really, anything. But it can also be a bit intimidating, because you find yourself in a text file with over 3000 lines, and all you wanted to do is change what a few keys do in the game. Luckily, in the Adventure mode itself there are only 133 possibilities of actions that can be performed with the keyboard. My idea is to make this change in a collaborative way, so if anyone is interested to play DF adventure as they are used with other roguelikes in the future, they won't need to change the keys again.

Initially, the keys that must be changed are the ones related to the movement, 'yuhjklbn', so the first thing, is to identify what these keys currently do in the game, and if any of those actions would conflict with movement. It is very likely that while assigning those keys to new values new conflicts will arise that will need to be addressed. For example, a good replacement for the Look [l] action is the key [ x], common in roguelikes for look/inspect, but that is already assigned to open the Action window, so it would also need to be reassigned. Anyways, I would really like to hear suggestions for good replacements from you guys that also like to play roguelikes with the vi keys so we can finally have that going.
 
Green: Action does not conflict with movement
Yellow: Action might conflict with movement, but not necessarily. Shift + movement is walk to tile + go up, but on my tests it didn't work with arrow keys.
Red: Action conflict with movement and need a new key assigned.

  • y: Status: customize / Attack: confirm (Alt + y) / Attack: charge / Yield
  • u: Attack: quick / Building Interact / Logs: layers
  • h: Status: health / Hold and Climb / Travel: hide instructions
  • j: Jump
  • k: Status: kills / Display Trakcs (Capital K) / Freshest Track (Alt + k) / Talk
  • l: Look / Search (Capital L) / Log: toggle line
  • b: Action: butcher / Log: bestiary
  • n: No action
« Last Edit: June 07, 2015, 10:43:48 am by Podesta »
Logged

Podesta

  • Bay Watcher
    • View Profile
Re: Vi Keys Keybind
« Reply #1 on: June 06, 2015, 10:59:13 pm »

Ok, so I've uploaded the version 0.1 to the Dwarf Fortress File Depot. There are still two or three annoyances that I will change later today or tomorrow, but first I want to play a bit :D. I'm still very much accepting suggestions for changing the keys.

Download
How to install: Replace the downloaded file 'interface.txt' with the file of same name that is located in the 'Game Folder/data/init'

Version 0.1 Changelog
Spoiler (click to show/hide)
« Last Edit: June 06, 2015, 11:02:12 pm by Podesta »
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Vi Keys Keybind
« Reply #2 on: June 07, 2015, 03:03:28 am »

Interesting, though I think technically it would belong over here: http://www.bay12forums.com/smf/index.php?board=13.0

I use a pretty heavily switched around layout myself, v to look around, g to grab stuff, b to drop stuff, numpad for movement arrows, numpad five is enter/confirm attack, num zero does z-minus/page down, numpad plus z-positive/page up, etc, but it just makes sense for me since I use mousekeys instead of a my trackball most of the time.
Logged

Podesta

  • Bay Watcher
    • View Profile
Re: Vi Keys Keybind
« Reply #3 on: June 07, 2015, 08:29:59 am »

Thanks Max, I'll be moving it over there, along with the updated version.

And yeah, it's all about muscle memory, and that's why I was a bit more surprised that nobody shared anything with the vi scheme, because it's really hard for me to play roguelikes otherwise, even with the numpad.
Logged