Winterbay's Helpful Automatic Monsterbasher (WHAM)

The book is probably the best guess I'd say, I know that's screwed me over before... Allthough BCA still needs to be told to not use Spirit of Peppermint when going in to fight the ninjas...
 
So it has, the problem with copying things between scripts doing things in different ways :)

Edit: 4.3.7 fixes that.
 
Last edited:
Hi Winterbay! Popping in to your lovely WHAM thread with assorted tidbits, responses, and news.

First of all, towards resolving the BatBrain fork I've reported the Groar issue as a bug, since he's just a regular cold monster, which means if mafia knew that, we wouldn't need to add additional special handling for him. NOTE: As I was writing this post, it was fixed. Superfast response!

Secondly, away from resolving the BatBrain fork I've changed m_regular() to return a spread, as I really should have in March when I changed player HP to player damage. I figured it would be polite to give you a heads-up on this.

EDIT: Actually, now that I've looked at WHAM, you're not calling it anywhere that isn't copied over from SS -- which means you'd make those changes anyway. So I won't feel bad about making this update after all! w00t

Thirdly, in an effort to track down frono's issue, I took a look at WHAM and saw that it duplicates almost all of SS -- which rather makes me wonder why you'd import it all, but that's beside the point. I found something mildly undesirable which is unfortunately not the source of frono's problem, but which you probably would like to fix. In stasis_repeat_WHAM() you have a reference to kill_rounds(smack).

However, everywhere else you are using smacks, not smack, which means kill_rounds is returning the monster's HP/0.00001, not your actual selected attack option from WHAM's attack_option(). Beyond making every stasis macro only perform one round, I don't think this would have any other negative consequence, however.
 
[/tt]. Beyond making every stasis macro only perform one round, I don't think this would have any other negative consequence, however.

For those of us using BCC's ascension script with a mimic set as "default" familiar, and using WHAM, this could make a huge difference in how long it takes to run turns. Thanks for finding that!
 
Hi Winterbay! Popping in to your lovely WHAM thread with assorted tidbits, responses, and news.

First of all, towards resolving the BatBrain fork I've reported the Groar issue as a bug, since he's just a regular cold monster, which means if mafia knew that, we wouldn't need to add additional special handling for him. NOTE: As I was writing this post, it was fixed. Superfast response!

Thanks. I've been wondering if it was a cold monster or a special monster, but never got around to doing anything about it :)

Secondly, away from resolving the BatBrain fork I've changed m_regular() to return a spread, as I really should have in March when I changed player HP to player damage. I figured it would be polite to give you a heads-up on this.

EDIT: Actually, now that I've looked at WHAM, you're not calling it anywhere that isn't copied over from SS -- which means you'd make those changes anyway. So I won't feel bad about making this update after all! w00t

No, I don't think I've been using that anywhere so that should be fine.

Thirdly, in an effort to track down frono's issue, I took a look at WHAM and saw that it duplicates almost all of SS -- which rather makes me wonder why you'd import it all, but that's beside the point. I found something mildly undesirable which is unfortunately not the source of frono's problem, but which you probably would like to fix. In stasis_repeat_WHAM() you have a reference to kill_rounds(smack).

However, everywhere else you are using smacks, not smack, which means kill_rounds is returning the monster's HP/0.00001, not your actual selected attack option from WHAM's attack_option(). Beyond making every stasis macro only perform one round, I don't think this would have any other negative consequence, however.

Thanks for finding that!
Also, the reason I copy large parts of SS over to WHAM was to bring it under control of the WHAM_dontuse-settings (allowing people to disallow lasagna bandages should they so desire without removing it from batfactors) and to get a higher degree of control over some variables (e.g. if SS ends with a stun and then hands off to WHAM, WHAM won't know this. If they are the same script that setting won't get cleared in between calls). The reason for the import is that I don't want to copy the entire script over :)

Apart from the WHAM_dontuse thing I guess I could now actually be calling main@smart_stasis() but that wasn't an option when I started with the transfer.

Differences in my fork of BatBrain are mainly related to Zombie Slayer and Bear arms then so if we could come up with a good way of handling those I'd be very very happy to not have a fork to maintain :)

ETA: Version 4.4 fixes the smack/smacks-issue.
 
Last edited:
I just upgraded to the latest one just now but whenever I try to fight anything:

Bad monster value: "frustrating knight" (BatBrain.ash, line 617)
Consult script 'WHAM.ash' not found.
You're on your own, partner.

I'm not fighting a frustrating knight. WHAM.ash is in my script folder.
 
I just upgraded to the latest one just now but whenever I try to fight anything:

Bad monster value: "frustrating knight" (BatBrain.ash, line 617)
Consult script 'WHAM.ash' not found.
You're on your own, partner.

I'm not fighting a frustrating knight. WHAM.ash is in my script folder.

Upgrade mafia here.
 
Ah thanks very much! I didn't know I would need to update manually every Sunday.
Read the next line, it says you need to update every hour. ;)

KoLmafia code is being updated all the time. Hourly builds are often best (but not always) and I believe there's a tool to automate getting them.
 
BatBrain 1.31.1 requires changes to SmartStasis which have been incorporated into 3.18. Since WHAM copied large portions of SmartStasis these changes need to be made in WHAM. My version with those changes is attached, as a public service, but I would expect a new release of WHAM or a reiteration of the instructions to use forked versions.
 

Attachments

I have an adapted version here, the question is: Should I remove the happymedium-handling from WHAM and rely on SmartStasis to handle it or combine the two?
 
I vote for whatever merges the fork and then eliminates copy and paste from SS into WHAM but since I don't have a Happy Medium I get to pontificate as a Software Engineer and Configuration Manager and not as a user ;-)
 
Winterbay, I had been unaware your script included Happy Medium handling. It seems as though SS's handling is a bit further developed, since it considers not only aura color but also level requirements and mainstat. My recommendation would be to remove it from WHAM and give me suggestions to improve it in SS where desired. I do so enjoy consolidated code.

Second, I like your idea of a user-configurable excluded actions list. I believe I'll see about adopting that -- you will be able to conveniently exclude actions from within BatMan-RE, or by manually editing some sort of data file.

As far as SS ending with a stun -- the main() function was not intended to run when SS was imported, because you'd have your own main(), with things possibly reordered or omitted. Perhaps you want to save custom actions until the monster is almost dead (handy when insulting pirates) or what have you. If you import the script, you'd have your own main() and it wouldn't be the same as SS's.

Once I add don't-use capability and those Bear Arm skills, we might be able to convert this fork into a slotted spoon.
 
I vote for whatever merges the fork and then eliminates copy and paste from SS into WHAM but since I don't have a Happy Medium I get to pontificate as a Software Engineer and Configuration Manager and not as a user ;-)

Well, I guess the benefit of what I had was that the user could decide for his/herself what colour was wanted, but then I don't have a Medium either (well I have one, but that was bought for investment purposes rather than for personal use).

Also, with 4.5 uploaded I'll look into separating the scripts again so that we don't have this sort of issue. Especially if BatBrain adds some sort of disallow-mechanic.

Zarqon: When I did import it, what I mainly did was duplicate the SS-main in WHAM but that had odd side effects which lead to me moving more of SS into WHAM, such as once-per fight things being used more than once (it appears that limited use-items and skills are not always correctly tracked and disallowed by BatBrain and so this lead to problems with WHAM trying to use them more than the allotted times) hence the dupllication of attack_, stasis_ and stun_option functions rather than their _even counterparts in BatBrain.
 
Back
Top