Why does my autorecovery fail?

ereinion

Member
I *think* that the reason it fails is that I've run out of scrolls of drastic healing on a character which doesn't have other recovery options set, but considering that I have set autoSatisfyWithMall to true, shouldn't mafia get new scroll from the mall? Is there some setting I am missing?

Anyway, here is what I got from the cli when trying to find the information for this post, dunno if it is any more help than what I've already said, but I thought I might as well include it.
Code:
[COLOR=red]Autorecovery failed.[/COLOR]

[COLOR=olive]>      inv scroll of d[/COLOR]

[COLOR=olive]> prefref mall[/COLOR]

autoSatisfyWithMall      (global, now 'true', default 'false')
cacheMallSearches (global, now      'true', default 'false')
relayHidesJunkMallItems (global, now 'false',      default 'false')
basementMallPrices (user, now '1', default '1')

[COLOR=olive]>      prefref recover[/COLOR]

loginRecoveryHardcore (global, now 'false',      default 'false')
loginRecoverySoftcore (global, now 'true', default      'true')
relayWarnOnRecoverFailure (global, now 'true', default 'true')
hpAutoRecovery      (user, now '0.25', default '-0.05')
hpAutoRecoveryItems (user, now      'scroll of drastic healing;cannelloni cocoon;visit the nuns;tongue of the      walrus;lasagna bandages', default 'cannelloni cocoon;scroll of drastic      healing;tongue of the walrus;lasagna bandages;doc galaktik's ailment      ointment')
hpAutoRecoveryTarget (user, now '0.65', default '1.0')
mpAutoRecovery      (user, now '0.15', default '-0.5')
mpAutoRecoveryItems (user, now 'knob      goblin superseltzer;mountain stream soda;magical mystery juice;knob goblin      seltzer', default 'phonics down;knob goblin superseltzer;mountain stream      soda;magical mystery juice;knob goblin seltzer;cherry cloaca cola;soda      water')
mpAutoRecoveryTarget (user, now '0.3', default '0.3')
recoveryScript      (user, now '', default '')
 
Recovery tends to fail a lot. It fails a lot less if you use Bale's universal recovery script but it will sometimes fail even with that.
 

ereinion

Member
Ok, thanks for your reply. So the reason autoadventuring/autorestore fails is simply that recovery is quite buggy, and there's not much that can be done to fix it?
 
Honestly, I have no clue why it fails. It has been something that has frustrated me a lot in the past though. Bale's script took care of most of that, but even it fails to deal with some cases of beaten up that will cause an abort. I tried to make it consider other options/not abort, but for whatever reason it wouldn't listen to me. So I just wrote my own script to deal with beaten up.

But besides those beaten up edge cases, Bale's recovery script works very smoothly, unless you run out of meat in which case it can't do much.

On a side note, where did you get the prefref alias? Seems pretty handy.
 

Veracity

Developer
Staff member
recovery is quite buggy, and there's not much that can be done to fix it?
I am sure that things could be done to "fix" recovery bugs - if they happen to get reported. Saying "oh, just use a third-party recovery script, mafia is buggy" isn't helpful - or motivating.

It so happens that I don't use any third party "automation" scripts (I do use some relay scripts - Bordemstir's raidlog, Bale's manor unlock - and some utility scripts - PVP bookkeeper), so, no recovery scripts, between battle scripts, consult scripts, counter scripts. I have a couple of multis with no healing skills who, like you, depend on scrolls of drastic healing, and if KoLmafia wants to heal them and they are out of scrolls, it aborts automation, just as you report. So, yes - I have seen this identical issue. It's "annoying", but I never felt like taking the trouble to look in to it. Now that somebody has actually decided to write a bug report, perhaps I will, if I have more time available to me, eventually. :)
 

Veracity

Developer
Staff member
Now that somebody has actually decided to write a bug report, perhaps I will, if I have more time available to me, eventually. :)
Actually, looking more closely, there is no Bug Report. This is a thread in the Community forum.
 

ereinion

Member
I thought it was from the alias thread on these forums, but it seems I was mistaken. Luckily there was a link to the correct thread there, and the alias can be found in this post (Bale also have a modified version of it in the alias thread). Really, there are a lot of useful aliases in that thread, you should have a look at it, if you haven't visited it before :)

And yeah, I could probably use the recovery-script to circumvent the issues I am currently having, but I don't want to have automated healing in-run (recovery-script is a global setting I believe?), and I've been too lazy to set that preference in my breakfast script based on what character is logged on/what the state of that character is. I guess this is the incentive I need to finally get round to that ;)

Again, thanks a lot for your replies :)
 
Last edited:

ereinion

Member
Sorry about that, I hope you didn't find my posts annoying ;) I do believe I didn't use any words like that, though I can see how my paraphrasing of the reply I got may not have seemed very respectful to the work the mafiadevs are doing... Anyway, I wasn't sure if this actually was a bug, or if there was some setting I was missing, which was why I decided to ask about it here instead of filing a bug report.
 

Veracity

Developer
Staff member
Hey - I said that _I_ found it "annoying". :)

Go make an actual bug report. Say that if you select "scroll of drastic healing" as a recovery option, KoLmafia will use one only if you happen to have one in inventory. That is probably true for ALL recovery items - and is probably intentional; we make one pass looking at existing items and fail if none are available. But, since we will buy NPC items - seltzers, what have you - why not mall items? In any case, make a bug report and we can look at it in more detail.
 
Just throw a simple code at the start of your breakfast script
Code:
if (can_interact())
          cli_execute("set recoveryScript = Universal_recovery"); 
else cli_execute("set recoveryScript = ");

Veracity, at the time I was messing with mafia's recovery, I was brand new to KoLMafia. I had no idea if the problems I was having with recovery was due to bugs or user error, or how to write a meaningful bug report about it. By the time I gained some understanding, I had already moved on too Bale's script which solved the issues. Now it is an out of sight, out of mind problem.
 

ereinion

Member
Yeah, I know it's not actually much work setting the preferences in my breakfast script, I've just been too lazy to take the 5 minutes it would have taken doing so. So far I've been pretty happy with the performance of mafia's recovery options, which mostly cover my needs, so I haven't really felt the "need" to do something about it.

Anyway, a bug report for this has been filed now, hopefully some of the great devs here on the forums will figure out a good solution for the problem :)
 
Top