autoBasement.ash - Better basement automation

xKiv

Active member
So, once your "base HP" (before any +% to HP or muscle) is about 1000, the script will favor +100% HP over 10 levels of elemental resist? (from equipment) .... that is not good, +10 levels of elemental resist is "equivalent" (in survivability of one damage source) to +100% HP at somewhere between 10 and 11 levels of resistance to begin with.

(
And since the score is a java float (with 23 bit mantissa), once you get ~800 million HP (after all buffs), it might disregard any elemental resistance, because +1 becomes equivalent to +0 at that precision. But that shouldn't happen until muuuch later.
)

You should probably change that 0.01 dynamically to something that's inversely proportional to basement_level**1.4 (or that 1 and 0.5 to something that's directly proportional), so that the relative importance of +HP% and +element_resist_level doesn't change with basement level.
 

Rinn

Developer
If you want some clarification to why I wrote it the way I did, it's because my character has practically every piece of worthwhile equipment in the game and every skill, so I never had any trouble basement diving. While it worked for me in almost 100% of cases I can see why it wouldn't be the most ideal logic for accounts that have access to less then I did. Then on top of that once I finished my telescope I stopped updating it completely.
 

Winterbay

Active member
I ran into another annoying problem this run (my last though) where it had a problem with switching between outfits where an item of which I only had one was in the offhand in one outfit but in the main hand in the other. This version solves that problem by forcing an unequip if it detects this is the case.
 

Theraze

Active member
Or... y'know... you could use Winterbay's version from 3 posts above yours that's been updated in the past year. :)
 

Bale

Minion
Unfortunately Rinn has not provided an official update to this script for over a year now and it no longer works with the current version of mafia as well as lacking Winterbay's new features. Consequently I have created a place for Winterbay's unofficial updates as the thread's second post HERE, and put a note at the beginning of this thread to that effect.

Rinn, if you dislike this initiative of mine, please let us know and I will modify the situation to your satisfaction.
 
Last edited:

mredge73

Member
Even with Winterbay's new version I still have to delete all of my outfits prior to running the script.
If my Disembodied hand has my whackn' stick and an outfit includes the stick:

> call scripts\Rinn\autoBasement.ash

Initializing items and effects...
Items and effects initialization complete!
Caching outfits...
Putting on outfit: Mysticality
Equipment changed.
Maximizing...
192 combinations checked, best score 3124.0
Putting on Hodgman's whackin' stick...
Equipment changed.
Saving outfit: Mysticality
Outfit saved
Putting on outfit: Muscle
You only put on part of that outfit.


Although it says "Putting on Hodgman's whackin' stick...", it doesn't actually do it.
Stripping the hand of the stick prior to running the script does not work either.
The only thing that works is to delete all outfits that have the whackin' stick in them prior to running the script.
 

Winterbay

Active member
Odd... It really should work... I'll have to take a look at that later when I have more time. The problem is that I have neither a hand nor a hatrack so can't really test things :(
 

mredge73

Member
I fixed it.
I had to rewrite strip_familiar, in its current form it would only function if I had both a hand and hatrack. I only have a hand so it returned before stripping the familiar.

Code:
boolean strip_familiar(string tested_outfit)
{
    item[int] outfits = outfit_pieces(tested_outfit);
    item hand;
    item hat;
    if(have_familiar($familiar[disembodied hand]))
    {
        hand = familiar_equipped_equipment($familiar[disembodied hand]);
        if((item_amount(outfits[1]) == 0 && hand == outfits[1]) ||(item_amount(outfits[2]) == 0 && hand == outfits[2]))
        {
            use_familiar($familiar[disembodied hand]);
            equip($slot[familiar],$item[none]);
        }        
    }    
    if(have_familiar($familiar[hatrack]))
    {
        hat = familiar_equipped_equipment($familiar[hatrack]);
        if(item_amount(outfits[0]) == 0 && hat == outfits[1])
        {
            use_familiar($familiar[hatrack]);
            equip($slot[familiar],$item[none]); 
        }
    }    
    return true;
}
This could be written better and more compact, but it works fine in this form.

Also (unrelated)
You should probably replace eat with eatsilent
 
Last edited:
I'm getting "Unrecognized keyword: none" in the mafia r9246 and Winter's ver 2.0. It's happening as it starts the routine for the Damage outfit. I do not have a DHand, Hatrack, or Double-fisted.
 

Winterbay

Active member
Ahh yes... I only tested that code with a person with both those familiars. Have changed that function to something similar but not quite the same and also changed to eatsilent since getting a milk every time you want to drink a Lucifer is rather pointless actually...

2nd post updated.
 

Winterbay

Active member
I'm getting "Unrecognized keyword: none" in the mafia r9246 and Winter's ver 2.0. It's happening as it starts the routine for the Damage outfit. I do not have a DHand, Hatrack, or Double-fisted.

Could you check what your combat_equipment and combat_stat zlib-variables say? My first guess would be that one of those is the culprit.
 

ajandaj

New member
When I run this script, I get "Cannot apply operator ^ to level (int) and 1.4 (float) (autoBasement.ash, line 384)" any ideas on what I am doing wrong?
 

Theraze

Active member
You're either using the year+ old autoBasement and a new version of mafia, or an old version of Mafia and a newer version of the script, but it's most likely the old aB script. You need to combine the two... new mafia, new script; old mafia, old script. I'd suggest using new mafia (as I believe you are, though you didn't give us that information) and Winterbay's update to the script found in post 2 in this thread.
 

Winterbay

Active member
^ is only in the old script, and had the old version of Mafia been used that would've worked. So, download the new version of the script in the 2nd post and it should work just fine as Theraze said.
 
It searches for a ton of things and then it says this

Items and effects initialization complete!
mpAutoRecoveryTarget => -0.05
Current character level (33) >= autoBasement_break_on_level (30), quitting
mpAutoRecoveryTarget => 0.3
Basement sucessfully automated for 0 out of 52 adventures.

I'm using the newest mafia and the basement version from the 2nd post
 
Top