[v1.7.0+] Interact with Sidekicks

A place to post your add ons and ideas for them

Moderator: Moderator

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

[v1.7.0+] Interact with Sidekicks

#1 Post by Zizzo »

So, you may have noticed that I've been on a bit of a tear recently :wink: expanding the functionality of various of my addons as they relate to player companions like the golem. (Mostly this was driven by playing various addon classes like Hiveminder and Mirrorblade, which have companions that you can equip and spend talent points for.) Naturally, I missed the Interact-with-the-Golem-style chat interaction that I had implemented with Interact with the Worm and Interact with the Mech, and I started thinking, "Can I generalize those?" The result is my new Interact with Sidekicks addon.

Lacking an obvious place to put an interact-with talent, we provide several other interfaces: the "Interact with party member" keybinding (bound to <Alt-Shift-I> by default), the "Interact with Party Members" action on the main game menu, and the "Interact" action on the map menu when you right-click on a sidekick. We re-use interfaces where we can; if you choose the Alchemist golem, for instance, we forward to the Interact with the Golem talent, and similarly for Writhing Ones' worm that walks and Annihilators' mecharachnid if you have the corresponding addons installed. For the general case we have a similar dialog of our own, less flavor-texty but covering all the commands that we can confirm the sidekick in question can handle.

The part that I'm really proud of, though, is that we also cover the two main things that you generally still have to take direct control of a sidekidk to do, even with the fancy dialogs: apply an inscription to it or change its talent point plan. Both of those are implemented on the general-purpose dialog for sidekicks that support them (checking for the relevant addon in the latter case, of course), and we even back-patch them into the existing interact-with talent dialogs (it looks like the mecharachnid supports inscription changing, if only to upgrade its steam generator).

(NOTE: The Talent Point Planner addon required a bit of re-architecting to work with this addon, so for compatibility, you'll want to upgrade it to release 10.8.3 or higher if you're using it with this addon. Similarly, ZOmnibus or ZOmnibus Lite will need to be upgraded to at least release 17.2.3.)

[Implementation notes:]

Code: Select all

Hooks:
  ToME:load [to install our keybinding]
  Game:alterGameMenu [to add our 'Interact with Party Members' action]
  Chat:load [to modify existing interact-with chat dialogs]
Superload:
  mod.class.Game:
    setupCommands() [to add our action to the keybinding]
  mod.dialogs.MapMenu:
    generateList() [to add "Interact" action as appropriate]
"Blessed are the yeeks, for they shall inherit Arda..."

leugimimi
Low Yeek
Posts: 9
Joined: Fri Oct 30, 2020 2:40 pm

Re: [v1.7.0+] Interact with Sidekicks

#2 Post by leugimimi »

I installed this addon on a whim, as I was not playing a class with sidekicks. But I discovered something really funny to use it for. I can use this addon to tweak enemy monsters.

I can give my items to a enemy monster (when they die the item will not be picked up automatically, as if you had discarded it), and you can also take the enemy items. they will be taken unidentified to your inventory, but you can drop and pick it up again so it can be identified.
I can also spend the ton of unused points that the monsters have to make them even more harder to kill.

10/10 would play with it again.

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

Re: [v1.7.0+] Interact with Sidekicks

#3 Post by Zizzo »

leugimimi wrote:I installed this addon on a whim, as I was not playing a class with sidekicks. But I discovered something really funny to use it for. I can use this addon to tweak enemy monsters.

I can give my items to a enemy monster (when they die the item will not be picked up automatically, as if you had discarded it), and you can also take the enemy items. they will be taken unidentified to your inventory, but you can drop and pick it up again so it can be identified.
I can also spend the ton of unused points that the monsters have to make them even more harder to kill.

10/10 would play with it again.
What?! [sound F/X: source diving][sound F/X: forehead repeatedly striking desk] Okay, so I neglected to check whether an actor is actually, y'know, a party member before putting an "Interact" action on its right-click map menu. Fixed in v1a. We Apologize for the Inconvenience.™ :oops:
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.7.0+] Interact with Sidekicks

#4 Post by Zizzo »

v1b adds something I should have thought of from the beginning: addons that provide sidekicks should be able to customize the text and action prompts of the interaction chat for their sidekick. We support this by checking the sidekick for a :sidekickInteractTexts() method, which should return the texts to use. Documentation is included in the .teaa, and by the time I post this, you should also be able to look to my new Mirrorblade Tweaks addon as an example to work from.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.7.0+] Interact with Sidekicks

#5 Post by Zizzo »

Couple bugfixes in v1b.1, in the area of adding inscriptions to sidekicks:
  • When we're replacing an existing inscription, the log message was incorrectly describing the sidekick as "now inscribed with" the inscription we just replaced, not the one we just added. :oops:
  • We originally copied over from player inscription handling the ability to spend a cat point to buy an inscription slot. On reflection, that was a bad idea, for several reasons:
    • Sidekicks don't generally have category points (unless you give them Wyrm Bile).
    • Pretty much every sidekick that's supposed to have the ability to gain inscription slots has a player talent to do that.
    • It presumably wasn't originally intended to be doable, so it would probably break badly. :?
    So we back it out in this release. We Apologize for the Inconvenience.™ :wink:
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.7.0+] Interact with Sidekicks

#6 Post by Zizzo »

After all the work we went to adding NPC portrait images to chat dialogs over in Chat/Quest Tweaks, I am deeply ashamed to discover that I'm missing some in one of my own addons. :oops: :oops: In particular, the chat dialog for adding an inscription to a sidekick wasn't passing the inscription talent image for use as the chat portrait image, as the corresponding dialog for the player does. That's fixed in v1b.2; We Apologize for the Omission.™ :oops:
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.7.0+] Interact with Sidekicks

#7 Post by Zizzo »

Tinker Gnome Alchemists get golems that are advertised as able to use steamsaws, and of course they'll need a steam generator for that. When I tried to apply one via this addon's "I want to apply an inscription to you" option, though, the steam generators in my inventory weren't listed as candidates. Turns out I was being overly aggressive in what to allow at that point and was specifically filtering for runes and infusions only, when I should have been allowing anything with 'inscription_talent' and 'inscription_data' fields; anything that the sidekick isn't allowed to use will be filtered out at a later point.

Anyway, that's going out as v1b.4, along with another small fix: we shouldn't include the "I want to change your talent point plan" option in the sidekick dialog if Talent Point Planner (or ZOmnibus or ZOmnibus Lite) is not enabled for us to make a talent point plan for our sidekick. We Apologize for the Confusion.™
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.7.0+] Interact with Sidekicks

#8 Post by Zizzo »

Based on a suggestion from a PM, v1c adds choices to the Interact with Sidekick dialog (and the other more sidekick-specific dialogs, if present) for the standard party orders from the "Give order" dialog, like setting your sidekick's target or leash anchor. Now, I probably won't be using any of these actions myself, so I made them optional, controlled by new game option "Gameplay | Include party orders in interaction dialogs", which is on by default.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply