Universal Recovery Script

shoptroll

Member
I'm not sure if this has been reported before, but I've noticed the following on numerous occassions:

Invalid line in data file: "elven magi-pack 0 0 40 50 0.0 45.0" (Universal_recovery.ash, line 147)
Updating recoveryScript_map_v2.txt from '2011-06-08T05:30:03-05:00' to '2011-06-08T05:30:03-05:00'...
Map modified within foreach (Universal_recovery.ash, line 1600)
...recoveryScript_map_v2.txt updated.

Any thoughts?

EDIT:

Also this:

Invalid line in data file: "Notes from the Elfpocalypse, Chapter IV 30 40 30 40 35.0 35.0" (Universal_recovery.ash, line 147)
Updating recoveryScript_map_v2.txt from '2011-06-08T05:30:03-05:00' to '2011-06-08T05:30:03-05:00'...
Map modified within foreach (Universal_recovery.ash, line 1600)
Restorative data is corrupted or missing. Troublesome!
 
Last edited:
Apparently I'm lost in the sauce. I have the relay file in the relay folder, and the ash in the scripts folder. This is what it looks like in the gcli:



Screenshot2012-02-07at124838PM.png








What am I doing wrong? Also, I'm doing my first HC Oxy run. Are there any other scripts that you would recommend?
 

Winterbay

Active member
You don't need to run it manually, it is run automatically as soon as Mafia thinks it needs to restore HP or MP during adventuring or when you call "restore hp/mp/both".
 

drakono82

New member
I'm seeing some serious delay in this script after it prints "Search complete." or "Purchases complete." It didn't used to be that way, but it's making any scripted adventuring take ages. Is this something anyone else is seeing? Is it mafia, the script, or the KoL servers?

Edit: Huh, I guess it seems to be happening with mafia functionality too, like buying ingredients for cooking. Guess I should relocate this question.
 
Last edited:

Theraze

Active member
Yep, set it as your recovery script, then ignore it. If you care deeply, use the relay script to set some more of the options, but all you need to do for basic operation is drop it into the scripts folder and set recoveryScript...


I'm seeing some serious delay in this script after it prints "Search complete." or "Purchases complete." It didn't used to be that way, but it's making any scripted adventuring take ages. Is this something anyone else is seeing? Is it mafia, the script, or the KoL servers?

Edit: Huh, I guess it seems to be happening with mafia functionality too, like buying ingredients for cooking. Guess I should relocate this question.
And that's sort of funny, because today my mafia browsing was faster than it's been in months. Adventures were flying by in under a second, less time than it normally takes to calculate the first round. Guessing that your connection to the KoL servers is just bad today.
 

Bale

Minion
What do you mean set it as my recovery script?

After you set recoveryScript = Universal_recovery you do not use the script, mafia uses the script for you.

It is then controlled through the Mafia GUI. On the Adventure Tab is a sub-tab titled "HP/MP Usage" You can control the levels for restoring HP and MP there. Then you simply adventure and assume that this script will take action when your HP is lower than the auto-restore setting.
 

Bale

Minion
I have a question about a possible future feature now that a certain feature was added to KoLmafia: Now recovery scripts fire before an encounter, regardless of adventuring in the relay or GUI...

That makes it possible for this script to take a look at the zone you're about to adventure in and figure out if you have enough HP to survive a single hit from the toughest monster in that zone and choose to restore enough HP to be certain you can survive that hit, regardless of your current recovery settings.

Please answer these questions:
  1. Would it be good for this script to override your recovery settings in that way, just because it thinks it knows better than you?
  2. Is there any time that would not be a good idea?
  3. Should it consider your initiative and not act this way if it thinks you'll get the jump on the monster?
  4. How much of this feature should be configurable and should it be opt in only?
  5. Do you have any other concerns or did I miss something?
 

lostcalpolydude

Developer
Staff member
3. Should it consider your initiative and not act this way if it thinks you'll get the jump on the monster?

As someone that does not use this script (this much automation scares me), my first thought when I started reading your post was that bullet. There's no reason to ensure survival of a single hit when you won't take that hit. Don't forget to account for the -init penalty of +ML (a piecewise linear function, even).
 

fronobulax

Developer
Staff member
I'm a little confused, but surviving a single hit is only helpful if I can kill the monster before the second hit, right? In my suboptimal play I often find I can't hit the monster (which reminds me of a bccascend question to ask) and so will be hit more than once. So my knee jerk response to 2) is All of the time - it will never be a good idea for me. But that's why options are opt-in and configurable, right?

I'd also be interested in an economic analysis - assuming I am adventuring in situations where I can do a one hit kill, how much meat would this save me as opposed to the current way? Will there be angst when it selects Doc G instead of the scrolls I have in invenrtory because the former doesn't "waste" anything?
 

Bale

Minion
Perhaps it would be better if I clarified this as restoring max("at least enough to be hit once", "your current restoration settings") since you seem tot think that I was suggesting restoring less than your settings to harm your suboptimal play style.

Will there be angst when it selects Doc G instead of the scrolls I have in invenrtory because the former doesn't "waste" anything?

Wait, what? Of course Doc G wastes something. It wastes meat.
 

fronobulax

Developer
Staff member
I remain confused. A chronic state according to my friends.

Restoring to the amount required to survive one hit is not useful if my suboptimal play will result in being hit multiple times before the fight ends. If max(one hit, settings) = settings then the feature makes no difference to me. If max(one hit, settings) = one hit then I almost certainly have chosen my settings wrong and anything that tells me I have done so is A Good Thing, but i would want to be informed and have a resolution suggested rather than implemented.

My Doc G comment was based upon vaguely remembered discussions concerning the point at which using a "restore all' item was considered a waste of resources because there were better ways to restore "one or two".
 

lostcalpolydude

Developer
Staff member
For a softcore player with a full set of skills and gear (noodles, throw shield, rain-doh), getting hit more than once should be unusual. I don't know much about HC, but restoring some HP but not enough to survive the fight would be wasteful.
 

fronobulax

Developer
Staff member
For a softcore player with a full set of skills and gear (noodles, throw shield, rain-doh), getting hit more than once should be unusual. I don't know much about HC, but restoring some HP but not enough to survive the fight would be wasteful.

In keeping with my suboptimal play, none of my characters have rain-doh and I have not seen a compelling reason to change that yet, and no one is going to throw a shield unless WHAM tells it to.

I understand why Bale's suggestion might be a good idea but only if it can be guaranteed that the character will be hit at most once. I don't think that can be guaranteed for all players and play styles that otherwise benefit from UR. Of course, since we are discussing the value of something I remain curious as to how much meat or which items might be 'saved' in the case where the option exists, is enabled, and monsters are guaranteed to hit at most once.
 

Theraze

Active member
Basically for this to be a feature I'd actually like, UR has to become a full combat suite (or import one) to know whether the skills I have will be capable of guaranteeing that I won't be hit more than once or if I am, that I'll be able to complete combat successfully before dying. If my goal is just to get the next choice adventure, I may not care to actually survive the blow, since I'll be running from combat either way. If UR is capable of calculating out the entire combat and knows what my final goal will be then yes, override the settings I've done which work, whether for combat avoidance or success, giving me the result I want >95% of the time. Otherwise, if I under heal, it's probably because I'm planning on dying or if not, that my familiar or some equipment affect or active skill or... something makes me confident that it's going to work out.

But like I said, when I'm finishing up the sea, often I just set the characters to use noodles and run away. If they die? No big deal, they just cast tongue once and adventure again. The combat isn't going to give me benefits in terms of how much it'll cost to buff up to beat the monsters, it's all about the next choiceadv. :)
 

fronobulax

Developer
Staff member
Since I often simultaneously proclaim both my confusion and my suboptimal play, I did have an Eureka moment when reading Theraze's post. I almost never use runaways. I can see how the restore to survive one hit feature could be useful if the user who opted in did so because they were certain that they could and would runaway.
 
Top