autoBasement.ash - Better basement automation

Magus_Prime

Well-known member
Pressurized potions are, from what I recall, the only type of potions where you can have only one of a type active at a time. One way to accommodate this special case, and user preference, might be to add a boolean flag to the script. Something like "autoBasement_debuff_when_needed".
 

Winterbay

Active member
Well, the same is also true for snowcones and cupcakes, but those don't have very useful effects in the context of this script.
 

Rinn

Developer
Or just don't use pressurized potions since it's probably cheaper to stop and powerlevel for a bit.
 

Sambal

New member
If I run this script will it automatically buy off the mall or will it try to create stuff first? I wouldn't want to be wasting valuable buffed turns on crafting potions in between of every floor.
 

Winterbay

Active member
That depends on your Mafia settings. If you have Mafia set to purchase from the mall if needed it will probably do so (unless you are a sauceror in which case getting three of each potion is probably going to make it cheaper to actually craft the stuff). Also, if you are running the basement I am going to assume that you are not in run and thus getting a chef wouldn't be that expensive which would mitigate the turn spenditure at least.
 

lostcalpolydude

Developer
Staff member
If I run this script will it automatically buy off the mall or will it try to create stuff first? I wouldn't want to be wasting valuable buffed turns on crafting potions in between of every floor.

Item Manager -> Creatable, check "require in-a-boxes" and mafia won't spend turns making potions no matter what a script tries to do (unless a script changes that setting because it's meant to spend turns cooking, but for a script like this it wouldn't happen).
 
Other than opening the script and reading through it - is there a convenient way to see all the variables that can be set? I checked the wiki and there's nothing (which maybe would be a great idea for some of these more robust scripts - a wiki page for them as these threads get so long)

I also just ran into a situation where against almost everything (combat) i want myst maximized cuz i'm using awesome balls of fire, however this spell is blocked by the golem and so i want musc maximized vs him... is there a way to do this? i set my autobasement combat stat to myst but i'm losing my golem fights because my hp is too low (hence why i want to maximize musc or HP i guess) before I fight him. suggestions?
 
Last edited:

Winterbay

Active member
I would suggest you setting your CCS for the Golem to use divine items or something similar and use the myst-version (since your maximizing that stat). This is what I've been doing and it's been working nicely.

Also. I think I'll put an explanation of all the settable variables in the 2nd post. I'll do that tomorrow when I have more time.
 
I would suggest you setting your CCS for the Golem to use divine items or something similar and use the myst-version (since your maximizing that stat). This is what I've been doing and it's been working nicely.

This is exactly what I have in my CSS but the problem is he's first hit killing me because my HP isn't high enough. If I could somehow maximize muscle for him I could get my HP high enough to survive a first hit (or two).

Also. I think I'll put an explanation of all the settable variables in the 2nd post. I'll do that tomorrow when I have more time.

much appreciated - thank you.
 

slyz

Developer
Other than opening the script and reading through it - is there a convenient way to see all the variables that can be set? I checked the wiki and there's nothing (which maybe would be a great idea for some of these more robust scripts - a wiki page for them as these threads get so long)
Documentation for a script is generally found in the first posts of its thread. In autoBasement's case, since it uses zlib, you can see all the variables by typing "zlib vars" in the gCLI. All the ones that start with "autoBasment" are relevant here, and they happen to be pretty self-explanatory.

The idea to add documentation to zlib vars has floated around for a while, but I'm not sure what happened to it. Zarqon was working on his WOSSMAN zlib var editor, which could show the documentation entered by script authors in the publicly available vars_documentation.txt map. Apparently he gave up on it for unrelated reasons, but the information is always there for anyone who wants to create another zlib var editor (there are a few that you can find in these forums).
 
but the information is always there for anyone who wants to create another zlib var editor (there are a few that you can find in these forums).

good to know something like this exists. i'll take a peek. was the idea of adding it to the wiki ever discussed? having an entry for autobasement.ash on the wiki with all the configurables as well as explanations or even "common strategies" would be awesome (as it would for many of the scripts)
 

Winterbay

Active member
2nd post updated with a list of the different variables and what they do. Also updated the script with the Li'l Xenomorph and made the switching between different item-dropping familiars slightly more efficient.
 
2nd post updated with a list of the different variables and what they do. Also updated the script with the Li'l Xenomorph and made the switching between different item-dropping familiars slightly more efficient.

rockin', your effort is appreciated.

just out of curiousity, any idea why this would happen? ignore adventure 13397 (i forgot to heal my HP)

gCLI said:
unable to buff hp to 9424, quitting
Basement sucessfully automated for 0 out of 80 adventures.
Maximizing...
1456 combinations checked, best score 965.0
Putting on square sponge pants...
Equipment changed.
Maximizing...
728 combinations checked, best score 965.0

[13397] Fernswarthy's Basement (Level 307)
Maximum HP Test: 8,136 current, 32765 * 0.21 (790 DA) = 6,919 needed
You lose 6,509 hit points

[13398] Fernswarthy's Basement (Level 307)
Maximum HP Test: 8,136 current, 32765 * 0.21 (790 DA) = 6,919 needed
You lose 6,184 hit points

First this I noticed is that the script aborted previously because I couldn't get to enough HP, but shouldn't there be some balance between maximizing HP and maximizing DA since both are in the formula? I manually put on some more DA (sponge pants) and then could pass the test with no other differences. The other thing I notice from the gCLI output above is that the script expected that I'd need 6919 HP to pass given my DA but I only lost 6184. Is the formula off possibly?
 
Last edited:

Winterbay

Active member
The script currently maximizes HP and hopes (which is quite often the case) that the DA gotten from the equipment used will give enough reduction. In your case the original outfit gave you ~71% reduction while your little change got 79% which is not that different even though ti was obviously significant here.

Also, the difference between the total HP needed is 32765 with Mafia's formula and ~29500 based on the number taken. This is a 10% difference which is not surprising since the Wiki lists the formula as level^1.4*10 with a 5% variance and Mafia (as well as the script) appears to use level^1.4*10*1.08. Given this 8% padding and a 5% variance a 10% difference is not that unexpected I'd say.

((307^1.4*10)*0.95)*0.21 ~ 6052
(((307^1.4*10)*1.08)*1.05)*0.21 ~ 7225
All the given numbers in your example fall within this range (except for possibly 9424 but that was with a different DA so...).
 
Thanks for a very reasonable explanation. I'm just glad I was able to pass the test after adding some additional DA - was just curious about the math/logic behind it. thanks again!

edit: hi, me again...

so far be it from me to tell you what to change/tweak as I have no problem doing this piece manually, but the numerical differences are so great that either I just have a crappy set of gear and cant get my HP to what it should be, or maybe it's worth looking at.

This is my challenge with the Gauntlet outfit that the script creates:
Maximum HP
Current: 8,636
Needed: 49294 * 0.29 (660 DA) = 14,177

This is my challenge after I change 3 pieces of gear (sponge helmet instead of nurse's hat, square sponge pants instead of sugar shorts, and stainless steel suspenders instead of blackberry combat boots):

Maximum HP
Current: 8,092
Needed: 49294 * 0.16 (890 DA) = 7,720

so my current HP drops by 544 but my DA multiplier changes enough to almost HALVE the HP needed to pass this test.

Again, it's your script and I'm not complaining... but given the vast difference in numbers I thought maybe you'd want to examine the algorithm to see if you want to tweak it to consider checking DA to apply balance between HP and DA in the calculations.

edit #2: i thought maybe if i manually changed my gauntlet outfit it would stick and i wouldn't have to manually do this challenge anymore, but the gauntlet outfit seems to revert. I thought (incorrectly obviously) that once an outfit was defined it would persist. Anyway I just wanted you to know I was looking for other ways of resolving this for myself so that I could suggest it for others assuming you don't want to change the algorithm.
 
Last edited:

roippi

Developer
Without closely reading the above, one other possible problem with including da in the forumulae is that the maximizer caps DA at 1000. This is desirable 99.6% of the time, but DA checks in the gauntlet are actually uncapped.

I just handle the HP and MP tests manually, personally.
 

Winterbay

Active member
First, it's not really my script. I'm just providing support for it :)
Second, outfits are only cached (i.e not rebuilt) if you stats are over 200 since by then you can use everything you may have. Before that point locking the outfit would probably make things worse since your outfit would not change as you level up.
Third, I'll see if there can be a change, but I do believe that somewhere in this thread is a motivation from Rinn about why it does what it does.
 
Top