ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Dec 11, 2018 8:48 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 04, 2018 2:49 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1573
Location: A shallow water area south of Bree
If you use roguelike keybindings (perhaps installed via my handy addon, if you'll forgive the shameless plug :wink: ), you've no doubt experienced the "joy" of being surprised on the worldmap by say, the lumberjack quest chat dialog or the lost kitten chat dialog while moving southwest — which, in the roguelike keybindings, is bound to the 'b' key, which in both dialogs just happens to be associated with the "go away, don't bother me" option. :|

Having been tripped up by that once too often, I'm working on an addon to try to prevent it from happening. My current approach is to modify the chat dialog during creation so that none of its options are associated with any key bound to a movement action. (And I am actually walking the live keybindings instead of just hard-coding the usual roguelike keys, in case someone has their own custom keybindings that might similarly trip over a chat dialog — maybe an 'asdf'-based left-handed roguelike variant?)

Now, I'm not currently planning to modify all chat dialogs in this manner, just the ones that are likely to get sprung on the player while you're moving. Right now, that's the ones mentioned above, the lumberjack quest chat and the lost kitten chat; while I'm testing, I figured I'd solicit input to see if there are any other chat dialogs anyone thinks I should also give this treatment to (or whether people think I should just go ahead and unilaterally modify all chat dialogs [or, for that matter, whether people think I should be doing this some other way…]).

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Last edited by Zizzo on Sat Oct 06, 2018 8:06 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Oct 06, 2018 8:06 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1573
Location: A shallow water area south of Bree
Well, all the tests appear to work, so I'm releasing my new Roguelike Chat Guard addon. As promised (and since no one suggested anything else), we modify the lumberjack quest chat and the lost kitten chat. If you're an addon developer and you think one of your addon's chats would benefit from the same treatment, you can hook into this too; just add code roughly like the following to your ToME:load hook:
Code:
local Chat = require 'engine.dialogs.Chat'
if Chat.addChatForRoguelikeModify then
  Chat:addChatForRoguelikeModify('your-chat-name')
end


[Technical notes:]
Code:
Superload:
  engine.dialogs.Chat:
    generateList() [to modify the generated list]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Sat Oct 06, 2018 8:08 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1573
Location: A shallow water area south of Bree
Frequently Asked Questions:

How does this addon work?

This addon alters certain chat dialogs so that no key bound to any movement action is used as a hotkey for any opeion in the chat dialog. This ensures that if the chat dialog pops up while you are moving, your movement key will not be misinterpreted as selecting a chat option. The Steam page image shows an example of this.

Wait, who would have letter keys bound to movement actions?

Mostly this will be useful for people using the "roguelike" or "vi" keybindings on a laptop or other keyboard lacking a numeric keypad. (We don't assume those keybindings, though, in case you have your own custom arrangement.)

Which chats does this addon modify?

Currently, the following chat dialogs are modified:
  • The lumberjack quest chat.
  • The lost kitten chat.
Various chats defined by other addons may also be modified, at the addon's option; presumably this will be detailed in the addon's documentation.

Why only those chats?

In the author's experience, those two chats are the only ones that are likely to pop up unexpectedly while the player is moving. If there are other chats that you think could benefit from this modification, here would be a good place to suggest them for addition to a later version.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group