Page 1 of 235 1 2 3 11 51 101 ... LastLast
Results 1 to 10 of 2373

Thread: Universal Recovery Script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default Universal Recovery Script

    Universal Recovery 3.13
    Universal Recovery Configuration 1.3

    This script will change kolMafia's default healing functions to make the most of your available items in hardcore/ronin or make the most of your meat if you have access to the mall. That makes this a great restoration improvement for both ascenders and farmers.

    Once installed, mafia will use this script to restore with. It does not require the user to ever call it explicitly. Just install it and forget it, assuming it will be there to take care of you. After installation, configuration only requires you to set the healing targets in mafia's HP/MP usage tab just as when you set up mafia's restoration settings.

    1. Distribution has migrated over to SVN. To install this script, with a current daily build, please copy/paste the following line into KoLmafia's CLI and press enter:
      Code:
      svn checkout https://svn.code.sf.net/p/mafiarecovery/code/
    2. Then in the gCLI type:
      set recoveryScript = Universal_recovery
      This is character specific so you'll have to set recoveryScript for every character who uses the script. If you ever want to turn the script off again, use the gCLI command: set recoveryScript =

    3. To configure options from the relay browser, you are able to call up a user interface from a drop-down menu from the relay browser's top menu.


    Options: This script will allow you to customize its healing in hardcore or ronin by making use of the user interface options from the relay browser's top menu or the equivalent options in KolMafia's HP/MP usage. When the mall is available it will anything and everything to heal. Anything not listed in the relay browser's user interface will be used whenever the script decides. The user can feel free to use either the relay browser's interface for recovery options or the mafia interface. They both work. However there are also several options for this script that are only accessible through the relay browser.

    The script has two different healing modes, based on the character's access to the mall.
    • Hardcore Mode: For hardcore before freeing the king or in normal core before breaking Ronin. This mode will treat inventory as if it was precious, always attempting to heal with the minimal items, never wasting any inventory since it is hard to replace.
    • Mallcore Mode: For Casual Ascension, after breaking Ronin or in hardcore after freeing the King and gaining mall access. In this mode, Universal Recovery will do whatever is most profitable. It will use the method of recovery that costs the least meat. It will check current mall prices (once per session) and purchase the items that have the best healing for their value. It will even balance the cost of restoring 20MP to cast Cannelloni Cocoon vs the cost of a scroll of drastic healing (and other HP healing items) and use the cheapest method. It will not use any more expensive restoratives in your inventory, as it assumes they would be sold in your store since you can make more meat that way.

    The script will obey mafia's preferences, so if you have it set to not purchase from the mall or NPC stores, then it will avoid that. Alternately, using the optional relay browser user interface, you can instruct the script to refrain from using the mall or NPC stores.

    If this script cannot purchase from the mall, it will stay in hardcore mode.


    Changelog in following post.
    Last edited by Bale; 11-06-2013 at 02:30 AM.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  2. #2
    Junior Member
    Join Date
    Mar 2007
    Posts
    7

    Default

    put restore_map.txt in the /data directory.

    Do you mean recoveryScript_map.txt? I don't see a file called restore_map.txt.

    Once again, HUGE thanks for this script! I have been using the Hardcore Recovery script since you started it and it has been truly invaluable. I can't wait to try this one out.

  3. #3
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    I'm very happy it's helping you. I'm going to continue to make it better any time I can figure out how.

    Do you mean recoveryScript_map.txt? I don't see a file called restore_map.txt.
    Originally Posted by jabberw0ck View Post
    Oh. Thanks! Yes, the name got changed at an earlier point but I didn't update the instructions. I'll edit that.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  4. #4
    Senior Member
    Join Date
    Jan 2009
    Posts
    151

    Default

    Ok, first bug. The script (at least in mall mode) fails if it decided Medicinal Herbs are cheapest and then can't use them because your spleen is full.

    Great work otherwise, interesting to watch it try to decide what to get

  5. #5
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Facepalm!

    Oh. Yeah. I'm going to have to make it check for spleen if you're in mallcore mode. Unfortunately I never use them so I forgot to make it check that in mallcore mode, like it already does in hardcore mode. You're really good at spotting my bugs. I like that.

    That's such an easy fix I've already uploaded v2.01 right now! If any of the 8 previous downloaders want to heal with Medicinal Herb's medicinal herbs then download the update, otherwise ignore it.

    Great work otherwise, interesting to watch it try to decide what to get
    Originally Posted by StormCrow42 View Post
    I think that's fun to watch also. I wonder if widespread use of my script amongst farmers would make a notable difference at keeping restorative prices proportional to how much they heal.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  6. #6
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    By the way, since my script now tries to make use of the Platinum Yendorian Express Card, if anyone actually has one of these, please let me know if the script uses it.

    The heuristic it uses, is that it will try to heal with the Express Card if your mp is below autoheal levels and also below 1/9 of your maximum mp. So, get your MP down that low and please tell me if it works. I doubt I'll ever own one so I can't test this myself. Also, if that heuristic doesn't match your own preferences, please tell me so I can make it better suit someone who actually owns one.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  7. #7
    Senior Member
    Join Date
    Jan 2009
    Posts
    151

    Default

    AutoHeal if below 82HP, up to -> 207HP with Bale's Universal Recovery.
    Current HP: 81, Current MP: 73... restoring HP! Target = 207
    Searching for "mummy wrapping"...
    Purchasing mummy wrapping (2 @ 190)...
    You acquire mummy wrapping (2)
    Purchases complete.
    Using 2 mummy wrapping...
    You acquire an item: really thick bandage
    Finished using 2 mummy wrapping.
    Using 1 really thick bandage...
    You gain 107 hit points
    Finished using 1 really thick bandage.
    Did not fully restore HP for some reason.

  8. #8
    Senior Member
    Join Date
    Jan 2009
    Posts
    151

    Default

    Attempting to heal up to 162MP with Bale's Universal Recovery.
    Current HP: 202, Current MP: 110... restoring MP! Target = 162
    Searching for "palm frond"...
    Purchasing palm frond (1 @ 100)...
    You acquire an item: palm frond
    Purchases complete.
    Using 2 palm frond...
    You acquire an item: palm-frond fan
    Finished using 2 palm frond.
    Using 1 palm-frond fan...
    You gain 36 hit points
    You gain 39 Mojo Points
    Finished using 1 palm-frond fan.
    Using cached search results for palm frond...
    Purchasing palm frond (1 @ 100)...
    You acquire an item: palm frond
    Purchases complete.
    Looks like perhaps a failure to purchase the proper number of palm fronds/mummy wrappings.

    I'm not certain, but it might also be valuing them at only half of what the combined set costs.

  9. #9
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    I hadn't run into that problem during my testing. Dang. It is an interesting bug actually. I caused it by getting too clever and then forgetting how clever I had gotten.

    I think I've gotten it fixed so v2.02 is now uploaded. Please download and continue testing.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  10. #10
    Senior Member
    Join Date
    Jan 2009
    Posts
    151

    Default

    That seems to have fixed that issue. At least it's successfully making palm frond fans and using them.

    However, it's even doing this in preference to using moths when in bird form. This seems off to me, since the palm fronds are costing 100 each, leaving the fans at 200 for ~40 MP. Moths are 100 meat in the mall for ~30 MP (not to mention that I'm accumulating them by farming them out of ronin on the battlefield).

    This character also has access to MMJ, so I'm not certain that the fans are the best deal even normally, unless you factor in their HP restoring ability.

Similar Threads

  1. Anecdote - Recovery Script not firing between auto-adventures?
    By fronobulax in forum Community Support
    Replies: 1
    Last Post: 02-20-2015, 07:36 PM
  2. Replies: 0
    Last Post: 09-21-2013, 05:50 PM
  3. what are all the ways mafia can consult a script? like recovery, breakfast
    By forgot my password in forum Scripting Discussion
    Replies: 5
    Last Post: 06-11-2009, 09:05 PM
  4. Recovery Script for Hardcore
    By Bale in forum Buff Upkeep Scripts
    Replies: 84
    Last Post: 03-04-2009, 08:17 AM
  5. Very New, Need a MP Recovery Script
    By Willie0248 in forum Scripting Discussion
    Replies: 2
    Last Post: 04-15-2006, 09:30 PM

Posting Permissions

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