SmartStasis -- a complex script for a simple CCS

zarqon

Well-known member
The insult book is a custom action and would not be selected by stasis_action(). The book is flagged in your batfactors.txt as "custom", right?

Your low-verbosity output gives basically no helpful information, so I am unable to know much more than you do.

It's becoming more clear that I actually need to examine WHAM so I can determine how many of BB/SS's functions it uses and how many it replaces with its own. Whenever I see reports about my scripts from people using WHAM my eyes cloud over in confusion since there are suddenly many unknowns in the mix.

EDIT: Can you duplicate this problem? If so, can you duplicate this problem using only SS (i.e. not WHAM)?
 

Winterbay

Active member
WHAM should not use the book automatically since it is marked as a custom action. It is never mentioned in the script and so should only be used when WHAM calls build_custom (WHAM starts by calling build_custom_WHAM, to add some things that SS doesn't, ending by calling build_custom).

That said: I notice that you use a sea lasso in the sea if we have it and are not experts while WHAM does the same thing, but also lets users decide if they want to via the zlib-variable WHAM_UseSeaLasso. Now, I'm not sure if there ever is a situation when you would not want to train your lasso skill if you have a lasso but there may be so would it be possible to make it toggleable in SS as well?
I will remove my seahorse handling code though because SS will do it just as well :)
 

lostcalpolydude

Developer
Staff member
Now, I'm not sure if there ever is a situation when you would not want to train your lasso skill if you have a lasso but there may be so would it be possible to make it toggleable in SS as well?

If you don't have the hat and pants on, it will cost you more lassos to train lassoing. Someone might be waiting until they get past the places where -combat helps (where you would want to have a mer-kin sneakmask on), especially if they are saving Mom. That's about all I can come up with.
 

zarqon

Well-known member
It is toggleable by adding closet put * lasso to your mood. No ZLib var needed.

I'm thinking perhaps SS should be slightly revamped to respect the blacklist, even for custom actions. Presently the blacklist is only for normal combat, not for "pre-combat" custom actions; however, completely skipping blacklisted actions would probably be more in line with user expectations. Plus, every single custom action would be easily toggleable.
 

Bale

Minion
Agreed. Custom actions should be blacklistable. It never crossed my mind that I might not be able to do that. Nor can I foresee a case where you would want to assume the player meant to black list an item, unless SS disagrees.
 

Crowther

Active member
Agreed. Custom actions should be blacklistable. It never crossed my mind that I might not be able to do that. Nor can I foresee a case where you would want to assume the player meant to black list an item, unless SS disagrees.
Well, I started to post just such a case, but gave up because it was hard to explain. WHAM hates wasting the empty slot next to my blue balls and often adds another item which is of no use in that combat and a total waste. I blacklisted just about everything to stop this. For example, I would prefer if my cocktail napkins were saved for clingy pirates.
 

Bale

Minion
Latest version of SS is not lassoing underwater. It's also not using tangled rat tails on tomb rats. Am I doing something wrong or are custom actions failing? I did ensure I was using the latest batfactors by deleting the entry in zversions. Here's something potentially useful:

Code:
> zlib verbosity = 9

Previous value of verbosity: 3
Changed to 9.
Validating adventure sequence...

Visit to The Sea: An Octopus's Garden in progress...

[533] An Octopus's Garden
Encounter: octopus gardener
Strategy: C:\Documents and Settings\David\My Documents\Dropbox\KolMafia\ccs\default.ccs [default]
Round 0: bale loses initiative!
You lose 18 hit points
1 HP costs 0.034μ. ( 1,394 / 1412 )
1 MP costs 2.182μ. ( 282 / 441 )
WHAM: We currently think that the round number is: 0 and that the turn number is 532.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for Octopus Gardener.
WHAM: No need to do anything with Octopus Gardener.
WHAM: Setting up variables via BatBrain
You have moveable feast equipped: (5.77) damage,
octopus's spade (2.0 @ +43.79): 585μ * 2.88% = 16.82
sea radish (3.0 @ +43.79): 4,935μ * 4.31% = 212.87
soggy seed packet (30.0 @ +43.79): 1,049μ * 43.14% = 452.49
straw hat (2.0 @ +43.79): 599μ * 2.88% = 17.23
Value of stat gain: 1,509.06μ
octopus's spade (2.0 @ +43.79): 585μ * 2.88% = 16.82
sea radish (3.0 @ +43.79): 4,935μ * 4.31% = 212.87
soggy seed packet (30.0 @ +43.79): 1,049μ * 43.14% = 452.49
straw hat (2.0 @ +43.79): 599μ * 2.88% = 17.23
Value of stat gain: 1,509.06μ
ATT: 441 (94% × 6.62, death in 224)
DEF: 369 (97.73% × 478.88, win in 2)
HP: 616, Value: 2,263.48 μ, RES: 0
Parsed round number: 1
Building options...
Options built! (57 actions)
WHAM: We currently think that the round number is: 1 and that the turn number is 532.
WHAM: Current MP = 282 out of 441.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 1394 out of 1412.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a Octopus Gardener. Mafia considers that this monster has an attack of 441 or 439 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 369 or 374 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 616 or 614 when given a monster name.
WHAM: Your current ML-adjustment is: 14.
WHAM: You have muscle = 682, mysticality = 255, and moxie = 301
WHAM: Monster HP is 616.0.
WHAM: WHAM added the following to BatRound: if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; 
skill 7095 is not OK since it is marked as a custom action.
skill 15 is not OK since it is marked as a custom action.
skill 19 is not OK since it is marked as a custom action.
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; moveable feast (0μ)0μ(5.77) Actual: 5.77 (0 μ/dmg)
Building custom WHAM actions...
Custom WHAM actions built! (0 actions)
Building custom actions...
Custom actions built! (0 actions)
skill 7095 is not OK since it is marked as a custom action.
WHAM: Stasis option chosen: skill 5021 (round 1, profit: -2.39)
This monster is not your huckleberry.
Stasis loop complete.
WHAM: SmartStasis complete.
WHAM: Running SmartStasis took 0.33 seconds.
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: We currently think that the round number is: 1 and that the turn number is 532.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 1 and that the turn number is 532.
WHAM: No need to stun this monster
Monster HP is 616 according to Mafia and 616.0 according to BatBrain.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: We estimate the round number to currently be 1 (loop variable 0)
Monster HP is 616 according to Mafia and 616.0 according to BatBrain (loop variable i = 0).
Queued: skill 1005
Building options...
Options built! (57 actions)
Parsed round number: 1
Building options...
Options built! (57 actions)
WHAM: Evaluating the attack but not performing it took 0.22 seconds.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Lunging Thrust-Smack (macroid skill 1005). Estimated damage: 616.0.
Queued: skill 1005
Building options...
Options built! (57 actions)
WHAM: Successfully enqueued Lunging Thrust-Smack.
WHAM: We are going to 1-shot with Lunging Thrust-Smack.
Constructed macro: scrollwhendone; sub batround; if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; endsub; skill 1005; call batround; 
Round 1: bale executes a macro!
Round 1: bale casts LUNGING THRUST-SMACK!
Round 2: octopus gardener takes 786 damage.
Round 2: bale wins the fight!
You gain 4 hit points
You gain 3 Muscularity Points
You gain 53 Meat, but the rest sinks into the murky depths.
After Battle: Coco shakes her dorsal fin, and her pectoral fins, to music only she can hear. If you were a fish, it'd probably be a little titillating, so thank goodness you're not a fish.
A dolphin stole: soggy seed packet
You gain 56 Strongness
You gain 33 Mysteriousness
You gain 27 Sarcasm
Happened: skill 1005
Parsed round number: 0
WHAM: Evaluating the attack and performing it took 1.53 seconds.
WHAM: We currently think that the round number is: 31 and that the turn number is 534.
WHAM: We currently think that the round number is: 31 and that the turn number is 534.
 

Winterbay

Active member
It's inteesting that neither wham nor ss wanted to use it (that code is in both atm). Are you sure you're not an expert already?

Edit: alsomake sure the sea lasso hasn't disappeared from batfactors again...
 
Last edited:

Bale

Minion
It's inteesting that neither wham nor ss wanted to use it (that code is in both atm). Are you sure you're not an expert already?

I'm sure. I checked my lassoTraining preference just to make sure that nothing had gone wrong with it.

This did work for me last week.
 

zarqon

Well-known member
It also worked for me yesterday. This is another WHAM-inclusive report so my eyes are clouding over.

Your batfactors ought to contain:

Code:
item	4198	sea lasso	0	0	custom, once

Does it? This is in the version I uploaded yesterday (wherein I also added sea cowbells, and some more info about certain Mer-kin).
 

Bale

Minion
yup. That's in my batfactors!

What other information could help troubleshoot this? I can always set lassoTraining back to "" so that SS thinks I need to train it. It will stay that way until I actually lasso something which will allow mafia to recognize the error. As long as it doesn't work, I can keep trying until it does.

Should I try running SS without WHAM? Could this be effected by BatMan_profitforstasis? Is the chance of getting hit a deterrent to lassoing?
 
Last edited:

zarqon

Well-known member
Imminent death is a deterrent -- SS won't perform most custom actions that are likely to get you killed. But that wasn't what happened here, because of this:

Custom actions built! (0 actions)

Lasso-ing should have been added to your custom actions regardless of your imminent death -- that check happens later.

Trying it with just SS would help narrow down where the problem lies.

EDIT: You haven't blacklisted the lasso, by any chance?
 

Bale

Minion
I am declaring my lack of lassoing to be a WHAM bug. I tried it by running SmartStasis and it lassos perfectly. Then I switched back to WHAM which runs its variant of SmartStasis and it did not lasso. Sorry for placing the blame on the wrong script.

WHAM_UseSeaLasso is true.

I'm suspecting that build_custom_WHAM() is somehow failing since WHAM also failed to use tangled rat tails for me. Winterbay do you still have a reason not to just call main@SmartStasis() so it can do its thing?

Continuing this discussion in the WHAM thread here: http://kolmafia.us/showthread.php?8...terbasher-(WHAM)&p=95397&viewfull=1#post95397
 
Last edited:

Magus_Prime

Well-known member
A fuzzy matching warning from SmartStasis:

Code:
Changing "poop deck" to "The Poop Deck" would get rid of this message (SmartStasis.ash, line 77)
 

zarqon

Well-known member
r7 Update!

As discussed above, SmartStasis now respects the blacklist for all custom actions. If you don't want SS to summon your pasta ghost, blacklist "summonspirit". If you don't want it to steal ever, blacklist "pickpocket". If you don't want it to train your lasso skill, blacklist "use 4198".

There are two exceptions:

  1. Disco combos do not check to see if they are blacklisted. However -- they are built by merging actions from opts[] so if you blacklist one of the component skills, the combo can no longer be built.
  2. For items, custom actions only respect total blacklisting, not partial blacklisting. This is featurenotbug, since chances are you'd want to save several of a certain item specifically so that you could perform a custom action with them (such as cocktail napkins being reserved for chatty pirates). If you want SS to skip a custom item action, you need to do a total blacklist of that item.

A few other changes:

  • New custom actions: If you have a Mer-kin dreadscroll and have not learned the clues from the Mer-kin killscroll or Mer-kin healscroll, it will use those items so that you can learn your clues.
  • Definitely The Poop Deck. Definitely.

Enjoy!
 

Crowther

Active member
For items, custom actions only respect total blacklisting, not partial blacklisting. This is featurenotbug, since chances are you'd want to save several of a certain item specifically so that you could perform a custom action with them (such as cocktail napkins being reserved for chatty pirates). If you want SS to skip a custom item action, you need to do a total blacklist of that item.
An interesting compromise. Thanks for the flurry of useful updates!
 

Bale

Minion
I express agreement with Crowther. That is a brilliant compromise which likely will match a user's intent.

So, blacklisting cocktail napkins 999 items worth is basically a total blacklist with the option left open to use them on clingy pirates.


such as cocktail napkins being reserved for chatty pirates

You should mean clingy pirates!


[*]New custom actions: If you have a Mer-kin dreadscroll and have not learned the clues from the Mer-kin killscroll or Mer-kin healscroll, it will use those items so that you can learn your clues.

Bug Alert!!! You do not check preference merkinVocabularyMastery. You can only learn clues from Mer-kin scrolls if get_property("merkinVocabularyMastery") == "100". As your code exists, you will waste scrolls without learning any clues if you haven't studied.
 
Last edited:

Bale

Minion
Trust me. I actually made that mistake and failed to get the clues, wasting a few scrolls in my confusion. I had to use the wordquizzes before I got them. With 100% vocabulary I get the special word 100% of the time.

I currently have the entire Cloathing of Loathing and the Habilments of Hatred, so when I say that 100% vocabulary gives 100% chance to learn the word, I mean that it has worked 12 times out of 12 attempts. The one time that I did not remember to take a vocabulary lesson I failed twice with each scroll.

12 of 12 vs 0 of 4 is reasonably convincing statistics.
 
Last edited:
Top