Hey guys, quick reply for now. First, thanks for the input. Haven't looked at your script in-depth yet, Turbodriver, so maybe it covers this, but... a little clarification for both of you:
The test (at least for how I'm wanting to do what I'm doing) needs to be a test within an interaction. Interactions have some existing possible tests for exiting the interaction, like buff_based, time_based, etc. One of them is mood_based, but as far as I can tell, mood_based only checks for entering a mood or (when inverted) checks for exiting a mood. I'd want something that can check for the existence of a particular mood, but within those type of interaction tests. That's why statistic_in_category probably won't work; it's not part of the interaction tests.