autoBasement.ash - Better basement automation

Winterbay

Active member
The quickest way that does not involve me recoding the script is if you open the script in Notepad or a similar program and change all "Hovering Sombrero" to "Bandersnatch" (or whatever that familiar is actually called, I don't have one so...) and then save it.
 

Zaranthos

Member
Basement level 3433: Cold & Sleaze Elemental Resistance Test
Maximizing...
6105 combinations checked, best score 2209.91
Putting on Hodgman's bow tie...
Equipment changed.
Putting on Brimstone Bludgeon...
Equipment changed.
unable to pass elemental test, quitting
Basement sucessfully automated for 0 out of 500 adventures.

I don't know why it fails but I can just put on my generic basement outfit which is a mix between stats and resist items to easily pass the test. It's either not taking into account my Dallas shield or not healing before doing the test check. Either could be a mafia problem also since auto-heal probably doesn't kick in until the beginning of an adventure request iirc.

Edit: Modifier maximizer isn't equipping for elemental resistance or the script isn't working right.
 
Last edited:

Zaranthos

Member
I filed this as a mafia bug report but I'll post it here also in case it's not actually a mafia problem.

KoLmafia 14.8 (latest daily build)
Windows 7 64 bit Java 32 bit 6 update 23

running autobasement.ash which I believe just calls modifier maximizer to optimize for elemental resistance but fails
Basement level 4081: Hot & Spooky Elemental Resistance Test
Maximizing...
38042 combinations checked, best score 2401.71
Putting on plexiglass pith helmet...
Equipment changed.
Wielding Brimstone Bludgeon...
Equipment changed.
Holding Brimstone Bunker...
Equipment changed.
Putting on Chester's muscle shirt...
Equipment changed.
Putting on sugar shorts...
Equipment changed.
Putting on Talisman of Baio...
Equipment changed.
Putting on Talisman of Baio...
Equipment changed.
Putting on Talisman of Baio...
Equipment changed.
Putting on Brimstone Bludgeon...
Equipment changed.
Using soft green whatever...
Stenchform removed.
Using 1 phial of hotness...
You acquire an effect: Hotform (duration: 10 Adventures)
Finished using 1 phial of hotness.
Maximizing...
1564 combinations checked, best score 2401.71
Using 1 seal-brain elixir...
You acquire an effect: Sealed Brain (duration: 20 Adventures)
Finished using 1 seal-brain elixir.
Using 1 Mick's IcyVapoHotness Rub...
You acquire an effect: Extreme Muscle Relaxation (duration: 10 Adventures)
Finished using 1 Mick's IcyVapoHotness Rub.
Using 1 black facepaint...
You acquire an effect: Black Face (duration: 10 Adventures)
Finished using 1 black facepaint.
Using 1 fish-liver oil...
You acquire an effect: Fishy Fortification (duration: 5 Adventures)
Finished using 1 fish-liver oil.
Using 1 pirate brochure...
You acquire an effect: Muscularrr (duration: 10 Adventures)
Finished using 1 pirate brochure.
unable to pass elemental test, quitting
Basement sucessfully automated for 34 out of 333 adventures.
Elemental Resist
Current: +5 hot 100% (1 hp), +5 spooky 48% (283,787 hp)
Needed: 77% average resistance or Hotform

Manually equipping just a Dallas shield is enough to pass the test.
Holding Dallas Dynasty Falcon Crest shield...
Equipment changed.
Elemental Resist
Current: +10 hot 100% (1 hp), +10 spooky 73% (146,900 hp)
Needed: 78% average resistance or Hotform
 

Theraze

Active member
This is indeed a script issue... notably one that each point of elemental resistance is only worth 50 hp, so in your first example, that would be worth about 50 for hot, 24 for spooky, and 283 for your hp, for a total value of 357. Your second, though successful, only had a value of 50 for hot, 36.5 for spooky, and 146 for hp, for a total value of 232.5, which is less and therefore less good.

It's possible that I'm overstating its resistance points, in which case the actual values would be 2.5 for hot and 2.5 for spooky in the first, still with 283 for hp. That would have a total value then of 288, compared to the 5+5+146 giving 156 total value in the second. Again... less good. But I think that the first set of examples is what the maximizer is pulling based on what it's been told.

Easiest fix? Put two more zeros before the hp maximizer. Since we're starting with .5 on the two elementals (halve them, basically), and .01 on hp (so 1/50th as valued), we're looking at each point of resistance only being worth 50 hp. If we made each point of resistance worth 5000 hp by using .0001 for hp instead, it would definitely try harder to resist instead of just brute forcing it...
 

Winterbay

Active member
The inner workings of the maximizer and the numbers it generates are a complete mystery to me...

I think part of the problem is also that the current setup works fine for lower basement levels (up to 500 or so) but when you get to the level we are here (4000+) it starts to get extreme and a different approach might be needed. Possibly it should be a sliding scale depending on basement level.
 

fox

New member
do i have to do anything special with this script when i ascend and want to run it again?
i've noticed it didn't make any outfits this time around and is individually equipping each optimal item

edit: also when setting "autoBasement_combat_stat", am i able to set it to myst or do i have to fully type out Mysticality
 
Last edited:

Winterbay

Active member
If you set it to "myst" it should work. In fact you should be able to set it to "my" and it would still work :)

You should not have to do anything special other than change any settings you want changed. It is still making outfits (or at least it should) but unless you have reached a certain point it won't cache them since your stats will change and let you use different gear between different levels.
 

fox

New member
ah okay

also i'm having the same problem as that other guy with the elemental maximization

[3355] Fernswarthy's Basement (Level 430)
Encounter: Got Silk?/Leather is Betther
You gain 905 Mysteriousness
You gain a Mysticality point!
Basement level 446: Hot & Spooky Elemental Resistance Test
Maximizing...
17640 combinations checked, best score 96.14
Putting on nurse's hat...
Equipment changed.
Wielding lawn dart...
Equipment changed.
Holding lawn dart...
Equipment changed.
Putting on sea salt scrubs...
Equipment changed.
Putting on double-ice britches...
Equipment changed.
Putting on plexiglass pinky ring...
Equipment changed.
Putting on V for Vivala mask...
Equipment changed.
Putting on hopping socks...
Equipment changed.
Putting on lawn dart...
Equipment changed.
Using 1 phial of hotness...
You acquire an effect: Hotform (duration: 15 Adventures)
Finished using 1 phial of hotness.
Maximizing...
480 combinations checked, best score 96.1
Putting on sugar shorts...
Equipment changed.
unable to pass elemental test, quitting
mpAutoRecoveryTarget => 0.4
Basement sucessfully automated for 16 out of 28 adventures.

if i just manually set my gear to the other element than the one i phial, i can usually pass the tests easily with my hp
but it's weird that i have to manually do this every elemental test @_@
 

Winterbay

Active member
From which point does this start being a problem? It might be that I should try to set the value of HP lower since it apparently is undervaluing the elemental resistance...
 

Theraze

Active member
I think that would be good... my suggestion is currently setting it to .0001 or even less. HP is great if you can't get more resistance, but the more you can resist, the cheaper the adventure should be.
 

Pazleysox

Member
I'm not sure if this is a bug, or a feature...

I'm trying to run the autobasement.ash script... The script calls the modified maximizer, which executes perfectly. My problem is I have all the equipment that mafia is trying to equip, but keeps crashing saying


"You don't have the item you're trying to equip.
Unable to meet all requirements via equipment changes."

Here's an excerpt from my CLI
Code:
> call scripts\autoBasement.ash

Initializing items and effects...
Items and effects initialization complete!
Validating adventure sequence...
No location selected.
Caching outfits...
Putting on outfit: Mysticality
You're already wearing as much of that outfit as you can.
Putting on outfit: +Monster Level

> call scripts\autoBasement.ash

Initializing items and effects...
Items and effects initialization complete!
Caching outfits...
Putting on outfit: Mysticality
You only put on part of that outfit.

NOTE: I do not have a dis-embodied hand.

Even when the item is already equipped.

I've tried shutting down mafia, and restarting, i've also tried re-booting my computer. The issue just started today. I was running the script, and made it through the first 100 floors of the basement, then all of a sudden, mafia stopped working. I posted this already in the mafia thread, and they suggested posting it here also.

-Paz
 

slyz

Developer
What do you have in your Mysticality outfit? And in your +Monster Level outfit?

Also, your gCLI output doesn't show the error message you quoted.
 
that doesnt look like it's using the modifier, it looks like maybe it's equipping the saved outfit. I've had this happen before and it's been an issue where it wanted me to have a sugar chapeau or something that i don't currently have available. my solution is always to remove the outfit definition and let the script use the modifier to redefine it. that seems to work every time.
 

Winterbay

Active member
Another problem is if you have an outfit with a chef-staff in it and need to use a sauceglove to be able to equip it. Last time I tried that and swapped between outfits it didnt' work since Mafia (or KoL for all I know) tried to equip the staff before the glove (I say this because I guess in a Mysticallity outfit a staff might be involved).

Also, in the CLI-output it appears as if you ran the script twice. Did it crash both times or was it some wonderful effect from having it run twice at the same time? (not that that should be possible but anyway...).

And yes, clearing your outfit will quite often make those type of problems go away.
 

mstieler

Member
New to basementing, and given that I have quite a few dives to do, automating seem like the way to go. I'm not certain just how well this works, but I was interested to find out if:

I'll be running my dives from Sauce Fist; can I set myself up to de-equip weapons/OHs when going in to combat so I can keep the KFH buffs and use Fist skills?

Can I set the combat stat maximizer to go for Myst when up against a Fern's Ghost or Dimensional Horror?

Also, my preferred familiar to run here would be a Spanglerack, specifically for it's Potatoness. Is that an issue, or can I change some things around to get that to work? The blocking seems to come in mighty handy.
 

xKiv

Active member
I think that would be good... my suggestion is currently setting it to .0001 or even less. HP is great if you can't get more resistance, but the more you can resist, the cheaper the adventure should be.

And it gets worse ...
Let's math this out a bit ...
if you have enough elemental resistance (I think you should be able to 15 (83%) with just equipment; and if you have slimesuit, parrot and all earring + buffbot, you are already over 20 (87%)), you are on the other side of the same problem - adding levels of resistance does less and less.
Look at that 15: +1 level is worth around 1% reduction from the full (4.5*(floor))**1.4; at floor 500, that's still almost 500 HP. 1300 HP at floor 1000.
But around resist level 40, you are only getting at least 0.01%, which is only worth 5 HP at floor 500, ...

Maybe the proper way is to
1) max out elemental resist without looking at HP at all
2) look what your resist is at that point, maybe substract a few levels (or %)
3) compute how many HP one resist level is worth at that point and basement floor
4) maximize again with according weight on HP
 

Pazleysox

Member
that doesnt look like it's using the modifier, it looks like maybe it's equipping the saved outfit. I've had this happen before and it's been an issue where it wanted me to have a sugar chapeau or something that i don't currently have available. my solution is always to remove the outfit definition and let the script use the modifier to redefine it. that seems to work every time.

that's exactly what seems to be happening. I've been trying to fool the modifier, but it's not working. The script keeps evoking the modifier, and the modifier is crashing the script. As far as my previous post about the "+monster level", the contents of the outfit are mute. My point was, I was trying to change my outfit to something different, so the script/mafia could change my outfit BACK to "myst"...

The information I previously posted was straight from the CLI. There's no crash report to post. :(

-Paz
 

Theraze

Active member
Could do that by something like 10 resistance 1, 400 max, 10 resistance 2, 400 max, .0001 hp. That would aim for 40 of resistance 1 and 2, and as much hp as you can get after.
 

Winterbay

Active member
that's exactly what seems to be happening. I've been trying to fool the modifier, but it's not working. The script keeps evoking the modifier, and the modifier is crashing the script. As far as my previous post about the "+monster level", the contents of the outfit are mute. My point was, I was trying to change my outfit to something different, so the script/mafia could change my outfit BACK to "myst"...

The information I previously posted was straight from the CLI. There's no crash report to post. :(

-Paz

What are the content of your outfits that seem to be giving the problem?
 

Pazleysox

Member
What are the content of your outfits that seem to be giving the problem?

The full outfit is as follows:

Hat: plexiglass pith helmet (Power: 180) [unequip]
Shirt: Chester's muscle shirt (Power: 200) [unequip]
Weapon: Hodgman's whackin' stick (Power: 200, 1h) [unequip]
Off-Hand: Hodgman's imaginary hamster [unequip]
Pants: astral trousers (Power: 50) [unequip]
Accessory: Talisman of Baio [unequip]
Accessory: Talisman of Baio [unequip]
Accessory: Talisman of Baio [unequip]
Familiar: lucky Tam O'Shanter [unequip]

It seems that the issue is now with my muscle outfit. I have 3 baio's on hand, and mafia will not equip my 3rd. When I run the maximizer, it shows 3 baio's to be equipped, and will put them all on when I click to equip them.

Now, why mafia thinks that a lucky tam is the best familiar equipment, I have no idea.

:EDIT:
When I run mafia to basement for me, it runs fine, and will equip outfits automatically. It will not auto buff though.
I also already have outfits saved as "Max muscle" & "Max Moxie"... Is there any way I can modify the script to use these instead of what mafia wants me to use?

-Paz
 
Last edited:
Top