[v1.7.0+] Restart Poisons

A place to post your add ons and ideas for them

Moderator: Moderator

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

[v1.7.0+] Restart Poisons

#1 Post by Zizzo »

So Restart Sustains is generally suitable for purpose, but it's not really a good match for the poison enhancement sustains from Vile Poisons. Generally, for instance, you'll (or at least I'll) want to have Volatile Poison and Leeching Poison on most of the time, but against, say, an opponent with absurdly overpowered near-cheating levels of healing, you might want to temporarily switch to Insidious Poison to shut that down, and juggling the sustain marks to make that happen would be kind of a headache.

Fortunately, in this simpler case, we can streamline and specialize the sustain handling to be more useful — hence my new Restart Poisons addon. Here's the scoop:
  • Any time one of your active poison sustains is deactivated by something other than user action, we flag it as having been forcibly deactivated and make a note to restart it. Like Restart Sustains, you'll get a prominent particle effect and a status indicator in the buffs display to let you know it's happened.
  • Since all the poison enhancement sustains are instant-use, we don't have to worry about juggling restarts while resting; instead, we just reactivate them as soon as they become available.
And while we're here, a few more useful features:
  • By default, if you activate a poison sustain while you already have two other ones active, the game will randomly deactivate one of them. That's kind of annoying, so instead we prompt for which sustain to deactivate. (Or if you hit the wrong talent by accident, you can just cancel out.)
  • And speaking of hitting the wrong talent by accident, :oops: :? we follow Restart Sustains' lead and add a new game option "Gameplay | Confirm deactivation of poison enhancement sustains", which pretty much does what it sounds like. (Note that deactivating a poison sustain by way of the prompt above won't ping this option.)
(As a license note, this addon uses a modified version of an image by Lorc from Game-icons.net, pursuant to the Creative Commons CC-BY-3.0 license.)

[And as with Restart Sustains, I figure this addon will be viewed by some as "protection from not paying attention", and thus would be suitable for merging into ZOmnibus but not ZOmnibus Lite.]

[Implementation notes:]

Code: Select all

Hooks:
  ToME:load [to load status effect definition]
  ToME:run [to add juggling to poison sustains]
  GameOptions:generateList [to add our game option]
Superload:
  mod.class.Actor:
    forceUseTalent() [to warn about poison sustains being deactivated]
    isTalentConfirmable() [to confirm deactivation of poison sustains]
  mod.class.Player:
    onTalentCooledDown() [to restart deactivated poison sustains]
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [v1.7.0+] Restart Poisons

#2 Post by Zizzo »

Frequently Asked Questions:

Why not just use Restart Sustains for these talents?

Restart Sustains is designed for use with sustained talents that the player will want to keep active all the time. For the poison enhancement sustains provided by Vile Poisons, by contrast, there are sometimes tactical reasons for changing which ones you're using. For instance, the player might want to switch to Insidious Poison while fighting an opponent with significant healing ability, or Numbing Poison while fighting an opponent that deals significant damage. Managing this via Restart Sustains would require manually juggling the associated sustain restart marks, which would be inconvenient.

How do I mark the poison sustains that I want restarted?

That's not necessary for this addon. Unlike Restart Sustains, Restart Poisons simply assumes that any active poison enhancement sustain that is deactivated by something other than user action should be remembered as having been forcibly deactivated and should be reactivated when it becomes available.

Can I use Restart Poisons and Restart Sustains together?

Restart Sustains (directly or via the ZOmnibus Addon Pack) and Restart Poisons do operate in the same areas of the game code, but they maintain their own separate sustain tracking information, so they should not interfere with each other. If you do use these addons together, however, we recommend that you not mark any of the poison enhancement sustains for restart by Restart Sustains; we have not tested this particular interaction, but we suspect the two addons' separate sustain-restart handling would interfere with each other.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply