SmartStasis -- a complex script for a simple CCS

coderanger

Member
Is there a way to make SS use EXTRACT if it is available? I could just put it in my CCS before WHAM but it seems worth having as a global thingy.
 

zarqon

Well-known member
And r30 brings you the features you want!

First of all, coderanger's post reminded me that I hadn't pushed the support for Extract into the world yet. I had added support for it a while back. Anyway, SS will now extract the heck out of all the Source essence. Unconditionally in aftercore, or if you're not then if you have less than 100 essence or it costs less than a third of your max MP. That ought to handle most situations in a manner most players would consider desirable.

Also, I added a few lines for SS to always upgrade abstractions if you have the Machine Elf. If there are any complaints we can be a little less aggressive about it, but the general sense I was getting so far is that there won't be any. :)

Enjoy!
 

Magus_Prime

Well-known member
In Nuclear Autumn, especially in HC, the only viable stasis item for Gremlins during the war is, probably, the dictionary but SmartStasis isn't using it. Against Gremlins that might hold the goal item SmartStasis is killing the monster in a handful of rounds.

Here's a sample combat:

Code:
Encounter: erudite gremlin
Strategy: F:\software\Kol\ccs\NuclearAutumn.ccs [gremlin]
Round 0: Arbos wins initiative!
WHAM: Running SmartStasis
2/4 monsters drop goals here.
This monster is the best source of goals (0)!
Round 1: Arbos executes a macro!
Round 1: Arbos casts EXTRACT!
You acquire an item: Source essence (3)
Round 2: You lose 6 hit points
Round 2: Arbos uses the Time-Spinner!
Round 3: erudite gremlin drops 9 attack power.
Round 3: erudite gremlin drops 8 defense.
Round 3: Arbos executes a macro!
Round 3: Arbos casts SUMMON LOVE STINKBUG!
Round 4: erudite gremlin takes 10 damage.
Round 4: You lose 6 hit points
Round 4: Arbos executes a macro!
Round 4: Arbos casts SUMMON LOVE MOSQUITO!
Round 5: erudite gremlin takes 17 damage.
Round 5: You gain 17 hit points
Round 5: erudite gremlin takes 10 damage.
Round 5: Arbos executes a macro!
Round 5: Arbos casts COWBOY KICK!
Round 6: erudite gremlin takes 62 damage.
Round 6: erudite gremlin takes 11 damage.
Round 6: Arbos executes a macro!
Round 6: Arbos attacks!
Round 7: erudite gremlin takes 275 damage.
Round 7: erudite gremlin takes 10 damage.
Round 7: Arbos wins the fight!
After Battle: Looking at the snowglobe reminds you of that time at KoL Con VIII, when both Fluffy Emma and PandaCougar complimented you on your dancing.
After Battle: You gain 7 Sarcasm
After Battle: The little orphan girl frisks your fallen opponent for candy, and weirdly enough she finds some. Her dance of joy brings a smile to your face.
After Battle: You gain 18 hit points
After Battle: You gain 18 Muscularity Points
You gain 213 Meat
You acquire an item: rad (10)
After Battle: You gain 28 Strongness
You gain a Muscle point!
After Battle: You gain 13 Magicalness
After Battle: You gain 14 Smarm
You can now equip a Dinsey's brain (and possibly other things).
You gain a Moxie point!
WHAM: SS has finished the fight. Aborting script execution.

Any ideas on how to tweak the stasis logic?
 

Magus_Prime

Well-known member
I don't expect WHAM, and by extension, BatBrain and SmartStasis, to handle the NA skills well yet but the character in question has over 1,000 HP and it's the SmartStasis logic that's killing the monster in a few rounds when the whole goal of the combat is to stasis.

I haven't looked at the logic yet but it "feels" like the use of a dictionary for stasis isn't even considered.
 
Last edited:

zarqon

Well-known member
@Magus: The dictionary uses the "monster" keyword to specify the monsters against which it does 45 damage. However, that means that as you say it isn't even considered against other monsters. I guess this hasn't been an issue so far because people usually have access to seal teeth. I'll have a go at making it work as a stasis item again, but in the meantime, you could change your local batfactors entry to 0 damage and nothing in the special field -- which means it wouldn't work anymore as a damage dealer vs. Chasm monsters, but it would work as a stasis item.
 

Magus_Prime

Well-known member
Zarqon: I fought the gremlins today and I don't think the batfactors change made any difference. SmartStasis fired and, while the combat followed the same sequence of actions as the fight I posted earlier, the tool dropped in the first three rounds of combat in every single case.

I tried two variants in batfactors and neither one changed the sequence of the combat:

Code:
item	536	dictionary	1 0

and

Code:
item	536	dictionary	0 0

If I were fighting a potentially tool carrying gremlin manually I would have used the dictionary repeatedly until either:

1. It was known that the monster didn't have a tool
2. The character was too low on HP to continue with Stasis
3. The tool appeared

Thanks for the idea.
 
Last edited:

Bale

Minion
static is used to read batfactors so it loads only once per session. It won't check the file again until you logout and in again. If you made the change after logging in SmartStasis might not have been aware.

zarqon was there an easier way to get mafia to reload batfactors?
 

Magus_Prime

Well-known member
Bale: that might explain it. I ran SmartStasis once before making the change as I didn't want to take the chance that Batbrain/SmartStasis would check for and, perhaps, download a newer version of batfactors after I made the edit. :eek:
 

zarqon

Well-known member
Yes, if you don't see the message saying "Loading batfactors..." then it's using its previously loaded version of batfactors. Probably the easiest way to force it to reload batfactors from file is by editing BatBrain; for example typing a random letter somewhere, then deleting the letter, then saving the "edited" file. It's the easiest method for me anyway, as I usually have BatBrain already open in a tab in Notepad++. Regardless, it's definitely easier than re-logging.
 

heeheehee

Developer
Staff member
Editing a script just forces Mafia to invalidate its cached version, which also matters because load_factors() is invoked statically. In this case, you could bypass that part by executing in the CLI something like "ashq import <BatBrain.ash>; load_factors();". Also, "Loading batfactors..." only displays if your verbosity is at least 7.
 

fronobulax

Developer
Staff member
I'm using BCCA to for Boris runs. I get a lot of aborts when WHAM stops and makes me finish the fight. I started paying attention to them and they all have WHAM reporting that SmartStasis finished the fight, when it clearly didn't. Because people always report problems like this in the WHAM thread, even when it is not Wham that needs to be looked at, I am reporting here just to be different. I can run tomorrow with a recommended verbosity and answer questions sooner.
[1482] The Themthar Hills
Encounter: dirty thieving brigand
Strategy: D:\Dropbox\dist\ccs\CafeBoob.ccs [default]
Round 0: cafeboob loses initiative!
Round 1: You lose 42 hit points
WHAM: Running SmartStasis
WHAM: SS has finished the fight. Aborting script execution.
WHAM: Running SmartStasis
WHAM: SS has finished the fight. Aborting script execution.
You're on your own, partner.
Click here to continue in the relay browser.

There referenced css is just consult wham.ash, to anticipate the obvious question :)
 

Theraze

Active member
To throw out an expected question which you probably didn't expect, have you tried it with SimpleSmack instead of WHAM, to verify that it's really SmartStasis that's at fault rather than WHAM's implementation of it?
 

fronobulax

Developer
Staff member
To throw out an expected question which you probably didn't expect, have you tried it with SimpleSmack instead of WHAM, to verify that it's really SmartStasis that's at fault rather than WHAM's implementation of it?

Help me out here. Search is not actually taking me to a copy of Simple Smack..

I figure since the gCLI said SS finished the fight it was more likely to be the component at fault.
 
Top