Universal Recovery Script

Not so much invalid date, but invalid certificate - because it was only valid until yesterday. Certificates need to be periodically renewed. The "industry practice" for this used to be "new certificate every two years", but now we see pushed towards shortening this, possibly way down to "every two months" in the foreseeable future?
 
If I run the script in the relay browser it brings up the script configuration. There i can set various options, some of which is which items it is allowed to use.

I noticed there are 3 items from
http://kol.coldfront.net/thekolwiki/index.php/Doc_Galaktik's_Medicine_Show

But all 3 of those are obsolete. There is no mention of the current versions of items.
1. Galaktik's Curative Nostrum - obsolete, can't find in wiki or mall

2. Doc Galaktik's Ailment Ointment - not sold by galaktik anymore, but can drop from barrel full of barrels, however it now has different stats than it used to when sold by galaktik himself

3. Galaktik's Fizzy Invigorating Tonic - obsolete, can't find in wiki or mall

The new items currently sold by galactic are:
Doc Galaktik's Pungent Unguent
Doc Galaktik's Homeopathic Elixir
Doc Galaktik's Invigorating Tonic

Also their price varies based on whether or not you finished the quest

edit: script seems to use be able to use the new items... not sure what the deal is with the old obsolete names then
 
Last edited:
When calculating the cheapest restorer, does the script look at items that restore both MP and HP at once?

The script seems to think that the best restorer in mall mode is mountain stream soda (restores 35 MP) when actually cotton candy item cone is cheaper even if you were to let their HP restoration go to waste and only use them for their MP restore.
While calculating the right value for a dual restore item can vary from person to person, calculating the value of only one side can be done easily (that is, ignore HP restore value to calculate only its MP restore value when comparing MP restorers; sure some HP goes to waste, but you are still saving money)

----

Another issue, on a new ascension I ended up having to heal, I was at 2 out of 6 HP. meaning I only needed to heal 4 points. Instead of using doc galaktik's pungent unguent (3-5 HP restored), it used Doc Galaktik's Homeopathic Elixir, which costs 4x as much as pungent unguent. it should be using one unguent, and then if it is still not enough to reach your desired target HP, a second one.

Code:
[COLOR=#66CC00]Restoring HP! Currently at 2 of 6 HP, 2 of 4 MP,     current meat: 2190 ... Target HP = 6.[/COLOR]
[COLOR=blue]Try to     heal HP from inventory.[/COLOR]
Purchasing Doc Galaktik's Homeopathic     Elixir (1 @ 120)...
You spent 120 Meat
You acquire an item: Doc     Galaktik's Homeopathic Elixir
Purchases complete.
Using 1 Doc     Galaktik's Homeopathic Elixir...
You gain 20 hit points
Finished     using 1 Doc Galaktik's Homeopathic Elixir.
 
Last edited:
Another issue, on a new ascension I ended up having to heal, I was at 2 out of 6 HP. meaning I only needed to heal 4 points. Instead of using doc galaktik's pungent unguent (3-5 HP restored), it used Doc Galaktik's Homeopathic Elixir, which costs 4x as much as pungent unguent. it should be using one unguent, and then if it is still not enough to reach your desired target HP, a second one.

Code:
[COLOR=#66CC00]Restoring HP! Currently at 2 of 6 HP, 2 of 4 MP,     current meat: 2190 ... Target HP = 6.[/COLOR]
[COLOR=blue]Try to     heal HP from inventory.[/COLOR]
Purchasing Doc Galaktik's Homeopathic     Elixir (1 @ 120)...
You spent 120 Meat
You acquire an item: Doc     Galaktik's Homeopathic Elixir
Purchases complete.
Using 1 Doc     Galaktik's Homeopathic Elixir...
You gain 20 hit points
Finished     using 1 Doc Galaktik's Homeopathic Elixir.

If it's that big of a deal, you have a few options.
1) buy what you want the script, or mafia to use
2) perm a skill that will allow you to have more HP at the beginning of your run

1 is a quicker fix than 2. 2 is more of a long term goal.
 
If it's that big of a deal, you have a few options.
1) buy what you want the script, or mafia to use
2) perm a skill that will allow you to have more HP at the beginning of your run

1 is a quicker fix than 2. 2 is more of a long term goal.
Thanks for the advice, that would work as a workaround, I intend to perm all the skills and have been making good headway on it so far I think.
It is not a big deal, but it is still a logic flaw in the script where overhealing is not correctly taken into account, so there are some other situations where this can crop up.

Also, this is going to be an issue for any new player that tries to use this script, and new players really need the meat (due to lacking the right perms).
There are also seasonal paths which don't let you use any permed skills which are affected. It is not a huge issue, but it does make day 1 and 2 of a run a bit more inefficient and thus painful.
 
Last edited:
Also, this is going to be an issue for any new player

It should be noted that the last update was January 2018 and the previous update was February 2017. Bale has not logged in here since January 2018. The script is almost ten years old and although Bale has expressed an interest in rewriting it, nothing has been released. A new player really should take the time to identify the support status of a script before deciding to rely upon it and possibly get frustrated because it doesn't behave as expected.
 
I noticed today that some required website seems to be offline. Making each turn take a very long time as this script has to timeout its connection attempt

Code:
[COLOR=red]IOException during data post     (https://zachbardon.com/mafiatools/autoupdate.php?f=recoveryScript_map_v2&act=getver):     Connection timed out: connect.[/COLOR]
Had to disable the script entirely in order to play.
 
https://zachbardon.com/mafiatools/ was online for me now so it may have been your connection.

For future reference there are files hosted there and shared by scripts so if the site is down for a while, other things will break. batfactors is one file that I recall is there.

The host/owner just got married and is pretty much on honeymoon for the month of May (2018) so if there is a repeatable problem, patience is advised.
 
https://zachbardon.com/mafiatools/ was online for me now so it may have been your connection.

For future reference there are files hosted there and shared by scripts so if the site is down for a while, other things will break. batfactors is one file that I recall is there.

The host/owner just got married and is pretty much on honeymoon for the month of May (2018) so if there is a repeatable problem, patience is advised.
Thank you for the info. I had thought it was a site specific to that script rather than a general mafia thing. I guess I can reenable universal recovery then since the site is back online.
 
I did a quick skim through and updated this script to work with G-Lover. Not tested outside of my account, but it works for me!

View attachment 9142
Thanks, I had just noticed that the old script didn't work with G lover... well, actually what it did is

(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
(usable quantity of cast (2) is limited to 0 by g-lessness)
...
And it did so too fast to tell which script called it as it overflow the gCLI even if you manually abort a second after it started. (sometimes it wouldn't abort either).
I went and manually ran scripts to find out which one does that. it must be trying to use canonelli cocoon.

Anyways, thanks for the updated version, so far I have had no problems with it.
 
Last edited:
Ok, this is downright weird. Using the script on a new multi on its first ascension (so no healing skills). Instead of restoring HP by buying doc galaktic's restoratives, its spending 1900 meat in the mall to buy the least efficient restoratives possible.

Code:
[COLOR=#66CC00]Restoring HP! Currently at 49 of 64 HP, 73 of 73 MP,      current meat: 2117 ... Target HP = 61.[/COLOR]
Searching for "Camp Scout      pup tent"...
Search complete.
Purchasing Camp Scout pup tent (1      @ 1,900)...
It is using a +1000HP item to heal 15HP...

edit: wait, I know what the problem is, this is a more extreme version of an issue I have mentioned before. Back then I was comparing only 18 meat, comparing using two different healing skills.

The issue is quite simple, the script simply does not care, at all, how much HP you can hold, it only care what gives the most HP/meat.
+1000 HP for 1900 meat = 1.9 meat/HP, this happened to be the best ratio of meat/HP in the store. So it uses it despite the fact it is actually only giving me +15 HP, for an actual efficiency of 126.6 meat/HP.

What was a minor issue before became a critical issue now. For now I am setting it to only buy from NPC stores.

edit2: double facepalm. now its using my scrolls of drastic healings for 15 HP (... wait why does it think those come from NPC vendors? or did I have one in inventory? I can't have, I am too low level for that quest... what is going on?)...
yea I am just going to disable this script entirely until I have healing skills. Or until I find the time to fix it. At the moment it is extremely harmful for new characters that do not have the healing skills permed..
 
Last edited:
Have you configured it to tell it what to use? It uses what it is in your healing settings in mafia
Are you sure? it has its own separate settings page though, and the items it is using don't even exist in the configuration for mafia baseline "restore hp" script.
Anyways, yes I have configured the baseline mafia options.

This is not a configuration issue it is a fundamental issue with the script as it harkens back to something I have noticed long long ago and was told to just get more +HP/MP skills permed. And that is no big deal since I was only losing a trivial amount of meat per heal, and in truth it was not a big deal.
Namely, it was using tongue of the walrus to cure ~2 HP instead of lasagna bandages; yes, tongue of the walrus is more efficient if both heal their average quantity, but when you are close to your HP cap then it is a waste to use the higher MP cost option

For people who have permed the healing skills and have a bunch of +maxHP / +maxMP skills permed this is less of an issue, the script will just use the skills. (still an issue because it is buying inefficient stuff instead of the cheapest option, wasting some small amount of meat.
For a brand new player lacking in perms this is really bad, bankrupting them for no reason. A +1000 HP item is assumed to actually heal you for 1000 HP, regardless of the fact that your maxHP is measured in two digits.

Anyways, things (that I remember) that needs to be fixed in this script are:
1. When calculating an item's efficiency, the "restored HP/MP" value used in the calculation should be whichever is lower between:
a. the amount that item or skill it can hypothetically restore
b. [maxHP-currentHP]. (or MP if restoring MP)

2. When looking at the mall, consider items which recover both HP and MP. Currently they are totally ignored. This results in a case of "item A: recover 100 HP and 100 MP for 100 meat" being ignored in favor of "item B: recover 50 MP for 100 meat". Even though the latter is half the efficiency.
Sure, writing a system that actually accounts for the value of both the HP AND the MP is complicated; but also not necessary, simply ignore no what is not being restored. this will improve efficiency.

3. include a sanity check that aborts and reports if meat per HP is ridiculously high. (say, over 10 meat per HP? maybe over 20?)

I have never made a mafia script before... but I have dabbled in other stuff like javascript. I will give it a try later.
 
Last edited:
The real problem is that you seem to have cannelloni cocoon permed but for some reason it's never mentioned in your post, so you should probably check your settings to enable that, because it's by far the best HP recovery ability out there.
 
The real problem is that you seem to have cannelloni cocoon permed but for some reason it's never mentioned in your post, so you should probably check your settings to enable that, because it's by far the best HP recovery ability out there.
1. This is a brilliant script, this doesn't mean it can't have issues or bugs. I will see about fixing it and posting the fix here later on.

2. You must have missed it, I was stating that I have made a new multi that has zero skills permed. And saying this issue should also affects all new players who have not permed cocoon and are recommended this script by someone. The part where I am talking about cocoon was referring to my main account. Having cocoon permed its not that big a deal there, merely somewhat inefficient. But on my new multi I don't have any perms at all and this issue really rises to the fore.
 
Last edited:
Back
Top