[v1.0.4-1.0.5] Enhanced Object Compare

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[v1.0.4-1.0.5] Enhanced Object Compare

#1 Post 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]
Last edited by Zizzo on Wed Nov 13, 2013 6:03 am, edited 1 time in total.
"Blessed are the yeeks, for they shall inherit Arda..."

HousePet
Perspiring Physicist
Posts: 6166
Joined: Sun Sep 09, 2012 7:43 am

Re: [v1.0.4] Enhanced Object Compare

#2 Post 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?
My feedback meter decays into coding. Give me feedback and I make mods.

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.0.4] Enhanced Object Compare

#3 Post 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.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.0.4] Enhanced Object Compare

#4 Post by Zizzo »

Migrating to v1.0.5, and we're now merged into ZOmnibus.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#5 Post 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)
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#6 Post by Zizzo »

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

rod
Wayist
Posts: 17
Joined: Wed Jan 01, 2014 8:15 pm

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

#7 Post by rod »

Any chance this could be extended to allow <shift>'ing through alchemist golem's gear as well?

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#8 Post 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: )
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#9 Post by Zizzo »

Pushing out v2a, with a bugfix that was clobbering Alchemists' Interact with Golem talent.
"Blessed are the yeeks, for they shall inherit Arda..."

FalconGrey
Wayist
Posts: 15
Joined: Mon Mar 31, 2014 1:41 am

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

#10 Post 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.

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#11 Post 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.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#12 Post 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.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#13 Post by Zizzo »

Pushing out v2b with a bugfix to keybinding installation that may affect you if you use the Precognition talent.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#14 Post 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 10295 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.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2009
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

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

#15 Post 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.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply