ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sat Dec 14, 2019 9:50 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Jun 13, 2017 1:52 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
As you may or may not know, hotkeys for activateable wielded objects don't go away when you unwield them; activating a hotkey for an unwielded object wields the object instead of activating it. Which can be deadly if you weren't expecting it. Hence my new Juggle Hotkeys on Unwield addon.

Originally I was just going to add a special marker to the hotkey icon for unwielded items, but then Steven Aus requested a way to have the icon be removed altogether, so I expanded the addon's purview a bit. Now we add a game option "UI | Hotkey handling on unwield", with values "Default", "Mark" or "Remove".

Now, I haven't exhaustively tested this addon, just made sure it works with my usual option settings; in particular, I'm not sure how it interacts with the "Always add objects to hotkeys" option (which I turned off). So I'm putting this out for further testing before likely eventual merging into ZOmnibus.

[edit 2017-07-15: Technical info]
Code:
Hooks:
  ToME:run [to surgically modify the hotkeys toolbar for our needs]
  ToME:runDone [to apply our settings on game load]
  GameOptions:generateList [to add our game options]
Superload:
  mod.class.Player:
    onWear() [to update hotkey marks]
    onTakeoff() [to update hotkey marks]
    onRemoveObject() [to update hotkey marks]

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


Last edited by Zizzo on Sun Jul 16, 2017 1:22 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Jul 08, 2017 6:53 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Zizzo wrote:
Now, I haven't exhaustively tested this addon, […]

Eh heh… :oops: So it turns out we weren't passing necessary artifact set handing information through our superloaded onWear() and onTakeoff(), which was breaking stuff in a lot of places (I tripped over it, for instance, trying to exit the level-up dialog while wielding a completed set of mindstars :shock: ). Simple enough to fix; that's going out as v1a. We Apologize for the Inconvenience.™

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


Top
 Profile  
 
PostPosted: Wed Jul 12, 2017 5:31 pm 
Offline
Wyrmic

Joined: Sat Dec 13, 2014 3:38 pm
Posts: 287
Can you also apply this to stacks of one-use scrolls and infusion patches (from Utility Supplies) when you run out of them? Not sure if you want them to automatically appear on the bar or not though when you get the first one of a certain stack.


Top
 Profile  
 
PostPosted: Thu Jul 13, 2017 3:13 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Steven Aus wrote:
Can you also apply this to stacks of one-use scrolls and infusion patches (from Utility Supplies) when you run out of them?

Ah, that's a slightly different angle: those are usable from inventory, which isn't something this addon addresses directly. [sound F/X: testing] So for instance, if you have "Hotkey handling on unwield" set to "Mark", then Summertide Phial's hotkey will be marked when you unwield it and go empty when you drop it. Similarly with f.i. the Rod of Spydric Poison if you hotkey it and then drop it.

What behavior do we want for this? It would probably be straightforward, for instance, to add another boolean option to remove an item's hotkey if it's dropped or destroyed (or consumed, in your case).

Steven Aus wrote:
Not sure if you want them to automatically appear on the bar or not though when you get the first one of a certain stack.

(shrug) I assume that would depend on whether you have the "Always add objects to hotkeys" option enabled (I don't, so I wouldn't know).

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


Top
 Profile  
 
PostPosted: Thu Jul 13, 2017 7:06 am 
Offline
Wyrmic

Joined: Sat Dec 13, 2014 3:38 pm
Posts: 287
I do, but I'm not sure if I notice every time whether consumables are added to the hotbar.


Top
 Profile  
 
PostPosted: Thu Jul 13, 2017 8:30 am 
Offline
Wyrmic

Joined: Sat Dec 13, 2014 3:38 pm
Posts: 287
It doesn't appear to add consumables to the hotbar when you get the first one of a certain type.


Top
 Profile  
 
PostPosted: Sat Jul 15, 2017 12:49 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Zizzo wrote:
It would probably be straightforward, for instance, to add another boolean option to remove an item's hotkey if it's dropped or destroyed (or consumed, in your case).

Well, that turned out not to be quite as straightforward as I'd hoped, but it wasn't too bad; v1b, just released, adds a boolean game option "UI | Remove hotkey on unwield", which does pretty much exactly what it sounds like it does. :wink: And I can confirm from testing that with this new option enabled, if you put a stack of scrolls or infusion patches on the hotkeys toolbar, the hotkey will be removed when you use up the last of the stack.

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


Top
 Profile  
 
PostPosted: Fri Oct 25, 2019 12:03 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
In addition to compatibiity changes for the merge into ZOmnibus/Lite v16, v1c is mostly internal structural changes. See, when I first wrote this addon, I didn't know that addons could superload engine components (in our case, engine.HotkeysIconsDisplay, which is used to draw the hotkeys toolbar). I learned that trick while writing Proper Possession and Possessor Tweaks, so now I'm busting it out here too. Should be no change in functionality (I hope…).

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


Top
 Profile  
 
PostPosted: Wed Nov 20, 2019 9:15 pm 
Offline
Yeek

Joined: Sun Jan 01, 2012 7:14 am
Posts: 12
Title makes me wish for a mod that juggled hotkeys on weapon swap. So for Temporal Warden, 1-5 could be shoot + arrow talents on one set, and the 4 blade talents plus, like, rush swap in when you hit q.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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