Winterbay's Helpful Automatic Monsterbasher (WHAM)

Magus_Prime

Well-known member
There are two zlib variables:

Code:
zlib WHAM_roundcost_aftercore = 50
zlib WHAM_roundcost_ronin = 15

It's been a while since I've used them but the value is in terms of meat you're willing to spend per round to speed things up. It's a global setting though and not location dependent. The meat cost takes into account MP and HP recovery, item costs, etc..

Experimentation is needed to see where your comfort zone lies in the balance between speed and expense.
 
Last edited:

Winterbay

Active member
I may remember incorrectly (I have not looked at my code in a while) but I think that WHAM should be setting the round_cost to a pretty high value if you are in the basement since in there stasising and whatnot is generally not the intention and we just want to get through the fight.

I just checked and no it doesn't. But it does skip SmartStasis in there.
 

Crowther

Active member
WHAM is definitely miscalculating something in the basement. I had trouble with the beer golem as well. As Winterbay says it would be nice to find out what exactly is off rather than just bandaid over it. I've dug into these issues before and even fixed a few, but my life was recently turned upside-down. That said, increasing the price you're willing to pay to shorten combat is a good bandaid and something you may want to do even if the discrepancy is fixed.

Does the short calculator even do anything? I've tried it in combat many times and it never does anything useful. It certainly doesn't do what batfactors says it does. I know the wiki has text for when it works, but I've never seen it.
 

Bale

Minion
Weaksauce? What the heck is that? If you explain clearly (and probably in the WHAM thread) I am more likely to be able to add it :)

Curse of Weaksauce is a skill that has several functions. Mostly though it is important because it turns a Sauceror into a God of Combat with a never ending stream of MP to power every buff. That might not mean much in softcore, but in hardcore the MP is amazing.

Attributes of Curse of Weaksauce:

  • If you also have the skill Itchy Curse Finger it will stagger the monster, preventing an attack for that round.

  • It delevels the monster every round, including the round it is cast. About 3% of the monsters original attack value is removed from the monsters atk and def each round. This is awesome for many things and my Disco Bandit loves doing it before starting a series of disco dances.

  • Most importantly, it has a special ability that only Saucerors can use. If you have previously cast Curse of Weaksauce and then kill the monster with a spell it willl restore up to 50 MP. The amount of MP restoration is 30% of the damage done by that final spell up to the maximum of 50 MP. (Spells that do multiple elements only give MP based on the strongest of the separate damages.) Weaksauce costs 8 MP and Saucegeyser costs 24 MP, so if you can kill a monster with Saucegeyser combat is very MP positive. Each fight is a fountain of MP for the Sauceror to use for other purposes.
 

Bale

Minion
BatBrain actually ought to know about this. That much MP regen is, as you say, quite deific.

Indeed. That much MP regen makes it very positive to use Song of Sauce which costs 100 MP for 10 turns because it guarantees one hit kills with Saucegeyser even at very high ML and I still get to run a ton of other useful buffs.

It would be nice to add that to BatBrain. Is there any chance that BatBrain could also come to understand the continuing effect of the deleveling also? (That way it could predict attack damage two rounds later.)

It would also be nice if the delayed damage of stuffed mortar shell could be understood by Batbrain, but that would probably be harder. For Pastamancers, effect combat tactics revolve around tactical use of stuffed mortar shell (it does fully tuned damage equal to weapon of the Pastalord for only 4 MP), but BatBrain doesn't get it.
 

Theraze

Active member
It would also be nice if the delayed damage of stuffed mortar shell could be understood by Batbrain, but that would probably be harder. For Pastamancers, effect combat tactics revolve around tactical use of stuffed mortar shell (it does fully tuned damage equal to weapon of the Pastalord for only 4 MP), but BatBrain doesn't get it.

Definitely agree on this. The delayed effect of SMS makes me usually delete it from my local batfactors when I notice it causing me to die on close combats. It generally is involved in 3-4* as many failed combats as successful ones, and I have enough other spells that it's easier to just ignore this one.
 

Bale

Minion
The delayed effect of SMS makes me usually delete it from my local batfactors .

That's awfully unproductive considering it keeps getting updated. There's a much better way. If you are using WHAM you can add it to relay_WHAM_dontuse.
 

Theraze

Active member
Yeah, but I keep hoping that someday it will be better supported and make me stop dying. If I put it into dontuse, then I won't see it magically work someday.
 

Ethelred

Member
In post no. 1 in this thread, Winterbay writes:

...

In case you want to you can also fine tune a couple of things in the script:

  1. The amount of turns the script should try to calculate before executing and retrying (defaults to 15)
  2. The hitchance you are willing to risk (defaults to 50%, or 0.5 to be exact)
  3. The max number of rounds you are willing to let the script automate skill-slinging before it reverts control to you (defaults to 30)
  4. A boolean safety parameter. If set to true the script will execute your best option and re-calculate your options form the result until either you are dead or the monster is (defaults to false, new form 2.8)
  5. A boolean parameter that if set tu true will make you not use any items at all when fighting (defauilts to false, new from 3.1)
  6. An integer parameter indicating how many extra rounds you wish WHAM to refrain from stasising (defaults to 0, new from 4.1)
  7. A boolean parameter to toggle use of the Sea Lasso in The Sea (defaults to false, new from 5.3)
  8. A boolean parameter that can be set to swap WHAM from trying to do things as profitable as possible to kill the monster as quick as possible without factoring in cost in any way (default false, new from 5.4)
  9. Two integer parameters indicating how much we are willing to spend to make the combat one round shorter, one for ronin and one for aftercore (to allow for different playstyle in the different cases) (defaults to 5 and 50 respectively, new from r13)
  10. A relay script relay_WHAM_dontuse that can be used to finetune the items and skills used by WHAM. Explanations on how to use it is shown when run. Put it in the /relay folder and run from the drop down in the relay browser. Requires Jason's htmlform in order to function (linked above).

In order to change them use commands like this in the CLI:
Code:
zlib WHAM_round_limit = <wanted number>
zlib WHAM_hitchance = <wanted fraction>
zlib WHAM_maxround = <wanted number>
zlib WHAM_AlwaysContinue = true or false
zlib WHAM_noitemsplease = true or false
zlib WHAM_safetymargin = <wanted number>
zlib WHAM_UseSeaLasso = true or false
zlib WHAM_killit = true or false
zlib WHAM_roundcost_aftercore= <wanted number>
zlib WHAM_roundcost_ronin = <wanted number>

...

It would be a big help if you could include the WHAM variable name in the list above. I've spent over an hour trying to work out what's what and am still not sure I've got them right. My biggest point of confusion is WHAM_killit (item 4?) and WHAM_AlwaysContinue (item 8?). Or have I got them reversed? Thanks for any enlightement anyone can shed.
 
Last edited:

Razorsoup

Member
In post no. 1 in this thread, Winterbay writes:



It would be a big help if you could include the WHAM variable name in the list above. I've spent over an hour trying to work out what's what and am still not sure I've got them right. My biggest point of confusion is WHAM_killit (item 4?) and WHAM_AlwaysContinue (item 8?). Or have I got them reversed? Thanks for any enlightement anyone can shed.

They are listed in the same order in both lists. So #4 is 'AlwaysContinue' and #8 is 'killit'. Setting #4 (AlwaysContinue) means that WHAM will automate the fight even if it doesn't think you will survive*. It will execute it's best guess but you probably won't win. Setting #8 (killit) to true means WHAM will kill monsters as quickly as possible without regard to cost/profit. That's been my understanding of those two variables.

* note: In my personal experience, in situations where WHAM is unable to find a winning strategy, the strategy it decides to use if you told it to always continue can be really odd and uneffective.
 

Theraze

Active member
In general, when it aborts, if the fight is still winnable, it will need deleveling, which is the one thing that BatBrain isn't awesome at calculating. Sometimes you can throw a stun and delevel out there, possibly in conjunction with a heal, and win. But the fight is usually lost by the point WHAM aborts. :)
 

Winterbay

Active member
In general, when it aborts, if the fight is still winnable, it will need deleveling, which is the one thing that BatBrain isn't awesome at calculating. Sometimes you can throw a stun and delevel out there, possibly in conjunction with a heal, and win. But the fight is usually lost by the point WHAM aborts. :)

Yeah, I never managed to solve the issue of restoration and deleveling. There is some code in WHAM for that but it doesn't work very well and almost never gets called since generally the script finds a better way...
 

Theraze

Active member
The big problem currently seems to be that while we (generally) start with the bigger attacks, usually the deleveling options go at the end, so we take all of our full damage and only weaken the enemy when it's too late. Probably would need to iterate through the options several times to make it work properly... stun first, then delevel, then damage. But... yeah, it works well enough in general. :)
 

Ethelred

Member
When using WHAM, it seems like I lose the level advancement messages in my session logs. I have the zlib print level set to the default value of 3. Would that be a factor? I like to review my session logs and the level messages were good search terms help see how one run compares to another. Can anyone recommend a way to get them back? Thanks, as always, in advance.
 

fronobulax

Developer
Staff member
When using WHAM, it seems like I lose the level advancement messages in my session logs. I have the zlib print level set to the default value of 3. Would that be a factor? I like to review my session logs and the level messages were good search terms help see how one run compares to another. Can anyone recommend a way to get them back? Thanks, as always, in advance.

Do you mean
You gain a Level!
? It was in my session logs yesterday and today and I am running WHAM. I don't expect zLib or WHAM to be a factor but if you are running the wrong daily build something could have gotten mixed up in the parsing changes.
 

Ethelred

Member
Do you mean
You gain a Level!


? It was in my session logs yesterday and today and I am running WHAM. I don't expect zLib or WHAM to be a factor but if you are running the wrong daily build something could have gotten mixed up in the parsing changes.

Yes, that is what I meant. Today, I'm running r14785 and the level gain messages seem to be there. Yesterday, with r14772, seemed to be mixed. Some were there and some weren't. So maybe it was just a temporary issue. I'll continue to watch and report back if they disappear again. Thanks for looking into it.
 

Magus_Prime

Well-known member
The r50 update to Batbrain breaks WHAM. I'm working my way through trying to accommodate the changes in Batbrain. So far I've had to make two changes:

Change line 500 to
Code:
if (my_path() == "Zombie Slayer" && monster_stat("howmany") > 1 && no_bears()) return true;

Change line 1086 to
Code:
if(have_skill($skill[Disco State of Mind]) && have_skill($skill[Disco Greed]) && have_skill($skill[Flashy Dancer]) && monster_stat("nostagger") < 1) {
 
Last edited:
Top