SmartStasis -- a complex script for a simple CCS

fxer

Member
Is there a trick to getting pickpocket to fire? my ccs is simply 'consult wham.ash' and the output is:

Code:
[563092] Barf Mountain
Encounter: garbage tourist AND TESLA!
Round 0: fxer wins initiative!
> WHAM: Monster HP is 111.0.
> WHAM: Running SmartStasis
Round 1: fxer executes a macro!
Round 1: fxer casts POCKET CRUMBS!
Round 2: garbage tourist drops 10 attack power.
Round 2: garbage tourist drops 14 defense.
...

Why isn't it attempting to pickpocket?
 
SS has been getting into a bad state for me lately, reporting to BatBrain / WHAM that it finished the fight before taking any actions when it really isn't done. This leads to a KoLmafia abort. Anyone else seen this? Do I need to change verbosity to debug?
 

Lxndr

Member
@adeyke: I added a lot of newer items and skills to batfactors recently, so BatBrain knows about abstraction upgrades. Whether or not it will choose them is an unknown, however. I'm considering an update to BatBrain that considers item results from actions to be worth much more if they are goals, which ought to force BatBrain's hand in this regard if you set upgraded abstractions as goals.

Setting goals for that sort of thing could be a bit fiddly though, so I'm game to hear what sort of automation you might have in mind. Would always upgrading abstractions if you lack the upgrade be desirable?

how does one set 'goals' in either BatBrain or SmartStasis? I'm trying to get my WHAM to automatically upgrade abstractions.
 
Last edited:

Thoth19

New member
The changelog on page1 doesn't mention it, so does this script handle the time-spinner? According to said log, it hasn't been updated for years, so I worry that it won't handle newer iotms. Thanks.
 

Bale

Minion
The changelog on page1 doesn't mention it, so does this script handle the time-spinner? According to said log, it hasn't been updated for years, so I worry that it won't handle newer iotms. Thanks.

The script doesn't need to be updated to handle new stuff. All that matters is that the data file, batfactors, is irregularly updated and it does include the time spinner. I added the time spinner's combat action myself.
 

Lxndr

Member
Just do it in the adventure window. WHAM and SmartStasis access that information.

I only know how to do this manually in the adventure window; how would I make my mafia/wham automagically know to use the abstractions at all times against DMT monsters?
 
Last edited:

Theraze

Active member
Since I've never fought a DMT monster, I'm not going to be your best helper here. Your main choices would be:
1) Custom CCS that imports SmartS/WHAM/SimpleS, checks the monster, adds the right goal-item, and then runs the normal automation.
2) AA or BB (probably BB) that sets the right (all 3?) item goals when you adventure in the location.
 

Bale

Minion
I only know how to do this manually in the adventure window; how would I make my mafia/wham automagically know to use the abstractions at all times against DMT monsters?

WHAM does the "automagically" for you. You just need to set a goal of "+99 abstraction: joy, +99 abstraction: certainty,+99 abstraction: motion" and WHAM will use abstractions once per combat against the appropriate monsters in an attempt to help you fulfill your goals.

At least that is how it should work because zarqon added the following lines to batfactors:

Code:
item	8708	abstraction: action	0	0	once, monster Thinker of Thoughts, item abstraction: joy
item	8709	abstraction: thought	0	0	once, monster Perceiver of Sensations, item abstraction: certainty
item	8710	abstraction: sensation	0	0	once, monster Performer of Actions, item abstraction: motion

That says that each item can be used once against the specific monster to create another specific item. If you set goals in mafia, SmartStasis will "automagically" sense the existence of those goals with its incredible powers of ESP (it can read mafia's mind so if mafia knows, then it knows) and try to create the item for which you are looking.
 

lostcalpolydude

Developer
Staff member
I think Lxndr wants add_item_condition() for a loginScript to avoid looking at the Adventure window every day for the next few years just to get this script to do what he wants.
 

Bale

Minion
OH! Is that his problem? That would work.

Code:
foreach it in $items[abstraction: joy, abstraction: certainty, abstraction: motion]
   add_item_condition(99, it);

Or cli_execute("goals add 99 abstraction: joy, 99 abstraction: certainty, 99 abstraction: motion"); would work also,
 

zarqon

Well-known member
Would anyone object to SS automatically upgrading all but one of your base abstractions if you have the familiar? That seems like a reasonable thing to do.

@Thoth: the changelog in the first post (not the second) has been updated more recently. But by and large, it's BatBrain that gets updated to support additional things (BatBrain has had more than 100 revisions since moving to SourceForge). I haven't investigated the time spinner yet but I did purchase one and will be taking a look at it soon. As Bale mentioned, its combat results are now known to SS -- whether it will choose to use it, I don't know yet.

Going back a ways: @worldwizard and @Lxndr: I've also run afoul of that error several times but am still not sure what's causing it. I haven't really dug into debugging it since so far I'm not able to replicate it -- it just happens sometimes.
 

Bale

Minion
Would anyone object to SS automatically upgrading all but one of your base abstractions if you have the familiar? That seems like a reasonable thing to do.

It is a very reasonable thing to do. Even more reasonable would be upgrading my very last abstraction: thought to certainty because I can never seem to have enough of those. I suppose there might be an edge case where I'm unhappy about that, but it hasn't happened yet that I would need spare abstractions of thought more than another certainty.
 
Would anyone object to SS automatically upgrading all but one of your base abstractions if you have the familiar? That seems like a reasonable thing to do.

@Thoth: the changelog in the first post (not the second) has been updated more recently. But by and large, it's BatBrain that gets updated to support additional things (BatBrain has had more than 100 revisions since moving to SourceForge). I haven't investigated the time spinner yet but I did purchase one and will be taking a look at it soon. As Bale mentioned, its combat results are now known to SS -- whether it will choose to use it, I don't know yet.

Going back a ways: @worldwizard and @Lxndr: I've also run afoul of that error several times but am still not sure what's causing it. I haven't really dug into debugging it since so far I'm not able to replicate it -- it just happens sometimes.
I have no objections to abstraction upgrades; I didn't even know that was possible!

As for the SS early abort... if you attempt to force the issue by clicking the script button in the KoLmafia relay browser, when it DOES occur (after loading the combat if necessary)... SS goes through the same sequence that got it in the bad state to begin with, and the exact same result happens: an abort. Maybe this is a hint as to where to look?
 
Here's some gCLI output from SS getting confused and aborting, with zlib verbosity set to 10. Hope it helps someone.

Code:
1 HP costs 6μ. ( 239 / 239 )
1 MP costs 6μ. ( 119 / 119 )
WHAM: We currently think that the round number is: 0 and that the turn number is 352.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for stumbling-drunk congoer (female).
WHAM: No need to do anything with stumbling-drunk congoer (female).
WHAM: Setting up variables via BatBrain
Setting monster to stumbling-drunk congoer (female)...
Value of stat gain: 305.3μ
Monster information loaded from cache.
You have filthy child leash equipped: (11) damage,
Events created: filthy child leash
Base round: (11) damage, 0 player damage, 0 meat
ATT: 74 (82.5% × 7.76, death in 38)
DEF: 141 (29.5% × 57.26, win in 4)
HP: 105, Value: 305.3 μ, RES: 0, Happenings: 2, ID: 1972
Info: mafia's monster name 'stumbling-drunk congoer (female)' does not match KoL's monster name 'Katherine Salas (InsaneKoala, #2377944)'.
Parsed round number: 0 (real: 1)
WHAM: We currently think that the round number is: 31 and that the turn number is 352.
WHAM: Current MP = 119 out of 119.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 239 out of 239.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a stumbling-drunk congoer (female). Mafia considers that this monster has an attack of 74 or 74 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 141 or 141 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 105 or 105 when given a monster name.
WHAM: Your current ML-adjustment is: 0.
WHAM: You have muscle = 136, mysticality = 69, and moxie = 69
WHAM: Monster HP is 105.0.
WHAM: WHAM added the following to BatRound: if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; 
Events created: attack
Base round: (11) damage, 0 player damage, 0 meat
WHAM: No valid attack options (Best option, '', not good enough)
WHAM: We currently think that the round number is: 31 and that the turn number is 352.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 31 and that the turn number is 352.
WHAM: Evaluating the attack and performing it took 0.01 seconds.
WHAM: We currently think that the round number is: 31 and that the turn number is 352.
WHAM: We currently think that the round number is: 31 and that the turn number is 352.
You're on your own, partner.
 
Top