[v1.3.0+] Staff Infusion

A place to post your add ons and ideas for them

Moderator: Moderator

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

[v1.3.0+] Staff Infusion

#1 Post by Zizzo »

The point of alchemic infusions, of course, is to switch between them according to what you're lobbing alchemist gems at (something other than Flame Infusion for fire wyrm broods, for instance :wink: ). Typically, though, you'll want to change the element of your staff at the same time to match it, which takes an extra turn and is generally a hassle. Hence my new Staff Infusion addon.

This addon adds an extra option to the Command Staff chat dialog to link your staff to your infusions, as indicated by the Staff Infusion marker effect (the icon juggling for which I'm probably a bit more proud of than I should be… :mrgreen: ). As long as said effect is present, activating an alchemic infusion sustain will automatically switch the element of your staff. (The effect is linked to the staff, and will be canceled if you take it off.)

And this might be considered cheating, so it probably won't be going into ZOmnibus. :wink:

[edit 2017-07-15: Technical info]

Code: Select all

Hooks:
  ToME:load [to load our infusion effect]
  Chat:load [to modify the Command Staff chat]
"Blessed are the yeeks, for they shall inherit Arda..."

smithfield
Halfling
Posts: 111
Joined: Wed May 23, 2012 1:19 am

Re: [v1.3.0+] Staff Infusion

#2 Post by smithfield »

Several weeks ago, I was running this character. I added the acid infusion, and then changed my mind and removed it - that is unlearned the skill and then made some use of the action that this plugin provides. In the process, the sustain associated with it was deducted - from my total mana.

I was in disbelief and repeated my actions and it happened again. This dropped my mana pool by 30 points each time, and by the time I realized it was permanent, I was down 150 or so, which made the character unplayable.

I'm a new player, and as such, it took me a while to sort out the cause - or likely cause - of this situation, but I sure now that it was this addon. I don't recall the precise order of actions at this point. I wish I could be more specific, and if you need more detail, ask and I will attempt to duplicate. I'm pretty sure that I can.

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

Re: [v1.3.0+] Staff Infusion

#3 Post by Zizzo »

smithfield wrote:Several weeks ago, I was running this character. I added the acid infusion, and then changed my mind and removed it - that is unlearned the skill and then made some use of the action that this plugin provides. In the process, the sustain associated with it was deducted - from my total mana.

I was in disbelief and repeated my actions and it happened again. This dropped my mana pool by 30 points each time, and by the time I realized it was permanent, I was down 150 or so, which made the character unplayable.

I'm a new player, and as such, it took me a while to sort out the cause - or likely cause - of this situation, but I sure now that it was this addon. I don't recall the precise order of actions at this point. I wish I could be more specific, and if you need more detail, ask and I will attempt to duplicate. I'm pretty sure that I can.
[sound F/X: source diving]*scratches head* Okay, I'm mystified; I can't figure out how the addon could be producing the effect you describe. Yes, if you can find a sequence of events to reproduce the problem, that would be a great help.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.3.0+] Staff Infusion

#4 Post by Zizzo »

Pro tip for addon developers: never, ever assume your custom-crafted temporary effect will only be present on the player. "No, but you see, it's only applied by–" Doesn't matter. Inner Demons. As I just discovered when my Staff Infusion effect tried to juggle the Command Staff hotkey of an Inner Demon. Which went about as well as you'd expect. :oops: v1a, just released, should catch that. We Apologize for the Inconvenience.™
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.3.0+] Staff Infusion

#5 Post by Zizzo »

v2 is an internal re-write to decouple our handling from the specific infusion talents defined by the main game. There should be no change in functionality for regular users, but addons that define their own infusion talents can now take advantage of the Staff Infusion effect. Where possible, we attempt to scrape the talent's damage type out of its activate() method; if your infusion talent follows the standard pattern:

Code: Select all

self:talentTemporaryValue(ret, "inc_damage", {[DamageType.WHATEVER] = t.getIncrease(self, t)})
then the Staff Infusion effect will automatically switch the player's staff to the right damage type when they activate your infusion. (I have already confirmed, for instance, that this works with Arcanum Class Pack's Poison Infusion and Metal Infusion talents.) If your talent's damage type is not automatically detected, you can help us along by adding a field of the form:

Code: Select all

infusion_damage_type = DamgeType.WHATEVER,
to your talent's definition.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.3.0+] Staff Infusion

#6 Post by Zizzo »

Well, this is embarrassing… :oops: See, back in 1.7.4, the T4 module's Command Staff method started using :talentDialog() instead of doing its own coroutine juggling. Which means that the bits in this addon that were copying said juggling were no longer necessary, and were in fact actively breaking things. Since June 2021, apparently. And even with an Alchemist character actively in play, I somehow failed to trip over this. :oops: :oops: :oops: I think I've got this fixed in v2a.2, just pushed out (I'm never entirely sure when it comes to corouting juggling…); I've got a new Alchemist going, so I'll test as I go and post more fixes as needed. We Apologize for the Error.™ :oops:
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply