[v1.7.0+] Restart Poisons
Posted: Mon Apr 27, 2026 4:14 pm
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:
[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:]
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.
- 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,
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.)
[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]