SmartStasis -- a complex script for a simple CCS

Galanodel

Member
Code:
[26310] Spooky Forest
Encounter: triffid
Strategy: C:\Users\Galanodel\Documents\KOL Mafia\ccs\SmartStasis.ccs [default]
Round 0: Lilinmall wins initiative!
Round 1: Lilinmall tries to steal an item!
You gain 10 Mojo Points
1/7 monsters drop goals here.
This monster is the best source of goals (1)!
HP: 629, Damage from Triffid: 0.16
This monster has 1 goals.
should_putty: false
You have 1 spooky putty sheets.
Copies made today: 0
currentBountyItem: 2413
bountysize: 0, puttying bounties up to 19
Round 2: Lilinmall executes a macro!
Round 2: Lilinmall uses the facsimile dictionary!
You gain 11 Mojo Points
You gain 92 Meat.
Round 3: Lilinmall attacks!
You gain 14 Mojo Points
Round 4: Lilinmall wins the fight!
You acquire an item: moxie weed
You acquire an item: spooky stick
You acquire an item: triffid bark
You gain 2 Strengthliness
You gain 4 Cheek

There you go :)
 

zarqon

Well-known member
Hmmm, looks like a problem loading bounty.txt, since bountysize should never be 0 if you're on a hunt. That might be my fault, since I've stripped down my local bounty hunting script a good deal. Does the problem resolve if you delete (all instances of) bounty.txt?

Hopefully, bounty info will become part of location/item proxy records and then all this business of parsing an external data file can be removed. But in the meantime I guess we ought to figure this out.
 

fronobulax

Developer
Staff member
Not sure this is a SmartStasis issue but it was interesting nevertheless. My ccs consults startstasis and then casts saucestorm. I had unidentified bang potions in my inventory and mafia was set to identify them. I was automating with Ascend but actually think macguffin was "in charge" at the moment. r9229 and latest versions of everything that does script checking.

From the session log...
[1376] Black Forest
Encounter: The Black Knight
Round 0: cafeboob wins initiative!
> Checking for updates (running BatBrain ver. 0.8.1)...
> You have a current version of BatBrain.
> You have the latest pluralMonsters.txt. Will not check again today.
> You have the latest batfactors.txt. Will not check again today.
> Checking for updates (running SmartStasis ver. 3.0)...
> You have a current version of SmartStasis.
> You have the latest use_for_items.txt. Will not check again today.
Round 1: cafeboob executes a macro!
Round 1: cafeboob uses the paperclip sproinger!
Round 2: the black knight takes 13 damage.
Round 2: cafeboob uses the milky potion!

immediately after that I noticed that my mafia windows had closed and that mafia had logged out and was counting down the 90 second timer in order to log back in. It logged in and was immediately logged out. I shut down mafia, restarted and tried to log in. I seem to have done so and then been logged out. Since I knew I was stuck on a fight page I logged in without mafia, resolved the fight, got back to mafia and things have been fine.

If I were going to investigate or try and reproduce, I would concentrate on what happens with mafia allowed to ID bang potions when there are unidentified potions in inventory. I know I used several boxes and added some to inventory recently enough that the adventures above may have been the first adventures since they were present.

Possibly related. I have mafia set to ID the stone spheres as well. The last several executions of macguffin have all aborted before the final temple because it had been unable to ID the spheres. Is this another case like remove malignant status effects where the script is much happier with a particular value of a mafia setting?

Thanks.
 

Galanodel

Member
I deleted bounty.txt, and it was re-created once, but the only line in it was a ravioli hat. I deleted it again, and now it hasn't re-appeared. I think I agree, it appears to be bounty.txt

Edit: I checked the original bounty.txt, it appears that everything in the file was okay. I restored it back to it's original location, but of course the same problem is occurring.
 
Last edited:

Theraze

Active member
There are different editions of bounty.txt that aren't compatible with each other, but work fine with the bounty script they're originally included with... my guess is that you're using a different bounty script than SS needs. If you want to use SS with bounties, check if it works without your bounty.txt file and use it as such, despite the fact that yours looks 'okay' otherwise...?
 

Galanodel

Member
There are different editions of bounty.txt that aren't compatible with each other, but work fine with the bounty script they're originally included with... my guess is that you're using a different bounty script than SS needs. If you want to use SS with bounties, check if it works without your bounty.txt file and use it as such, despite the fact that yours looks 'okay' otherwise...?

I actually don't have a bounty script of any kind. I believe this one was created by SS.
 

Theraze

Active member
Any chance SS could identify unknown spheres? At least if you have the auto-identification enabled... but regardless, a turn or two of spheres should work well for stasis, and while you have them, the spheres present an excellent completely safe reusable stasis option...
 

Bale

Minion
I just want to say that I think SS 3.0 is absolutely amazing. It is doing everything I've ever wanted from the old SS, but better. My CCS has become a very happy and simple place.
 

zarqon

Well-known member
@Galanodel: I remember now -- FTF originally did not autoupdate bounty.txt. It did puttying optionally, if you had the bounty data file. Grab it from the Map Manager (should be able to save link target as), and I'll put a load_current_map() into the next update.

@Theraze: Have you verified that it doesn't already do this?

@Bale: Thanks! I've put untold hours into making it as awesome as I can so it's good to hear some positive feedback.
 

Theraze

Active member
Possibly related. I have mafia set to ID the stone spheres as well. The last several executions of macguffin have all aborted before the final temple because it had been unable to ID the spheres. Is this another case like remove malignant status effects where the script is much happier with a particular value of a mafia setting?

Thanks.

From my session logs:
[1448] Hidden City (Square 16)
Encounter: ancient protector spirit
Round 0: Theraze wins initiative!
> Monster value: 572.5
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: ancient protector spirit takes 13 damage.
Round 2: Theraze attacks!
Round 3: ancient protector spirit takes 13 damage.
Round 3: Grofflesby shoots a beam of ice-cold water at your opponent, hitting it for 23 damage.
Round 3: ancient protector spirit takes 23 damage.
You lose 20 hit points
Round 3: Theraze attacks!
Round 4: ancient protector spirit takes 13 damage.
Round 4: Grofflesby shoots a beam of ice-cold water at your opponent, hitting it for 27 damage.
Round 4: ancient protector spirit takes 27 damage.
Round 4: Theraze attacks!
Round 5: ancient protector spirit takes 13 damage.
Round 5: Theraze wins the fight!
After Battle: Grofflesby does a little fairy dance.
You acquire an item: cracked stone sphere
You gain 12 Beefiness
You gain 11 Wizardliness
You gain 19 Chutzpah
You gain a Moxie point!
> 29 turns left to keep searching...
[1449] Hidden City (Square 17)
Encounter: Altared Perceptions
> 28 turns left to keep searching...
[1449] Hidden City (Square 18)
Encounter: pygmy assault squad
Round 0: Theraze wins initiative!
> Monster value: 1121.14
Round 1: Theraze tries to steal an item!
You lose 23 hit points
Round 2: Theraze executes a macro!
Round 2: Theraze attacks!
Round 3: pygmy assault squad takes 39 damage.
Round 3: Theraze attacks!
Round 4: pygmy assault squad takes 39 damage.
Round 4: Theraze attacks!
Round 5: pygmy assault squad takes 42 damage.
Round 5: Theraze attacks!
Round 6: pygmy assault squad takes 76 damage.
Round 6: Theraze wins the fight!
Spade Alert - possible unknown meat bonus: -6 +7 -7 +8 -8 +9 -9 +10 -10 +11 -12 -13 +14 -14
You gain 169 Meat
After Battle: Grofflesby does a little fairy dance.
You acquire an item: pygmy pygment
You acquire an item: bottle of alcohol
You gain 12 Beefiness
You gain 8 Enchantedness
You gain 20 Sarcasm

You can see that it gained the stone sphere in adventure 1448 and failed to identify it in adventure 1449.
 

zarqon

Well-known member
A version of BatBrain that didn't use "item" for spheres has only existed for 4 days. However, this is probably explained by the fact that there's still an intheclear() check for using spheres. Players playing even semi-optimally will probably not be in the clear when they need to detect spheres in the Hidden City, so I should probably remove that.

Also, I'm probably going to rework the way potions and spheres are handled, datawise -- I think I'll move the information to the data file, with the keyword (i.e. "detection" or "fire") as the ufname. That way they don't need to be hardcoded in the script, and they'll be easier to average for unknowns. The current method makes me puke a little in my mouth when I see it.

BatBrain 0.8.2 Update! just now, by the way.

Went to add the double-ice box's spell damage tuning and found there were other tuning items missing. Added all of them. Added the the double-ice box's passive damage and then noticed several other passive damage items missing from the data file. Added them. Realized that with the all-in-one data file format chefstaves can be part of the data file, rather than hardcoded. Converted that. Allow a "custom" flag in the data file, so that my "what's missing?" utility can consider an action added, even though BatBrain ignores the entry. While I was at it, removed the intheclear() check for auto-detecting spheres. SS won't perform Category II actions if they will cause you to die, anyway.

Beware! Caution Warning: unless you download this update, you may start stasising with custom actions (flyers, creepy grin) due to the data file including them as empty (0-damage) records.

Mayflies

What in blue blazes am I going to do about mayflies? With only 30 casts a day I shouldn't just always-cast, but since the swarm gets stronger the more you use it, casting sometimes would probably be desirable. How do people generally use mayflies? I have the item but basically never use it because I'm usually not spending a lot of time fiddling in aftercore. I know there are plenty of fiddlers who play this game, however. How would you like SS to use your mayfly summons (if at all)?

Aside: I've always thought there should be some mayfly/rogue swarmers synergy, somehow.
 

xKiv

Active member
Wow.
Unfortunately, my box/internet is so slow that playing my daily turns with SS on would take almost the entire day (as opposed to ~2 hours with completely macrofied combats).


Mayflies: I just randomly cast them at "profitable" monsters (where "profitable" is defined by me thinking "hey, this is one of the better meat/item dropping monsters in this zone").
Sometimes I only do this until 20 and reserve the stronges casts, if I think I will be facing hobosses oslt.
 

zarqon

Well-known member
I guess mayflies are basically equivalent to a pasta guardian -- I'll add a should_mayfly() function. At the very least, it could summon them if you're running out of turns to use all of your daily summonses.

@Galanodel: I've attached the file; save it to your data directory.

EDIT: now irrelevant file removed
 
Last edited:

MHoP

New member
Awesome script Zarqon, I haven't had any problems with it at all. I mostly use it in aftercore because I prefer to play most the the actual run by had (except for when I am doing a long war). But I may do a bit more automation in my runs. After 50 + runs on 2 different characters it gets kinda old doing the same ol stuff all the time.
 

fronobulax

Developer
Staff member
BatBrain 0.8.2
SmartStasis 3.0
r9234
My ccs is
[ default ]
consult SmartStasis.ash
skill entangling noodles
skill saucegeyser

All my automation has been aborting with the following message in the relay browser.
Too many, or zero, matches for skill, "Entangling Noodles", macro aborted.

I take the Entangling Noodles out of my CCS and things are running fine. Either all the bang potions are now identified (since an error message about one was in a previous abort that I did not capture) or folks like me need to be trained how to write a CCS that plays nicely with SmartStasis. I'm guessing the latter ;-)
 

Winterbay

Active member
I think the problem is that SmartStasis casts entangling noodles if it thinks it needed and as such when you ask Mafia to cast it afterwards it fails because you no longer have that skill available.
 

fronobulax

Developer
Staff member
I think the problem is that SmartStasis casts entangling noodles if it thinks it needed and as such when you ask Mafia to cast it afterwards it fails because you no longer have that skill available.

Agreed, for the message quoted. Not sure the interaction with identifying spheres and potions is 100% yet. In a perfect world I would have been smart enough to see documentation or an error message that I understood or something else that basically said trying to do something in a CCS that can only be done once and that might have been done by SmartStasis is Not A Good Thing.
 
Top