SmartStasis -- a complex script for a simple CCS

You can't... a consult script breaks the macrofication. But it doesn't abort anything else, it just affects your combat speed. What script are you getting kicked out of that you're thinking SS is to blame for?

When the message popped up during the combat automation phase of my farming script it would open a window for me to finish the combat manually and then cease adventuring.

Code:
adventure(my_adventures(), $location[giant castle]);

I deleted the section Bale mentioned. Now to see if my multi can use smartstasis without being booted out of the script.
 
In case anyone is wondering about my update schedule, MacGuffin is next (since I'm on that quest now and need to fix Mr. Alarm), then FTF/SS. More and more of Batman is making its way up the tree, but I'm OK with that since everything is getting smarter as a result.
 
More and more of Batman is making its way up the tree, but I'm OK with that since everything is getting smarter as a result.

BatMan is so smart that everything nearby gets smarter! Even I'm getting some trickle down smarts just from thinking about BatMan! I've heard that BatMan can reverse global warming!
 
BatMan is so smart that everything nearby gets smarter! Even I'm getting some trickle down smarts just from thinking about BatMan! I've heard that BatMan can reverse global warming!

I hope he doesn't go too far so we get Global Cooling instead. Or, come to think of it, that would be awesome. More cold and snow for everyone :)
 
Out of interest, what are your intentions for FTF and SS? I'm simply itching for some CoT support.

Your post makes me uncomfortable for all sorts of reasons. I'm sure that zarqon's intentions are purely platonic and you might want to check your cot for bedbugs.
 
It seems that action rate is often the last thing to be spaded. The CoT is missing action rate for quite a few of these familiars, which makes it very difficult to add the information. Here's my current CoT function which returns an advevent (BatMan's standard combat-affecting record). Please feel free to suggest changes:

(with apologies for the compacting which may make it harder to read)

PHP:
advevent crown() {
   advevent res; res.id = "crown";
   if (!have_equipped($item[crown of thrones]) || my_enthroned_familiar() == $familiar[none]) return res;
   if (round < 4) switch (my_enthroned_familiar()) {           // only act in first three rounds
      case $familiar[He-Boulder]:           case $familiar[Spirit Hobo]:        case $familiar[Hand Turkey]:
      case $familiar[Leprechaun]:           case $familiar[Temporal Riftlet]:   case $familiar[Misshapen Animal Skeleton]:
      case $familiar[Wereturtle]:           case $familiar[Knob Goblin Organ Grinder]: res.meat = 10; break;
      case $familiar[Jill-O-Lantern]:       case $familiar[Nervous Tick]:       case $familiar[Killer Bee]:
      case $familiar[Magic Dragonfish]:     case $familiar[Ghost Pickle on a Stick]: res.hp = 9; break;
      case $familiar[Pygmy Bugbear Shaman]: case $familiar[Wild Hare]:          case $familiar[Feather Boa Constrictor]:
      case $familiar[Levitating Potato]:    case $familiar[Snowy Owl]:          case $familiar[Baby Gravy Fairy]: res.hp = 5.5; res.mp = 3.5; break;
      case $familiar[Coffee Pixie]:         case $familiar[Scary Death Orb]:    case $familiar[Origami Towel Crane]:
      case $familiar[Mosquito]: res.mp = 5.5; break;
      case $familiar[El Vibrato Megadrone]: case $familiar[Rock Lobster]: res.mp = 12.5; break;
      case $familiar[Casagnova Gnome]: res.hp = 17; res.mp = 11; res.stun = 0.5; break;
      case $familiar[Jitterbug]: res.hp = 9; break;            // add 17.5 Stench Damage
      case $familiar[Hobo Monkey]: res.delevel = 4; break;     // add 20 Hot Damage
      case $familiar[Ninja Pirate Zombie Robot]: res.hp = 12.5; res.mp = 9; break;
      case $familiar[Pet Cheezling]: res.hp = 10; res.mp = 5; break;
      case $familiar[Jumpsuited Hound Dog]: res.hp = 7; res.mp = 5; break;
      case $familiar[Astral Badger]: float i; foreach mush in $items[spooky mushroom, Knob mushroom, Knoll mushroom] i += item_val(mush); res.meat = 2.0*i/3.0; break;
   }
   void throne_drops(boolean[item] td, float rate, boolean once) {
      float v; foreach it in td {
         if (once && stolen contains it) return;
         v += item_val(it);
      } res.meat += v/count(td) * rate;
   }
   switch (my_enthroned_familiar()) {                          // act any round
     // ABSOLUTELY STUNNING, DAHLING
      case $familiar[Pair of Ragged Claws]: case $familiar[Evil Teddy Bear]:    case $familiar[MagiMechTech MicroMechaMech]:
      case $familiar[RoboGoose]:            case $familiar[Emo Squid]:          case $familiar[Spooky Pirate Skeleton]:
      case $familiar[Syncopated Turtle]:    case $familiar[Fuzzy Dice]:         case $familiar[Midget Clownfish]: res.stun = 0.3; break;
      case $familiar[Baby Sandworm]:        case $familiar[Mariachi Chihuahua]: case $familiar[Snow Angel]: res.stun = 0.5; break;
      // case [Inflatable Dodecapede]: res.stun = X; break;
     // HP AND MP
      case $familiar[Black Cat]: res.hp = -35; res.meat = -25; break;   // frig.
      case $familiar[Cheshire Bat]: res.hp = 9; break;                                   // these need action rate
      case $familiar[Mini-Hipster]: res.hp = 15; res.mp = 9; break;                      //
      case $familiar[Llama Lama]:                                                        //
      case $familiar[Wizard Action Figure]:                                              //
      case $familiar[Ninja Snowflake]: res.mp = 5.5; break;                              //
      case $familiar[Dramatic Hedgehog]: res.hp = 2.5; break; 	  // also delevels       //
      case $familiar[Stab Bat]: res.hp = -12.5; break;            // add 25 dmg          //
      // case $familiar[Personal Raincloud]: X HP, X MP                                   //
     // BECAUSE HEY, FREE ITEMS
      case $familiar[Frozen Gravy Fairy]: throne_drops($items[cold nuggets],1,true); break;
      case $familiar[Flaming Gravy Fairy]: throne_drops($items[hot nuggets],1,true); break;
      case $familiar[Sleazy Gravy Fairy]: throne_drops($items[sleaze nuggets],1,true); break;
      case $familiar[Spooky Gravy Fairy]: throne_drops($items[spooky nuggets],1,true); break;
      case $familiar[Stinky Gravy Fairy]: throne_drops($items[stench nuggets],1,true); break;
      case $familiar[BRICKO chick]: throne_drops($items[BRICKO brick],1,true); break;

      case $familiar[Piano Cat]: throne_drops($items[beertini, papaya slung, salty slug, tomato daiquiri],0.3,false); break;
      case $familiar[Stocking Mimic]: throne_drops($items[Angry Farmer candy, Cold Hots candy, Rock Pops, Tasty Fun Good rice candy, Wint-O-Fresh mint],0.3,false); break;
      case $familiar[Untamed Turtle]: throne_drops($items[snailmail bits, turtlemail bits, turtle wax],0.35,false); break;
      case $familiar[Adorable Seal Larva]: throne_drops($items[hot nuggets, cold nuggets, stench nuggets, spooky nuggets, sleaze nuggets],0.35,false); break;
      case $familiar[Ancient Yuletide Troll]: throne_drops($items[candy cane, eggnog, fruitcake, gingerbread bugbear],0.3,false); break;
      case $familiar[Sweet Nutcracker]: throne_drops($items[candy cane, eggnog, fruitcake, gingerbread bugbear],0.3,false); break;
      case $familiar[Green Pixie]: throne_drops($items[bottle of tequila],0.2,false); break;
      // itemfams from here down have unspaded action rate -- assuming 30%
      case $familiar[Pottery Barn Owl]: throne_drops($items[volcanic ash],0.3,false); break;
      case $familiar[Gluttonous Green Ghost]: throne_drops($items[bean burrito, enchanted bean burrito, jumping bean burrito],0.3,false); break;
      case $familiar[Reassembled Blackbird]: throne_drops($items[blackberry],0.3,false); break;
      case $familiar[Hunchbacked Minion]: throne_drops($items[skeleton bone],0.3,false); break;
      case $familiar[Attention-Deficit Demon]: throne_drops($items[chorizo brownies, white chocolate and tomato pizza, carob chunk noodles],0.3,false); break;
      case $familiar[Cocoabo]: throne_drops($items[white chocolate chips],0.3,false); break;
      case $familiar[Cotton Candy Carnie]: throne_drops($items[cotton candy pinch],0.3,false); break;
      case $familiar[Crimbo Elf]: throne_drops($items[candy cane, Cold Hots candy, Wint-O-Fresh mint],0.3,false); break;
      case $familiar[Angry Goat]: throne_drops($items[goat cheese pizza],0.3,false); break;
/*
// monster level
      case $familiar[O.A.F. 	+10 monster level increase
      case $familiar[Slimeling 	9-16 damage, delevels
      case $familiar[Jack-in-the-Box 	delevels opponent 3-5
      case $familiar[Ragamuffin Imp 	delevels opponent 3-5
      case $familiar[Dandy Lion 	delevels opponent 3-5
      case $familiar[Clockwork Grapefruit 	delevels opponent 3-5
      case $familiar[Sabre-Toothed Lime 	delevels opponent 3-5
      case $familiar[Dancing Frog 	delevels opponent 3-5
      case $familiar[Hanukkimbo Dreidl 	delevels opponent 3-5
      case $familiar[Psychedelic Bear 	delevels opponent 3-5
      case $familiar[Crimbo P. R. E. S. S. I. E. 	delevels opponent 3-5
      case $familiar[Hippo Ballerina 	delevels opponent 	33%
      case $familiar[Autonomous Disco Ball 	delevels opponent 5-9
      case $familiar[Mutant Gila Monster 	delevels opponent 8-10
      case $familiar[Baby Yeti 	delevels opponent

// damage
      case $familiar[Cymbal-Playing Monkey 	5-25 damage 	30%
      case $familiar[Sugar Fruit Fairy 	15-25 damage 	33%
      case $familiar[Uniclops 	15-25 damage 	30%
      case $familiar[Barrrnacle 	10-30 damage 	30%
      case $familiar[Urchin Urchin 	15-30 damage 	30%
      case $familiar[Penguin Goodfella 	15-30 damage 	30%
      case $familiar[Exotic Parrot 	15-30 damage 	33%
      case $familiar[Pet Rock 	20-50 damage 	30%
      case $familiar[Toothsome Rock 	20-50 damage 	30%
      case $familiar[Purse Rat 	40-50 damage 	30%
      case $familiar[Imitation Crab 	15-20 damage, 15-20 damage 	33%
      case $familiar[Animated Macaroni Duck 	20-50 damage 	30%
      case $familiar[Star Starfish 	floor(current MP/4) damage (capped at 100) 	30%
      case $familiar[Rogue Program 	15-18 damage

      case $familiar[Blood-Faced Volleyball 	15-20 Spooky Damage 	30%
      case $familiar[Chauvinist Pig 	15-25 Sleaze Damage 	33%
      case $familiar[Grinning Turtle 	15-25 Spooky Damage 	30%
      case $familiar[Baby Mutant Rattlesnake 	15-25 poison
      case $familiar[Hovering Sombrero 	15-25 Spooky Damage 	33%
      case $familiar[Frumious Bandersnatch 	2-4 damage, 2-4 Cold Damage, 2-4 Hot Damage, 2-4 Sleaze Damage, 2-4 Spooky Damage, 2-4 Stench Damage
      case $familiar[Mutant Fire Ant 	15-25 poison
      case $familiar[Grouper Groupie 	15-25 Sleaze Damage 	30%
      case $familiar[Mutant Cactus Bud 	15-25 poison
      case $familiar[Cuddlefish 	15-30 Sleaze Damage 	30%
      case $familiar[Squamous Gibberer 	15-30 Spooky Damage 	33%
      case $familiar[Teddy Bear 	X Sleaze Damage
      case $familiar[Teddy Borg 	15-25 Sleaze Damage 	30%
      case $familiar[Wind-up Chattering Teeth 	15-20 Stench Damage 	30%
      case $familiar[Grue 	20-25 Spooky Damage 	33%
      case $familiar[Ghuol Whelp 	15-25 Stench Damage 	30%
      case $familiar[Howling Balloon Monkey 	10-15 Stench Damage 10-15 Sleaze Damage 	30%
      case $familiar[Underworld Bonsai 	17 Spooky Damage
      case $familiar[Whirling Maple Leaf 	15-25 Cold Damage 	25%
*/
   }
   return res;
}

I was rather pleased with the solution for item-dropping. It returns the average value of the possible items, times drop rate.

Note that the whole bottom half is commented. I haven't decided how to add damage yet.

What a royal pain.
 
For the Pottery Barn Owl, you might want to make it's drop rate .01. It took about 100 combat actions before I finally got 1 drop with one combat going all the way to 30 rounds and he didn't drop. That "Rarely" in the wiki means it!
As for the cocoabo, it drops like the elemental Gravy fairies and the stocking mimic as far as rate goes from what I've observed.
The mimic, Cocoabo, and elemental fairies have only ever dropped once per round.
Those are the only ones I'm personally familiar with.
 
Thanks for that info. I'll add it in, since it's better than nothing.

The mimic, Cocoabo, and elemental fairies have only ever dropped once per round.

I assume you mean once per combat, right?

Does anyone know if any of the enthroned familiars will drop multiple items per combat? If all of them are once per combat, I can remove some stuff.
 
Wow, talk about screw up big time. That's supposed to be once per combat, not round.. <slaps self a little silly> All the familiars that dropped have ever been reported as once per combat. As far as how long it takes for them to drop, I have seen them take as long as round 30 to drop them in that "Your fairy drops! You lose..." That's very rare and they usually drop by round ten, mostly dropping in the first three rounds.
 
Does SS handle bander leveling (GAP super skill, flavour of magic, stuffed mortar shell against resistant monsters)? If not, is it ever likely to? Aside from gremlins, this would be where I'd use the script most. Also, is it possible to turn off starfishing? Just because I have a slimeling active doesn't mean I want to be statsising.
 
Also, is it possible to turn off starfishing? Just because I have a slimeling active doesn't mean I want to be statsising.
You could change line 257:
PHP:
if (my_mp() == my_maxmp() && !can_combo()) base.mp = 0;
to
PHP:
if (my_mp() >= floor(my_maxmp() * to_float(get_property("mpAutoRecovery"))) && !can_combo()) base.mp = 0;
so SS stops stasising once you have reach your MP auto-recovery target.
 
Heyo. In lieu of an official update, I recently started using SS and thought I'd let others know what I personally had to do to the out-of-the-box version to get it working how I wanted:

  • add rogue program; just had to copy-paste the base starfish line and replace the name
  • slimeling satiety was being improperly detected in FTF. I tracked it down to FTF checking for the slimeling image on round 1; it does not always display in this round, even when the slimeling is fed. Added && round > 1 to that line of code, good to go.
  • add mini-hipster
  • add 0-mp trivial combat skills

Now, on the mini-hipster: anyone have advice on how to calculate the meat/mp gains? I know I'm calculating them wrong right now.
 
Regarding hipster, according to the wiki, it has a 20+(weight*2.5) chance of doing an action every round, and each of the 8 actions (2 potato actions, but they count as one) is equally likely. That means that your chance of meat is (20+(weight*2.5))/8 and the average meat gain is (4*weight)+4.5. So for 20 weight, your chance for meat gain is a 70/8 (8.75%) chance of a 84.5 average meat round. That means your meat per round (for the first 10 rounds) is 7.39375 per round.

If you go up to 32 pounds, when action is guaranteed, your chance for meat gain is 100/8 (12.5%) chance of a 132.5 average meat round. Meaning 16.5625 meat per round, not counting any of the other possible bonuses like healing, etc.

Note: For action chance, this:
Code:
20+min(80, familiar_weight(my_familiar())*2.5)
should work.
 
Last edited:
Got tired of SS trying to trigger healing when I'm getting slammed by enemies that I could kill, if I weren't trying to gain 5 health a round from my mosquito...

Any good way of considering how much health you should gain per round, compared to expected damage or will usually miss or something like that? Currently I'm just disabling the SS autoheal by saying it needs to restore at least 10 HP a round to be worthwhile...

Edit: Trying this out...
Code:
if (base.hp != 0 && vprint("HP/round from "+my_familiar()+": "+rnum(base.hp),"maroon",5)) if (will_usually_miss()) famhp = base.hp;

If it works as it should, if I'm not guaranteed the non-crit dodge, it shouldn't try to stasis for health. Change is adding the if (will_usually_miss()) before the famhp part... basically, if they wouldn't miss, you wouldn't gain that health. I could make it more complicated by doing if (will_usually_miss() || base.hp > expected_damage()), but that's definitely way too complicated. :)
 
Last edited:
There's going to be such a tiny window of juuust being above safe moxie where expected_damage() * chance_to_hit() > HP_per_round that it's really not worth the effort :)
 
Well, I got beat up about 5 times yesterday on one character who was trying to raise moxie in the ballroom before I made that change. Not a once after, so...

There's going to be such a tiny window of juuust being above safe moxie where expected_damage() * chance_to_hit() > HP_per_round that it's really not worth the effort :)
You reference a chance_to_hit() function... does that actually exist? Or was it a theoretical/personal function? :D
 
Last edited:
Back
Top