Feature - Rejected [Patch] Try to save MP even if skills are expensive or you are in aftercore

Saklad5

Member
I was recently trying to figure out how to equip MP-saving gear when executing my Mood in a way that didn’t entail switching back and forth with every individual skill. I ended up looking at the source code to see if there was a hidden setting or something, and it turned out that such a function already exists. However, for reasons that are beyond me, it doesn’t trigger in aftercore or for skills more expensive than 50MP. I get that MP is at more of a premium during a run, but that doesn’t mean that MP is free in aftercore. And I don’t why MP is suddenly less important when you are using more of it.

I’ve attached a patch that removes those checks from the code. If someone wants to add a hidden setting to govern this behavior, that’s fine. Even if this patch doesn’t get incorporated into KoLmafia, I’ll probably keep using it myself.

View attachment MP Saver.patch
 

Saklad5

Member
I saw that, but I’d still rather make that a setting.

On a related note, is it possible to configure moods to equip MP-saving gear, then restore the original gear after finishing execution?
 

Darzil

Developer
If you can work out how and where to change equipment for mana saving before and after all buffs, that'd be well worth doing.
 

Saklad5

Member
Upon reflection, I think it’d be impossible. KoLmafia has no way of knowing if unconditional triggers actually need to do something, and that means that it cannot tell if a mood is actually doing anything. And switching equipment back and forth before literally every adventure would hardly be an improvement.

If unconditional triggers could be reworked in such a way that the conditional and the action were distinct, this would be possible. Such a change would make sense, since anything that is actually supposed to run before every adventure probably belongs in the dedicated script for just that. It probably wouldn’t be worth screwing up everyone’s existing moods, though.
 

Saklad5

Member
It could work if KoLmafia ignored unconditional triggers when deciding whether to swap equipment, but that feels messy.
 
Top