SmartStasis -- a complex script for a simple CCS

Both are probably valid, depending on the enemy. While the putty is a better option for skipping Sonofa, the sniff might help for grabbing star charts or other specific-monster goals to reduce total turncount.
 
I'm pretty sure Crowther meant putty instead of fax. There might be people that fight puttied copies to olfact them. A check for $location[none] could handle that case.
 
Yeah, turns out my fix doesn't work. I'll come back to it some other time, and just make sure I'm paying attention when I get my wandering Hellions.
 
r17 Update (it was r16 but that had a dumb error which I corrected, hence 17)

First off we have a new boolean script setting called BatMan_onlycustomitems. Rather than being a hard "no items allowed", setting this to true will cause BatBrain to remove all combat items not flagged as "custom" from your options, after it builds its list of custom actions. That means that non-custom items which are necessary for quests or what have you (such as the sea lasso) will still be performed as usual, but after that it won't consider combat items.

I've seen a request for this kind of thing enough times that I finally implemented it. People understandably want to hoard their stuff, so this setting is for them. Never mind that it's cheaper to use those love songs than it would be to heal or recover MP after the fight.

SS will now Smash and Graagh for goals in Zombiecore.

@digitrev: I implemented your solution, but also added a location[none] check as suggested by lost. So monsters that wander in from another zone will not be Olfacted, but puttied monsters still will be. Monsters that wander into their own zone will still be Olfacted because that makes sense.

Enjoy!
 
Last edited:
Never mind that it's cheaper to use those love songs than it would be to heal or recover MP after the fight.

With things like nuns MP, and MP regen that doesn't fill your MP pool being ignored, I can understand why people disagree with the script's calculation of MP cost. When I do the sea quest manually, I put on MP regen gear, never fill my MP pool, and spend 0 meat on MP even though it's the only resource I use for killing stuff.
 
I also understand that despite BatBrain's rather extensive amount of information known, script users are often smarter still. Some possibilities I'm entertaining to allow users to 'fix' BatBrain's seeming penchant for item use:

1) Factor settings/variables for MP and combat items. BatBrain would multiply its estimated value for each by the specified factor setting, allowing users to tweak the script's own estimates of MP and combat item values. Default values could be MP at 0.9 and items at 1.1 or somesuch. People who want to disallow items entirely could set the value prohibitively high.

II) When you can't immediately buy a replacement item (i.e. it's untradeable or you don't have mall access), using an item has an opportunity cost beyond the actual price of the item. For items which drop from monsters, the opportunity cost (in adventures) can be programatically calculated. If (turns required for farming replacement)*valueOfAdventure were added to the cost of irreplaceable items, I strongly suspect BatBrain would often forgo their use. This option would almost certainly slow the script down, though, which is something I'd very much like to avoid where possible.

c) Some kind of weighted factoring of the value of MP, perhaps based on the percentage of your total MP that an action would cost. This seems to be the best option in terms of not slowing the script down, but also the most difficult to calculate. Formula suggestions?
 
People understandably want to hoard their stuff, so this setting is for them. Never mind that it's cheaper to use those love songs than it would be to heal or recover MP after the fight.!
Yeah, it's sad people don't understand basic economics, but I block all items in aftercore, because I already lost my frostball twice and all my hobo market items. WHAM always puts another item in with funksling, even if it is useless. And well, bugs. So, I don't think it's fair to characterize people who wanted this option was uninformed hoarders. I'm fine with paranoid jerk, though.
 
Yeah, I got bitten by that as well, so WHAM actively disallows frosty's iceball. Or at least it should, I no longer have one to test with so...
 
II) When you can't immediately buy a replacement item (i.e. it's untradeable or you don't have mall access), using an item has an opportunity cost beyond the actual price of the item. For items which drop from monsters, the opportunity cost (in adventures) can be programatically calculated. If (turns required for farming replacement)*valueOfAdventure were added to the cost of irreplaceable items, I strongly suspect BatBrain would often forgo their use. This option would almost certainly slow the script down, though, which is something I'd very much like to avoid where possible.

I think that this would be one of:
- infinite adventures (and opp. cost) for items that can't be reliably replaced (boss drops, limited time events) = don't use those
- adventures calculated as finite, but effectively infinite (because I will never return to where they drop, until next ascension)
- adventures calculated as more than zero, but effectively zero (because I will return to where they drop, for unrelated reasons)
- adventures calculated as 1 or more = probably don't use

so I suspect the effect of this would be "don't use items"

c) Some kind of weighted factoring of the value of MP, perhaps based on the percentage of your total MP that an action would cost. This seems to be the best option in terms of not slowing the script down, but also the most difficult to calculate. Formula suggestions?

I think that worth of MP should somehow factor in MP recovery settings (but I don't use those).
What I am getting at is, if I am down to 10 mp, then each mp is important. When I have 1000 MP (actual usable mp, not just the maximum), then I usually don't want to wait before I can use it. Especially when I just buffed my myst and thus created a "must recover 20k MP before mp regen will be considered for casting spells" situation.
 
I've never blacklisted my iceball, and I've never lost it. But I don't use WHAM. I think a while back when custom actions were first set loose into opts, WHAM took some time to adjust, and people were reporting custom items being used, but that seems to be behind us now. Either that, or everyone has blacklisted or closeted their iceballs. Nonetheless, blacklisting your iceball is still a safe call -- the only downside is that it won't show up in your actions table for BatMan RE.

so I suspect the effect of this would be "don't use items"

For non-tradeable items or when you don't have mall access, essentially yes. Items you can immediately replace would still be considered.

I think that worth of MP should somehow factor in MP recovery settings (but I don't use those).

Agreed. That's why it has done so since the very beginning, for those using UR. :)

What I am getting at is, if I am down to 10 mp, then each mp is important. When I have 1000 MP (actual usable mp, not just the maximum), then I usually don't want to wait before I can use it.

Yes, this exactly. I'd like to do something about this, but am not sure of the best way forward. Thus far, BatBrain has tried as much as possible to use actual, objective values for things. When we start saying MP is worth a variable amount, we enter the realm of things people can argue about forever -- UNLESS it's done so well that everyone's happy.

A man can dream, I suppose. I'm open to suggestions to help my dream take form.

EDIT: How about a soft MP cap, like monster damage caps? MP up to a certain point would be valued at full, but beyond a certain point (say 300) the value would taper, perhaps with a 0.7 exponent?
 
Last edited:
Lazy fix for olfacting bounty monsters:
Code:
  // second, set puttifaction for bounty monsters
   if (to_bounty(get_property("currentEasyBountyItem")).monster == m) should_olfact = true;
   else if (to_bounty(get_property("currentHardBountyItem")).monster == m) should_olfact = true;
   else if (to_bounty(get_property("currentSpecialBountyItem")).monster == m) should_olfact = true;

Since I don't believe we track how many of the bounty items we've gotten in an easily accessed way besides parsing the preference with a split_string manually, I didn't try to do anything fancy for putty. But at least this way it doesn't take 54 adventures for a simple bounty anymore...

Bump that currently SS doesn't have any bounty handling and these 3/4 lines make it happen again.
 
So I'm trying to write some auto DNA extraction code, and I thought that SmartStasis/WHAM would be the best spot to do so. To make a long story short, I added the following line just after the olfaction code, i.e.:
Code:
if (should_olfact) encustom(custom_action("attract"));
if (should_extract) encustom($item[DNA extraction syringe]);

Now, I've done some basic checks to see if the my encustom action is being called, and it definitely is. Unfortunately, it's never actually using the syringe. I have no idea why. Help?
 
I just noticed that SmartStais is trying to use item 2404 (Jam Band Fliers) in aftercore. I accidentally picked up the fliers during the war but never completed the quest. The fliers aren't even in inventory. In my copy of the script the problem line is 207. Perhaps that statement would benefit from a check for aftercore. Either that of KoLMafia might unset the flyeredML property when the war is over.

Any thoughts on the best way to fix this?
 
Checking for the item before using them should work well. Unless that makes someone sad, because they are removed if you use them when the island is closed.

EDIT: Oh, it seems that check is already made. Is it possible mafia missed them being used up?
wiki said:
The Rock Promoters are long gone, and the scheduled day of the show has passed. You toss the stack of flyers in a trash can.
 
I don't know if mafia tracks that, but that only matters if the person goes there to get rid of the flyers, so checking for them in inventory isn't sufficient.
 
I don't know if mafia tracks that, but that only matters if the person goes there to get rid of the flyers, so checking for them in inventory isn't sufficient.
Sorry, I wasn't clear. KoL gets rid of the flyer when you use it after the quest is closed. So if mafia and KoL become out of sync, then WHAM will try using it a second time, etc.
 
From Veracity in this post in the Bug Reports forum

Obviously, "flyerML < 10000" is not the correct check for "should I do more flyering?" If a script attempts to use flyers after the war is done, I consider that to be a bug in the script.

It seems that a check for whether the flag indicating that the war is over, and if not then the check for flyerML, is the better approach. I'm still going through SmartStasis but I haven't found such a check.
 
Last edited:
Back
Top