Universal Recovery Script

How do you think it should be taken into consideration? Your ideas would be helpful since I'm not really into aftercore.
 
I'm actually a little bit confused by VinnyB's statement. It would seem to me, with such a specialized dwelling that one would want manual control over when to rest within said dwelling in order to gain the buff at opportune times, rather than merely when hp/mp deemed the restoration from resting necessary. Personally, if I were in VinnyB's situation, I would disallow UR from resting in my dwelling if the meat/item drop buff was meant to be conserved and manually choose to rest as needed to gain the buff, letting UR use other methods of restoring hp/mp as needed.
 
I don't think you can choose whether UR uses free disco naps or not. I guess it would be best to check if you have Crimbo stuff in your campground before using Disco Naps.

Here is the crimbocamp() function from Heeheehee's Profit from Effects:
PHP:
float crimbocamp() {
	int[item] camp = get_campground();
	int crimbo09=0;
	if(camp[$item[crimbo wreath]]==1) crimbo09=crimbo09+1;
	if(camp[$item[gingerbread house]]==1) crimbo09=crimbo09+1;
	if(camp[$item[plastic crimbo reindeer]]==1) crimbo09=crimbo09+1;
	if(camp[$item[string of crimbo lights]]==1) crimbo09=crimbo09+1;
	int b=0;
	switch(crimbo09){
		case(1): b=5;
		case(2): b=10;
		case(3): b=20;
		case(4): b=50;  // In the event that you have all the items.
	}
	return b;
}
A lighter version of this, combined with a check to see if the first Disco Nap has been used, should take care of that.
 
I don't think you can choose whether UR uses free disco naps or not.

Actually, Spiny is correct. "Free Disco Rest" is configurable in both hardcore and mallcore modes. (Check the options in relay_Universal_Recovery.)
 
"Free Disco Rest" is configurable in both hardcore and mallcore modes.
My bad, I didn't have Mafia running when I posted this, and I didn't remember that option. I guess there is a simply solution to VinnyB's problem then.
 
Using latest versions all around.
I saw the following and was not pleased at burning 48 turns to regain 64 hit pooints.
> Restoring HP! Currently at 1 of 65 HP, 98 of 165 MP, current meat: 321 ... Target HP = 49.

[2036] Rest in Clan Sofa (48 turns)
You gain 64 hit points
You gain 19 Mana Points

I then maxed out UR verbosity and this time only burned 9 turns to do about the same thing.
> Calling Universal Recovery for type=HP, amount=0
> Restoring HP! Currently at 5 of 66 HP, 119 of 165 MP, current meat: 108 ... Target HP = 50.
> Trying to fullheal
> Try to heal HP from inventory.
> Trying to fullheal
> Try to heal HP with skills.

[2088] Rest in Clan Sofa (9 turns)
You gain 61 hit points
You gain 37 Mana Points

Recovery settings are 15/75 and 15/50. All of the configurable HP restores are allowed. All of the configurable MP restores are allowed except for the Card and Soda, which this character does not have. Other settings are Never Abort, Both Disco Rest (that doesn't apply), Superverbose and use mafia Preferences. Character is a Sauceror in Bad Moon. Both meat supply and inventory are sparse.

Using grep on my session logs suggests that sometime between 8/6 and 8/7 a change occurred with the sofa.
cafebabe_20100805.txt:[1605] Rest in Clan Sofa (2 turns)
cafebabe_20100805.txt:[1618] Rest in Clan Sofa (1 turns)
cafebabe_20100805.txt:[1637] Rest in Clan Sofa (1 turns)
cafebabe_20100805.txt:[1647] Rest in Clan Sofa (2 turns)
cafebabe_20100805.txt:[1651] Rest in Clan Sofa (1 turns)
cafebabe_20100805.txt:[1663] Rest in Clan Sofa (1 turns)
cafebabe_20100805.txt:[1672] Rest in Clan Sofa (1 turns)
cafebabe_20100806.txt:[1683] Rest in Clan Sofa (1 turns)
cafebabe_20100806.txt:[1695] Rest in Clan Sofa (2 turns)
cafebabe_20100806.txt:[1698] Rest in Clan Sofa (1 turns)
cafebabe_20100806.txt:[1710] Rest in Clan Sofa (1 turns)
cafebabe_20100806.txt:[1719] Rest in Clan Sofa (2 turns)
cafebabe_20100806.txt:[1727] Rest in Clan Sofa (1 turns)
cafebabe_20100806.txt:[1731] Rest in Clan Sofa (1 turns)
cafebabe_20100806.txt:[1739] Rest in Clan Sofa (1 turns)
cafebabe_20100806.txt:[1745] Rest in Clan Sofa (1 turns)
cafebabe_20100807.txt:[1750] Rest in Clan Sofa (48 turns)
cafebabe_20100807.txt:[1802] Rest in Clan Sofa (19 turns)
cafebabe_20100809.txt:[1928] Rest in Clan Sofa (67 turns)
cafebabe_20100809.txt:[2012] Rest in Clan Sofa (18 turns)
cafebabe_20100810.txt:[2036] Rest in Clan Sofa (48 turns)
cafebabe_20100810.txt:[2088] Rest in Clan Sofa (9 turns)

I acquired and used the Frobazz house on 8/8 and I believe the campground was bare ground up to that point.

I am concerned that my UR settings allow it to burn 48 and 9 turns for effectively the same result. I wonder why it is choosing the sofa over the house in my campground although I wonder only because I am using my memory and not the wiki.

Any ideas?

Thanks.
 
House gives ~40 MP and HP while the sofa gives roughly level times 5 of each so above level 12 I guess that the sofa is better.
 
One of the things that's been bugging me has been the seemingly random decision to restore MP when I don't want any MP restoring at all. I tend to use MP restoring familiars (Starfish or Cocoabo stasis style) through most if not all of my runs. Every now and then, I find this:
Code:
cast 7 Summon Party Favor
You acquire an item: divine champagne flute
You acquire an item: divine blowout
You acquire an item: divine noisemaker
You acquire an item: divine can of silly string
You acquire an item: divine can of silly string
You acquire an item: divine blowout
You acquire an item: divine noisemaker
 > Restoring MP! Currently at 162 of 162 HP, 21 of 297 MP, current meat: 37721 ... Target MP = 27.

use 1 carbonated water lily
You gain 63 Mana Points

cast 1 Summon Party Favor
You acquire an item: divine noisemaker
 > Summons today: Hearts(0) Favors(8) Songs(0) BRICKOs(0)
If you recognize it for what it is, this is libramBurn.ash.

Now, I have the settings in mafia for burning MP as "Recast at 100%" and "Do not rebalance" followed by Restore your mana as "Do not auto-recover mana" and "Do not auto-recover mana". Every item is unchecked.
For the relay script, the dropboxes are "Do not auto-recover mana" and "Try to recover mana up to 5%" (there is no disable) and every item is unchecked.
Big problem, since I have mafia disabled on MP restoration, it shouldn't be calling the script at all, I think. I'm not sure, I had to swing by here first before I ran off and called it a bug.

Also, I wanted to ask if a flag for disabling MP restoration might be included if certain MP restoring familiars are active. The stocking Mimic, for example, always produces way more MP than I can burn off, and I have a bBS that is very good at burning my MP for me, but a stasis script that makes sure I get back as much MP as possible. If I have such a familiar active, I'd rather not use any MP recovery whatsoever. Something for consideration at least.
 
You can configure Mafia's MP restoration for restoration between adventures, but when Mafia is asked to cast something, it will always try to restore the MP needed to cast if the MP on hand isn't enough.

Code:
cast 7 Summon Party Favor
...
 > Restoring MP! Currently at 162 of 162 HP, 21 of 297 MP, current meat: 37721 ... Target MP = 27.

use 1 carbonated water lily
You gain 63 Mana Points

cast 1 Summon Party Favor
I think the issue here is with libramBurn asking for 8 casts of Divine Favors. Mafia proceeds to cast 7 times (it doesn't have enough MP for the 8th cast), restores MP, and does the 8th cast.
 
Um, if you're using LibramBurn.ash, why are you using mafia's manaburning at all? I thought you were supposed to disable manaburn within mafia and allow libramburn to burn as your mana is generated up to a certain threshold which you set within the script itself?
 
Bump.
I was kind of hoping someone might tell me what silly thing I did that made UR decide it needed 48 sofa turns to restore 64 hp and 19 mp as noted above. I'm sort of leery about running UR with that character until I understand why. I figured I had done some dumba** thing that everyone but me would find easy to spot ;-)
 
I am not sure (and looking at an old version of UR), but doesn't (around line 993 in this version)
Code:
	int x = (target - my_mp())/ my_level()*5;

parse as ( (target-my_mp) / my_level ) * 5
instead of (target-my_mp) / (my_level * 5)
?

which would make UR rest up to 25 times more than needed when using the sofa (as long as it wouldn't overflow HP)



ETA: and similarly around line 1345 for restoring HP without overflowing MP.

ETA2: why does the current version of UR have
Code:
	x = [b]max[/b](x, my_adventures());
in there? Wouldn't that always use up all remaining adventures?
 
Last edited:
Um, if you're using LibramBurn.ash, why are you using mafia's manaburning at all? I thought you were supposed to disable manaburn within mafia and allow libramburn to burn as your mana is generated up to a certain threshold which you set within the script itself?
Which is exactly how I have it set. Mafia doesn't currently have an option to have it set to completely disable, just "@ 100%" and "do not rebalance". Mafia never kicks in for casting buffs, only my scripts do.

Maybe there's a bug in libramBurn if it's asking for 8 casting when I can only cast 7. I do have the MP threshold set to 0 MP. Might have something to do with it.
 
Which is exactly how I have it set. Mafia doesn't currently have an option to have it set to completely disable, just "@ 100%" and "do not rebalance". Mafia never kicks in for casting buffs, only my scripts do.

Maybe there's a bug in libramBurn if it's asking for 8 casting when I can only cast 7. I do have the MP threshold set to 0 MP. Might have something to do with it.

You know, I misread your original post and my apologies for that. I use libramburn with my AT who only has brickos to summon. Relevant vars file entries are as follows:

Code:
libramburn_minmp	400
libramburn_summonbrickos	true
libramburn_summonfavors	false
libramburn_summonhearts	false
libramburn_summoninhc	false
libramburn_summonsongs	false

I don't run a mood. I don't cast anything while automating other than the occasional olfaction and summon brickos when the script fires off to do so. I do use UR, but I have mana restoration disabled and rely on my gear for recovery. My mana burning options say: Start recasting immediately & do not rebalance buffs. I don't ever change those. If the script does, so be it.

In case it's also relevant, these are the manburn settings on file:

Code:
> prefref manaburn

manaBurnSummonThreshold (user, now '10', default 10)
manaBurningThreshold (user, now '-0.05', default -0.05)
manaBurningTrigger (user, now '-0.05', default -0.05)

I don't have a problem at all with libramburn. It should be noted that I have a much larger max mana pool than you appear to have. I start out with boosting MP as much as possible, then manually calling the script so it will bulk cast as much as possible down to the 400 MP that I set. It then casts once as mana accrues between battles.

My best guess is that you don't have your libramburn_minmp set properly.
 
Hmm for some reason it is not displaying any messages. For a while i thought my restore script setting got reset
 
Back
Top