SmartStasis -- a complex script for a simple CCS

Replaced WHAM with SimpleSmack. Similar behavior.

[1517] The Themthar Hills
Encounter: dirty thieving brigand
Strategy: D:\Dropbox\dist\ccs\CafeBoob.ccs [default]
Round 0: cafeboob wins initiative!
You won during stasis!
You won during stasis!
You're on your own, partner.
Click here to continue in the relay browser.
 
And I changed SmartSmack so that the verbosity was 8 while it was running and got...

Code:
[1535] The Themthar Hills
Encounter: dirty thieving brigand
Strategy: D:\Dropbox\dist\ccs\CafeBoob.ccs [default]
Round 0: cafeboob loses initiative!
1 HP costs 4μ. ( 419 / 525 )
1 MP costs 6μ. ( 125 / 155 )
brigand brittle (1.0 @ +0): 5μ * 1% = 0.05
Monster information loaded from cache.
Base round: damage, player damage, 0 meat
ATT: 179 (94% × 50.8, death in 9)
DEF: 163 (95.45% × 172.52 (15), win in 2)
HP: 195, Value: 1,518.56 μ, RES: 0.04 (0.04) (0.04) (0.04) (0.04) (0.04), Happenings: 3, ID: 475
Parsed round number: 0 (real: 1)
Happened round 0: monsterfumble
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
No valid attacks (Best attack '' not good enough).
You won during stasis!
1 HP costs 4μ. ( 419 / 525 )
1 MP costs 6μ. ( 125 / 155 )
brigand brittle (1.0 @ +0): 5μ * 1% = 0.05
Monster information loaded from cache.
Base round: damage, player damage, 0 meat
ATT: 179 (94% × 50.8, death in 9)
DEF: 163 (95.45% × 172.52 (15), win in 2)
HP: 195, Value: 1,518.56 μ, RES: 0.04 (0.04) (0.04) (0.04) (0.04) (0.04), Happenings: 4, ID: 475
Parsed round number: 0 (real: 1)
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
No valid attacks (Best attack '' not good enough).
You won during stasis!
You're on your own, partner.
Click here to continue in the relay browser.

I have my suspicions but I am so often wrong I will let someone else interpret for me.
 
Well, I read that as round 0, it thinks the monster fumbled. Somehow that made it unable to parse/consider any actions. The combination of fumbled monster and no actions available for you meant that it decided you must have won already. Maybe?
Code:
Round 0: cafeboob loses initiative!
<snip>
Parsed round number: 0 (real: 1)
Happened round 0: monsterfumble
<snip>
No valid attacks (Best attack '' not good enough).
You won during stasis!

Maybe a verbosity 10 if you get it to abort again? If that happens, run_combat() will keep aborting as it tries to rescan the same page.
 
Well, I read that as round 0, it thinks the monster fumbled. Somehow that made it unable to parse/consider any actions. The combination of fumbled monster and no actions available for you meant that it decided you must have won already. Maybe?
Code:
Round 0: cafeboob loses initiative!
<snip>
Parsed round number: 0 (real: 1)
Happened round 0: monsterfumble
<snip>
No valid attacks (Best attack '' not good enough).
You won during stasis!

Maybe a verbosity 10 if you get it to abort again? If that happens, run_combat() will keep aborting as it tries to rescan the same page.

Character ascended but I'll go to 10 when it occurs again. What I don't get is that Boris was able to get a one hit kill with Cleave after every stop I can remember. So it seems like there is some other factor being considered that is considered more important than defeating the monster.
 
Well, it looks like something is making the page-scrape abort rather than give any possible actions - the best attack is '' rather than, well, anything.
 
BCCA. Boris. Verbosity 10. SmartSmack. Was able to one shot with cleave after script stopped.

Code:
Request 10 of 80 (Cyrpt: The Defiled Niche) in progress...

[346] The Defiled Niche
Encounter: senile lihc
Strategy: D:\Dropbox\dist\ccs\CafeBoob.ccs [default]
Round 0: cafeboob wins initiative!
1 HP costs 4μ. ( 211 / 211 )
1 MP costs 6μ. ( 34 / 34 )
Setting monster to senile lihc...
lihc eye (20.0 @ +0): 19μ * 20% = 3.8
lihc face (9.0 @ +0): 95μ * 9% = 8.55
shimmering tendrils (5.0 @ +0): 500μ * 5% = 25
Value of stat gain: 197.6μ
Monster information loaded from cache.
Base round: damage, player damage, 0 meat
ATT: 66 (94% × (32.29), death in 9)
DEF: 61 (95.45% × 118.82, win in 1)
HP: 60, Value: 234.95 μ, RES: 0.04 (-0.92) (0.04) (1) (0.04) (-0.92), Happenings: 2, ID: 192
Parsed round number: 0 (real: 1)
Events created: attack
Base round: damage, player damage, 0 meat
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
Building custom actions...
Custom actions built! (0 actions)
This monster is not your huckleberry.
No valid attacks (Best attack '' not good enough).
This monster is not your huckleberry.
Stasis loop complete.
SmartStasis complete.
You won during stasis!
1 HP costs 4μ. ( 211 / 211 )
1 MP costs 6μ. ( 34 / 34 )
Setting monster to senile lihc...
lihc eye (20.0 @ +0): 19μ * 20% = 3.8
lihc face (9.0 @ +0): 95μ * 9% = 8.55
shimmering tendrils (5.0 @ +0): 500μ * 5% = 25
Value of stat gain: 197.6μ
Monster information loaded from cache.
Base round: damage, player damage, 0 meat
ATT: 66 (94% × (32.29), death in 9)
DEF: 61 (95.45% × 118.82, win in 1)
HP: 60, Value: 234.95 μ, RES: 0.04 (-0.92) (0.04) (1) (0.04) (-0.92), Happenings: 2, ID: 192
Parsed round number: 0 (real: 1)
Events created: attack
Base round: damage, player damage, 0 meat
Profit per round: ActionProfitDamageOtherbase (0μ)0μ--
Building custom actions...
Custom actions built! (0 actions)
This monster is not your huckleberry.
No valid attacks (Best attack '' not good enough).
This monster is not your huckleberry.
Stasis loop complete.
SmartStasis complete.
You won during stasis!
You're on your own, partner.
Click here to continue in the relay browser.

I wonder if there is any significance to the duplicate messages? Perhaps SS is being improperly called twice? If so grep didn't find it.
 
Last edited:
What I find confusing -- and probably closely connected to the source of the error -- is that that both of your examples show more than one event having happened already on round 0, before even parsing the page (note the "Happenings: X" bit in the monster stats output). A look at your happenings file may help reveal the problem, if the problematic entries haven't already been overwritten or deleted.
 
What I find confusing -- and probably closely connected to the source of the error -- is that that both of your examples show more than one event having happened already on round 0, before even parsing the page (note the "Happenings: X" bit in the monster stats output). A look at your happenings file may help reveal the problem, if the problematic entries haven't already been overwritten or deleted.

Tell me what at what point I should capture teh happenings file and I will try and do so.

This is happening with two characters, both of whom are running BCCA. I note that BCCA imports SmartStasis. I can construct a scenario where something BCCA does leaves SS in an unexpected state. Next time I just want to autoadventure I will try doing it without BCCA and see if the situation occurs.
 
BCCA imports SmartStasis? Where? The ONLY mention of SS in the whole script appears to be that someone pulled code to test for the right monster in the junkyard.

Did you mean WHAM, or something else entirely?
 
BCCA imports SmartStasis? Where? The ONLY mention of SS in the whole script appears to be that someone pulled code to test for the right monster in the junkyard.

Did you mean WHAM, or something else entirely?

I meant I really should not post when under the influence of mind altering prescriptions. You are correct. The file that I was looking at and thought was BCCA was, in fact, WHAM. I agree that SS is not imported in BCCA.

I'm still not sure what to do to capture the happenings data...
 
data\Happenings_fronobulax.txt or whatever your character name is.

Oh wait, that's been depreciated. Not sure anymore. :(

Edit: New filename since 2/15/15 is data\BatMan_happenings_fronobulax.txt
 
Last edited:
data\Happenings_fronobulax.txt or whatever your character name is.

Oh wait, that's been depreciated. Not sure anymore. :(

Edit: New filename since 2/15/15 is data\BatMan_happenings_fronobulax.txt

I know the file but have never used it. Do I just run WHAM normally and save the file when SS thinks it is done when it isn't or do I need to run SmartSmack or at a specific verbosity?
 
I think you just need to grab the lowest 3-5 fights from the list, because if your data file is anything like mine, it's probably 500-800k or more, but the issue is that the current fight believes it's already done. Which might possibly happen when using a free runaway/win, but... boss bat man would have better and more accurate suggestions for what he needs. :)
 
OK. I just deleted happenings, ran and got the SS finished on a hair clog on the third adventure. Was not running BCCA :-)

Code:
malevolent hair clog	20161122144253	skill 11000	1	true
malevolent hair clog	20161122144253	win	2	false
toilet papergeist	20161122144251	skill 11000	1	true
toilet papergeist	20161122144251	win	2	false
claw-foot bathtub	20161122144252	skill 11000	1	true
claw-foot bathtub	20161122144252	win	2	false
 
Recently I've encountered a problem with SmartStasis, that seems to have been caused by recent changes to correct how KoLmafia tracks rounds. My default CSS is:

if hasskill pocket crumbs
skill pocket crumbs
endif
skill summon love mosquito
skill extract
consult SmartStasis.ash
attack with weapon

I added the "if hasskill/endif" to attempt to deal with the problem, but that's never mattered before. Currently, with that CSS, combat looks like this:

[1186774] Gingerbread Sewers
Encounter: gingerbread vigilante
Strategy: /Users/brian/Library/Application Support/KoLmafia/ccs/default.ccs [default]
Round 0: Parco Molo wins initiative!
Round 1: Parco Molo casts POCKET CRUMBS!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: Parco Molo casts POCKET CRUMBS!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: Parco Molo casts POCKET CRUMBS!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: Parco Molo casts POCKET CRUMBS!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: Parco Molo casts POCKET CRUMBS!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: Parco Molo casts POCKET CRUMBS!
KoLmafia thinks it is round 2 but KoL thinks it is round 1

That goes forever until I abort. If I remove the attempt to use pocket crumbs, combat works fine. If I remove the call to SmartStasis.ash, combat works fine. If I put on Pantsgiving (so I actually have acces to pocket crumbs), combat works fine. Only the combination of not having the skill, testing for having the skill, and consulting SmartStasis causes the endless loop.
 
I tried 17492 (since that's the most recent version). Combat works again, though now I do get the "KoLmafia thinks it is round 2 but KoL thinks it is round 1" messages.
 
This is on a character that does not have Pocket Crumbs? We submit Pocket Crumbs and KoL responds without advancing the round? Does it correct after that - i.e., only report the round mismatch once per battle?
 
Back
Top