SmartStasis -- a complex script for a simple CCS

I've made a significant speed improvement to my local copy as of a few weeks ago (caching familiar/baseround data per round rather than recalculating up to hundreds of times every time options are built). I'm not ready with the features I promised last time though, so I haven't posted an update yet.

Also, and especially until the next update, your processor speed will actually make a somewhat noticeable difference, what with BB doing all this sorting and rebuilding of options; at this point I must recommend against SS for "legacy" machines. Speeding things up is starting to become a bigger concern, particularly given all the things KoL is adding lately that have some sort of special handling. Friggin' pogs, seriously.

In the meantime, closeting combat items you don't want to use will speed things up a bit.

One additional thing I should mention about your above posted combat. From BB, line 545-ish:

PHP:
advevent m_event(float att_mod, float stun_mod) {
  // TODO: add elemental hobo special attacks

You may still get beaten up in Hobopolis using any BB-powered script because I still don't have any numbers to use for hobo elemental attacks.

@Theraze: I remember writing that check for DB combos at some point, but a quick look through SS didn't reveal it anywhere. Must have been in a previous version or something, huh. I'll make sure it gets in for the next SS update. Thanks!

Anyone have a decent estimation for the damage formula of Stomping Boots?
 
Last edited:
Would it make sense to handle free runaways in SmartStasis?

I think you'd need two new variables:
1) One to let SmartStasis know how many free runaways you want to attempt per day (for the navel ring, GAP or peppermint parasol)
2) One to let SmartStasis know what zones you want to use them in.

It would also be nice to be able to use the runaways if your active familiar is a bandersnatch with ode running or a stomping boots and you have runaways left.
 
Wouldn't it make more sense for BatMan to handle that? Running away ends the fight, and SS is aimed at everything before the fight finishes.
 
True. As Zarqon says in the first post, it ends combat in a few special circumstances. But the real question is which script would such a feature be most appropriate in, and while I don't pretend to know enough about the internal workings of either script to answer that properly, on the face of it I would have thought that BatMan would be the place for it. Either way, it's a good idea, and it'd be a neat feature.
 
BatBrain mostly tries to make killing the monster as cheap as possible. SmartStasis tries to make the fight as profitable as possible. I think SmartStasis should consider running away, after squeezing as much profit as possible from the monster.
 
Conceptually, SS should happen before a "finisher" script, so once SS passes the combat off to whatever's next, it should be assumed that you have done whatever custom actions you want to do and the finisher script will simply kill the monster. For that reason, SS includes plenty of custom actions which will end the current combat. All this to say, yes, taking advantage of free runaways would be quite appropriate in SS.

The thing is, if I do implement runaways, I want it to be an easy-to-use implementation that suits the majority of playstyles. Personally, I'm a casual player who has more fun scripting the game than actually playing it, most of the time. I don't care too much about speedy runs (though it's something I'd like to attempt at some point), so I basically never use free runaways except for Slime Tubing. I'm even perming skills based on concepts and character flavor rather than optimality (clan bots perm skills to help with their various functions, but my main is perming all the passive skills first -- he has no combat skills permed at all!).

All this to say I don't have a solid handle on how people want to use their runaways in-run. I assume their main use is to avoid spending adventures on puny stat gains, like when backfarming or finishing up a quest below your current level, such as going back to unlock the hidden temple after getting Liver. When getting goals near the end of your day, they could also be used to run away from monsters who don't have your goal, to give you more chances at goals.

Are there other uses for runaways? If not, it seems like it could be fairly easily automated: when you have free runaways remaining, fighting a monster which lacks goals, run away if 1) you're fighting a monster well below your level, or 2) you're running out of turns and other monsters in this location drop goals. There would probably need to be some other checks in there, but it's a start. Unless I've misunderstood how people like to use their runaways, which as I've mentioned, is quite possible.

Thoughts? The more feedback on this before implementing the better, I think.
 
The changes to the Hidden City bring this to the forefront. Will SS identify the spheres? If so, is it automatic or based upon the KoLmafia setting? If not, is that a capability that is planned for The Future, or is it something that logically belongs in some other script?

I tend to run macguffin with SS in place and I can't remember the last time I did not have to manually identify the spheres. It could be operator error (or memory loss) but I don't think so.
 
Don't think anything will change here. If you have set mafia's autoSphereID property to true, it will attempt to identify them unless throwing them will get you killed. Bang potions also depend on autoPotionID but with one exception -- it will always attempt to identify potions which you have more than one of.

Your $0.02 on the runaway proposal?
 
If you have set mafia's autoSphereID property to true, it will attempt to identify them unless throwing them will get you killed.

OK. That doesn't sound like what I am actually experiencing. I will pay attention this run and see if I am closer to death than I think or whether there might be something else going on.

Your $0.02 on the runaway proposal?

My opinion is not worth even that. Runaways are not a game mechanic I use manually so if I can and a script supports them, great. Otherwise I don't know wnat I would be missing.
 
...
run away if
1) you're fighting a monster well below your level, or
2) you're running out of turns and other monsters in this location drop goals.
3) you're running out of turns *of expensive +items buffs* and other monsters in this location drop goals.

(like when I want tomb ratchets, olfact rats, then try to freerun from all non-rats ; note that if the freerun is also a banisher, you should *not* repeat that source until the banish runs out, that would probably be a waste)
 
OK. That doesn't sound like what I am actually experiencing. I will pay attention this run and see if I am closer to death than I think or whether there might be something else going on.

I've had some trouble when running BCCs script and having SS first followed by soemthing else as BCC's script often does something and when it turns over power to the CCS Mafia will start at point two in the CCS instead of from the start. I've solved this by importing SS into my WHAM-script so that the CCS is only 1 thing, whcih thus never gets skipped.
 
Your $0.02 on the runaway proposal?

I disagree with runaway logic being in SS at all. Often I automate combat without bothering to set goals. (I just click the script button in the relay browser.) I'd be quite surprised and upset if it ran away from a monster I need to kill, just because of a lack of goals.
 
@Bale: Aside from under-level runaways, all the proposed logic would have no effect when no goals are set. And for under-level runaways, we'd probably want to make sure you were in a run, and we'd probably also want a setting for how far "under your level" you would like to use free runaways. Setting this variable to 0 (or whatever extreme amount, depending on implementation) would disable free runaways for backfarming.

You may also start finding it handy to set your actual goals, since scripts are becoming increasingly goal-aware.

@xKiv: I don't think I would script using runaways which aren't entirely free, and there are presently no free banishing actions which are self-stackable. But it is good to note for later.

Another issue I noticed when verifying the above: is the 80% chance of a free runaway with the GAP/navel ring/parasol good enough to be considered for this feature? I'm thinking no.
 
so.. am i the only one having problems getting Smartstasis to w*rk anymore?

Putting an asterisk in the word "work" does not inform anyone about your problem, other than to make it sound vaguely offensive. More details, less implied cursing.

In other words: Yes, you are the only one.


You may also start finding it handy to set your actual goals, since scripts are becoming increasingly goal-aware.

Why should I have to do that when I'm adventuring manually? It is just an extra step that I might accidentally forget about.
 
Another issue I noticed when verifying the above: is the 80% chance of a free runaway with the GAP/navel ring/parasol good enough to be considered for this feature? I'm thinking no.
I'm no speed ascender but I thought the conventional wisdom was that it was optimal to use up to 5 GAP (et al.) runaways.

EDIT: Well, as optimal as a rule of thumb can ever be. I suppose you could calculate it on a per-instance basis, but that would be horrendously complicated.
 
Last edited:
Back
Top