Saturday, June 7, 2014

Adding even more context to mouse commands

In a recent post I already blogged about the upcoming context menus for ADOM. Right now I am busy upgrading the context intelligence so that commands really are only offered if they can be executed. This might sound simpler than it actually is because some commands in ADOM check a dozen of preconditions and all that needs to be re-used in the context command selection algorithm. Which again sounds simpler than it is as ADOMs ancient codebase never was prepared for such things. But by the end of today it would be there for all commands. And there will be other side effects (that gamers probably expect but that cause headaches for programmers working on an ancient code base - like me ;-)...

What you really want is not just a list of commands to be executed but rather that the commands already work within the context at which they were clicked (e.g. when you right-klick on a goblin 10 steps away and select "Recall monster memory" you probably expect the monster memory for that specific goblin - not for any arbitrary goblin and definitely not being prompted to type in the monster for which you want to see details). Again this may sound trivial to programmers but I have to touch many lines of code in ADOM to enable this as ADOM never was prepared for mouse interaction.

The good news is: I have found a very good way to do this so that I am very optimistic about having this feature for all commands by the end of this day, too.

And finally while adding this it just occurred to me that the next release of ADOM also should have a double-left-click mode in order to activate the most heavily used attack mode (e.g. shoot a missile, cast a spell, use mind craft). Double right-clicking should offer a selection of one of these modes.

I hope this sounds like yet another useful modernization of the ADOM UI ;-) What do you think?

No I'm off to convince Jochen and Zeno that we need this immediately ;-)


  1. Oh my, that's a great feature! Even GrEaTeSt!

  2. Obligatory disclosure: as an old player of ADOM, perhaps I'm not the best source of advice about newbie-friendliness. Even more importantly, in order to comment about the context menu in a knowledgeable way, one needs to wait and try it out in the game.

    With that out of the way, I'll give you some thoughts your post has inspired.
    I do like the idea of a context-sensitive menu; I have some concerns, however, about tying UI improvements to the use of a mouse and of various types of clicks and double clicks (btw, would they work with touchpads?). For a game which provides the player both with a long playing time and with an extensive list of options to choose from, the use of the mouse is going to become tiring very soon and to bog down the player. My perspective about user interfaces is that the use of a mouse instead of a keyboard not always results in UI improvements, and pressing keys can be a faster and a better interface. The newbie-problem as far as ADOM interface is concerned is not the use of keys, which is frequent in many games (be they keys on a keyboard or on a joypad), the problem is that ADOM has an utterly humongous number of commands, and thus keys, to learn and remember.

    The point of these considerations is: a combination of context-sensitive menus *and* a few keys could make for an improved UI; the player should be able to bring up the menus, navigate and choose the menu items using the keyboard. An example of this kind of overhaul:
    - the arrows and numbers stay the same, to move the PC and melee monsters
    - an 'a'ction command launches a menu where you can choose to [t]hrow missiles, use [m]indcraft, and [c]ast a spell; the first entry of the menu should be selectable with just Enter, and what comes first would depend on the class of the character (a magic user would have "Cast a spell" as first choice, an archer "Throw a missile", etc.; if possible, the player should be able to use the mouse to drag the choices and put them in the order he wants)
    - the 'e'at command stays the same, because it's something you do often
    - a 'u'se command launches a menu with various options: read a [b]ook or a [s]croll, [z]ap a wand, [d]rink a potion, use a [t]ool
    - 'r' to repeat the last command
    - the use of tactics is so important and useful that I would leave as it is, with F1-F7 commands to set your tactic
    - an 'i'nfo command launches a menu to enter screens of information: show the [e]quipment, the stuff in the [b]ackpack, the [w]eapon skills, the [m]essage buffer, the [r]ecipes if the PC has the alchemy skill
    - using the arrows/numbers keys plus a modifier key such as Ctrl would bring up the menu with context-sensitive choices for all the other actions and interactions with the environment and the monsters. Some examples: Ctrl-5 (or Ctrl-. or right-clicking on the PC) gives a menu with choices to drop items, apply a skill, order your companions if they are around, pick items if there are items at your position, make an offer if you are on an altar or if you are near an altar and there is a monster on it, pay/haggle if you are in a shop and you have picked up some wares, activate a trap/lever and use a stairway if there is one at your position. If on your left there is a door, Ctrl-4 offers to open/close/kick the door, and to detect traps/pick locks if you have the skill. If on your left there is a monster, Ctrl-4 offers to chat, give an item, kick, pickpocket if you have the skill
    - actions and information that have to do with the player instead of the PC should reside in a menu bar: save/quit the game, online help, NotEye menu, show version, redraw screen, show and edit configurations variables, switch auto-pickup/dynamic display

  3. I agree with atomos that the biggest problem to learning adom is the number of key commands... however it would be more tedious to have to open up menus and press multiple keys for each thing. Rather it would be better to put the hotkeys next to the related command in the mouse menu, so that they would be easier to learn.