SmartStasis -- a complex script for a simple CCS

Gdunge

Member
Well, that was fun! Can't wait to ascend now and see the new Valhalla.

Meanwhile, back in the Kingdom, I'm still getting beat up during stasis. Here's a Verbosity 8 log:

Code:
[14748] Infernal Seal Ritual
Encounter: watertight seal
Strategy: /Users/dougw/Library/Application Support/KoLmafia/ccs/default.ccs [watertight seal]
Round 0: gdunge wins initiative!
1 MP costs 8.0 μ.
1 HP costs 1.7985611 μ.
hyperinflated seal lung (100.0 @ +137.0): 75μ * 100.0% = 75.0
hyperinflated seal lung (100.0 @ +137.0): 75μ * 100.0% = 75.0
Monster value: 1025
Profit per round: ActionProfitDamageOtherbase; Rogue Program (0μ)63.41μ8.17 (0 MPD)45% stun chance MP: 8.17
Round 1: gdunge executes a macro!
Round 1: gdunge uses the fat stacks of cash!
Round 2: gdunge uses the fat stacks of cash!
Round 3: gdunge uses the fat stacks of cash!
You gain 1 Muscularity Point
You lose 859 hit points
Round 4: gdunge executes a macro!
Round 4: gdunge uses the fat stacks of cash!
You gain 1 Muscularity Point
You lose 752 hit points

...and then I was dead.

I would be happy to help troubleshoot the problem if you tell me what to do.

Thanks!
 

fronobulax

Developer
Staff member
We've discussed this before and I remain convinced that the problem lies with the operator. Nevertheless, in today's run, I got Beaten Up. A lot. Since I could one shot the monsters in the zone this did not make me happy. The first thing I noticed was that SS did not decide to cast Entangling Noodles for me. I had pulled it out of my CCS because there was a conflict between my CCS and SS with some character where SS would cast Noodles and so there would be an error when CCS finally gained control and (re)cast Noodles. Then I realized that UR was not kicking in until about 35%. I raised that to 50% and between the two changes I stopped getting Beaten Up. Familiar was a Cocoabo so SS was correct in trying to stasis. My guess is that SS is not correctly predicting how long stasis is safe. That may be due to SS and UR having different ideas of what my HP should be or would be after script execution.

The problem is really operator. I don't care whether I stasis or not. I could argue that I have a preference for quick kills even if that is suboptimal. But I know of no other way to automate the collection of pirate insults or the Junkyard quest without SS, so I use it.
 

zarqon

Well-known member
Actually this is SS's problem. I fixed it a week ago but have been unable to post the update. On the subway now and will have very little time for the next several days, but I realize this is a high priority fix and will try to post it as soon as I can.
 

fronobulax

Developer
Staff member
fronobulax, have you made slyz's modification from post 1000? That fixes a lot of those issues...

No. I may have missed the significance but, in general, I prefer to wait for an official release of scripts when the author is actively involved in updating them.
 

Theraze

Active member
The significance is that as it stands in the release version, it takes all speculative actions as definitely having already occurred. So according to the script, you have already entangled, used every delevelling power, healing power, and are doing quite well. With those changes, after the speculation happens, they get reverted back to original, so you haven't entangled... unless you actually have. And you haven't delevelled... unless you have. Repeat this haven't/have through all skills/items as needed. :)
 

Winterbay

Active member
Heh, have I said how mcuh I love this bee thing? It is the best thing since like forever and I've been around for a while :)
 
Last edited:
Feature Request: If you have the juju mojo mask equipped, and none of the intrinsic effects, use the 0-mp class combat skill in the first round, (before noodles, even if you could get hit) to get primestat's god's attention.
 

Rinn

Developer
I'm noticing SmartStasis is trying to pickpocket twice when I should only be able to pickpocket once.
 

Bale

Minion
I also noticed this happen when I was an AT. It seems like a minor bug though since it won't cost an action if you cannot pickpocket, nor does it take an extra page load since it is macroed. So I didn't care much.

Cosmetic bug.
 

Bale

Minion
Made the following apiphobic change to SS so that I could easily finish the quest today:

Code:
  // insults
   if (item_amount($item[the big book of pirate insults]) + item_amount($item[Massive Manual of Marauder Mockery]) > 0 && have_item($item[pirate fledges]) == 0 &&
       contains_text(m.to_string()," Pirate") && monster_attack(m) - monster_level_adjustment() < 100) {
      int insultsknown;
      for i from 1 to 8 if (get_property("lastPirateInsult"+i) == "true") insultsknown += 1;
      if (insultsknown < 8) 
		custom[count(custom)] = to_event((item_amount($item[the big book of pirate insults]) > 0? "use 2947": "use 5120"),to_spread(0,"physical"),"att 0.3*buffedmox");
   }
 

Bale

Minion
I just made an Hivecore discovery with notable relevance to SS. The Beebee King is immune to stun. SS cast Entangling noodles on him and it did not work. :( He killed me thanks to that extra hit. I would probably have lived if that turn was not wasted.

I'm afraid I'm not figuring out how SS identifies unstunnable monsters so that it won't try to entangle them. Actually, it looks like SS doesn't try to identify unstunnable monsters. Is that true?
 
Last edited:

zarqon

Well-known member
Hey everyone, my laptop died yesterday -- video chip overheated (common problem with HP dv series) -- so I won't be able to fix this and post a proper update for a while. So in the meantime, here are my current versions of SS and BB. I was in the middle of making some changes, so while they are functional to the point of being better than the current first post, they are unfinished.

Off the top of my head, I think this includes fixes for most of the problems mentioned. It won't stasis to death, it won't throw 'b' items in Beecore. This doesn't include a Marauder Manual check, since at the time mafia still didn't support that item -- however, there's a subfunction waiting for that name to get plugged in which you can find easily. There were also a few small errors in BB's logic which were cleaned up.

I'll properly update these once my laptop is working again, whenever that may be. In the meantime, I have a question:

High-ML Slime Tube monsters appear to have a special attack. I recently automated a double-nodule run and noticed myself dying due to casting DB combos (fortunately I caught it and had a bit of a cushion, so I still made the run). My moxie was buffed well above the adjusted ML, so evidently there is another mechanic at work here, and I didn't see anything on the Wiki about it. Anyone know what that mechanic is? As a temporary fix, I adusted m_hit_chance() to return always if you're in the Tube, but that's a hack and I'd like to know the real numbers.

-- EDIT: files removed due to update --
 
Last edited:

Bale

Minion
The experimental BatBrain is definitely buggy. At the very least m_dpr(0,0) is not working properly. My batround says if hpbelow 258; abort "BatBrain abort: Danger, Will Robinson"

That's a problem because my max_hp() is only 99. ;)

Switching back to the released version I get if hpbelow 41; abort "BatBrain abort: Danger, Will Robinson" which works much better.

I know it is an experimental build, but consider this fair warning to anyone who wants to check it out now.
 

Rinn

Developer
A good addition to ss when you get a chance would be to have it always use +meat disco/rave combos against dirty thieving brigands if you could survive the combat.
 

Theraze

Active member
The experimental BatBrain is definitely buggy. At the very least m_dpr(0,0) is not working properly. My batround says if hpbelow 258; abort "BatBrain abort: Danger, Will Robinson"

That's a problem because my max_hp() is only 99. ;)

Switching back to the released version I get if hpbelow 41; abort "BatBrain abort: Danger, Will Robinson" which works much better.

I know it is an experimental build, but consider this fair warning to anyone who wants to check it out now.

Is there a fix for this yet? I switched back to release because the aborting was becoming problematic...
 
Top