Universal Recovery Script

Spiny

Member
I've never used the autobasement script, so I'm not sure but what you posted above does look like it's affecting something that might conflict with proper behavior.

It looks like the autobasement script is trying to do something, saw this in the code:

Code:
	string mp_recovery = get_property("mpAutoRecovery");
	string mp_recovery_target = get_property("mpAutoRecoveryTarget");
	set_property("mpAutoRecovery", "-0.05");
	set_property("mpAutoRecoveryTarget", "-0.05");

There is also some code regarding the jumbo dr. lucifer to restore mana, which of course would require having fullness available to do so. I'm not sure what the solution for you would be, but I think that the basement script is conflicting with this script's behavior.
 
Last edited:

Bale

Minion
Would this answer any questions? It has been popping up in my CLI as I try to use a basement-diving script. Bad interaction?

mpAutoRecovery => -0.05
mpAutoRecoveryTarget => -0.05
That would be your problem. Your basement-diving script seems to be turning off restoration. When that is changed by a script the mafia UI does not update to show the correct settings. If you log out and log in again mafia will show the correct recovery levels, but obviously that's a bit much to do. Here's a simpler answer:

If you use relay_Universal_Recovery it will show the correct recovery settings in the relay browser.
 

Valliant

Member
Awesome, thanks for letting me know. I'll post it in that thread as a potential error, as I would prefer for it to not turn off restoration if I'm not using Dr. Lucifers.
 

fronobulax

Developer
Staff member
That's a problem that pops up from time to time. Now that I've got a UI to configure options, should I add "Only use Disco Rest if it grants HP as well as HP" as an option?
Yes, please. You might also consider a more general preference associated with the idea that using something currently available is better than spending meat to get something more optimal. If there is ever a case where it would be more efficient to autosell X, buy Y and restore rather than just use X to restore, I'd be willing to have the script do just that if the preference was set.

I really like UR but it took me a while to figure out how to adjust my preferences so it did not spend all of my meat during times when meat was otherwise scarce. One point of my confusion was when I could not get it to use "free" things because preserving meat was more important to me than efficiency.
 

Bale

Minion
Okey-doke! New restoration options for next update.

(Being able to make my own user interface in the relay browser is awesome!)
 

Bale

Minion
Yes, please. You might also consider a more general preference associated with the idea that using something currently available is better than spending meat to get something more optimal. If there is ever a case where it would be more efficient to autosell X, buy Y and restore rather than just use X to restore, I'd be willing to have the script do just that if the preference was set..

autosell? Hell no! My script won't ever autosell or mall sell your stuff for you! I'd consider that a bit too invasive.

However, I figured a simple way to get it to use inventory in mallmode. I'm a little hesitant to add that, so I want people's input. Do folks really want the ability to use up an inventory of potentially expensive restoratives regardless of their mall price? If enough people really want that, I'll add the option no matter how silly I think that may be.
 

StDoodle

Minion
Bale; I have made the appropriate edit in my local copy, but would like to request that you consider changing the verbosity check for the message "You'd be able to purchase magical mystery juice if you opened your guild store" to be a little higher; I for one consider opening the guild to be wasted turns in most ascensions, and seeing that message over and over is annoying. But verbosity = 0 would suppress a bit more than I'd consider "safe," so I'm hoping this could be tweaked to 2 or at least 1. Thanks for considering it!
 

Spiny

Member
To be honest, I've grown used to the way UR handles restoratives in mallmode. The logic makes sense and allows me to build up a supply of various restoratives that are not commonly called upon by the script to use so that I can use them myself in oddball circumstances or sell/donate/give them away should I choose to.

As far as a nag message for unlocking the guild for mmj, I always open my guild store as I'm sub-optimal so I've never seen the nag message.
 

Bale

Minion
Being able to purchase mmj is not necessarily sub-optimal. It's pretty much the only use for the guild store that is worth those turns.

Bale; I have made the appropriate edit in my local copy, but would like to request that you consider changing the verbosity check for the message "You'd be able to purchase magical mystery juice if you opened your guild store" to be a little higher; I for one consider opening the guild to be wasted turns in most ascensions.

I'm considering bumping it up a level in the next version. It can still get annoying quickly for people who don't want to do so and punishing them seems odd.
 

StDoodle

Minion
It's pretty much the only use for the guild store that is worth those turns.

While I admit that no other guild-store unlock is even arguably worth-while for decent-skillcount HC, I would argue that it still isn't worthwhile as an AT. I can run pretty decent +ML and still delevel-plink without running out of meat.

Of course, if you look at it from the perspective of real-life time saved by not using knob seltzer from level 9 to level 11... that's another story. ;)
 

Bale

Minion
I cannot argue that. It's nice, but not nearly so beneficial by the time you are level 9. At that point mmj is not nearly so necessary since there are sources of major meat. As a myst class though, it is awesome at low level. :) That's why I'm turning up the necessary verbosity to get that warning.
 

StDoodle

Minion
Doh! I didn't even think about the fact that the same conditions fire for myst classes! Partially because I do unlock the guild store for them (especially PM's; they bleed meat).

Heck, in that case, it may be appropriate to have a different verbosity check for AT's vs. PM & S.
 

fronobulax

Developer
Staff member
Nit - are you going to tweak the price updating logic in view of the mafia preference and hosting here? UR seems to always be visiting Jason's backup site for me.

My level 60, never ascended character doesn't care about the optimization UR performs. Since the Hot Tub and the Nuns (HP only) remain otherwise unused, in a perfect world, they would be used before inventory or purchase. Use it or lose it. However that character is an edge case in so many ways that I don't expect anything to change for it.

My ascending character used to use mafia's autorecovery settings and I knew how to manage them in my runs. I started using UR in HCO and was quite surprised to find I was running out of meat. The settings that had worked so well for mafia were an undesired meat sink with UR and I found I couldn't do things when I wanted to because I had no meat. I really like UR and so have learned to adjust the restore settings based upon how important saving meat is at any particular moment. However, based upon the past experience, I am biased towards using something something I already have (free rest, Nun, hot tub, inventory item) rather than the optimal use of something that has to be purchased. The possible exceptions would be items of extreme value or that I am saving for the future but there ways to deal with those cases.

The only point to all this is to note that my preferred optimization would place a priority on "Use or Lose" which would include anything that can be used a limited number of times per day or something I already have. I recognize that Use or Lose makes it hard to save something for the future which is why I am really just babbling on about my Use Case but not asking for any changes.
 

StDoodle

Minion
Actually, that sounds like something to look at for HCO players. They have less turns per day, hence they have more uses of limited times per day things like the hot tub & nuns. Either a separate check for HCO or a configurable setting for when to use those vs. items & such seems like a good idea to me.
 

Bale

Minion
Nit - are you going to tweak the price updating logic in view of the mafia preference and hosting here? UR seems to always be visiting Jason's backup site for me.

Is that a bad thing? This site does occasionally go down after all and he seems to update the prices at that site.

The only point to all this is to note that my preferred optimization would place a priority on "Use or Lose" which would include anything that can be used a limited number of times per day or something I already have. I recognize that Use or Lose makes it hard to save something for the future which is why I am really just babbling on about my Use Case but not asking for any changes.

Interesting. I'm not quite sure how to adapt that concept into the code smoothly, but I'll think about it.

Actually, that sounds like something to look at for HCO players. They have less turns per day, hence they have more uses of limited times per day things like the hot tub & nuns. Either a separate check for HCO or a configurable setting for when to use those vs. items & such seems like a good idea to me.

A worthwhile point for me to consider in combination with the above.
 

fronobulax

Developer
Staff member
Is that a bad thing? This site does occasionally go down after all and he seems to update the prices at that site.
Perhaps. Just looking at the output, the script tells me that it is fetching data from Jason's backup site but never seems to tell me that it is getting data from kolmafia.us. Thus my first concern is whether there is something wrong with kolmafia.us. The "normal" behavior I might expect would be to fetch prices from kolmafia.us and only fetch from nixietube.info if there was a problem. In that case I would expect one message, always, that mentions which site provided the data OR silence about the site unless there was a problem with kolmafia.us. Given the mafia preference about sharing data, if it is set I wonder why UR does its own fetch rather than rely on Mafia? Tangentially, the whole exercise makes me wonder how often does it make sense to update the price data since the ideal, by my definition, behavior from UR varies if the update interval is hourly as opposed to daily.

Like I said though it is a nit. UR is doing something reasonable but it just isn't telling me what I expect.
 

Bale

Minion
Perhaps. Just looking at the output, the script tells me that it is fetching data from Jason's backup site but never seems to tell me that it is getting data from kolmafia.us.

It gets data from kolmafia.us at logon. UR is relying on mafia to have downloaded the data at that time, just as you suggest it should be. (It only downloads from kolmafia.us if the preference for logon price update is not set.) There's no way for me to know if it the price update was successful.

Price update can only be done once per session (for each source), not hourly.

What do you expect UR to tell you?
 
Last edited:

Winterbay

Active member
I was just wondering if this text isn't smewhat missleading:

Code:
Restoring HP! Currently at 6 of 15 HP, 36 of 49 MP, current meat: 30 ... Target HP = 12.
Insufficient meat to fully restore MP without wasting restoratives!
Did not fully restore HP for some reason.

I mean why does it even mention MP since it is clearly trying to restore HP...
 

Bale

Minion
It was trying to restore MP in order to cast a spell to heal your HP at the time. The goal was HP restoration.
 
Top