SmartStasis -- a complex script for a simple CCS

Theraze

Active member
(This is all based on my recollection that this still exists and is waiting for the upcoming BatBrain rewrite or something like that, which may or may not exist.)

Depends... do you ever use both automated and relay combat? If the answer is yes, then... no. There is no fix.

If the answer is no, you only ever use relay (or automatic combat, and always fight manually if it aborts), then you can look at what Winterbay came up with in the BatBrain thread. Basically, the turncount ends up off by one between the automated and relay/manual combat. So it decides that it can't use it even though it's fine. What you need to do is take BatBrain and try to get it to match your reality... which, if memory serves, means breaking it horribly. Something like taking the happened() function and making it check turncount-1 while the set_happened() function is still setting to turncount.

Alternatively, you could just search for "once" and remove the happened check before it. Would completely disable using once-per-combat items. That would be changing this line:
Code:
      if (happened("use "+it) && (contains_text(fields.special,"once") || (!to_item(it).reusable &&
to this:
Code:
      if ((contains_text(fields.special,"once") || (!to_item(it).reusable &&
 

adeyke

Member
I'm running WHAM, which calls SmartStasis. The SmartStasis part is exhibiting some problematic behavior.

I'm in an Avatar of Boris run right now, with most of the Fighting skills unlocked. I just finished doing the arena flyer sidequest. During that time, it would first use broadside to stun the opponent, followed by the rock band flyers. That's good. However, it would then use the spectre scepter until the stun wore off, at which point WHAM would finish the combat. Those wasted rounds translate to a lot of extra damage and thus a lot of meat spent on healing.

It's entirely possible that this due to error on my part, such as my having an old version of something or some incorrect settings. If so, let me know. And maybe this isn't the right thread to post this, in which case I apologize.
 

Theraze

Active member
SS believes that any stasis is good stasis. Easiest fix, if you haven't let mafia loot your closet... is to just closet your spectre scepter. Because it can lightly heal you, SS believes it's always a good thing.

Alternatively, you can raise the meat required to make SS think stasis is a good thing... but that's on you. Decide how expensive you want it, tweak until it works properly. Or just stash the item that's being (ab)used.
 

anholt

New member
I'm doing alley farming for gourdcore, so I absolutely need items, with an NPZR to work towards GMS trophy. I definitely want to stasis, but pickpocket gets me to a better zone sooner. And I started playing in the alley a bit immediately upon ascension.

Here's my CCS:

[ default ]
try to steal an item
consult SmartStasis.ash
attack with weapon

yet I wasn't seeing pickpockets happen. If I drop "consult SmartStasis.ash", then I get pickpockets. this was very surprising to me. I went into smartstasis and ripped out the in_the_clear() test for pickpockets and I got pickpockets again. I don't understand why I would want that test, without at least placing some value on the pickpocketed item and comparing it to how badly I could get hit. And it seems like if my ccs says pickpocket first, instead of just leaving that up to stasis, that should be respected.
 

Theraze

Active member
If you want mafia to always try to pickpocket, put "pickpocket" in quotes instead of try to steal an item. If you want mafia to decide whether or not you really want to pickpocket... leave the fully phrased bit there.
 

zarqon

Well-known member
Optionally, you could set the items as goals. I believe SS will attempt to pickpocket items regardless of danger if they are goals.
 

Theraze

Active member
I'm not sure this will work with a consult script in your CCS, since Mafia skips Macro actions in that case.

The quotes mean to hand it straight over. What consult does is stop the auto-macro-fication of actions... it doesn't stop direct actions.
 

slyz

Developer
Having a consult in your CCS causes any line with KoL Macro commands to be skipped altogether. I just checked that "pickpocket" will be ignored when you have a consult script.
 

anholt

New member
If you want mafia to always try to pickpocket, put "pickpocket" in quotes instead of try to steal an item. If you want mafia to decide whether or not you really want to pickpocket... leave the fully phrased bit there.

Yeah, apparently it's not stasis-related -- having trouble with featherexpress, too, even with "pickpocket", in quotes like that.
 

Winterbay

Active member
Due to a recent change in Mafia articles like "the" needs to be removed in monster names. This is a fixed version of SmartStasis.

Edit: There is no "aughty sorceress"... (new version attached)
 
Last edited:

Xenthes

Member
I am having issues running Smartstasis and batbrain at the same time. I keep on getting

Code:
Bad monster value: "a n-dimensional horror" (BatBrain.ash, line 812)
Consult script 'SmartStasis.ash' not found.
You're on your own, partner.
Click here to continue in the relay browser.

I just downloaded the newest versions of both but still get the same error.

and my CCS is:
[ default ]
consult SmartStasis.ash
attack with weapon
 
Last edited:
I am having issues running Smartstasis and batbrain at the same time. I keep on getting

Code:
Bad monster value: "a n-dimensional horror" (BatBrain.ash, line 812)
Consult script 'SmartStasis.ash' not found.
You're on your own, partner.
Click here to continue in the relay browser.

I just downloaded the newest versions of both but still get the same error.

and my CCS is:
[ default ]
consult SmartStasis.ash
attack with weapon



I don't have problems using the latest hourly build for mafia (where the monster name changed) and Winterbay's modified SmartStassis.ash (from his post right above yours).
 

zarqon

Well-known member
3.16 Update

It seems that for the most part I have been treating all problems reported about my combat scripts as being BatBrain-related, and I neglected updating this script since it almost never needed changing. I figured the only change between now and the last update was the monster names, but when I diffed them just now there were actually several changes -- some from quite a while back.

  • Custom actions have been added for tower monsters, in the event that you wanted to automate/relay play those rather than using mafia's tower helper. I often like to climb the tower in the relay browser, and this makes it much more convenient when using BatMan RE.
  • A few custom actions were also added for the Bugbear Invasion path -- throwing insta-kill items such as quantum nanopolymer spider webs and drone self-destruct chips at the appropriate bugbears.
  • For people using SS directly (as opposed to a script which imports SS), rather than only consider Noodles for a pre-combat stun, consider all stunners.
  • Aaaaand fix the monster names.

Nothing huge, but will be nice to have this script caught up with mine now. Enjoy!
 

Winterbay

Active member
Since you can encounter Bugbear Scientist outside of the lab and it's only in the lab that you want to silence them I think it may be a good idea to check for the correct location as well. Very minor thing though I guess since the amount of backfarming at that point should be negligible.
 

Rinn

Developer
Could you make SS attempt to steal (and use rave steal) before releasing the boots even if there's 100% chance of getting all the monsters drops?
 

fronobulax

Developer
Staff member
Edge case, but...

SS keeps allowing me to get beat up. Level 94, never ascended Pastamaster in Hobopolis. Hovering Sombrero. I had switched to using WHAM (which includes SS) in Crimbo because of unknown and scaling monsters. SS decides I need HP. It casts Lasagna Bandages. Hobo hits me. Repeat until Hobo beats me up or SS gives up and I one shot the hobo. Problem is that bandages restore double digit amounts of HP but getting hit inflicts triple digit amounts of damage. So I am losing more than I gain. The irony of this is that I can pretty much one shot anything and can cast Cocoon outside of combat and so in a global sense there is almost no reason to stasis at all.

I can almost certainly run at a requested verbosity if this is worthy of investigation.
 
Top