Moods referencing other moods

Isvarka

Member
Is it possible to have a mood that references another mood?

For example, you have Mood A that has all your standard buffs, but then you have Mood B that is all of your standard buffs plus one more. Can Mood B in some way directly reference Mood A so that you don't have to duplicate each line of Mood A in Mood B?

Thanks.
 

Bale

Minion
That's really messed up. I think that change your mood, not allow it to reference another.
 

StDoodle

Minion
I'm curious to see how much of that (when properly re-written) would fire before the new mood's settings take over...

On a similar note, it would be nice to be able to access moods in ash. As far as I can tell, the mood files aren't formatted in a way that can be read in via file_to_map(), so any complicated mood management would need to completely reinvent the wheel. This is actually something I've thought about many times, as a lot of my "core" moods currently have 3 versions: "-combat version," "+combat version," and "+/- combat doesn't matter version." But AT buffs kinda make that a PITA. (Would be nice to be able to assign AT buffs a priority, so that anything past what you could use was ignored easily, and they were used in order.)
 

Isvarka

Member
I did try the mood command on it, but it just set the mood to the other mood without actually doing anything within the mood. I didn't try forcing the execution and setting it back to the original mood though, so I'll try that tonight and see how that goes.
 

Isvarka

Member
Sorry I didn't get a chance to get back to this earlier. I tried heeheehee's suggestion which didn't work, and I tried several other variations, all with no success. So I was wondering whether people think it might be a good idea if I put in a feature request for this. Either requesting referencing other moods or accessing moods in ash or both. And possibly some sort of priority system for AT buffs even. Or is this too much of an uncommonly wanted/needed thing to warrant a feature request? Opinions?
 

Theraze

Active member
The problem with making it work is that if mood A references mood B, and executes, and mood B references mood A, and executes... As it currently stands, the devs don't have to listen to complaints about mafia chewing up all their CPU (for that, at least).

If you REALLY want it to happen, instead of having it directly setting the mood, maybe have it run a script that changes the moods, executes, etc.
 

holatuwol

Developer
as a lot of my "core" moods currently have 3 versions: "-combat version," "+combat version," and "+/- combat doesn't matter version."
Not sure if this is relevant, but if it were me, I would probably have only written a "+/- combat doesn't matter" version that leaves off one AT buff and added an "always" trigger that casts combat/noncombat/other buffs based on some user property that I set via the CLI.
 

Isvarka

Member
Not sure if this is relevant, but if it were me, I would probably have only written a "+/- combat doesn't matter" version that leaves off one AT buff and added an "always" trigger that casts combat/noncombat/other buffs based on some user property that I set via the CLI.

That makes a lot of sense actually. I think I'll go that route instead to avoid the possibility of infinite loops and similar issues. Thanks.
 

holatuwol

Developer
That being said, the related idea of being able to break a mood into separate pieces to indicate what buffs you would use for specific gameplay aspects of KoL (combats, noncombats, item drops, etc) is one that has usability merit, so with r9184, KoLmafia will allow you to define moods that are nothing more than combinations of other moods.
 

Isvarka

Member
That being said, the related idea of being able to break a mood into separate pieces to indicate what buffs you would use for specific gameplay aspects of KoL (combats, noncombats, item drops, etc) is one that has usability merit, so with r9184, KoLmafia will allow you to define moods that are nothing more than combinations of other moods.

Oh, sweet! Thanks!
 
Top