The "Press <control> to compare" functionality in tooltips and the various equipment/inventory dialogs is nice, but it does have some annoyances, like comparing a ring to the wrong worn ring, or having to step out of the archery shop to swap your bow and arrows back out of the second weapon set so you can compare them to stuff in the store. Well, I think I've finally figured out the right spot to hijack it and the right UI to handle it, so I give you my new
Enhanced Object Compare addon.
Here's what the addon does:
- Tells you at the top of the tooltip or text zone specifically what you're currently comparing against.
- While you're holding down <control>, tapping <shift> will cycle through all the appropriate equipment slots.
Now, the cycle order is as follows:
- For most weapons, it goes main hand, psionic focus, second weapon set main hand, second weapon set psionic focus.
- For weapons that can be wielded in the off hand (daggers, or one-handed weapons for dual wielders), that changes to main hand, off hand, psionic focus, second weapon set main hand, second weapon set off hand, second weapon set psionc focus.
- For things like shields that can only be wielded in the off hand, and for ammo in the quiver slot, it just cycles between main slot and second weapon slot.
- Rings cycle between your worn rings.
- Everything else only has one candidate slot anyway.
Note that it won't try to skip comparisons that don't make sense, like comparing a sword to a bow, on the premise that if you meant to compare that sword to a sword in another slot, you can just cycle to it.
I'm gonna float this out in the wild for more testing before merging it into ZOmnibus; had some weird bugs in there for a while (like it trying to compare a shield to a sword), and I want to make sure I've got all those shaken out.
[edit 2013-11-13 1:03am: I keep forgetting the
Technical info that
Darkgod asked for:]
Code:
Hooks:
ToME:runDone [to add our <shift> and <ctrl> hooks]
Superload:
mod.class.Object:
getDesc() [to hijack the <ctrl> comparison]
mod.dialogs.ShowEquipInven:
init() [to add our <shift> and <ctrl> hooks]
mod.dialogs.ShowInventory:
init() [to add our <shift> and <ctrl> hooks]
mod.dialogs.ShowPickupFloor:
init() [to add our <shift> and <ctrl> hooks]
mod.dialogs.ShowStore:
init() [to add our <shift> and <ctrl> hooks]