Winterbay's Helpful Automatic Monsterbasher (WHAM)

I just remembered I have write access to WHAM, so I made this change and submitted it. Let me know if I messed anything up.

Thanks for the fix zarqon!

Wohoo, the additon of more people helped :)
(I'm un Germany for another five days and so wouldn't have been able to do anything until Tuesday or so otherwise...)
 
Even after zarqon's recent updates to Batbrain I'm still unable to use WHAM to handle the lair contestants:

Code:
> zlib verbosity = 10

Previous value     of verbosity: 9
Changed to 10.

[896] Smoothest Adventurer Contest
Encounter:     Smooth Criminal
Round 0: Arbos wins initiative!
Round 1: Arbos     executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is     round 1
You're on your own, partner.

Any ideas?
 
Even after zarqon's recent updates to Batbrain I'm still unable to use WHAM to handle the lair contestants:

Code:
> zlib verbosity = 10

Previous value     of verbosity: 9
Changed to 10.

[896] Smoothest Adventurer Contest
Encounter:     Smooth Criminal
Round 0: Arbos wins initiative!
Round 1: Arbos     executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is     round 1
You're on your own, partner.

Any ideas?
I don't see anything in the log to show you are using WHAM. Double check your combat settings.
 
My CCS consists of one line: "consult WHAM.ash".

WHAM is working fine everywhere else in the course of a normal ascension, with the exception of handling some Snojo fights.

This was posted a few pages back in response to the same question from me a month ago:

The reason WHAM has trouble handling the contestants is Batbrain returns 0 - 3 damage for sauce/pasta spells (and maybe something similar for other skills) even though they seem to do normal damage.
 
Wouldn't mafia print "Strategy: $cssFileNameHere" if it was actually automating the fight according to a css?

"executes a macro" and then "you're on your own, partner" looks like you have a vanilla kol macro set an autoattack, and it aborts.
 
This is probably not relevant, but how are you initiating the automation?
The script (iirc) button in relay browser?
Minibrowser?
The button in GUI (I don't use it so I don't remeber how to say which button)?
"adventure" in CLI (but removed from the quoted log)?

Also, do you have any special actions enabled? (it's next to the part that lets you tell mafia to use ccs instead of just "attack"; I also don't remember what to click (right click?) here to see the full list)
 
I've tried it via either the "script" button in the relay browser and via the "begin" button on the Adventure tab in the main interface. It fails both ways.

No special actions enabled. I've attached a screenshot of the entire CCS and the contents of the tab.

2016-01-12_10-33-22.png
 
Probably not related, but SmartStasis (and thus, WHAM) handles throwing the refreshments, so you could delete the tourist sections from your CCS. BatBrain isn't even being called though, and I'm not sure why either. Though I don't use WHAM, my BatBrain-powered script works fine in all the Contest zones. Maybe try explicitly specifying contest zones in your CCS?
 
Funny you should mention it but I was planning to use BatmanRE during the contests this run. I just ascended into a HC Disco-bandit run so it will be another three days before I can test.
 
Something unexpected happened today when I fought the contestants: WHAM worked but BatmanRE did not. During the last ten combats of the Hippy/Frat War I enabled BatmanRE and it handled the combats without problem.

I then went to the lair and when I started the first contest the expected BatmanRE "overlay" was not visible when the encounter loaded but when I hit the "script" button WHAM, ran properly to completion and won the combat. As a test I went to the Sleazy Back Alley and fought a combat there: BatmanRE worked as expected. Back to the lair and fought another contestant: No BatmanRE but WHAM still worked.

BatmanRE was also a bit odd during the tower encounters:

- It never displayed during the Wall of Skin or Wall of Meat encounters
- It did display during the Wall of Bone encounter but only after I first cast Garbage Nova using the CAB
- It did display during the "Shadow" encounter but only after this time I tossed a gauze garter at the shadow. In later rounds BatmanRE displayed options as expected
- In the Naughty Sorceress battle BatmanRE didn't load until after I'd killed her first form.
- After I broke the prism BatmanRE worked flawlessly in every location I tried

I'm very confused right now.
 
Last edited:
So, if WHAM worked fine, and you're posting BatmanRE problems... why do that in the WHAM thread? Not much Winterbay will be able to do to fix a working script. :)
 
Because, prior, to this morning, WHAM wasn't working in fighting contestants. I also thought that since the discussion started here that I would, potentially, finish it in the same place. :D
 
The next update to BatBrain will restructure monster data into a record, like so:

PHP:
record monster_data {
   int variable;           // the +ML currently being run; if the same, the monster will be reloaded from cache
   boolean nopotato;       // potatos are useless here
   boolean nofamiliar;     // your familiar will not act
   spread aura;            // passive damage dealt to you every round
   spread retal;           // damage dealt to you if you hit with a melee attack
   spread res;             // resistances to each element, expressed as -1.0 (vulnerability) to 1.0 (immunity)
   spread pen;             // the monster's penetration ($element[none] for DA penetration)
   int drpen;              // DR penetration.  The doctor is IN!
   int howmany;            // group monster size (default 1)
   int multiattack;        // number of attacks per round (default 1)
   int maxround;           // combat lasts till this round (default 30)
   int damagecap;          // damage in amounts beyond this will be reduced...
   float capexp;           // ...by this exponent
   float autohit;          // chance of automatically hitting, regardless of moxie
   float automiss;         // chance of automatically missing
   float nostagger;        // chance of shrugging staggers.  Usually 1.0 if anything
   float nostun;           // chance of shrugging multi-round stuns
   float noitems;          // chance of ignoring combat items
   float noskills;         // chance of ignoring skills
   float delevelres;       // percent resistance to deleveling
   float spellres;         // percent resistance to spells
   float dodge;            // chance of dodging melee attacks
   string onlyhurtby;      // can only be damaged by X.  possible: club, pottery, healing
   string[string] dmgkey;  // normalized damage type(s) vs. this monster (sauce, pasta, perfect)
};
static monster_data[monster] mdb; // keep all monsters loaded as encountered for faster loading
monster_data mdata;               // m's monster_data

Note the static database of monsters. This will be used to skip most of set_monster() for monsters you've already encountered (with the same bonus resistance from +ML).

The main issue for WHAM is that monster_stat() will no longer work for most of the monster keywords, and you should rather use mdata.<field>. Additionally, maxround is now part of monster data since various monsters have varying combat lengths.

As the responsible party for breaking this script, I took the liberty of updating it to work with the upcoming update.
 

Attachments

Alright, what might be a stupid problem here. I've been using BatBrain/WHAM/SmartStasis for what feels like years. I started Mafia today, r16639, and whenever I start combat I end up with:

Code:
[540] The Haunted Pantry
Encounter: possessed can of tomatoes
Round 0: evilspoons wins initiative!
Unknown variable 'maxround' (WHAM.ash, line 586)
Consult script 'WHAM.ash' not found.
You're on your own, partner.

I'm guessing this has to do with zarqon's post above, so I'm trying the copy of WHAM.ash posted there.

Yep, talked too quickly. Zarqon's copy of WHAM.ash works perfectly, BatBrain and SmartStasis had updated but of course the update messages hadn't fired in the CLI because WHAM kept crashing. I'm guessing those changes need to be pushed to the SVN for WHAM right away to prevent more confused users such as I.
 
Last edited:
I was wondering, and sorry if this has been asked, but why does WHAM cast Olfaction on the Shaky Clowns in the Fun House?
The only possible reason i could think of was that it would be for bounty hunting. . . but that would be the Creepy Clown.
Or does the Shaky Clown give the most/best clownosity drops?
(Thanks again for one of my favorite scripts btw)
 
Last edited:
As Shaky never appears in WHAM, it's not that. Have you checked your olfaction preferences to make sure you didn't tell scripts that you wanted to olfact Shaky Clowns in the past?

Edit: From SmartStasis...
setvar("BatMan_attract","blooper, dairy goat, shaky clown, zombie waltzers, goth giant, dirty old lihc, hellion, violent fungus","list of monster");


So SmartStasis defaults to olfacting those monsters. Remove any you don't want it to from the BatMan_attract in your vars file.
 
Last edited:
Back
Top