Winterbay's Helpful Automatic Monsterbasher (WHAM)

Here's my initial trial. . .

Previously I had WHAM_noitemsplease set to true, because in after core it eats up lots of useful items. I had to set that back to false, because I'm in softcore and I have rain doh. First combat WHAM wasted a CSA disobedience grenade. Not a big deal and unrelated to these changes, but I thought I'd mention it.

Next, WHAM decided to start hugging everybody. I try to save the first 10 each day for swarms, so I get 20 horde. I removed bear hug from batfactors.

Now WHAM pretty much just does a ravenous pounce. Occasionally it will use blue balls and indigo cup, but otherwise it's 100% ravenous pounce. Maybe that will change as I eat. It uses pounce, even when kodiak moment will also instant kill for free. This is according to WHAM's statistics. It lists both as 100% hit and both as more doing more damage than the monster's HP and chooses the slightly more expensive pounce. (I might be wrong about this)

Some of these monsters can be killed and converted for free assuming HP restore (I get hit once). I don't expect WHAM to know that I'm going to get that HP back at the end of the fight, so it's can't be that optimal.

Anyway, that's what I discovered in my few minutes of play this morning. Hopefully I'll get some time to try again tonight.

EDIT:

I just fought something harder (alphabet giant + 45 ML) and grisly scene then ravenous pounce was used. The next giant, just ravenous pounce. Sadly I didn't have the verbosity high enough to see why. Same with the hole in the sky.

Weaker monsters are all given kodiak moment. Now I'm wondering if I was wrong about pounce being used when kodiak would one-hit. Maybe it wasn't a sure one-hit.

All in all, it seems pretty nice. It works better than my one-size-fits-all CCS, even if it doesn't convert any horde, because very little horde is spent on healing.

EDIT:

Sorry about the rambling edits. I just got an abort on Dr Awkward. When I use kodiak moment, it hit for more HP than WHAM expected, then I realized it's the auto-critical. I think you said that wasn't accounted for. Anyway, I think that explains my constant feeling that pounce was being used too much and kodiak too little.

EDIT:

Smash & Graaagh is being used in the wine cellars, but those are conditional drops and it doesn't work there.

I'm out of turns, so hopefully no more edits. All in all, I'd say it's pretty useful already. For example, I never got beaten up like I did with my default CCS.
 
Last edited:
During which phase did it use the grenade? If it was in the SmartStasis-part then there's currently not much to do about it (but then that would've failed under noitemsplease as well...), otherwise you can add it to the items you don't want used with the help of the relay-script.

I found it to use pounce quite a lot today when I had an empty stomach, but as soon as I started to fill up on brains it went over to just attacking.

Yeah, the autocrit is not accounted for because I cannot find a way to specify in batbrain that a skill will autocrit, the critchance-function is oblivious of what is used to call it and the damage calculation is hard to modify. I think the best bet is to change regular() to add a new number to it, but the current numbers all have specific meanings apart from being used to discern between the different calls and I'm not familiar enough with the damage-formula for a normal attack to understand all of it...
 
During which phase did it use the grenade? If it was in the SmartStasis-part then there's currently not much to do about it (but then that would've failed under noitemsplease as well...), otherwise you can add it to the items you don't want used with the help of the relay-script.
I have to admit, I haven't paid that much attention. CSA obedience grenades aren't that useful. The saved logs look a little different (I guess I don't save html).
Code:
[238] Barrrney's Barrr
Round 2: Crowther uses the CSA obedience grenade!
Round 3: Crowther uses the The Big Book of Pirate Insults!
 > WHAM: Starting evaluation and performing of attack
Round 4: Crowther executes a macro!
Round 4: Crowther casts BEAR HUG!
Round 5: Crowther wins the fight!
I think that means smart stasis used it.
Yeah, the autocrit is not accounted for because I cannot find a way to specify in batbrain that a skill will autocrit, the critchance-function is oblivious of what is used to call it and the damage calculation is hard to modify. I think the best bet is to change regular() to add a new number to it, but the current numbers all have specific meanings apart from being used to discern between the different calls and I'm not familiar enough with the damage-formula for a normal attack to understand all of it...
It looks like -1 is being used for kodiak in regular, but you're right. That code is as complex as KoL's damage formula which I don't understand either. Best I can tell it should work, but I have no confidence in that evaluation.
I found it to use pounce quite a lot today when I had an empty stomach, but as soon as I started to fill up on brains it went over to just attacking.
It continued to use it for me even when I was mostly full, but I was fighting tough monsters and probably needed the autohit.
 
Took off my bear claws for elemental damage in the hidden city and things got strange. Lots of different problems. Here's one.
Code:
[508] Hidden City (Square 8)
Encounter: boaraffe
Round 0: Crowther wins initiative!
WHAM: Running SmartStasis
Round 1: Crowther executes a macro!
Round 1: Crowther uses the Rain-Doh indigo cup!
You gain 65 hit points
WHAM: Starting evaluation and performing of attack
Round 2: Crowther executes a macro!
Round 2: Crowther casts INFECTIOUS BITE!
You lose 56 hit points
Round 3: Crowther casts INFECTIOUS BITE!
You lose 57 hit points
Round 4: Crowther casts INFECTIOUS BITE!
You lose 59 hit points
Round 5: Crowther casts INFECTIOUS BITE!
Round 6: Crowther casts INFECTIOUS BITE!
You lose 58 hit points
WHAM: Starting evaluation and performing of attack
Round 7: Crowther executes a macro!
Round 7: Crowther casts INFECTIOUS BITE!
You lose 56 hit points
Round 8: Crowther casts INFECTIOUS BITE!
You lose 58 hit points
I got beaten up.

EDIT: Figured that out. I was holding a ranging weapon (butt tuba) and so WHAM/batbrain wasn't considering pounce, even though pounce works just fine with a ranging weapon.
 
Last edited:
Righto. I've made some small further modifications. Let's try out these versions shall we?
 
Last edited:
Well, personally I used the attached version and went from about 81k meat at the start of the day down to 69 meat 30 adventures later. Tiny bit painful HC testing. :) Level 12 running through the war.

Know part of the issue was that Universal_recovery undervalues MP value in zombie-core and sometimes div-zeros on setting HP value. After noticing my meat running away, I started tweaking it to add in more zombie-cost awareness. But... eh. :)

Edit: Think I may have figured out why. You didn't include Crowther's fix for BatBrain thinking that any stasis is good, even if you're losing money. So using devour as much as possible, even if it's costing me 300 meat per casting, is considered the 'best' action. After making that fix, WHAM's calling of SS now uses plague claws instead of devour.
 
Last edited:
Edit: Think I may have figured out why. You didn't include Crowther's fix for BatBrain thinking that any stasis is good, even if you're losing money. So using devour as much as possible, even if it's costing me 300 meat per casting, is considered the 'best' action. After making that fix, WHAM's calling of SS now uses plague claws instead of devour.
I was wondering why I didn't hit this problem, but then realized I'm in softcore running lots of ML instead of my normal hardcore.

EDIT: Low level trial didn't go as well. Mostly because stunning, deleveling and turning new horde is critical and WHAM kept wasting minions on pounce. Once my horde ran down to zero, WHAM couldn't decide what to do, even though I made an easy kill. I ended up setting my script to: infectious bite, indigo cup, blue balls, pounce, pounce, WHAM. This worked pretty well. Most monsters were turned and WHAM made very good choices on which skill to use to finish them off. I especially like it's use of bear hug when my HP was a bit low. I don't think I used a single horde for healing today thanks to WHAM.
 
Last edited:
Any chance we could get a WHAM zlib variable to get a monster to a specific hp instead of killing it?

I tried a rudimentary version of this where I just decreased the initial monster hp by a given value. This unfortunately doesn't work very well, there are a lot more considerations that need to take place.
 
EDIT: Low level trial didn't go as well. Mostly because stunning, deleveling and turning new horde is critical and WHAM kept wasting minions on pounce. Once my horde ran down to zero, WHAM couldn't decide what to do, even though I made an easy kill. I ended up setting my script to: infectious bite, indigo cup, blue balls, pounce, pounce, WHAM. This worked pretty well. Most monsters were turned and WHAM made very good choices on which skill to use to finish them off. I especially like it's use of bear hug when my HP was a bit low. I don't think I used a single horde for healing today thanks to WHAM.

Post-change, mine went okay, though it still loves using devour when it doesn't need to (though at least it doesn't pick it for pure stasis now)... It'll devour when it only needs to gain 6 hp of 400, instead... devour-decision fail on SS's part. Removed devour from batfactors entirely, since it was my main point of failure.

Early run though, it's going well. Possibly since I don't have pounce yet. With no-pounce and plague claws, WHAM successfully killed the first 3 hunters day 1 without needing any interaction. :)
 
WHAM successfully killed the first 3 hunters day 1 without needing any interaction. :)
That's pretty nice. I've lost count of how many times I've lost to that pea shooting plant thing, because it was significantly harder than the zone I was fighting in. WIN!
 
What's interesting is that I've never had Batbrain get stuck in the stasis-loop. That said, I generally never run enough +ML to end up with economic problems, especially as a myst-class. As a muscle class meat seems to be more of an issue.

That said, in my local copy I've added as a special action to cast infectious bite first if you can survive it (and also modified it to not smash&graaagh if the only goal item an opponent have is conditional). I'll see if that works.
 
I tried a rudimentary version of this where I just decreased the initial monster hp by a given value. This unfortunately doesn't work very well, there are a lot more considerations that need to take place.

Due to monster HP and skill damage variance it is somewhat hard to get to a specific HP without performing every attack one at a time, which somewhat goes against the saving of server-hits that the script tries to do. You would need to set the variable for how long to plan before performing an attack to 1 first no matter and then define the monster HP you want to reach in some way, but it will be very inefficient I think.
 
I've gotten this off and on since WHAM_AlwaysContinue was added, but... figured I should post since it's not just unknown monsters which breaks my theory.
WHAM: Starting evaluation and performing of attack
WHAM: Could not find a way to kill the monster. Trying the best available option since you've set WHAM_AlwaysContinue to true.
WHAM: We are going to 1-shot with attack with your weapon.
Round 2: Theraze executes a macro!
Round 2: Theraze attacks!
Round 3: baron von ratsworth takes 2 damage.
Round 3: baron von ratsworth takes 3 damage.
You lose 16 hit points
Baron fought.

> zlib WHAM

Copy/paste/modify/enter any of the following lines in the CLI to edit settings:

zlib WHAM_AlwaysContinue = false
zlib WHAM_hitchance = 0.5
zlib WHAM_maxround = 30
zlib WHAM_noitemsplease = false
zlib WHAM_round_limit = 10
(If no values were shown, no settings or values matched your input text. Type "zlib vars" to see all.)
As you can see, I obviously have NOT set AC to true. So why does the script blindly charge in and kill me? :( I could easily have killed him with an initial plague claws or two rather than the "plink and pray" method it actually employed...
 
That's odd... Mine has been aborting in that situation I feel.

It should only move on to trying your best option if the following returns false:
Code:
(killer.id == "" && !to_boolean(vars["WHAM_AlwaysContinue"]))

In your case the second is obviously true, so it must be the first part that is playing up. It should not enter into that section of the code unless it could not find a way to kill the monster (i.e. killer.id == ""), this could be changed by the delevel()-function but if so it should really have done some delevelling as well, and if it didn't do any delevelling killer.id should not be set to anything but "" since nothing has changed. In conclusion: I have no idea why it would do that...
 
Nothing new to report. I'm still running my own preface CSS, then letting WHAM clean up what's left and it's working very nicely.
 
Some minor modifications to three files:
Batbrain: Added in the stasis-limiting line that I missed earlier and I think (or if that was in the last version) made the crit for Kodiak Moment work. Potentially...
Batfactors: Added the skills Billious burst and Corpse pile and readded Intimidating bellow which had disappeared sometime in the past
WHAM: Make sure we use Howl of the Alpha against some specific monsters, Use infectious bite if it's safe, don't use smash&graagh if the only interesting goal item from the monster is a conditional drop.
 
Last edited:
I've a minor hiccup with the new version. Or what I'm doing now. I cast infectious bite in my CCS, then when WHAM takes over, it casts it again, which wastes a round. I can just remove the skill from batfactors. Is there even a way for WHAM to know it infectious bite has already been cast?
 
Unfortunately not since it can be cast more than once (even though I marked it as once in the file to not do bit over and over...) and batbrain has no idea on what has been done before it is invoked.

Edit: That said, the implementation of the bite wasn't very good since it wouldn't turn anything other than low level monsters anyway so changed it around a bit, should make it not use it as much (unless the best option you have of killing the monster will lead to the monster taking >50% of its HP in damage from the bite) and will probably solve your problem :)
 
Last edited:
Back
Top