Universal Recovery Script

roippi

Developer
I have absolutely no intuition for how UR maps meat to restoratives. It is entirely a black box to me.

I agree that automatically grabbing war restoratives (without an opt-in preference, at least) would be undesirable.
 

Bale

Minion
Veracity, I think most of your post was intended to teach me something that I already know so I'll treat it as rhetorical.

I am quite aware that boomboxes & macrame nets are not restoratives. I mentioned them as a choice that I do not want to remove from the player since many rely on them to kill the sorceress as a myst class. Purchasing filthy poultices/gauze garters could remove that choice.


I have absolutely no intuition for how UR maps meat to restoratives. It is entirely a black box to me.

In ronin/hardcore I don't make such a mapping, the script merely attempt to use everything without wasting anything. When mall access is available it is simple: I find the cheapest restorative and it's price in meat divided by mp restored is meat per mp.
 
Running 9532 the script keeps telling me that it hasn't refilled all my HP and aborting. 9 times out of 10 it has restored all my HP the rest it's 4-6 HP short. Which is odd since I have mall access to buy scrolls of drastic healing and have the skill Cannelloni Cocoon. As a matter of fact a closer look at what just happened shows that UR cast Cannelloni Cocoon then cast Lasagna Bandages twice, which unless there's been a change to Cannelloni Cocoon should have been a waste of MP.

Final edit: Solved: Turns out it was due to the effect "Corrupted" causing my stats to constantly change. Got rid of the effect and it stopped aborting and casting lasagna bandages after casting cocoon.
 
Last edited:

Rinn

Developer
It might be worth checking for effects that wildly change stats (Uncertain and Corrupted, are there any more?) then having UR always assume the worst case those effects have on your stats when considering max hp/mp. Maybe, I doubt it will come up a lot though.
 

Bale

Minion
Universal recovery v 3.89 released!


Changelog:
version 3.89 July 5, 2011
  • Fixed critical restoration bugs that sometimes affects people with a healing skill, but not cannelloni cocoon or other full heal.



Why did nobody ever report this problem clearly!? This bug was probably the number one reason that fairly unskilled characters hated to use my script. Seriously! Thank goodness I started running an unskilled multi who just learned a single healing skill so that I could be saying WTF is wrong with my script!?!?!
 
Last edited:

Bale

Minion
Out of curiosity, what was this critical bug?

Failure to cast the recovery skill more than once if you are low on mp. It then continues automation even though you have only a few HP which caused me to get repeatedly beaten up. I consider this to be a complete failure of my script under those conditions.

I am just flabbergasted that nobody ever spelled this out to me, but I suspect this is the reason that many people said in a vague way that this script did not work for them and then lost all interest in explaining any details.

Thank goodness I recently started adventuring with a brand new multi.
 
Last edited:

schizophoenix

New member
I've never been sure if this is what's supposed to happen, so I finally thought I'd ask. Mafia is set to "stop if auto-recovery fails", "auto-recover at 25%", "try to recover up to 95%".
Code:
Restoring HP! Currently at 11 of 55 HP, 39 of 51 MP, current meat: 90 ... Target HP = 53.
Searching for "doc galaktik's ailment ointment"...
Search complete.
Purchasing Doc Galaktik's Ailment Ointment (1 @ 60)...
You acquire an item: Doc Galaktik's Ailment Ointment
You spent 60 Meat
Purchases complete.
Using 1 Doc Galaktik's Ailment Ointment...
You gain 9 hit points
Finished using 1 Doc Galaktik's Ailment Ointment.

And then it continues adventuring. Since you mentioned the bug above, I was wondering if something related might be happening. I have no healing skills.
 

Bale

Minion
That's pretty simple actually. You only had 90 meat. You spent 60 on ailment ointment. The remaining 30 meat won't buy more HP.
 

schizophoenix

New member
Ah, sorry. Picked a bad example. But when I do have enough meat, it still doesn't heal up to the target HP.
Code:
Restoring HP! Currently at 6 of 61 HP, 50 of 56 MP,     current meat: 4531 ... Target HP = 58.
Searching for "doc     galaktik's ailment ointment"...
Search complete.
Purchasing Doc     Galaktik's Ailment Ointment (1 @ 60)...
You acquire an item: Doc     Galaktik's Ailment Ointment
You spent 60 Meat
Purchases complete.
Using     1 Doc Galaktik's Ailment Ointment...
You gain 8 hit points
Finished     using 1 Doc Galaktik's Ailment Ointment.
Searching for "doc galaktik's     ailment ointment"...
Search complete.
Purchasing Doc Galaktik's     Ailment Ointment (1 @ 60)...
You acquire an item: Doc Galaktik's     Ailment Ointment
You spent 60 Meat
Purchases complete.
Using 1     Doc Galaktik's Ailment Ointment...
You gain 9 hit points
Finished     using 1 Doc Galaktik's Ailment Ointment.
is the latest time.

Incidentally, I don't know why it's using Ailment Ointment at all, since I have it deselected both in the relay script and Kolmafia's settings...
 
Last edited:

Bale

Minion
Well, that looks not good. Could you turn up verbosity to max in the relay script and try to reproduce that so that I can have full debugging data? Thank you!
 

schizophoenix

New member
It happens every time at low levels, before I accumulate healing items.
Code:
Calling Universal Recovery for type=HP, amount=0
Restoring HP! Currently at 15 of 64 HP, 34 of 60 MP, current meat: 3925 ... Target HP = 61.
Trying to fullheal
Try to heal HP from inventory.
Trying to fullheal
Try to heal HP with skills.
Last attempt to purchase HP with meat.
Searching for "doc galaktik's ailment ointment"...
Search complete.
Purchasing Doc Galaktik's Ailment Ointment (1 @ 60)...
You acquire an item: Doc Galaktik's Ailment Ointment
You spent 60 Meat
Purchases complete.
Using 1 Doc Galaktik's Ailment Ointment...
You gain 10 hit points
Finished using 1 Doc Galaktik's Ailment Ointment.
Calling Universal Recovery for type=MP, amount=0
 

Bale

Minion
OH. I think I know what is happening. This is a feature I'd forgotten about.

If the script is down to the wire where all you have to heal with is Doc Galaktik, the script knows that the expense is extreme and it wants to cut corners in the hopes that you will eventually have a better means of healing. At that point it will set your auto-recovery trigger as a minimum target to heal up to. It's just getting your HP above the auto-recovery trigger as it is supposed to.

I think that is a good feature and many pages ago user feedback prompted me to add it. What do you think? However, there should definitely be a message informing the user of why healing level has been lowered so that she knows what is going on.
 

schizophoenix

New member
That sounds very reasonable.

Also, this happened just now:

Code:
Calling Universal Recovery for type=HP, amount=0
Restoring     HP! Currently at 16 of 66 HP, 48 of 65 MP, current meat: 4003 ... Target     HP = 63.
Trying to fullheal
Try     to heal HP from inventory.
Trying to     fullheal
Try to heal HP with skills.
Last     attempt to purchase HP with meat.
Calling     Universal Recovery for type=MP, amount=0

and it continued adventuring below my auto-recovery trigger. This happened for a few adventures, until I got hit again and manually aborted. However, hitting the "restore your HP" link from the Mafia relay browser caused

Code:
Calling Universal Recovery for type=HP, amount=62
Restoring     HP! Currently at 9 of 66 HP, 45 of 65 MP, current meat: 4003 ... Target HP     = 63.
Trying to fullheal
Try     to heal HP from inventory.
Trying to     fullheal
Try to heal HP with skills.
Last     attempt to purchase HP with meat.
Searching for "doc galaktik's     ailment ointment"...
Search complete.
Purchasing Doc Galaktik's     Ailment Ointment (5 @ 60)...
You acquire Doc Galaktik's Ailment     Ointment (5)
You spent 300 Meat
Purchases complete.
Using 5 Doc     Galaktik's Ailment Ointment...
You gain 45 hit points
Finished using     5 Doc Galaktik's Ailment Ointment.
Searching for "doc galaktik's     ailment ointment"...
Search complete.
Purchasing Doc Galaktik's     Ailment Ointment (1 @ 60)...
You acquire an item: Doc Galaktik's     Ailment Ointment
You spent 60 Meat
Purchases complete.
Using 1     Doc Galaktik's Ailment Ointment...
You gain 10 hit points
Finished     using 1 Doc Galaktik's Ailment Ointment.
 
Last edited:

Theraze

Active member
Well, that 'feature' made me set my minimum recovery to 100% back when I was newly relearning KoL, since otherwise UR would only heal me to 65% of health when collecting gunpowder and the zergs would do their thing, and since they do more than that... I was continually beaten up and unable to actually win the few fights that would come up. :(

I do think it's a useful feature. I think some sort of message, possibly once a day on a preference, should come up to say that you are not getting full restoration but instead only to your minimum target because of your settings, and that you should probably at least enable Doc Galaktik, the Knobs, and the Blacks.
 

fronobulax

Developer
Staff member
At that point it will set your auto-recovery trigger as a minimum target to heal up to.

Ah ha! I saw that a few times and considered it a bug because UR did not heal to the amount I requested nor tell me that it was not doing so. I won't debate the merits of the feature but an explicit message when it happens would be useful.
 

stannius

Member
In "aftercore," the script keeps using black cherry sodas, even though they're turned off in the hp/mp restore checklist, and I have mall-bought restoratives in inventory. Is that by design? I could post my preferences file (minus password) if it would help.
 

Bale

Minion
In aftercore the script will use whatever it believes to be cheapest. Such limitations only exist for ronin/hardcore use. The script compares the cost of purchasing all possible restoratives and then uses whatever gives the best ratio of meat per mp. It assumes that if you have more expensive restoratives in your inventory you'll want to sell them in the mall for enough meat to purchase a better value.
 
Top