[v1.7.0+] Tinkers for Sidekicks
Posted: Sun Mar 03, 2024 10:29 pm
Pretty much every Alchemist ever who has gotten the EoR tinker-making talents has wanted to attach tinkers to their golem's equipment. In theory it's convoluted but doable, if you can wear the equipment yourself — which might not work so well for that massive voratun greatsword or plate mail that requires STR 60 to wield. 
That's why I'm working on an addon to simplify that, Tinkers for Sidekicks. Here's what I've got so far:
Now, some of the tinker-handling code really wasn't designed to account for the case when the actor with the tinker of interest in inventory and the actor wearing the equipment we're trying to attach the tinker to aren't the same actor, so I basically had to replace large chunks of said code. In particular, any other addon that plays around in the area of Actor:doWear(), Actor:doWearTinker() and/or Actor:doTakeoffTinker() is likely to have compatibility problems with this addon. As always, let me know if you run into any problems.
[Looking ahead, I have no idea whether anyone would consider this cheating, but considering the aforementioned potential compatibility problems, I'm kind of leery about adding it to ZOmnibus.]

That's why I'm working on an addon to simplify that, Tinkers for Sidekicks. Here's what I've got so far:
- From the player's inventory dialog, you can choose "Attach to item" for a tinker in the player's inventory, and it should list any suitable equipment worn by either the player or the golem as attachment candidates.
- From the Interact with the Golem equipment dialog, you can choose "Detach from item" or "Detach tinker" for anything in the golem's equipment, and the detached tinker should properly return to the player's inventory. "Attach item" also works for stuff in the player's inventory, and only the golem's equipent will be listed as candidates.
- Drag-and drop in the Interact with the Golem equipment/inventory dialog appears to work the way you'd expect in my tests so far; so does the "Gameplay | Swap tinkers" game option.

Now, some of the tinker-handling code really wasn't designed to account for the case when the actor with the tinker of interest in inventory and the actor wearing the equipment we're trying to attach the tinker to aren't the same actor, so I basically had to replace large chunks of said code. In particular, any other addon that plays around in the area of Actor:doWear(), Actor:doWearTinker() and/or Actor:doTakeoffTinker() is likely to have compatibility problems with this addon. As always, let me know if you run into any problems.
[Looking ahead, I have no idea whether anyone would consider this cheating, but considering the aforementioned potential compatibility problems, I'm kind of leery about adding it to ZOmnibus.]
Code: Select all
Hooks:
EquipInvenDialog:makeUI [to allow tinkers in Interact with the Golem]
Superload:
mod.class.Actor:
doWear() [overloaded, to add our cross-actor handling]
doWearTinker() [overloaded, to add our cross-actor handling]
doTakeoffTinker() [overloaded, to add our cross-actor handling]
mod.dialogs.UseItemDialog:
use() [to add cross-tier support to tinker-related actions]
mod.dialogs.ShowEquipInven:
init() [to add cross-actor support to drag-n-drop]
onDragTakeoff() [to add cross-actor support to drag-n-drop]