autoBasement.ash - Better basement automation

syrinxlui

Member
I think I changed a setting somewhere and now the vprint messages don't appear. The script just quits and I have to backtrack to figure out why. Any ideas?
 

Winterbay

Active member
Type "zlib verbosity = 9" (or 10) and you should get as much information as you need (or more most likely). Updating this script is still on my to-do-list...
 

Magus_Prime

Well-known member
I'm looking for some guidance. In my most recent basement run. I had quite a few instances where autobasement would fail to pass a test. Minor tweaking with either the maximizer or the relay browser helper would pass allow passage without problem. Do I have something misconfigured or is autobasement missing something? Here are the two circumstances that happened most frequently:

1. Failing an elemental resistance test. Casting Saucespheres and Turtle Tamer shells allowed passage but autobasement wouldn't cast them as needed.

2. Failing a stat test. More often than not purchasing a gremlin mutagen would allow passage. I have autoBasement_max_potion_price set to 10,000.

Any thoughts?
 

Winterbay

Active member
I think both of those would work fine if I actually did the changes to the script I've been thinking of doing...
 

Winterbay

Active member
Ok, so a Beta-release of the new version is available on sourceforge now. You can check it out via
Code:
svn checkout https://svn.code.sf.net/p/winterbay-mafia/autobasement/code/

It took me, more or less, to level 400 when I tried and seems a lot more stable than the earlier version. There are some issues with the new maximize-command that I have not yet ironed out (it may try to use more than one hatter-buff for example).
Is there a way to detect if the hatter has been visited today already?

Since it now uses the maximizer completely (and ignores the previous data-file) three new settings were added autobasement_eat/drink/spleen_to_buff which all defaults to false. If set to true the script will be allowed to eat, drink and spleen to buff you up for tests. Useful for higher levels if you are underlevelled yourself, but should probably be kept to false for the first half of a 500-level run at least. If true you will most likely also get warnings about eating without milk and drinking without ode. I'm not sure how to repress that since we're just passing the maximizer command to cli_execute atm.

Please report any findings of oddness here and I'll try to handle them :)
 

Theraze

Active member
Pass the maximizer command through index_of to detect if we are using eat or drink and if so, replace_string? We use eatsilent and overdrink to suppress messages. Alternatively, we could cast ode (if we don't already have max songs) and use a milk for the extra adventures... definitely worthwhile if we're using more than a single point of fullness.
 

Winterbay

Active member
Well, mafia automatically casts ode if you can, so the problem only comes up when you already have 3 songs. Replacing for eatslient might be an idea though. I'll look at that.
 

roippi

Developer
You probably need to be looking at the command field of the record, since that is blank if you've used the hatter already today.
 

Veracity

Developer
Staff member
Using the latest version, it tends to fail Elemental tests. Here are some examples.

Basement level 57: Stench & Hot Elemental Resistance Test
stench
1421.7721302257405
5.0
5.0
false
0.5333333333333333
hot
1421.7721302257405
5.0
5.0
false
0.5333333333333333
Casting Cannelloni Cocoon 1 times...
You gain 630 hit points
Cannelloni Cocoon was successfully cast.

[3205] Fernswarthy's Basement (Level 57)
Elemental Resist Test: +2 stench 25% (1,049 hp), +2 hot 25% (1,049 hp)
You lose 996 hit points
You lose 996 hit points
Basement sucessfully automated for 53 out of 80 adventures.
When I removed Beaten Up and ran it again immediately, it did this:

Basement level 57: Stench & Hot Elemental Resistance Test
stench
1421.7721302257405
5.0
2.0
false
0.23
hot
1421.7721302257405
5.0
2.0
false
0.23
stench
1421.7721302257405
5.0
2.0
false
0.23
hot
1421.7721302257405
5.0
2.0
false
0.23
Maximizing...
14792 combinations checked, best score 43.13
Searching for "drop of water-37"...
Search complete.
stench
1421.7721302257405
5.0
5.0
false
0.5333333333333333
hot
1421.7721302257405
5.0
5.0
false
0.5333333333333333
Putting on hardened slime hat...
Equipment changed.
1
2
stench
1421.7721302257405
5.0
5.0
false
0.5333333333333333
hot
1421.7721302257405
5.0
5.0
false
0.5333333333333333
4
stench
1421.7721302257405
5.0
5.0
false
0.5333333333333333
hot
1421.7721302257405
5.0
5.0
false
0.5333333333333333
5
stench
1421.7721302257405
5.0
5.0
false
0.5333333333333333
hot
1421.7721302257405
5.0
5.0
false
0.5333333333333333
Casting Cannelloni Cocoon 1 times...
You gain 1,703 hit points
Cannelloni Cocoon was successfully cast.
stench
1421.7721302257405
5.0
5.0
false
0.5333333333333333
hot
1421.7721302257405
5.0
5.0
false
0.5333333333333333

[3206] Fernswarthy's Basement (Level 57)
Elemental Resist Test: +2 stench 25% (1,049 hp), +2 hot 25% (1,049 hp)
You lose 607 hit points
You lose 607 hit points
Basement sucessfully automated for 1 adventures

Here's another one:
Basement level 73: Stench & Hot Elemental Resistance Test
stench
2010.283014124557
5.0
8.0
false
0.7088734567901234
hot
2010.283014124557
5.0
8.0
false
0.7088734567901234

[3222] Fernswarthy's Basement (Level 73)
Elemental Resist Test: +2 stench 25% (1,480 hp), +2 hot 25% (1,480 hp)
You lose 1,413 hit points
You lose 1,412 hit points
Basement sucessfully automated for 15 out of 20 adventures.
Trying again immediately without removing Beaten Up first:

> autoBasement 1

Beaten Up will be removed by skill Tongue of the Otter...
Casting Tongue of the Otter 1 times...
You gain 19 hit points
You lose an effect: Beaten Up
Tongue of the Otter was successfully cast.
You were beaten up, quitting
Basement sucessfully automated for 0 out of 1 adventures.
Uh, yeah. I was Beaten Up when I came in, and it removed it. The problem is ... ?

Trying again immediately:

Basement level 73: Stench & Hot Elemental Resistance Test
stench
2010.283014124557
5.0
2.0
false
0.23
hot
2010.283014124557
5.0
2.0
false
0.23
stench
2010.283014124557
5.0
2.0
false
0.23
hot
2010.283014124557
5.0
2.0
false
0.23
Maximizing...
22188 combinations checked, best score 43.13
stench
2010.283014124557
5.0
5.0
false
0.5333333333333333
hot
2010.283014124557
5.0
5.0
false
0.5333333333333333
stench
2010.283014124557
5.0
5.0
false
0.5333333333333333
hot
2010.283014124557
5.0
5.0
false
0.5333333333333333
stench
2010.283014124557
5.0
5.0
false
0.5333333333333333
hot
2010.283014124557
5.0
5.0
false
0.5333333333333333
stench
2010.283014124557
5.0
5.0
false
0.5333333333333333
hot
2010.283014124557
5.0
5.0
false
0.5333333333333333
stench
2010.283014124557
5.0
5.0
false
0.5333333333333333
hot
2010.283014124557
5.0
5.0
false
0.5333333333333333
stench
2010.283014124557
5.0
8.0
false
0.7088734567901234
hot
2010.283014124557
5.0
8.0
false
0.7088734567901234
Putting on hardened slime hat...
Equipment changed.
Wielding lawn dart...
Equipment changed.
Holding lawn dart...
Equipment changed.
Putting on sea shawl...
Equipment changed.
Putting on sea salt scrubs...
Equipment changed.
Putting on hardened slime pants...
Equipment changed.
1
2
stench
2010.283014124557
5.0
8.0
false
0.7088734567901234
hot
2010.283014124557
5.0
8.0
false
0.7088734567901234
4
stench
2010.283014124557
5.0
8.0
false
0.7088734567901234
hot
2010.283014124557
5.0
8.0
false
0.7088734567901234
5
stench
2010.283014124557
5.0
8.0
false
0.7088734567901234
hot
2010.283014124557
5.0
8.0
false
0.7088734567901234
Casting Cannelloni Cocoon 1 times...
You gain 2,434 hit points
Cannelloni Cocoon was successfully cast.
stench
2010.283014124557
5.0
8.0
false
0.7088734567901234
hot
2010.283014124557
5.0
8.0
false
0.7088734567901234

[3223] Fernswarthy's Basement (Level 73)
Elemental Resist Test: +2 stench 25% (1,480 hp), +2 hot 25% (1,480 hp)
You lose 533 hit points
You lose 534 hit points
Basement sucessfully automated for 1 adventures
And it worked.
 

Winterbay

Active member
Yes, elemental tests is a problem. For some reason things get wonky sometimes and I can't tell why (I sometimes had to do a "refresh all" in order to get Mafia back into synch with KoL when the elemental resistances got mixed up). Lucky for me I left the debug numbers in there so at least I have something to look at.

The interesting thing is, it really thought it would succeed since otherwise it wouldn't have cast the healing spell (that is the last thing that happens before it visits the basement of real). As you also can see, the numbers printed by Mafia and the numbers listed by the script does not match up (e.g. in the last one where it says 8.0 for both stench and hot (taken from numeric_modifier("_spec", "stench/hot reisistance") while Mafia prints +2).
 

morgad

Member
first time I have run Mafia in ages ...

updated mafia/batbrain/wham to latest (https svn checkout does not work for me)

Code:
> svn checkout http://svn.code.sf.net/p/winterbay-mafia/autobasement/code/

Validating repo...
Repo validated.

A http://svn.code.sf.net/p/winterbay-mafia/autobasement/code/scripts
A http://svn.code.sf.net/p/winterbay-mafia/autobasement/code/scripts/autoBasement.ash
http://svn.code.sf.net/p/winterbay-mafia/autobasement/code
At revision 3

Successfully checked out working copy.
Pushing local updates...
autoBasement.ash => /home/fit/.kolmafia/scripts/autoBasement.ash
Done.

and autoBasement does not run
Code:
> autoBasement

Unknown variable 'rec' (autoBasement.ash, line 232)

is there some other script I need to update, that I have mnissed?

best regards
Dave
 

Magus_Prime

Well-known member
I haven't had a chance to try the latest autobasement.ash yet but I ran into something similar to what Veracity hit on my last run. The relay browser basement helper had no problem with buffing the character enough to pass the elemental tests in question.

Often, but not always, all that was necessary to pass was to cast a few Turtle Tamer buffs on top of what autobasement.ash has already figured out.
 

livercat

Member
Code:
> autoBasement

Unknown variable 'rec' (autoBasement.ash, line 232)

I'm getting the same error. Previous revision is running fine, so it seems the problem is indeed in autoBasement.ash, not in some other script.
 

Crowther

Active member
I have to say, I think I might have a crush on this script. Clean, simple, optimal, powerful, etc. Too bad I already have all my telescope parts.

I'd like to add some comments, but they're all minor.

When it aborts because it can't beat a test, because it's too expensive, it doesn't mention that autoBasement_max_potion_price can be changed.

Sometimes when it aborts because it can't beat a test, rerunning things works fine.

Caching outfits is nice, until it starts aborting and then it takes a lot of time to only do a level or two. I'm not sure I'd fix that one.
 

Magus_Prime

Well-known member
Caching outfits is nice, until it starts aborting and then it takes a lot of time to only do a level or two. I'm not sure I'd fix that one.

That's something that's been on my list to mention for quite a while. What about a two-fold check:

If all stats are above 200 AND we've cached outfits today THEN don't go through the process again today.

Perhaps with a zlib variable to toggle the behavior.

Thoughts?
 

heeheehee

Developer
Staff member
Ah, but as you get more muscle, you might have a different outfit that maximizes your HP (e.g. lawn dart vs brimstone bludgeon), or what have you (maximizer doesn't support more complicated functions like effective HP, taking into account resistance / DA).

Yeah, that's extremely niche and was never relevant for me, since I always started basement diving late enough that was a non-issue.
 
Top