Auto-added buff here
TargetSim
ON_ADD
EXIT_NATURALLY
Dispel buff here
TargetSim
ON_ADD
EXIT_NATURALLY
Alternative secondary affordance here
1
Action ID here
Happy_Buffs
5
TargetSim
SI to allow the player to dispel this manually. This will automatically show up when the target is running this SI (provided he/she passes the other tests)
Do not use mood_based as a separate condition. The interaction ends if
any of the conditional actions specify an EXIT_NATURALLY or EXIT_CANCEL action. In the loot you could do something like this:
Buff ID from above
TargetSim
False
Happy_Buffs
TargetSim
And BTW, I've tried adding the "end interaction" buff directly under 'conditional_actions' and had problems (though that may be due to awkward test sets, so IDK), so that's why I'm proposing to do it this way. Either do it under 'operation_actions' with the 'alarm_interval' set to 1, or you can do it as an outcome in an affordance link.
Another thing you could to is shift some of the operations to the target:
affordance
Using a "pusher" would also work (A pusher just being a one-shot interaction that has a continuation to push on the target. That continuation would be the 'real' SI in that case.) That would have the advantage of forcing one of the two outcomes, especially if you put 'prohibit_cancelation' on the continuation:
super affordance goes here
TargetSim
loot ID
The only caveat with this method is that it might make it difficult to have a periodic skill gain, though. The point is, ending the interaction when all the happy buffs are gone is entirely doable (Though you'll probably get a delay of a minute or so)