Universal Recovery Script

Magus_Prime

Well-known member
Universal Recovery uses a data file hosted by zarqon on zachbardon.com/mafiatools/autoupdate.php. That server recently updated to push everything to HTTPS and something is being lost in the translation on the server side.

To fix the problem change the three lines in Universal_recovery.ash that have the following string from
Code:
http://zachbardon.com/mafiatools/autoupdate.php

to

Code:
https://zachbardon.com/mafiatools/autoupdate.php
 
Last edited:

taltamir

Member
Universal Recovery uses a data file hosted by zarqon on zachbardon.com/mafiatools/autoupdate.php. That server recently updated to push everything to HTTPS and something is being lost in the translation on the server side.

To fix the problem change the three lines in Universal_recovery.ash that have the following string from
Code:
http://zachbardon.com/mafiatools/autoupdate.php

to

Code:
https://zachbardon.com/mafiatools/autoupdate.php
Ideally, this info should actually be stored in a file on the SVN that gets downloaded with the script. For example, the mushroom autofarm script stores its data in a text file which it downloads as part of the SVN pull

Anyways, at the moment the script doesn't work
 

zarqon

Well-known member
@taltamir: Ideals vary. The benefit of using the Map Manager over SVN is that files are publicly editable. I definitely prefer this for BatBrain, as things are being constantly added to the game which that script needs to know about, and a lot of content has been added by users. For files that don't need frequent updating as new content is added (like, probably, this case, since the file hasn't been updated since February) SVN is preferable.

I've updated ZLib to continue to work with the Map Manager, but Bale is using his own code to access the Map Manager and hasn't been around here in several months to update his script. If you want the script to 'work' again though, you can simply add the 's' in the right places as Magus noted above until Bale (hopefully -- fingers crossed) returns to update it. That's what I did -- so there was only a small glitch in my Unversal Recovering.

Or, optionally, change it to simply use file_to_map() rather than checking the Map Manager at all. If Bale's not around, it's probably not getting updated anyway until the script itself updates.
 
Last edited:

zarqon

Well-known member
Right, it didn't and then you bug reported it and then it did and then it didn't again. Hopefully that will be fixed soon.
 

zeryl

New member
Not sure what has happened recently, but it seems like this gets stuck into a huge loop, and never proceeds for me.

What I've found in the log is this:

In mallmode, best MP restorative is: palm-frond fan @ 862.75 meat total.
Mall price to restore 105MP is 447 meat.
Trying to use 1 Medicinal Herb's medicinal herbs
Failed to use an item from the mall.

And then it just loops, and sits. Never to actually run anything at all.

If something isn't available to purchase, does it not exclude it on the next cycle? Is there some way to skip past this one item?
 

kevtron

New member
I had it Mafia going yesterday no problem, but today after setting universal recovery now have a problem.

Now when I try to run any adventures it spams a huge amount of <html> looking code and then says "Restorative data is corrupted or missing. Troublesome!"

I've installed it and set it as my recovery script, and it was after setting it as my script that this started (missed that step yesterday after first installing it)... anyone have any ideas?
 
Last edited:

Bale

Minion
Sorry. Problem involving change of protocols for the map manager. My local copy was fixed, but I forgot to update the SVN.

Try updating the script. Then let me know for sure that it worked.
 

coandco

Member
With the latest update, I'm now seeing the following error in my console when Universal Recovery is run:
Code:
IOException during data post     (https://zachbardon.com/mafiatools/autoupdate.php?f=recoveryScript_map_v2&act=getver):     sun.security.validator.ValidatorException: PKIX path building failed:     sun.security.provider.certpath.SunCertPathBuilderException: unable to find     valid certification path to requested target.
IOException     during data post     (https://zachbardon.com/mafiatools/autoupdate.php?f=recoveryScript_map_v2&act=getver):     sun.security.validator.ValidatorException: PKIX path building failed:     sun.security.provider.certpath.SunCertPathBuilderException: unable to find     valid certification path to requested target.
 

Bale

Minion
I think that might be a sign that you need to update Java. I remember something about older versions of java not handling https protocols properly. (Older meaning like half a year older than the most recent version.)

I don't remember though if it produced that exact error. Still, it cannot hurt to update java. Then let us know if you still have a problem.
 

taltamir

Member
You're welcome! I'm glad its sorted out.
@Bale I noticed you just recently posted in this thread. But the first page changelog states that the last update to the script was 7 years ago. Have you just not been updating the changelog?

Because if it is 7 years old, and looking at the description and the logic example given it would in an inefficient experience if used today in 2018. Where healing via MP based skills is massively more efficient than it used to be. And the skills used for it are different too. (the skill disco power nap has been decommissioned since and replaced with adventurer of leisure, which boosted disco nap into being the most efficient option prior to cannelloni cocoon overtaking it. with the doc galactic changes, assuming you did the galactic quest which should be the first thing you do on every ascension, you are paying 1.2 meat per HP using disco + adventurer. all the way down to 0.75 meat/HP if you have a -3 MP cost item.)
http://kol.coldfront.net/thekolwiki/index.php/Cost_Analysis_of_Restoring_HP_and_MP
 

fronobulax

Developer
Staff member
I believe the change log was deprecated when it was moved to SVN.

Revision: 36
Author: balefull
Date: Wednesday, January 10, 2018 11:52:54 PM
Message:
Map manager switched from using http to https.

----
Modified : /scripts/Universal_recovery.ash

Revision: 35
Author: balefull
Date: Monday, February 20, 2017 02:07:18 PM
Message:
Remove automatic update.

----
Modified : /scripts/Universal_recovery.ash

Revision: 34
Author: balefull
Date: Thursday, February 16, 2017 02:28:54 PM
Message:
Forgot to delete a line after my last commit. Big fixed.

----
Modified : /scripts/Universal_recovery.ash

Revision: 33
Author: balefull
Date: Thursday, February 16, 2017 05:12:56 AM
Message:
r17808: Gelatinous Noob skill: Gelatinous Reconstruction

----
Modified : /scripts/Universal_recovery.ash

Revision: 32
Author: balefull
Date: Saturday, February 4, 2017 03:27:20 AM
Message:
Fix mp cost for lasagna bandages.

----
Modified : /scripts/Universal_recovery.ash

Revision: 31
Author: balefull
Date: Wednesday, January 18, 2017 06:49:02 PM
Message:
Do not use recuperative sweets if they cannot be purchased from the mall and might be synthesized.

----
Modified : /scripts/Universal_recovery.ash

Revision: 30
Author: balefull
Date: Thursday, October 27, 2016 02:36:56 AM
Message:
Don't misuse spleen items. They're too chewy!

----
Modified : /scripts/Universal_recovery.ash

Revision: 29
Author: balefull
Date: Wednesday, October 26, 2016 03:16:26 PM
Message:
Epic food is so common in-run these days! I think this estimation is still way too low. Perhaps I should up it to 5.1

----
Modified : /scripts/Universal_recovery.ash

Revision: 28
Author: balefull
Date: Wednesday, September 28, 2016 06:11:14 PM
Message:
Fix round off error for Internal Soda Machine.

----
Modified : /scripts/Universal_recovery.ash

Revision: 27
Author: balefull
Date: Sunday, September 25, 2016 12:28:29 PM
Message:
Make UR more forgiving about spending adventures resting (if it is enabled) when you are experiencing a Nuclear Autumn.

----
Modified : /scripts/Universal_recovery.ash

Revision: 26
Author: balefull
Date: Wednesday, August 24, 2016 05:59:18 PM
Message:
Typo in last commit broke HP purchase. It's fixed now.

----
Modified : /scripts/Universal_recovery.ash

Revision: 25
Author: balefull
Date: Wednesday, August 24, 2016 12:55:24 AM
Message:
Support for Nuclear Autumn.

----
Modified : /scripts/Universal_recovery.ash

Revision: 24
Author: balefull
Date: Wednesday, July 13, 2016 05:09:49 PM
Message:
Fix svn checking to not be troublesome when svn is down.

----
Modified : /scripts/Universal_recovery.ash

Revision: 23
Author: balefull
Date: Sunday, May 3, 2015 01:00:13 PM
Message:
Make the new Doc Galaktik code play nice with "Bees Hate You" or potential other paths which remove restoratives from play.

----
Modified : /scripts/Universal_recovery.ash

Revision: 22
Author: balefull
Date: Thursday, April 23, 2015 11:48:47 PM
Message:
Small tweak to last commit.

----
Modified : /scripts/Universal_recovery.ash

Revision: 21
Author: balefull
Date: Wednesday, April 22, 2015 06:46:08 PM
Message:
Doc Galaktik has been completely revamped! This should fix things.

----
Modified : /scripts/Universal_recovery.ash

Revision: 20
Author: balefull
Date: Tuesday, March 17, 2015 07:39:08 PM
Message:
Some fixes for Medicinal Herb's medicinal herbs.

----
Modified : /scripts/Universal_recovery.ash

Revision: 19
Author: balefull
Date: Monday, February 23, 2015 08:31:15 PM
Message:
r15461 requires me to change _spec to Generated:_spec

----
Modified : /scripts/Universal_recovery.ash

Revision: 18
Author: balefull
Date: Saturday, February 21, 2015 03:25:16 AM
Message:
Ed does not heal like a mere mortal.

----
Modified : /scripts/Universal_recovery.ash

Revision: 17
Author: balefull
Date: Thursday, January 15, 2015 09:02:05 PM
Message:
Last commit works better now.

----
Modified : /scripts/Universal_recovery.ash

Revision: 16
Author: balefull
Date: Thursday, January 15, 2015 06:21:14 PM
Message:
Fix for Lasagna Bandages and Astral Bracers only affecting in-combat mp costs.
Restoration values for Chateau are spaded now.

----
Modified : /scripts/Universal_recovery.ash

Revision: 15
Author: balefull
Date: Tuesday, January 6, 2015 03:15:13 AM
Message:
Improved support for Chateau Mantegna.
Still needs better spading for recovery.

----
Modified : /scripts/Universal_recovery.ash

Revision: 14
Author: balefull
Date: Sunday, January 4, 2015 02:03:16 AM
Message:
Oops. Typo fixed. X2 COMBO!!

----
Modified : /scripts/Universal_recovery.ash

Revision: 13
Author: balefull
Date: Sunday, January 4, 2015 01:35:43 AM
Message:
Oops. Typo fixed.
----
Modified : /scripts/Universal_recovery.ash

Revision: 12
Author: balefull
Date: Saturday, January 3, 2015 06:28:31 PM
Message:
Preliminary support for Chateau.
This requires r15115 to work properly!

Better support will be added once I know exactly how much hp/mp are restored at the Chateau.

----
Modified : /scripts/Universal_recovery.ash

Revision: 11
Author: balefull
Date: Thursday, November 13, 2014 02:26:01 AM
Message:
KoL changed how skills work today. and unfortunately UR needs to manually activate the Zombie Master recovery skills. Fix urls for Lure Minion, Summon Minion, and Summon Horde.

----
Modified : /scripts/Universal_recovery.ash

Revision: 10
Author: balefull
Date: Tuesday, October 7, 2014 05:34:09 AM
Message:
Improve Thrice-Cursed protection.
Fix bug with mmj attempting to be purchased when you cannot do it.
Remove warning for not opening myst guild since it is out of the way now.

----
Modified : /scripts/Universal_recovery.ash

Revision: 9
Author: balefull
Date: Thursday, March 20, 2014 02:32:15 AM
Message:
When you get bad effects in the desert, properly Shake It Off.

----
Modified : /scripts/Universal_recovery.ash

Revision: 8
Author: balefull
Date: Tuesday, March 18, 2014 06:36:50 PM
Message:
Better protection for Once to Thrice-Cursed

----
Modified : /scripts/Universal_recovery.ash

Revision: 7
Author: balefull
Date: Tuesday, March 4, 2014 08:34:49 PM
Message:
Shake it Off cures almost all bad stuff.

----
Modified : /scripts/Universal_recovery.ash

Revision: 6
Author: balefull
Date: Wednesday, February 19, 2014 12:46:24 AM
Message:
Did you know that licking a Space Tours Tripple cures Beaten Up? I just learned that!

Also, fixed a horrible, horrible bug that was causing UR to believe you could rest 3 time a day for free if you have an Unconscious Collective. In case you didn't know, KoL fixed that bug for other avatar paths so they can't do it either.

----
Modified : /scripts/Universal_recovery.ash

Revision: 5
Author: balefull
Date: Monday, February 17, 2014 09:58:02 PM
Message:
Support Sneaky Pete's ability to Shake It Off


----
Modified : /scripts/Universal_recovery.ash

Revision: 4
Author: balefull
Date: Monday, November 25, 2013 03:39:34 AM
Message:
retrieve_item() is often more versatile and error resistant than buy()

----
Modified : /scripts/Universal_recovery.ash

Revision: 2
Author: balefull
Date: Tuesday, November 5, 2013 09:04:15 PM
Message:
Version 3.13: First SVN updating version
Also, Desert (Unhydrated) is no longer a noncombat zone.

----
Modified : /scripts/Universal_recovery.ash

Revision: 1
Author: balefull
Date: Tuesday, November 5, 2013 08:47:20 PM
Message:
Initial commit for version 3.12.1 before modification to enable SVN updating.
 

taltamir

Member
I believe the change log was deprecated when it was moved to SVN.
Thank you, that is good news.
In that case it might be a good idea to edit that second post with the changelog to note that changelog is no longer being updated and has been replaced with the SVN commit log. Since right now looking at the threat it looks like a project that has been dead for 7 years instead of an active one.
 

fronobulax

Developer
Staff member
Thank you, that is good news.
In that case it might be a good idea to edit that second post with the changelog to note that changelog is no longer being updated and has been replaced with the SVN commit log. Since right now looking at the threat it looks like a project that has been dead for 7 years instead of an active one.

That's is Bale's call to make. There was a period when Bale resisted migrating UR to SVN because he was working on OneUp (?) a.k.a. Universal Recovery 2.0. That project seems to have stalled and Bale himself seems to be spending much less time on KoL things.

Since you joined in 2017 there is an historical convention that it might help to make explicit. In the days before SVN the way to advertise scripts and updates was to start a thread on KoLmafia.us and attach the latest version of the script to the first post. When a new version was released text in the first post was edited. Authors who wanted to report changes often edited additions into a change log at the same time. But when the 'check for update' process was migrated to SVN the incentive for authors to maintain the first post diminished to zero. So a change log in a thread here for a script that is updated via SVN is the exception, not the expectation. SVN change logs are available via SVN clients. I don't think SVN in mafia supports dumping an entire change log but you can get the change message associated with a change when it is updated.
 

taltamir

Member
That's is Bale's call to make
Which is why I phrased it as a mild suggestion.

Since you joined in 2017 there is an historical convention that it might help to make explicit. In the days before SVN the way to advertise scripts and updates was to start a thread on KoLmafia.us and attach the latest version of the script to the first post. When a new version was released text in the first post was edited. Authors who wanted to report changes often edited additions into a change log at the same time. But when the 'check for update' process was migrated to SVN the incentive for authors to maintain the first post diminished to zero. So a change log in a thread here for a script that is updated via SVN is the exception, not the expectation. SVN change logs are available via SVN clients. I don't think SVN in mafia supports dumping an entire change log but you can get the change message associated with a change when it is updated.
That historical conversion is pretty obvious, yes. But I am not suggesting he delete the first post nor that he constantly update it.
Just make 1 last final update saying "hey, this isn't dead. I am just not going to post changelog here anymore since it is already on SVN".

While there is zero incentive to constantly edit the first post with every update. Not doing that one last final update makes it seem like a dead project.

In regards to dumping a current changelog from mafia... did you perhaps misread my suggestion as me saying that they should update the changelog on the first post with every new update? because that was not what I was saying.
 
Last edited:

fronobulax

Developer
Staff member
Just make 1 last final update saying "hey, this isn't dead. I am just not going to post changelog here anymore since it is already on SVN".

We use different criteria for determining whether something is 'dead'. The first post on thread here contains no information that I would use to determine whether a script is a) being actively maintained; b) still works but may not be maintained; or c) neither of the above. The last post(s) or the SVN status is what I would use. We clearly disagree and that's OK.
 

taltamir

Member
We use different criteria for determining whether something is 'dead'. The first post on thread here contains no information that I would use to determine whether a script is a) being actively maintained; b) still works but may not be maintained; or c) neither of the above. The last post(s) or the SVN status is what I would use. We clearly disagree and that's OK.
that post literally lists update dates which shows the script was last updated 7 years ago.
change it to say "look at SVN" is not something that needs ongoing maintenance to the thread and constant edits. it is a one time edit that will never need to be touched again
 
Top