Universal Recovery Script

Uninstalled and reinstalled the script again, using Mafia's script manager. Then found the configuration script thingy for it in the "-run script-" relay browser drop-down. Reinforced my "Don't buy stuff" preference and told it not to break automation. The fist time after that, when I told it to restore mp, it showed a bunch of I/O exceptions. Tried restoring mp again and it worked just fine.

So, apparently, if one forgets to use that little configuration script thingy, Universal Recovery goes insane. Which is weird, as I've never used the configuration thingy with my older Mafia versions and had no problems. Maybe it has something to do with the newer versions of Mafia?
 
Just sounds like you hadn't told UR that you'd made mafia incapable of autobuying stuff from NPCs or the mall. That perfectly supports my supposition, especially as uninstalling and reinstall the script doesn't change your mafia preferences.
 
I don't know enough about technojargon to know what you were talking about. Consider me a tourist here, who happens to be thinking of moving in and becoming a local at some point. I can pick stuff up fairly quickly, but when you get into more complex stuff, it's like a foreigner yelling at me in their language. All you had to say was that I needed to run the UR configuration script and make sure it was set up right. Confusion aside, the problem is now fixed. And perhaps it can be a lesson to anyone else who doesn't run the UR configuration script after installation. :rolleyes:
 
You set mafia to not buy stuff from the mall or NPCs. You left UR on the defaults - buy from both the mall and NPCs regardless of whether or not it's actually possible. You got an error when UR tried to buy stuff from NPCs and your mafia settings made that impossible.
 
Oh, it's not a huge issue. At some point Bale will probably want to make UR have slightly different behaviour... whether:
1) Throw up warnings to players who have set their mafia to harm them by using up their inventory rather than buying cheap consumables and who have left UR set to buy from the mall and NPCs, but disallowed that, or
2) Make UR consider the player's settings and not try to buy when it will fail, simply using up the inventory until all healing is impossible, or
3) Change the default to the level where it simply checks what the player has set as their preferences, or
4) Make UR use the 'buy' command instead of retrieve_item so that it will override your settings and not fail, where you CAN disable cheap restores, but it will use the best cheap restores even if you've told it that you want to stay more expensive in general, until you tell UR that you want to stay expensive as well...

But until one of those happens, it's good to have logic confirmed. :)
 
Universal Recovery will repeatedly abort all execution if it can't get in contact with sourceforge to check for updates, rather than throwing an error once and then continuing as (for example) BestBetweenBattle does.

Code:
Validating adventure sequence...
Condition added: goat cheese (3)

Checking for updates (running Best Between Battle rev. 21)...
svn: E170001: OPTIONS of '/p/bestbetweenbattle/code': 403 Forbidden (https://svn.code.sf.net)
Searching for "abstraction: action"...
Search complete.
Validating repo...
svn: E170001: OPTIONS of '/p/mafiarecovery/code': 403 Forbidden (https://svn.code.sf.net)
Something went wrong while fetching svn directory info
Done.
Did not fully restore HP for some reason.

Validating adventure sequence...
Condition added: goat cheese (3)

Validating repo...
svn: E170001: PROPFIND of '/p/mafiarecovery/code': 403 Forbidden (https://svn.code.sf.net)
Something went wrong while fetching svn directory info
Done.
Did not fully restore HP for some reason.

Loading character status...
Requests complete.

Validating adventure sequence...
Condition added: goat cheese (3)

Validating repo...
svn: E170001: PROPFIND of '/p/mafiarecovery/code': 403 Forbidden (https://svn.code.sf.net)
Something went wrong while fetching svn directory info
Done.
Did not fully restore HP for some reason.

Of note is that my HP was at max, so while the final error on each try is technically correct, it is only so in the vaguest of senses.
 
Last edited:
I can't see how that is possible! I added a check against that...

Code:
void daily_handling() {
	if(get_property("_version_BalesUniversalRecovery") == "") {
		// This is zarqon's automatic map updating: http://kolmafia.us/showthread.php?t=1515
		string curr = visit_url("http://zachbardon.com/mafiatools/autoupdate.php?f="+fname+"&act=getver");
		if(!file_to_map(fname+".txt",heal) || count(heal) == 0
		  || (curr != "" && get_property(fname+".txt") != curr))
			get_newmap(curr);
		// If you're using scripts like this, you should automatically update prices from KoL's price list maintained by fewyn. 
		if(get_property("sharePriceData") == "false") {
			cli_execute("update prices http://kolmafia.us/scripts/updateprices.php?action=getmap");
			set_property("sharePriceData", "true");
		}
		// cli_execute("update prices http://nixietube.info/mallprices.txt"); # JasonHarper's price list is backup for kolmafia.us
		// Set _meatpermp and meatperhp today so they can be used by other scripts right away
		restore_values();
		meatper();
		if(svn_exists("mafiarecovery")) {
			cli_execute("svn update mafiarecovery");
			set_property("_version_BalesUniversalRecovery", thisver);
		}
		else check_version();
	}
}

That sets _version_BalesUniversalRecovery to the current version number the first time it checks the svn. After that it won't ever get to that code if _version_BalesUniversalRecovery has been set.

Can anyone see what I missed? That function is the only place that svn is checked.
 
Level 7 Starting
BCC: We have completed the stage [friarssteel].
BCC: We have completed the stage [cyrpt].
BCC: We have completed the stage [innaboxen].
BCC: levelMe(53, true) called.
Level 8 Starting
BCC: We have completed the stage Trapper
BCC: We have completed the stage [piratefledges].
BCC: levelMe(68, true) called.
Level 9 Starting
BCC: You don't have a wand, or it's not safe to use one. No Zapping for you.

Validating repo...
svn: E170001: OPTIONS of '/p/mafiarecovery/code': 403 Forbidden (https://svn.code.sf.net)
Something went wrong while fetching svn directory info
Done.
Did not fully restore HP for some reason.

Any idea what this means? Full HP as well.
 
Code:
			cli_execute("svn update mafiarecovery");
			set_property("_version_BalesUniversalRecovery", thisver);

That sets _version_BalesUniversalRecovery to the current version number the first time it checks the svn. After that it won't ever get to that code if _version_BalesUniversalRecovery has been set.

Can anyone see what I missed? That function is the only place that svn is checked.

I think you need to switch those two lines around. The first line causes the script to abort, and the second line never runs.
 
I'll update this script once SourceForge gets its act together.

In the meantime, anyone that has trouble can simply copy/paste the following line into the CLI and press enter:

Code:
set _version_BalesUniversalRecovery = 3.15
 
I'm a little surprised that nobody complained until now. I've committed changes to allow UR to play nice with Nuclear Autumn, including the use of Internal Soda Machine.
 
Speaking of Nuclear Autumn. Y'all might want to "set baleUr_DontUseHotTub = true", because the hot tub removes rad sickness and timing that is useful. I got burned a couple times when I was going to manually heal at the chateau and typed "burn -0" to burn my MP first only to have UR trigger and use the hot tub. At least, I assume it was UR, because hot tub was not check in mafia.
 
Any chance that your changes to the script are causing UR to no longer be capable of restoring in other avatar paths? I'm in a WoL run and was having no issues yesterday all the way back in r17128 (or similar) but today after the updates I just get this message:
Code:
Restoring HP! Currently at 108 of 223 HP, 425 of 430 MP, current meat: 89921 ... Target HP = 212.
Did not fully restore HP for some reason.

I figured well maybe the update needs the latest version of Mafia, but the problem persists after going to r17145. I am not out of meat, have not ascended, have not lost access to any areas etc. If there is any more information I can include, please let me know!
 
Oh, heck. Yeah, that was my fault. I made a typo which I'm fixing now. It's amazing how much of a difference it makes if you switch equals with not-equals.

Update the script now and things should work fine.
 
I am getting nearly constant "Did not fully restore HP for some reason." "Did not fully restore MP for some reason." errors using this script in HC NA. I'd love to give you more info, but that's all the info it gives me. It doesn't tell me what it's trying to use so I can determine what the problem is.
 
Back
Top