Results 1 to 6 of 6

Thread: [Patch] Try to save MP even if skills are expensive or you are in aftercore

  1. #1
    Senior Member
    Join Date
    Apr 2018
    Posts
    186

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

    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.

    MP Saver.patch

  2. #2
    Developer
    Join Date
    Apr 2010
    Posts
    5,049

    Default

    It is done deliberately to avoid server hits. as documented in the code you deleted.

  3. #3
    Senior Member
    Join Date
    Apr 2018
    Posts
    186

    Default

    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?

  4. #4
    Developer
    Join Date
    Apr 2010
    Posts
    5,049

    Default

    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.

  5. #5
    Senior Member
    Join Date
    Apr 2018
    Posts
    186

    Default

    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.

  6. #6
    Senior Member
    Join Date
    Apr 2018
    Posts
    186

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •