SmartStasis -- a complex script for a simple CCS

Exactly as Theraze said. In more detail; if your stocking mimic is just 10lbs, you should "profit" about 4.25MP per round on average; if you're casting salve at full cost every other round, combat "costs" 2MP per round. So, by continuing to "stasis" you're profiting about 2.25MP per round. Of course, with a heavier mimic, that profit only goes up.
 
Exactly as Theraze said. In more detail; if your stocking mimic is just 10lbs, you should "profit" about 4.25MP per round on average; if you're casting salve at full cost every other round, combat "costs" 2MP per round. So, by continuing to "stasis" you're profiting about 2.25MP per round. Of course, with a heavier mimic, that profit only goes up.

Ah, that explains it thanks. It should do that less now that I've altered my ccs to plink with my brc. Shouldn't have as much MP to try and recover.
 
I've had a little time today to fix the issues described earlier -- poison removal is now one of the automatic responses in the action filter, and BatBrain now multi-sorts in stasis_action() -- one sort based on profit (secondary sort), and another based on low damage (primary sort).

Also, I removed further substantial chunks of old code from the stasis loop (including all of the healing loop), given that stasis_action() considers nearly all available actions now. The stasis loop is now only 25 lines! I do, however, need to add something to BatBrain so that it will exclude Burrowgrub if you won't make good use of it.

I was stasising very nicely today as a myst class in Ronin with a NPZR, alternating between salve and my dictionary.

Hopefully will get DB combos sorted into BatBrain this weekend and then will post another update.
 
Would you be willing to release a fix for the poison problem somehow? I tried moving things around myself but couldn't get it to work. Or is the batbrain in the first post updated and I've just failed to notice that?
 
From the way his post read, to me at least, watch for a new update after the weekend, but sometime soon after that...?
 
What with various V-day events, didn't get to resorting DB combos into BatBrain this weekend. However, the fixes I already mentioned do still warrant an update. New files are in the first post, and BatBrain now has version checking. The script is not efficient about Burrowgrub yet, but otherwise is a marked improvement over the last one.

A band that I was drumming for has dissolved due to babies, so I'll probably have time this week to spiff the script up yet further. As usual, please report any anomalies, or submit fixes if you are able.
 
A band that I was drumming for has dissolved due to babies.

That's terrible. Babies are the strongest acid known to mankind. Many groups of people have been dissolved by toxic showers of babies and I feel your pain. My condolences to your former bandmates.
 
Valentine's day trivia:

As soon as the google spider gets to it, this page will be the SECOND extant occurance of "dissolved due to babies" on the internet.
 
Really? I'm surprised that there aren't more webpages and forums dealing with the problems of infant catalyzied dissolution.
 
Does batbrain currently support automated use of summon hobo underling if wearing Hodge gear (for the +100% meat/item drop buffs as well as free booze or food)? If not can this be put in the script or is it something I would have to do manually?
 
Since it's limited (right? It is limited use?) it seems to me like this would be best left out so you could choose when to use them (hobo bosses, etc)
 
There is presently no support for summoning hobo underlings. Since you're limited to 5/day I hadn't planned on adding them -- but I could see automating the +items skill if it would help you acquire goals (perhaps if at least half of the bonus would not be wasted or something like).
 
Updates to BatBrain!

I've been working with StDoodle on both expanding and consolidating the data files, and the result is batfactors.txt -- a single data file containing all the combat factors which were previously loaded from separate data files. This is now the code BatBrain uses to load the data file:

PHP:
record combat_rec {
   string ufname;     // user-friendly name
   string dmg;        // damage formula
   string dmgtypes;   // types of damage done
   string special;    // comma-delimited list of other action results
};
combat_rec [string, int] factors;
load_current_map("batfactors",factors);        // master data file of battle factors
if (last_monster() == $monster[mother slime] || last_monster() == $monster[chester] || have_effect($effect[form of...bird]) > 0) {
   remove factors["item"];                     // remove items if impossible
   vprint("You can't use items in this combat.",-6);
}
if (have_effect($effect[temporary amnesia]) > 0) {
   remove factors["skill"];                    // remove skills if impossible
   vprint("You can't cast any skills with amnesia!",-5);
}
foreach ty,in,rec in factors {                 // reduce any ranges to average values
   string deranged(string sane) {
      matcher rng = create_matcher("\\{\\s*?(.+?)\\s*?,\\s*?(.+?)\\s*?,\\s*?(.+?)\\s* ?\\}",sane);
      while (rng.find()) sane.replace_string(rng.group(0),rng.group(2));
      return sane;
   }
   factors[ty,in].dmg = deranged(rec.dmg);
   factors[ty,in].special = deranged(rec.special);
}

Note the regex, cleverly devised by StDoodle and inserted into this code with my special regex tongs. The data file can now include ranges for everything -- even mid-formula. This is because we would like the data file to be able to specify ranges for everything, rather than only average values. For now, however, BatBrain still uses the average values.

The upshot is this:

  • After you update BatBrain, all the files in your data directory beginning with "dmg_" may be deleted. I'll leave those old data files on the Map Manager for a week or so, but after that, they will be removed.
  • The data file needs reworking to include a) ranges for everything with a range, using the format {min,ave,max}, ii) things added to KoL since these data files were made many moons ago, and 3) separate att/def deleveling information. This means for something that delevels attack by 1-3 and defense by 0-1, you would use "att {-3,-2,-1}, def {-1,-0.5,0}". Having these separate will significantly improve the accuracy of combat scripts using BatBrain.

Any help tweaking the data files would be appreciated. For now, do not remove the "delevel X" flags in the special field -- I'll remove those myself after transitioning BatBrain to use the new "att" and "def" flags.

Also thanks to StDoodle, BatBrain now correctly estimates damage of pastamancer and sauceror skills (with handling for tuning via cookbooks and Immaculate), which was one of the major knowledge inaccuracies that needed addressing.

Thanks much for the collaboration StDoodle!
 
Ahh... did finally figure out what was wrong with my manual adventuring. :D The [early BatMan] fight relay override from long long ago was still in place, and it calls SmartStasis as part of its bits. Smart[ish]Stasis calls BatBrain, which also defines most of the parts that the fight override has. Removed the parts that conflicted, but that just made the gCLI print out the sheet and the actual fight page to say VOID, which wasn't hugely useful. :D Relay removed for now. Heh.
 
If you liked having that there, I'm using this at the moment -- but be warned. I was trying to get the jQuery tablesorter plugin working on this but never got it figured out, so if you have a lot of options, your table will be very long and you'll have to scroll down to get to the attack button. However, all the options are now clickable to perform the action, so you don't often need to scroll all the way down.

Also, it's now correct on the first round thanks to the workaround from Winterbay.

EDIT: attachments removed with BatMan Relay release.
 
Last edited:
Hmm.. Downloading those just to test it out gave the following error:
Code:
[83] Degrassi Knoll
Function 'runaway_cost( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (fight.ash, line 7)

Edit: Solved by changing "import smartstasis.ash" to "import smartishstasis.ash" :)
 
Last edited:
Hmm.. Downloading those just to test it out gave the following error:
Code:
[83] Degrassi Knoll
Function 'runaway_cost( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (fight.ash, line 7)

Edit: Solved by changing "import smartstasis.ash" to "import smartishstasis.ash" :)

You mean you didn't just rename SmastishStasis to SmartStasis when you downloaded it originally, so you didn't need to change all your CCS? :D

zarqon: Thanks for the update. :) Yeah, I've gotten used to not seeing my buttons on my screen, so that makes me happy. :)
 
Back
Top