Page 1 of 1
[v1.3.0+] Juggle Hotkeys on Unwield
Posted: Tue Jun 13, 2017 1:52 am
by Zizzo
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: Select all
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]
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Sat Jul 08, 2017 6:53 pm
by Zizzo
Zizzo wrote:Now, I haven't exhaustively tested this addon, […]
Eh heh…

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

). Simple enough to fix; that's going out as v1a. We Apologize for the Inconvenience.™
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Wed Jul 12, 2017 5:31 pm
by Steven Aus
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.
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Thu Jul 13, 2017 3:13 am
by Zizzo
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).
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Thu Jul 13, 2017 7:06 am
by Steven Aus
I do, but I'm not sure if I notice every time whether consumables are added to the hotbar.
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Thu Jul 13, 2017 8:30 am
by Steven Aus
It doesn't appear to add consumables to the hotbar when you get the first one of a certain type.
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Sat Jul 15, 2017 12:49 am
by Zizzo
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.

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.
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Fri Oct 25, 2019 12:03 am
by Zizzo
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…).
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Wed Nov 20, 2019 9:15 pm
by Lprsti99
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.
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Fri Oct 30, 2020 3:11 am
by Zizzo
v1d is mostly a compatibility release that cooperates with my new
Annotated Charm Hotkeys addon so that they don't fight each other while modifying hotkey icons. Also the usual localization support, and our game options are now under the new "[ZOmnibus]" tab on the Game Options dialog.
Re: [v1.3.0+] Juggle Hotkeys on Unwield
Posted: Mon Aug 30, 2021 11:59 pm
by Zizzo
As you may or may not know, you can assign a hotkey to an object by pressing the hotkey while the object is selected in an inventory dialog. Of course, if the object is in your inventory and needs to be wielded to use, it should get our not-wielded marker, which we weren't doing. That's fixed in v1e, just pushed out.
Of course, the way
I know about that particular hotkey-assigning method is from accidentally typing a hotkey while an inventory dialog is open and thereby clobbering one of my talent hotkeys.

Since I was already working in that general area, I decided to fix that too. v1e also adds a new game option "[ZOmnibus] | Confirm setting hotkeys from inventory dialog", which, if enabled, will prompt you to make sure you hit that hotkey intentionally.
