SmartStasis -- a complex script for a simple CCS

It's not just in the DoD, it's everywhere, and like I said, again, it never thinks I'm safe. I just wanted to suggest not mosquito-stasising quantum mechanics or protagonists when you're getting hit every round.
 
That doesn't happen for me. It could be something wonky happening with your safety threshold -- type "zlib vars" in the CLI and tell me the value of your threshold setting.
 
Yeesh, I just realized I hadn't updated FTF/SmartStasis in a year - to the day.

I guess it should probably work a bit better now.
 
Just noticed that you're missing fat stacks of cash here:

Code:
item stasis_item() {
   if (my_location() != $location[orc chasm]) {
      if (item_amount($item[dictionary]) > 0) return $item[dictionary];
      if (item_amount($item[facsimile dictionary]) > 0) return $item[facsimile dictionary];
   }
   if (item_amount($item[turtle totem]) > 0) return $item[turtle totem];
   if (item_amount($item[spices]) > 0) return $item[spices];
   if (item_amount($item[seal tooth]) > 0) return $item[seal tooth];
   if (item_amount($item[spectre scepter]) > 0) return $item[spectre scepter];
   vprint("No stasis item found!","olive",-2);
   return $item[none];
}

Fat stacks of cash are not used up if you aren't in the Old Crimbo Town Toy Factory which really isn't likely to ever again happen. Since they do no damage, that makes them slightly nicer for use than the turtle totem and spices.
 
I am trying to use SS to get clockwork keys from the Thugnderdome. None of my disco combos are happening.

I have set my goal to "+2 clockwork key". I am a Level 27 disco bandit.

Here's my Custom Combat script:
Code:
[ default ]
consult SmartStasis.ash
attack with weapon

And here is some sample log output:
Code:
[31298] Thugnderdome
Encounter: gnarly gnome
Strategy: /Users/dougw/Library/Application Support/KoLmafia/ccs/SmartStasis.ccs [default]
Round 0: gdunge wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
2/6 monsters drop goals here.
Round 1: gdunge tries to steal an item!
Round 2: gdunge tries to steal an item!
Round 3: gdunge attacks!
You gain 4 Fortitude
You gain 3 Magicalness
You gain 3 Sarcasm

Am I missing something?

Thanks!

Edit:
Update: it's working great in other places, such as McMilligancuddy's Farm against the ducks. SmartStasis is casting the proper combos, including the one that forces a drop if pickpocketing fails.

But it doesn't bother to try the item-drop combos on the gnomes in the Thugnerdome, even though I've set an item goal as above.

Hmmm. Why not?
 
Last edited:
OK, here's the output that slyz asked for. Thanks for looking!

There are a few things that look wrong.

- The MCD is not unavailable. I can change it from 0 to 10.
- The script thinks I can only do 3 disco combos. I can actually do all of the disco/rave combos.
- The gnarly gnome should be my huckleberry, right? It drops the clockwork key.

Validating adventure sequence...
Condition added: clockwork key (2)
clockwork key (2)
Requests complete.

You don't have any spooky putty monsters.
MCD: unavailable

Visit to MoxSign: Thugnderdome in progress...

[31781] Thugnderdome
Encounter: gnasty gnome
Strategy: /Users/dougw/Library/Application Support/KoLmafia/ccs/SmartStasis.ccs [default]
Round 0: gdunge wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
flange (5.0 @ +180.6202): 2500.0 meat * 14.031009% = 350.77524
Monster value: 2581.71
Profit per round: 0
Bonus damage to DB skills: 0
You are able to cast 3 possible disco combos.
2/6 monsters drop goals here.
Round 1: gdunge tries to steal an item!
Round 2: gdunge tries to steal an item!
Checking for unidentified potions...
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
flange (5.0 @ +180.6202): 2500.0 meat * 14.031009% = 350.77524
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
flange (5.0 @ +180.6202): 2500.0 meat * 14.031009% = 350.77524
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
flange (5.0 @ +180.6202): 2500.0 meat * 14.031009% = 350.77524
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
flange (5.0 @ +180.6202): 2500.0 meat * 14.031009% = 350.77524
Round 3: gdunge casts POP AND LOCK IT!
Round 4: gdunge casts RUN LIKE THE WIND!
Round 5: gdunge casts BREAK IT ON DOWN!
You acquire an effect: Rave Concentration (duration: 1 Adventure)
clockwork key (5.0 @ +210.6202): 7950.0 meat * 15.531009% = 1234.7152
clockwork key (5.0 @ +210.6202): 7950.0 meat * 15.531009% = 1234.7152
Round 6: gdunge casts DISCO EYE-POKE!
Round 7: gdunge casts DISCO DANCE OF DOOM!
You gain 1 Strongness
You gain 3 Enchantedness
You gain 7 Sarcasm
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
clockwork key (5.0 @ +180.6202): 7950.0 meat * 14.031009% = 1115.4652
This monster is not your huckleberry.

Conditions not satisfied after 1 adventure.
 
Ok, some clarification of this output:

  1. The MCD is considered unavailable if you are in a moxie sign and you have untinkered your meatcar. This is because the script checks for the meatcar to determine if you have unlocked the beach; there isn't another way to do it without a server hit. However, there's a way around it if you call canadv.ash on one of the beach zones.
  2. Only three of your DB combos are "possible" because the monster drops no meat, and the script ignores damage/stun/delevel combos. That leaves 2 +item combos and 1 pickpocket combo for a grand total of 3.
  3. "Huckleberries" are monsters that should be stasised despite normal rules -- currently, this means stasising gremlins for tools, stasising Megalopolis monsters for essence discs, and stasising ravers to learn DB skills.

I don't see a problem with any of the behavior you posted above. Rave Concentration is the most profitable of your DB combos in that case so it's chosen first, and I'm assuming it started the pickpocket combo next, which killed the monster before it completed.
 
Zarqon already explained that the script is behaving as it should, and the problem is that the combos kill the gnomes before being completed. I just wanted to add that you should try running more (a lot more) +ML, so they have more hitpoints.

Ur Krel's Aria can be asked to any buffbot for free, then you would have to do some math to see if cheap things like slimy food/booze or astral cupcakes would allow you to finish the combo, and if the cost in meat (or adventures lost in case of the food/booze), is worth the profit made from finishing the combo.
 
@Zarqon: great script, thanks for the help, and the hints. I made a meatcar and that's working now. Yes, that was my pickpocket combo starting.

@slyz: great suggestion, I'll play with that. Thanks!

I have a new issue with FTF where it constantly tells me that my slimeling needs sating. I'll post to the appropriate thread.

Thanks again!
 
Got some questions here. SS currently doesn't support the Crown of Thrones. How could I add this kind of functionality in without altering SmartStasis itself? Basically what I'm looking for is something to recognize the drop items from familiars in the throne. They don't always drop in the first few turns of combat, as I've had it take up to round 15 a couple of times (rare). If I include a second CCS script after SmartStasis.ash, in order to make sure I got my nuggets from my fairy, how would I set up the recognition? Otherwise, SS will go ahead and kill before I get the drop.
Or is this kind of moot as there's Crown stasis in the works?
 
I was not aware that Crown stasis existed until your post. It looks complicated -- there are currently 20 familiars that drop items as a combat action from the throne, no doubt with more on the way eventually. Further, many enthroned familiars have combat actions that affect SS in other ways, restoring HP/MP or producing meat. Ugh.

I didn't see anything authoritative on the Wiki about the action rate. Someone suggested that HP/MP regen will only occur within the first three rounds, whereas item drops could happen any time. Meat drop was not mentioned. I would also be interested to know if this action rate is effected by Jingle Jangle, although I doubt it would be. I suppose I should devote some time to testing this after the next time I free the king. Double ugh.
 
The wiki can't be updated because the page is too large already. Someone with more wiki knowledge would have to start splitting up the page into several pages, and a fourth column is really needed. HP/MP should always be the first 3 rounds, items/meat should always be once per combat on a random round (I might be wrong about meat, but I hope it's just once per combat). I would guess that damage can happen any number of times on any rounds, but who would use a damage familiar? Also note that mafia should already have the first round of HP/MP regen reported as part of the total regen for your character, but I believe none of the other in-combat stuff is reported by mafia in any way.
 
Thanks lostcalpoly, I'll go with that for now. Also rather odd, that bit about regen being included in modifiers! I don't get why; it complicates in-combat coding.

The throne may also screw up FTF's detections for pickpocketing / monster value, since it uses extract_items() and was made under the general assumption that you wouldn't get more than one item in a round -- which could happen commonly now if you steal on the same round that your enthroned familar drops an item. This will take some time to properly integrate.
 
How about doing what was done with combat items: a publicly editable data file that people can help fill in, with
- when it acts (first 3 rounds, or only once per fight)
- what it drops (eventually the string(s) too, for parsing)
- the formula for the amount of HP/MP/Meat
 
Time for another mysterious, non-reproducible strangeness report!

This started after upgrading KoLmafia to 8499. Zlib 20, FTF 4.0, SS 2.6.

[32664] Dungeons of Doom
Encounter: swarm of killer bees
Strategy: /Users/dougw/Library/Application Support/KoLmafia/ccs/SmartStasis.ccs [default]
Round 0: gdunge wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Unknown variable 'ghostname' (SmartStasis.ash, line 14)
Consult script 'SmartStasis.ash' not found.
You're on your own, partner.

It does this on every attempt to adventure with my custom combat script, which looks like this:

[ default ]
consult SmartStasis.ash
attack with weapon

This is peculiar because as far as I can tell, the string 'ghostname' does not appear in any of these scripts. In fact, nowhere in my scripts folder.

Should I try to downgrade KoLmafia and see what happens? I'm afraid I'll break something.

Here's a couple of bats for Zarqon:

/|\ M /|\
/ | \Q/ | \

/\y/\

And a page full of someone else's:

<http://isthe.com/chongo/odd/bat.html>

and a great big one:

<http://www.insite.com.br/rodrigo/software/bat.html>

Thanks,

Gdunge
 
I can't seem to find any mention of "ghostname" in neither SS, FTF nor Zlib. Do you have all the latest versions?
 
Do you have any older versions of SS sitting around in a subfolder or something? This error could only happen due to mafia running an older version of SS than the current one.
 
Back
Top