autoBasement.ash - Better basement automation

Rinn

Developer
Currently I do elemental tests by maximizing both resistances, then if that isn't enough I use a phial and maximize the other resistance. I don't currently maximize DA for the gauntlet because all my equipment puts me well over 1000 regardless of what I end up wearing.
 

slyz

Developer
I modifies a few things, here are the changes:

- added a zlib variable called "autoBasement_get_drops". If set to true, item dropping familiars will be used for combats until they give 5/5 drops (Astral Badger, then Green Pixie, then Llama Lama). A sombrero type will then be used (Baby Sandworm if you have one, or a hovering Sombrero). Default is false.

- I removed the equipment maximizing from increase_stat(), so that its function is only to use potions.

- reverted to using saved outfits for stat tests, the gauntlet and combats. As with Mafia's automatic basementing feature, you should have outfits with these names: "muscle", "mysticality", "moxie", "gauntlet" and "damage". This allows for example to find a good equilibrium between HP and DA for the gauntlet, or tinkering with your combat outfit.

- Damage Absorption from your "gauntlet" outfit will be taken into account when calculating the damage you have to survive.

- the maximizer is used to maximize mp for MP drain tests. I left it this way because I am currently a DB, and when moxie happens to be high, wielding a moxie magnet can be more interesting. This part is easy to comment out.

- for HP and MP drain tests, once you are equipped, the relevant stat will be buffed if needed, taking into account percentage-based HP and MP increasing skills (wisdom etc...).

- changed the way elemental tests are handled:
. "maximize 0.5 elem1 0.5 elem2 res, 0.01 hp, switch Exotic Parrot" is used
. if this is not enough, the appropriate elemental form potion is used, then the maximizer is used again: "maximize elem1 res, 0.01 hp, switch Exotic Parrot"
. if this is still not enough, muscle is buffed to raise your max HP enough (taking into account HP increasing skills)

- added matt.chugg's code to handle levels 100, 200 etc...

For combats, my outfit maximizes moxie and I funksling love songs of naughty innuendo. I'm only on level 360 right now, and testing, maybe it will be necessary to buff moxie to a certain point on higher levels.

That's about where my scripting skills can get me. I would love to see how one could find out the cheapest way to buff a stat up to a certain goal. Maybe I'll try working on that next. Tracking meat spend on potions would be easy to add too.

EDIT: typo in stat buffing goal for MP drain tests.
 

Attachments

  • autoBasement_slyz.ash
    24 KB · Views: 68
Last edited:

Bazaaretw

Member
I modifies a few things, here are the changes:

- added a zlib variable called "autoBasement_get_drops". If set to true, item dropping familiars will be used for combats until they give 5/5 drops (Astral Badger, then Green Pixie, then Llama Lama). A sombrero type will then be used (Baby Sandworm if you have one, or a hovering Sombrero). Default is false.

- I removed the equipment maximizing from increase_stat(), so that its function is only to use potions.

- reverted to using saved outfits for stat tests, the gauntlet and combats. As with Mafia's automatic basementing feature, you should have outfits with these names: "muscle", "mysticality", "moxie", "gauntlet" and "damage". This allows for example to find a good equilibrium between HP and DA for the gauntlet, or tinkering with your combat outfit.

- Damage Absorption from your "gauntlet" outfit will be taken into account when calculating the damage you have to survive.

- the maximizer is used to maximize mp for MP drain tests. I left it this way because I am currently a DB, and when moxie happens to be high, wielding a moxie magnet can be more interesting. This part is easy to comment out.

- for HP and MP drain tests, once you are equipped, the relevant stat will be buffed if needed, taking into account percentage-based HP and MP increasing skills (wisdom etc...).

- changed the way elemental tests are handled:
. "maximize 0.5 elem1 0.5 elem2 res, 0.01 hp, switch Exotic Parrot" is used
. if this is not enough, the appropriate elemental form potion is used, then the maximizer is used again: "maximize elem1 res, 0.01 hp, switch Exotic Parrot"
. if this is still not enough, muscle is buffed to raise your max HP enough (taking into account HP increasing skills)

- added matt.chugg's code to handle levels 100, 200 etc...

For combats, my outfit maximizes moxie and I funksling love songs of naughty innuendo. I'm only on level 360 right now, and testing, maybe it will be necessary to buff moxie to a certain point on higher levels.

That's about where my scripting skills can get me. I would love to see how one could find out the cheapest way to buff a stat up to a certain goal. Maybe I'll try working on that next. Tracking meat spend on potions would be easy to add too.

EDIT: typo in stat buffing goal for MP drain tests.

Can you post this updated version but with maximizer for all tests?
 

slyz

Developer
Here you go, using the maximize command for all outfits. For combats, I left Rinn's solution of maximizing muscle.

I guess putting in another zlib variable (or 6) would make it more flexible.

This is untested (I hit level 500 after posting the previous version.
 

Attachments

  • autoBasement_maximizer_slyz.ash
    24.3 KB · Views: 66

slyz

Developer
I started moving around the outfit maximizing part because of the way I handled elemental tests: during the last step, when increase_stat() is called to increase muscle, the elemental resistance from the previous maximizing is wiped.

I also realized that the best stat and hp outfits will stay the same all along. Maybe the maximizer could be used in the beginning and the oufits saved with the names I used.

Elemental tests require a lot of outfit switching too. Maybe saving all the outfits once and using numeric_modifier() instead of actually switching outfits would save some server hits/time.

Having an ash maximize function which gives the output without actually switching equipment would be nice on page hits too.
 

Bale

Minion
Having an ash maximize function which gives the output without actually switching equipment would be nice on page hits too.
That would be quite nice indeed. Jason didn't seem to care about it though when I suggested it. :(

There's still one aching problem with the maximizer, namely that its results are not available in a script.

Could you implement something like one of these

item [slot] maximize(string keyword_list) - a full list of equipment that would maximize
string maximize(string keyword_list) - outputs a list of equip, unequip suitable for providing to whatif
 
Last edited:

Rinn

Developer
I'll compromise and have it cache outfits if all your base stats are above 200. If any base stat is below 200 it's going to maximize every time because there's the potential your best outfit is going to change frequently.

I've been looking over your changes and some are great but I don't understand why you removed all the references to the Disemboded hand and replaced them with an if/else with -familiar. The switch command doesn't do anything if you don't have the familiar your request. I also don't see why you're calling increase_stat and passing in the requested hp and mp value when it's checking for a stat value, or why you're multiplying the damage value by the mp/hp_mod.
 
Last edited:

Rinn

Developer
I'm about to release a new version, however I'm going to take out the equiping of a moxie magnet because of equalizer potions until I figure out the best way to maximize mp. Here's my thinking, since we have equalizer potions the only reason we should ever equip a moxie magnet is as so:

Based off of your base main stat, if the bonus Moxie from equipment only while equipping a moxie magnet is greater then the bonus Mys from equipment only.

This would happen if you have very few mys percentage increasing equipment and a lot of mox percentage increasing equipment. Whatever we can buff higher with equipment only is the stat we want to use regardless of what your main stat is. Until I solve this in some nonasinine way it's always going to maximize mys.

Edit: Version 1.3 in first post, this is all untested as I'm in the middle of an ascension.
 
Last edited:

slyz

Developer
On my DB basement run, the maximizer only used the magnet (and moxie boosting equipment) when my moxie happened to be buffed a lot higher than my myst. What I did was just to let him decide what was best given the current buffed stats, and buff more the relevant stat if needed. Maybe deciding which is cheaper to buff could help us decide.

Edit: oh, and I was asking him to maximize MP, not a stat. That was another reason why I took out the maximizer part of increase_stat() and put it in each test. Maybe a increase_equip() that could handle MP and HP as well as stats would be more flexible.
 
Last edited:

Harrakan

New member
So I tried to use this script for my basement run today and it seems to be stopping when it gets to an elemental test - it changes equipment and gets out my parrot and then just says:

"unable to pass elemental test, quitting
Unable to continue automating the basement."

and stops.

I can actually beat the test, after it happens I go in and just press the button manually and I pass, so I don't know what's up.
 

Rinn

Developer
On my DB basement run, the maximizer only used the magnet (and moxie boosting equipment) when my moxie happened to be buffed a lot higher than my myst. What I did was just to let him decide what was best given the current buffed stats, and buff more the relevant stat if needed. Maybe deciding which is cheaper to buff could help us decide.
Figuring out the cheapest way to buff is going to have to come later, but it is a goal I have for this script. I believe someone else actually just released something that can determine the meat cost for using potions, which should help.

Edit: oh, and I was asking him to maximize MP, not a stat. That was another reason why I took out the maximizer part of increase_stat() and put it in each test. Maybe a increase_equip() that could handle MP and HP as well as stats would be more flexible.
This is exactly how I changed increase_stat() beyond your changes. The issue with what you did is you were passing in an HP value and it was checking if that number was less then or equal to your buffed stat before it stopped using potions, in practically most cases your hp is going to be way higher then your buffed muscle, so it would have been wasting a lot of unnecessary potions at low levels.

So I tried to use this script for my basement run today and it seems to be stopping when it gets to an elemental test - it changes equipment and gets out my parrot and then just says:

"unable to pass elemental test, quitting
Unable to continue automating the basement."

and stops.

I can actually beat the test, after it happens I go in and just press the button manually and I pass, so I don't know what's up.
Whoops, I was checking for true instead of false in the elemental tests, I'll fix this.

Edit: 1.4 released, check the first post. I just got out of ronin so I was able to test it. I'm going to add a way to force certain equipment for combats (naval ring for example).
 
Last edited:

slyz

Developer
The issue with what you did is you were passing in an HP value and it was checking if that number was less then or equal to your buffed stat before it stopped using potions, in practically most cases your hp is going to be way higher then your buffed muscle, so it would have been wasting a lot of unnecessary potions at low levels.

What I was passing on for the gauntlet or elemental tests was:

Code:
increase_stat(damage * 100 / hp_mod, $stat[muscle]);

where hp_mod is the ratio between muscle and hp (due to % increase skills like Ravioli).

damage * 100 / hp_mod is effectively the amount of muscle needed to have an amount of hp equal to damage.

Edit: I checked v1.4 and I saw you didn't keep mp_mod and hp_mod. If you count on changing increase_stat() in the future, I think it will make your life a little bit easier to pass on only a goal in terms of buffed stat without the "hp" and "mp" switches. The relevant code was:

Code:
int mp_mod = 100 ;
				
if ( have_skill($skill[Wisdom of the Elder Tortoises]) )
{
	mp_mod = mp_mod + 50 ;
}
if ( have_skill($skill[Marginally Insane]) )
{
	mp_mod = mp_mod + 10 ;
}
if ( have_skill($skill[Cosmic Ugnderstanding]) )
{
	mp_mod = mp_mod + 5 ;
}

int hp_mod = 100 ;
			
if ( have_skill($skill[Spirit of Ravioli]) )
{
	hp_mod = hp_mod + 25 ;
}
if ( have_skill($skill[Abs of Tin]) )
{
	hp_mod = hp_mod + 10 ;
}
if ( have_skill($skill[Gnomish Hardigness]) )
{
	hp_mod = hp_mod + 5 ;
}

I only accounted for % increasing skills. To pass on MP or HP as a goal, simply use:

Code:
increase_stat(mp * 100 / mp_mod, $stat[mysticality]);
increase_stat(damage * 100 / hp_mod, $stat[muscle]);

I also wanted to apologize if I seem to be trying to be imposing my changes to your script: I am still learning a lot from everyone's work and I'm simply happy to contribute =)
 
Last edited:
I'm having an issue with the latest 1.4 version. When it's maximizing muscle, I get this...

Basement level 387: Monster
Maximizing...
248 combinations checked, best score 4960.0
Wielding lawn dart...
Equipment changed.
Taking off lawn dart...
Equipment changed.
Holding lawn dart...
Why bother putting a weapon into your offhand if you don't have anything in your on-hand? "On-hand?" Whatever.
Putting on Muscle...

The mainhand is supposed to be the haiku katana. If I type in "outfit Muscle" it equips everything like it's supposed to.
 

slyz

Developer
That looks like a problem with the maximizer...Does it happen again when you try relaunching the script?

What happens when you type maximize Muscle, switch Disembodied Hand in the gCLI?
 

Rinn

Developer
What I was passing on for the gauntlet or elemental tests was:

Code:
increase_stat(damage * 100 / hp_mod, $stat[muscle]);
where hp_mod is the ratio between muscle and hp (due to % increase skills like Ravioli).

damage * 100 / hp_mod is effectively the amount of muscle needed to have an amount of hp equal to damage.

Edit: I checked v1.4 and I saw you didn't keep mp_mod and hp_mod. If you count on changing increase_stat() in the future, I think it will make your life a little bit easier to pass on only a goal in terms of buffed stat without the "hp" and "mp" switches. The relevant code was:

Code:
int mp_mod = 100 ;
                
if ( have_skill($skill[Wisdom of the Elder Tortoises]) )
{
    mp_mod = mp_mod + 50 ;
}
if ( have_skill($skill[Marginally Insane]) )
{
    mp_mod = mp_mod + 10 ;
}
if ( have_skill($skill[Cosmic Ugnderstanding]) )
{
    mp_mod = mp_mod + 5 ;
}

int hp_mod = 100 ;
            
if ( have_skill($skill[Spirit of Ravioli]) )
{
    hp_mod = hp_mod + 25 ;
}
if ( have_skill($skill[Abs of Tin]) )
{
    hp_mod = hp_mod + 10 ;
}
if ( have_skill($skill[Gnomish Hardigness]) )
{
    hp_mod = hp_mod + 5 ;
}
I only accounted for % increasing skills. To pass on MP or HP as a goal, simply use:

Code:
increase_stat(mp * 100 / mp_mod, $stat[mysticality]);
increase_stat(damage * 100 / hp_mod, $stat[muscle]);
I also wanted to apologize if I seem to be trying to be imposing my changes to your script: I am still learning a lot from everyone's work and I'm simply happy to contribute =)
I was going to change the check back to how you had it but I decided to keep it checking direct hp and mp values as there's a ton of modifiers besides the % increasing skills (equipment being the big one) and this will be more accurate without doing a bunch of math. It's really no problem, I overloaded the function so every case that isn't mp and hp can still use the old version without modification.

Also I accidentally made outfits cache below 200 instead of above, whoops! 1.5 is in the first post.
 
Last edited:
Top