Page 1 of 4

[v1.0.4-1.0.5] Enhanced Object Compare

Posted: Sun Nov 03, 2013 10:44 pm
by Zizzo
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: Select all

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]

Re: [v1.0.4] Enhanced Object Compare

Posted: Sun Nov 03, 2013 11:30 pm
by HousePet
Shields can potentially be worn in other slots.
Perhaps scan all equipped slots for matching base item types instead of hardcoding slot checks?

Re: [v1.0.4] Enhanced Object Compare

Posted: Mon Nov 04, 2013 1:23 am
by Zizzo
HousePet wrote:Shields can potentially be worn in other slots.
Perhaps scan all equipped slots for matching base item types instead of hardcoding slot checks?
[sound F/X: source diving] Ah, no worries, it already does the right thing by accident. See, it's not hardcoding by object type, but by what equipment slots the object says it can be wielded in --- and if you have the Stone Warden's Stoneshield talent, shields report themselves as being wieldable in both mainhand and offhand, just like Corrupted Strength works with one-handed weapons, so it works out with the same cycle.

I did discover in testing, though, that floor object tooltips weren't updaing properly when tapping <shift>. That's fixed now in v1a, along with a couple text tweaks: if there's more than one candidate object to compare with, we add e.g. "(1 of 2)" to the note at the top about which object we're comparing against, and also a "Press <shift> to cycle through choices" note at the bottom.

Re: [v1.0.4] Enhanced Object Compare

Posted: Wed Nov 13, 2013 6:02 am
by Zizzo
Migrating to v1.0.5, and we're now merged into ZOmnibus.

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Fri Nov 22, 2013 1:46 am
by Zizzo
Pushing out v1c with a small bugfix: I wasn't properly sanitizing the inputs to Object:getDesc(), so it would crash in some case. We Apologize for the Error.(TM)

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Wed Dec 25, 2013 2:50 am
by Zizzo

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Tue Jan 21, 2014 2:53 am
by rod
Any chance this could be extended to allow <shift>'ing through alchemist golem's gear as well?

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Sun Feb 02, 2014 3:51 am
by Zizzo
rod wrote:Any chance this could be extended to allow <shift>'ing through alchemist golem's gear as well?
[slaps forehead] An obvious improvement, one that I should have thought of. That's now out as v2 (still not yet on Steam, annoyingly... :evil: )

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Sun Jun 22, 2014 1:02 am
by Zizzo
Pushing out v2a, with a bugfix that was clobbering Alchemists' Interact with Golem talent.

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Mon Jul 14, 2014 7:26 am
by FalconGrey
Found a nasty Duplication Bug that I thought originally was in the ToME scripting.

http://forums.te4.org/viewtopic.php?f=42&t=41889

Somehow it is screwing up the interactions with the Golem when equipping armor and weapons.

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Thu Jul 17, 2014 2:39 am
by Zizzo
FalconGrey wrote:Found a nasty Duplication Bug that I thought originally was in the ToME scripting.

http://forums.te4.org/viewtopic.php?f=42&t=41889

Somehow it is screwing up the interactions with the Golem when equipping armor and weapons.
That may be a side effect of another bug I fixed recently. I gather from your other posts that you're playing via Steam; I've made yet another attempt at updating ZOmnibus on Steam, with little success.

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Thu Jul 17, 2014 7:55 pm
by Zizzo
Zizzo wrote:That may be a side effect of another bug I fixed recently. I gather from your other posts that you're playing via Steam; I've made yet another attempt at updating ZOmnibus on Steam, with little success.
With Marson's much appreciated help, I've finally managed to push to Steam updated versions of Enhanced Object Compare and ZOmnibus with the bugfix I mentioned above. Let me know if this fixes the problem.

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Wed Nov 05, 2014 4:00 am
by Zizzo
Pushing out v2b with a bugfix to keybinding installation that may affect you if you use the Precognition talent.

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Mon Feb 02, 2015 1:09 am
by Zizzo
Just to tease you with a preview, :wink: I'm working on modifications to this addon that will allow you to use <control> to compare runes and infusions in your inventory or a store's inventory with corresponding inscriptions already inscribed on your body. Here's a screengrab of what I've got so far, to give you an idea where I'm going with this:
inscription-compare.png
inscription-compare.png (123.58 KiB) Viewed 61170 times
Now, this will probably take a while, as this part of the code appears to be particularly convoluted, so I figured I'd take the opportunity to get some feedback on what sort of stuff people would like to see here.

Re: [v1.0.4-1.0.5] Enhanced Object Compare

Posted: Fri Feb 06, 2015 2:28 am
by Zizzo
Zizzo wrote:Just to tease you with a preview, :wink: I'm working on modifications to this addon that will allow you to use <control> to compare runes and infusions in your inventory or a store's inventory with corresponding inscriptions already inscribed on your body.
Keeping my fingers crossed that I found all the bugs, because it just went out as v3. I also took the opportunity to fix <shift>-cycling in store dialogs.