SmartStasis -- a complex script for a simple CCS

heeheehee

Developer
Staff member
Trust me. I actually made that mistake and failed to get the clues, wasting a few scrolls in my confusion. I had to use the wordquizzes before I got them. With 100% vocabulary I get the special word 100% of the time.

I currently have the entire Cloathing of Loathing and the Habilments of Hatred, so when I say that 100% vocabulary gives 100% chance to learn the word, I mean that it has worked 12 times out of 12 attempts. The one time that I did not remember to take a vocabulary lesson I failed twice with each scroll.

12 of 12 vs 0 of 4 is reasonably convincing statistics.

With 50% mastery, I've definitely gotten words from scrolls.

(0 of 4 is not enough statistics... ever)
 

Bale

Minion
With 50% mastery, I've definitely gotten words from scrolls.

(0 of 4 is not enough statistics... ever)

It convinces me that I want to learn my vocabulary.

I think we can agree that it should only be attempted with merkinVocabularyMastery > 0.
 

zarqon

Well-known member
Important bug to fix! I've added code to only attempt learning clues at vocabulary skill level of 90 or higher. That ought to be satisfactory, and if not I can change it to only attempt at 100. r8.
 

heeheehee

Developer
Staff member
It convinces me that I want to learn my vocabulary.

I think we can agree that it should only be attempted with merkinVocabularyMastery > 0.

Oh, usually I don't bother learning very much vocab at all -- I just brute-force half or so of the dreadscroll (I've never bothered with the worktea, and only occasionally do I learn all the words from the choices and scrolls) -- since I'm still hunting for noncombats long after I find the dreadscroll, I have plenty of turns to burn Deep-tainted.

I would be interested to see a more clever "solver", though. This variant of Mastermind is harder than the usual :|
 

lostcalpolydude

Developer
Staff member
I never use worktea, but finding all of the other clues seems worthwhile. Did you know that every failed use of the dreadscroll costs a turn?
 

heeheehee

Developer
Staff member
I never use worktea, but finding all of the other clues seems worthwhile. Did you know that every failed use of the dreadscroll costs a turn?

Yes, that would agree with the turns remaining of Deep-tainted after each use.

edit: The tradeoff really depends on how much you value turns. For reference: 30% mastery costs 3 cheatsheets and either (a hallpass and 1-2 turns) or 3 wordquizzes, which at current mall prices costs around 24k. At that rate, it'll cost about 80k to max out vocabulary.

On the other hand, on average, with a naive approach (changing one option at a time until you get the right answer) each guess takes two tries to get the right answer, but let's be a little conservative and say 3 tries -- you do have to confirm the ones you had right initially. If you only use the knucklebone and Deep Dark visions, let's say, you'll end up spending 18 tries, with 162 turns worth of Deep Dark Visions (144 after subtracting wasted turns), which you can spend elsewhere.

(note: 162 is just an estimate using n^2/2; it's a bit on the low end, but my point still stands)
 
Last edited:

Razorsoup

Member
My TT alt keeps getting an error ("This skill is useless out of water.") that I think is related to SmartStasis. From the output, it looks like SmartStasis is trying to use Summon Leviatuga which doesn't make sense given I am not underwater. Any advice on how to troubleshoot or fix this would be appreciated.

My CCS is:
Code:
[ default ]
consult SmartStasis.ash
attack with weapon

The output from gCLI with verbosity set to 10.
[19143] The Middle Chamber
Encounter: tomb bat
Strategy: C:\Documents and Settings\Michael\My Documents\Desktop\Kingdom of Loathing\ccs\default.ccs [default]
Round 0: Steve Hanler wins initiative!
1 HP costs 0.744μ. ( 1,578 / 1949 )
1 MP costs 0.01μ. ( 219 / 1447 )
Factoring in Scarysauce: (6) damage, retal
You have cup of infinite pencils equipped: 27.5 damage,
leathery bat skin (30.0 @ +78): 541μ * 53.4% = 288.89
unidentified jerky (10.0 @ +78): 90μ * 17.8% = 16.02
mummy wrapping (20.0 @ +78): 189μ * 35.6% = 67.28
Value of stat gain: 464.84μ
leathery bat skin (30.0 @ +78): 541μ * 53.4% = 288.89
unidentified jerky (10.0 @ +78): 90μ * 17.8% = 16.02
mummy wrapping (20.0 @ +78): 189μ * 35.6% = 67.28
Value of stat gain: 464.84μ
ATT: 175 (6% × 3.78, death in 1578)
DEF: 157 (95.45% × 1,159.43 (25), win in 1)
HP: 185, Value: 1,003.54 μ, RES: 0
Parsed round number: 1
Building options...
Evaluating 'min(29.0+3,10)+floor(sqrt(max(29.0-7,0)))'...
Evaluating '325.5*zone(sea)'...
Options built! (42 actions)
Profit per round: ActionProfitDamageOtherbase; cup of infinite pencils; Cocoabo (13.44μ)16.36μ30.83 (-0.44 μ/dmg)Att: -1.08 (0 DPR) Def: -1.08 HP: -3.87 MP: 3.87
Building custom actions...
Custom actions built! (0 actions)
Stasis action chosen: skill 2024 (round 1, profit: 15.79)
leathery bat skin (30.0 @ +78): 541μ * 53.4% = 288.89
unidentified jerky (10.0 @ +78): 90μ * 17.8% = 16.02
mummy wrapping (20.0 @ +78): 189μ * 35.6% = 67.28
Value of stat gain: 464.84μ
Attack action chosen: skill 2003 (round 1, profit: 16.33)
Top of the stasis loop.
Queued: skill 2024
Building options...
Evaluating 'min(29.0+3,10)+floor(sqrt(max(29.0-7,0)))'...
Evaluating '325.5*zone(sea)'...
Options built! (42 actions)
Constructed macro: scrollwhendone; sub finito; skill 2024; endsub; call finito; repeat hasskill 2024 && (!hpbelow 1578.0 && hpbelow 1949 && !mpbelow 219.0 && !pastround 26)
Round 1: Steve Hanler executes a macro!
This skill is useless out of water.
KoLmafia thinks it is round 2 but KoL thinks it is round 1
You're on your own, partner.
 

Theraze

Active member
Looks like SS is deciding that since Summon Levituga does no damage outside the sea, it's a perfect stasis skill... probably needs some special coding somewhere to make it not get selected at all outside the sea, not just 0 damage.
 

Razorsoup

Member
Looks like SS is deciding that since Summon Levituga does no damage outside the sea, it's a perfect stasis skill... probably needs some special coding somewhere to make it not get selected at all outside the sea, not just 0 damage.

I think that makes sense. Now I'm trying to figure out why it felt the need to use a stasis skill in the middle chamber of the pyramid. I think it may be because I had the cocoabo equipped and it was trying to wait to give the cocoabo time to heal me. Does that sound about right? I can't think of any other reason it would have needed to prolong the fight.
 

zarqon

Well-known member
Since there are starting to be quite a lot of Sea-only items and skills, I'll be adding an "underwater" keyword to batfactors. If an action is flagged as "underwater" and you're not currently in the Sea, the action will be removed from consideration and will not be present in opts. This keyword should only be used on actions like Summon Leviatuga which fail or accomplish absolutely nothing out of the Sea -- there are plenty of actions (items in particular) which work, though less powerfully, outside the Sea.
 

Laccowan

New member
Hello!
I'm having some problems using this script: it seems it's trying to use the indigo cup twice. Sometimes mafia goes on, but sometimes it stops.

This is the quotation with verbosity=8
[317] Hidden City (Square 15)
Encounter: ancient protector spirit
Strategy: D:\Giochi Necessari\KoL\ccs\Ascendo e mi curo.ccs [default]
Round 0: nafoi wins initiative!
Round 1: Vecchio Scarpone rubs its soles together, then stomps in place restlessly. Clearly, the violence it's done so far is only making it ache for some quality stomping.
1 HP costs 10,μ. ( 212, / 212 )
1 MP costs 3,636μ. ( 248, / 286 )
obsidian dagger (100.0 @ +154,29): 50,μ * 100,% = 50,
obsidian dagger (100.0 @ +154,29): 50,μ * 100,% = 50,
ATT: 210, (44,% × 10,29, death in 47)
DEF: 160, (41,13% × 9,18, win in 140)
HP: 140,, Value: 607,81 μ, RES: 1,
Parsed round number: 1
Profit per round: ActionProfitDamageOtherbase; enthroned El Vibrato Megadrone (0μ)29,09μ--MP: 12,5
Stasis action chosen: use 5561 (round 1, profit: 29,09)
obsidian dagger (100.0 @ +154,29): 50,μ * 100,% = 50,
Attack action chosen: skill 4009 (round 1, profit: -9,09)
Queued: use 5561
Constructed macro: scrollwhendone; sub finito; use 5561; endsub; call finito; repeat hascombatitem 5561 && (!hpbelow 212.0 && !mpbelow 248.0 && !pastround 26 && !match "acquire an item")
Round 1: nafoi executes a macro!
Round 1: nafoi uses the Rain-Doh indigo cup!
You gain 42 hit points
Round 2: Partenopeo lowers itself down over your temples and shoots a beam of energy through your brain. Whee!
Round 2: You gain 10 Mojo Points.
Round 2: nafoi uses the Rain-Doh indigo cup!
Happened: use 5561
Happened: use 5561
Parsed round number: 3
Stasis action chosen: use 2177 (round 3, profit: -45,26)
obsidian dagger (100.0 @ +154,29): 50,μ * 100,% = 50,
Attack action chosen: skill 4009 (round 3, profit: -1,82)
Stun action chosen: use 5560 (round 3, profit: 0)
You're on your own, partner.
Click here to continue in the relay browser.

I don't know if the problem is the raindoh or something else...

My CCS is
[ default ]
consult SmartStasis.ash
skill saucegeyser

Tell me if you need more informations. Thank you in advance!


EDIT:
Not knowing much about how this works I tried editing the batfactors.txt:
I changed the line
item 5561 Rain-doh indigo cup 0 -0.2*maxhp once, stun 1
to
item 5561 Rain-doh indigo cup 0 -0.2*maxhp once, stun 1, once

I don't know why, but now it stopped using it twice. I hope this can be useful to someone.


EDIT2:
nope. He decided to do it again.
[556] Oil Peak
Encounter: oil baron
Strategy: D:\Giochi Necessari\KoL\ccs\Ascendo e mi curo.ccs [default]
Round 0: nafoi wins initiative!
Round 1: Rasputin ti Guarda irritates the crap out of you and your opponent with his incessant high-pitched yapping.
Round 1: nafoi executes a macro!
Round 1: nafoi uses the Rain-Doh indigo cup!
You gain 48 hit points
Round 2: Partenopeo lowers itself down over your temples and shoots a beam of energy through your brain. Whee!
Round 2: You gain 12 Mojo Points.
Round 2: nafoi uses the Rain-Doh indigo cup!
You're on your own, partner.
Click here to continue in the relay browser.
 
Last edited:

Winterbay

Active member
WHAM has been stomping pretty well for me. I don't have a medium so can't test that but there are a lot more conditionals on that usage than there is on the stomping.
 

zarqon

Well-known member
SS won't automatically stomp for boring old gooey paste, under the premise that under most circumstances you'd want to save your stomps for better pastes. So if you're in a zone with only monsters that squish into gooey paste it won't ever stomp. I think we can add some code to BBB to skip switching to that familiar in the event you're in a zone without squishworthy monsters.

I've also discovered another possible catch with familiar drop farming. If you're in a non-adventure.php location, the hipster combats will never fire. The next update will skip the hipster for those locations.
 

zarqon

Well-known member
r10 Update

The first thing you'll notice with this update is that your settings have changed names! As mostly foretold in the BatBrain thread, the following settings have changed names:

  • ftf_olfact => BatMan_attract. Specify monsters here that you always want to attract.
  • ftf_grin => BatMan_banish. Specify monsters here that you always want to banish.
  • ftf_yellow => BatMan_yellow. Specify monsters here that you always want to yellow ray.
  • cameraPutty => deleted (you can toggle cameras being used as putty by simply blacklisting them)

In the case of the first three, ZLib was already prepared and will automatically migrate the contents of your previous settings over to the new settings, then delete your old ftf_ settings. No hassle!

SS now also uses BatBrain's new custom actions categories rather than hard-coding specific actions. It uses the "copy" category (which also includes rain-doh black boxes and 4-d cameras) where it once specified Spooky putty, the "attract" category (which also includes the Jarlsberg creamstaff) where it once specified Olfaction, the "banish" category (which includes several challenge path skills and a wide range of combat items) where it once merely specified Creepy Grin, and the "yellow" category where it once specified Point at Your Opponent. In the case of "yellow", it will not throw items if you have a He-Boulder with you, but otherwise, it will attempt to yellow ray your opponent using any actions flagged with "yellow", such as unbearable lights.

Of these changes, the one that merits further warning is the change to BatMan_banish. This setting is now intended as a general-purpose list of monsters you always want to banish. BatBrain will use banishing actions such as Banishing Shout or jiggling the Cheesestaff, and even including temporary banishers such as crystal skulls or divine champagne poppers, unless you blacklist them.

Enjoy! I'm particularly excited about this update to SS because it paves the way for a really cool BatMan RE update -- combat queue manipulation! Going to post that now.
 

CptJesus

Member
Getting this error when attempting to use WHAM, coming from SmartStasis.

Code:
the degrassi knoll bakery
the degrassi knoll garage
the degrassi knoll gym
the degrassi knoll restroom
Multiple matches against degrassi knoll.
Bad location value: "degrassi knoll" (SmartStasis.ash, line 60)
Consult script 'WHAM.ash' not found.
You're on your own, partner.
 

m00g

New member
New Degrassi update throws a spanner in the works at line 60.

I've just replaced that with this for now until someone comes up with a more elegant solution (I know nothing!)

Code:
      case $location[the degrassi knoll bakery]: foreach i in $items[spring, cog, sprocket, empty meat tank] if (has_goal(i) > 0) return true; break;
      case $location[the degrassi knoll garage]: foreach i in $items[spring, cog, sprocket, empty meat tank] if (has_goal(i) > 0) return true; break;
      case $location[the degrassi knoll gym]: foreach i in $items[spring, cog, sprocket, empty meat tank] if (has_goal(i) > 0) return true; break;
      case $location[the degrassi knoll restroom]: foreach i in $items[spring, cog, sprocket, empty meat tank] if (has_goal(i) > 0) return true; break;
 

zarqon

Well-known member
r11 fixes this. I just changed the location to the garage, unless the other Gnoll monsters also can drop meatcar parts when mayfly'd, which I haven't tested.
 
Top