Feature Perform "When an effect is gained" actions first

digitrev

Member
So I'm adventuring in Dread with several buffs defined in my mood (so that I don't die), and many of them cost MP. Now, this would not be a problem, except that I keep getting Chilled to the Bone. I have my mood set to uneffect Chilled to the Bone, but mafia keeps trying to increase the duration of my buffs before losing Chilled to the Bone. This means that it fails, since I don't have enough MP to cover anything. Now, I've been working around this by simply overbuffing, but I was wondering if it would be possible to have Mafia execute the "uneffect" actions before the "cast buff" actions. Or at least an option to make this behaviour possible.
 
There's always the option of having your mood (or pre/post-Adventure script) execute a script, where you can list actions in the order you want them to run. Chilled to the Bone kind of seems like a niche case not worth updating how moods work in general.
 
Well, I think a fair question would be, what order are parts in a mood executed? For example, first thing anybody wants done is to get rid of Anapests because <insert anecdote here>. Perhaps a consideration to allow certain parts of a mood to take priority? "Before anything else, When I get Just the Best Anapests, uneffect Just the Best Anapests"

Or to put it in the moods.txt, "priority_gain_effect just the best anapests => uneffect Just the Best Anapests"

Just some ideas.
 
Well, I think a fair question would be, what order are parts in a mood executed? For example, first thing anybody wants done is to get rid of Anapests because <insert anecdote here>. Perhaps a consideration to allow certain parts of a mood to take priority? "Before anything else, When I get Just the Best Anapests, uneffect Just the Best Anapests"

Or to put it in the moods.txt, "priority_gain_effect just the best anapests => uneffect Just the Best Anapests"

Just some ideas.

What advantage could anyone theoretically gain from removing Just the Best Anapests before performing other actions in a mood?
 
It's not just that, I'm saying. Take Chilled to the Bone. Can be a massive MP drain or make moods outright impossible. There are other effects that can up MP cost, not to mention the myriad that play with stats and MP.

Let's say, just as an example, you get Majorly Poisoned. Well, you want to recover from that, naturally, but you also want to restore some of the MP that's now available as well as regen it, say by drinking a Cloaca Cola Polar.

Of course, that drink won't do what you want unless you remove the poison first. Currently, moods do not have a clear order of operations. So even if you set up the moods, you have no idea if they will work how you want until after the fact.

An option to have something happen first guaranteed would make it simpler to use. Simply telling someone to use/create a script raises the difficulty level rather than ease them into it. Otherwise, why have moods at all when it can all be done with a bBS or aAS.
 
People will want to be able to specify the exact order for everything if any order specifying is possible, probably.

I never use moods (mostly because I want to have 0 turns of effects when I run out of turns, for pvp), so I'm not likely to look into any changes regardless.
 
Let's say, just as an example, you get Majorly Poisoned. Well, you want to recover from that, naturally, but you also want to restore some of the MP that's now available as well as regen it, say by drinking a Cloaca Cola Polar.

Of course, that drink won't do what you want unless you remove the poison first. Currently, moods do not have a clear order of operations. So even if you set up the moods, you have no idea if they will work how you want until after the fact.
So the fix for this is for moods to always remove poison first.
 
Well, I think a fair question would be, what order are parts in a mood executed? For example, first thing anybody wants done is to get rid of Anapests because <insert anecdote here>. Perhaps a consideration to allow certain parts of a mood to take priority? "Before anything else, When I get Just the Best Anapests, uneffect Just the Best Anapests"

Or to put it in the moods.txt, "priority_gain_effect just the best anapests => uneffect Just the Best Anapests"

Just some ideas.

Having priorities would be nice. Even a simple top priority checkbox would be nice.
 
Some (admittedly) minimal "debugging" implies that Mafia executes "When an effect is lost" first, then "Unconditional", and finally "When an effect is gained" entries, in that order. Evidence:

This is my mood.
Code:
Always, echo unconditional
When I get Brother Flying Burrito's Blessing, echo uneffect Brother Flying Burrito's Blessing
When I get Wasabi Sinuses, echo uneffect Wasabi Sinuses
When I get Winklered, echo uneffect Winklered
When I run low on Antibiotic Saucesphere, echo cast 1 antibiotic saucesphere

I have all 3 of the "uneffect" effects active, and I do not have antibiotic saucesphere active. Typing "mood execute" gives me

Code:
> mood execute

cast 1 antibiotic saucesphere
unconditional
uneffect Brother Flying Burrito's Blessing
uneffect Wasabi Sinuses
uneffect Winklered
Mood swing complete.
 
I think it actually casts accordion thief buffs, then skills, then does other stuff, so that's what you are seeing.
 
Last edited:
Not that I am volunteering to compile and verify the information but it seems to me that documenting the sequence of mood related activities would go a long way towards clarifying what the feature request should be, or even if one is needed. I suspect the task is complicated by such mafia options as auto remove malignant status effects, equipment change during casting, buff balancing, and which script hooks are in use.
 
Back
Top