Winterbay's Helpful Automatic Monsterbasher (WHAM)

Well, as can be seen WHAM does know that the skill will kill the monster (damage 7505, raw damage 18000+) so that's not the problem. If you can manage to get one combat at verbosity 10 (which should abort with printout) and then one finish the fight at 9 it should hopefully give enough information to figure out what happens. I have not run into this myself yet (currently powerlevelling my last AoJ run to level 30 so mainly throwing divine things at Spaaaace monsters).

Edit: If you want to try something could you comment out line 473 (sort opts by -dmg_dealt(value.dmg);) in attack_option(). That is the only line that would in any way do anything with the deleveling/attack interactions.
 
Last edited:
Did you see my debug logs above? I really hate that double posting rule, which probably doesn't really apply in this forums anyway.
 
I did, but then I forgot about it :) I'll look at it.

Edit: Ok, so in the verbosity 10 log we see that attack is OK and is predicted to do 12 damage while in the level 9 log it is predicted to do more than 300 (capped at monster HP of 134).´Both are calculated with dmg_dealt() so why the big difference?
 
Last edited:
I really hate that double posting rule, which probably doesn't really apply in this forums anyway.
I hate it too. If I have read a note and the author then edits it, I never see the edits. It is WAY more convenient if the author adds information in a new note, which is visible to everybody, whether or not they have read the first note.

As far as I am concerned, it is a non-rule in these forums.
 
Just had WHAM throw up its hands and give up against a Warwelf. Should have been a trivially easy combat - I weapon-hit it once for 385 (+30) and it was down. SCBig! DB with 426 buffed moxie.

Verbosity 10 log file:

Code:
[53] Spooky Forest
Encounter: warwelf
Round 0: mutantopia wins initiative!
 > Running ZLib version: r37 (current)
 > 1 HP costs 1.889μ. ( 260 / 260 )
 > 1 MP costs 17μ. ( 257 / 321 )
 > Running BatBrain version: 1.35 (current)
 > Running SmartStasis version: 3.19 (current)
 > Running WHAM version: 5.4 (current)
 > WHAM: We currently think that the round number is: 0 and that the turn number is 52.
 > WHAM: Checking to see if WHAM sould adjust the unknown_ml for Warwelf.
 > WHAM: No need to do anything with Warwelf.
 > WHAM: Setting up variables via BatBrain
 > Parsed round number: 1
 > Building options...
 > Evaluating '325.5*zone(sea)'...
 > Evaluating '1.0*(12+min(0.15*174.0,20)+min(0.0,40)+0.0)'...
 > Options built! (11 actions)
 > WHAM: We currently think that the round number is: 1 and that the turn number is 52.
 > WHAM: Current MP = 257 out of 321.
 > WHAM: You have no profitable MP restoratives.
 > WHAM: Current HP = 260 out of 260.
 > WHAM: You have no profitable HP restoratives.
 > WHAM: You are fighting a Warwelf. Mafia considers that this monster has an attack of 154 or 154 when given a monster name.
 > WHAM: Mafia further considers that this monster has a defense value of 152 or 152 when given a monster name.
 > WHAM: Mafia further further considers that this monster has a HP value of 152 or 152 when given a monster name.
 > WHAM: Your current ML-adjustment is: 0.
 > WHAM: Monster HP is 157.0.
 > WHAM: WHAM added the following to BatRound:  if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; 
 > attack does hurt the monster for 155.5255264104496 and is ok.
 > WHAM: Attack option chosen: attack (round 1, profit: 0)
 > WHAM: We currently think that the round number is: 1 and that the turn number is 52.
 > WHAM: Starting evaluation and performing of attack
 > WHAM: We currently think that the round number is: 1 and that the turn number is 52.
 > attack does hurt the monster for 155.5255264104496 and is ok.
 > WHAM: Attack option chosen: attack (round 1, profit: 0)
 > WHAM: No need to stun this monster
 > Monster HP is 152 according to Mafia and 157.0 according to BatBrain.
 > WHAM: We can't Saucesplash.
 > true, true, true, true, false
 > Monster HP is 152 according to Mafia and 157.0 according to BatBrain (loop variable i = 0).
 > Queued: attack
 > Building options...
 > Evaluating '325.5*zone(sea)'...
 > Evaluating '1.0*(12+min(0.15*174.0,20)+min(0.0,40)+0.0)'...
 > Options built! (11 actions)
 > attack does hurt the monster for 1.4744735895503993 and is ok.
 > Skipping attack since it is too risky.
 > use 5560 does hurt the monster for 1.4744735895503993 and is ok.
 > Skipping use 5560 since it is too risky.
 > skill 5021 does hurt the monster for 1.0 and is ok.
 > Skipping skill 5021 since it is too risky.
 > skill 3005 does hurt the monster for 1.4744735895503993 and is ok.
 > Skipping skill 3005 since it is too risky.
 > use 559 does hurt the monster for 1.4744735895503993 and is ok.
 > Skipping use 559 since it is too risky.
 > skill 3008 does hurt the monster for 1.4744735895503993 and is ok.
 > Skipping skill 3008 since it is too risky.
 > skill 1023 does hurt the monster for 1.4744735895503993 and is ok.
 > Skipping skill 1023 since it is too risky.
 > use 5561 does hurt the monster for 0.0 and is ok.
 > Skipping use 5561 since it is too risky.
 > skill 3004 does hurt the monster for 0.0 and is ok.
 > Skipping skill 3004 since it is too risky.
 > use 27 does hurt the monster for 0.0 and is ok.
 > Skipping use 27 since it is too risky.
 > skill 2024 does hurt the monster for 0.0 and is ok.
 > Skipping skill 2024 since it is too risky.
 > WHAM: No valid attack options (Best option, 'attack', not good enough)
 > Monster HP is 152 according to Mafia and 1.4744735895503993 according to BatBrain (loop variable i = 1).
 > WHAM: Unable to find a good way to kill the monster, not generating any data files.
 > Parsed round number: 1
 > Building options...
 > Evaluating '325.5*zone(sea)'...
 > Evaluating '1.0*(12+min(0.15*174.0,20)+min(0.0,40)+0.0)'...
 > Options built! (11 actions)
 > WHAM: Evaluating the attack but not performing it took 0.04 seconds.
 > WHAM: Debug printing the damage dealt by your options.
 >  
 > WHAM: Harpoon!: 157.00 potential damage (raw damage: 182.50) and a hitchance of 100.00%.
 > WHAM: Attack with your weapon: 155.53 potential damage (raw damage: 155.53) and a hitchance of 95.45%.
 > WHAM: Weapon of the Pastalord: 108.90 potential damage (raw damage: 108.90) and a hitchance of 100.00%.
 > WHAM: Cannelloni Cannon: 32.00 potential damage (raw damage: 32.00) and a hitchance of 100.00%.
 > WHAM: Rain-Doh blue balls: 15.00 potential damage (raw damage: 15.00) and a hitchance of 100.00%.
 > WHAM: razor-sharp can lid: 2.50 potential damage (raw damage: 2.50) and a hitchance of 100.00%.
 > WHAM: Suckerpunch: 1.00 potential damage (raw damage: 1.00) and a hitchance of 100.00%.
 > WHAM: Rain-Doh indigo cup: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
 > WHAM: Entangling Noodles: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
 > WHAM: spider web: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
 > WHAM: Summon Leviatuga: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
 >  
 > WHAM: Evaluating the attack but not performing it took 0.05 seconds.
Round 1: mutantopia executes a macro!
 
See attached. I captured at least one 10 and a couple of 9's. Commenting out line 473 made no difference. It still stops because it cannot delevel even though Weapon will one shot and stasis is known to be nonprofitable.
 

Attachments

I think maybe I'm homing in on something.
Code:
Running ZLib version: r37 (current)
1 HP costs 2.4μ. ( 484 / 484 )
1 MP costs 8μ. ( 229 / 311 )
You have hot plate equipped: (3) damage, retal
Running BatBrain version: 1.35 (current)
Running SmartStasis version: 3.19 (current)
Running WHAM version: 5.4 (current)
WHAM: We currently think that the round number is: 0 and that the turn number is 426.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for Blur.
WHAM: No need to do anything with Blur.
WHAM: Setting up variables via BatBrain
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
ATT: 318 (94% × 42.17, death in 13)
DEF: 299 (8.8% × 47.42 (14), win in 36)
HP: 289, Value: 2,319.1 μ, RES: 0
Parsed round number: 4
Building options...
Options built! (63 actions)
WHAM: We currently think that the round number is: 4 and that the turn number is 426.
WHAM: Current MP = 229 out of 311.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 484 out of 484.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a Blur. Mafia considers that this monster has an attack of 318 or 319 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 299 or 309 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 289 or 324 when given a monster name.
WHAM: Your current ML-adjustment is: 33.
WHAM: Monster HP is 289.0.
WHAM: WHAM added the following to BatRound: if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; 
WHAM: round: 4
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
WHAM: Attack option chosen: skill 2106 (round 4, profit: -125.56)
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; enthroned El Vibrato Megadrone (0μ)0μ--
Building custom WHAM actions...
Custom WHAM actions built! (0 actions)
Building custom actions...
Custom actions built! (0 actions)
WHAM: Stasis option chosen: skill 5023 (round 4, profit: -40)
WHAM: round: 4
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
WHAM: Attack option chosen: skill 2106 (round 4, profit: -125.56)
This monster is not your huckleberry.
Stasis loop complete.
WHAM: SmartStasis complete.
WHAM: Running SmartStasis took 0.17 seconds.
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: We currently think that the round number is: 4 and that the turn number is 426.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 4 and that the turn number is 426.
WHAM: round: 4
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
WHAM: Attack option chosen: skill 2106 (round 4, profit: -125.56)
WHAM: Stun option chosen: skill 3004 (round 4, profit: -24)
Monster HP is 289 according to Mafia and 289.0 according to BatBrain.
WHAM: We can't Saucesplash.
true, false, false, true, false
Queued: skill 3004
Building options...
Options built! (62 actions)
Monster HP is 289 according to Mafia and 289.0 according to BatBrain (loop variable i = 1).
Queued: skill 2106
Building options...
Options built! (62 actions)
WHAM: round: 6
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,093.13μ
WHAM: Attack option chosen: skill 2023 (round 6, profit: 0)
Monster HP is 289 according to Mafia and 184.085 according to BatBrain (loop variable i = 2).
Queued: skill 2023
Building options...
Options built! (62 actions)
WHAM: round: 7
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,093.13μ
WHAM: Attack option chosen: skill 2023 (round 7, profit: 0)
Monster HP is 289 according to Mafia and 171.085 according to BatBrain (loop variable i = 3).
Queued: skill 2023
Building options...
Options built! (62 actions)
[b]WHAM: round: 8[/b]
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,093.13μ
WHAM: Attack option chosen: skill 1005 (round 8, profit: -64)
Monster HP is 289 according to Mafia and 158.085 according to BatBrain (loop variable i = 4).
[b]BatBrain: round = maxround + 1[/b]
Queued: skill 1005
Building options...
Options built! (62 actions)
[b]WHAM: round: 31[/b]
Skipping attack since the hitchance is too low.
WHAM: round: 31
Skipping skill 2005 since it is too risky.
kill_rounds(opt.dmg): 1
maxround: 30
round: 31
round: 31
So, BatBrain is setting round to 31, but WHAM thinks the monster still alive. Then every thing fails, because there's no round left for the kill. I highlighted some of the debugging lines I added to WHAM and BatBrain.

EDIT: Then I removed that line from BatBrain and WHAM happily killed my monster. So the problem is end of combat related somehow.

Here's my kill. Note, when it says "BatBrain: round = maxround + 1" that isn't really happening. It just would have.
Code:
Running ZLib version: r37 (current)
1 HP costs 2.4μ. ( 484 / 484 )
1 MP costs 8μ. ( 229 / 311 )
You have hot plate equipped: (3) damage, retal
Running BatBrain version: 1.35 (current)
Running SmartStasis version: 3.19 (current)
Running WHAM version: 5.4 (current)
WHAM: We currently think that the round number is: 0 and that the turn number is 426.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for Blur.
WHAM: No need to do anything with Blur.
WHAM: Setting up variables via BatBrain
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
ATT: 318 (94% × 42.17, death in 13)
DEF: 299 (8.8% × 47.42 (14), win in 36)
HP: 289, Value: 2,319.1 μ, RES: 0
Parsed round number: 4
Building options...
Options built! (63 actions)
WHAM: We currently think that the round number is: 4 and that the turn number is 426.
WHAM: Current MP = 229 out of 311.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 484 out of 484.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a Blur. Mafia considers that this monster has an attack of 318 or 319 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 299 or 309 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 289 or 324 when given a monster name.
WHAM: Your current ML-adjustment is: 33.
WHAM: Monster HP is 289.0.
WHAM: WHAM added the following to BatRound: if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; 
WHAM: round: 4
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
WHAM: Attack option chosen: skill 2106 (round 4, profit: -125.56)
WHAM: Running SmartStasis
Profit per round: ActionProfitDamageOtherbase; enthroned El Vibrato Megadrone (0μ)0μ--
Building custom WHAM actions...
Custom WHAM actions built! (0 actions)
Building custom actions...
Custom actions built! (0 actions)
WHAM: Stasis option chosen: skill 5023 (round 4, profit: -40)
WHAM: round: 4
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
WHAM: Attack option chosen: skill 2106 (round 4, profit: -125.56)
This monster is not your huckleberry.
Stasis loop complete.
WHAM: SmartStasis complete.
WHAM: Running SmartStasis took 0.18 seconds.
WHAM: SS did not finish the fight, continuing with script execution. 
WHAM: We currently think that the round number is: 4 and that the turn number is 426.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 4 and that the turn number is 426.
WHAM: round: 4
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,110.31μ
WHAM: Attack option chosen: skill 2106 (round 4, profit: -125.56)
WHAM: Stun option chosen: skill 3004 (round 4, profit: -24)
Monster HP is 289 according to Mafia and 289.0 according to BatBrain.
WHAM: We can't Saucesplash.
true, false, false, true, false
Queued: skill 3004
Building options...
Options built! (62 actions)
Monster HP is 289 according to Mafia and 289.0 according to BatBrain (loop variable i = 1).
Queued: skill 2106
Building options...
Options built! (62 actions)
WHAM: round: 6
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,093.13μ
WHAM: Attack option chosen: skill 2023 (round 6, profit: 0)
Monster HP is 289 according to Mafia and 184.085 according to BatBrain (loop variable i = 2).
Queued: skill 2023
Building options...
Options built! (62 actions)
WHAM: round: 7
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,093.13μ
WHAM: Attack option chosen: skill 2023 (round 7, profit: 0)
Monster HP is 289 according to Mafia and 171.085 according to BatBrain (loop variable i = 3).
Queued: skill 2023
Building options...
Options built! (62 actions)
WHAM: round: 8
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,093.13μ
WHAM: Attack option chosen: skill 1005 (round 8, profit: -64)
Monster HP is 289 according to Mafia and 158.085 according to BatBrain (loop variable i = 4).
BatBrain: round = maxround + 1
Queued: skill 1005
Building options...
Options built! (62 actions)
WHAM: round: 8
Skipping attack since the hitchance is too low.
WHAM: round: 8
drum machine (30.0 @ +131.8920807370024): 1,360μ * 69.57% = 946.12
palm frond (10.0 @ +131.8920807370024): 45μ * 23.19% = 10.44
hot date (5.0 @ +131.8920807370024): 65μ * 11.59% = 7.54
carbonated water lily (10.0 @ +131.8920807370024): 279μ * 23.19% = 64.7
Value of stat gain: 1,093.13μ
WHAM: Attack option chosen: skill 2005 (round 8, profit: -35.64)
Monster HP is 289 according to Mafia and 35.53173750000002 according to BatBrain (loop variable i = 5).
BatBrain: round = maxround + 1
Queued: skill 2005
Building options...
Options built! (62 actions)
Parsed round number: 4
Building options...
Options built! (63 actions)
WHAM: Evaluating the attack but not performing it took 0.45 seconds.
WHAM: Enqueuing a stun to help with the battle
Queued: skill 3004
Building options...
Options built! (62 actions)
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Knee + Shield Combo (macroid skill 2106). Estimated damage: 104.91499999999999.
Queued: skill 2106
Building options...
Options built! (62 actions)
WHAM: Successfully enqueued Knee + Shield Combo.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Toss (macroid skill 2023). Estimated damage: 13.0.
Queued: skill 2023
Building options...
Options built! (62 actions)
WHAM: Successfully enqueued Toss.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Toss (macroid skill 2023). Estimated damage: 13.0.
Queued: skill 2023
Building options...
Options built! (62 actions)
WHAM: Successfully enqueued Toss.
WHAM: We can't Saucesplash.
true, false, false, true, false
WHAM: Enqueueing Lunging Thrust-Smack (macroid skill 1005). Estimated damage: 122.5532625.
BatBrain: round = maxround + 1
Queued: skill 1005
Building options...
Options built! (62 actions)
WHAM: Successfully enqueued Lunging Thrust-Smack.
WHAM: We can't Saucesplash.
true, false, false, true, true
WHAM: Enqueueing Shieldbutt (macroid skill 2005). Estimated damage: 34.53173750000002.
BatBrain: round = maxround + 1
Queued: skill 2005
Building options...
Options built! (62 actions)
WHAM: Successfully enqueued Shieldbutt.
WHAM: We are going to 6-shot with Entangling Noodles, Knee + Shield Combo, Toss, Toss, Lunging Thrust-Smack and Shieldbutt.
Constructed macro: scrollwhendone; sub batround; if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; endsub; skill 3004; call batround; skill 2106; call batround; skill 2023; call batround; skill 2023; call batround; skill 1005; call batround; skill 2005; call batround; 
Round 12: Crowther executes a macro!

[427] Oasis in the Desert
Round 12: Crowther casts ENTANGLING NOODLES!
KoLmafia thinks it is round 13 but KoL thinks it is round 5
Round 13: Crowther casts KNEE + SHIELD COMBO!
Round 14: blur takes 59 damage.
Round 14: blur takes 31 damage.
Round 14: blur takes 12 damage.
Round 14: blur drops 5 attack power.
Round 14: Crowther casts TOSS!
Round 15: blur takes 13 damage.
Round 15: Crowther casts TOSS!
Round 16: blur takes 13 damage.
Round 16: Crowther casts LUNGING THRUST-SMACK!
Round 17: blur takes 87 damage.
Round 17: Crowther casts SHIELDBUTT!
Round 18: blur takes 80 damage.
Round 18: blur takes 11 damage.
Round 18: blur drops 5 attack power.
Round 18: Crowther wins the fight!
You gain 171 Meat
You acquire an item: drum machine
You acquire an item: carbonated water lily
You gain 40 Beefiness
You gain 24 Magicalness
You gain 20 Sarcasm
Happened: skill 3004
Happened: skill 2106
Happened: skill 2023
Happened: skill 2023
Happened: skill 1005
Happened: skill 2005
Parsed round number: 0
Look! You found 1 carbonated water lily (279μ)!
Look! You found 1 drum machine (1,360μ)!
Happened: crit
WHAM: Evaluating the attack and performing it took 1.53 seconds.
WHAM: We currently think that the round number is: 31 and that the turn number is 427.
WHAM: We currently think that the round number is: 31 and that the turn number is 427.
I thought I was going to run out of turns before this problem came out. I've played over 100 turns this morning and this was only the second time WHAM refused to fight.
 
Last edited:
Well, that is one difference between 5.2 and 5.4 as well that I removed the endscombat-fix since supposedly batbrain should allow enqueueing of up to 3 actions after it thought combat had ended. If this isn't really working then we would definitely have odd consequences.

Edit: Let me just say that I hate debugging things that cannot be easily reproduced. Spent 65 turns in the area where the script crashed yesterday and nothing... *sigh*
 
Last edited:
Ok, I think I see what the problem is.
BatBrain sets round to maxround + 1 when any option is fed through to_event that ends combat. WHAM goes through all available options in attack_option() and hen the monster HP gets below the threshold where it can kill the monster it is going to be marked as endscombat and set round to maxround + 1.
This then gets plugged into:
Code:
//Reduce RNG risk for stasisy actions
        if (kill_rounds(opt.dmg) > min(min(maxround, WHAM_maxround) - round - 1,drnd)) {
            vprint("Skipping " + opt.id + " since it is too risky.", "purple", 9);
            continue;
        }

Say we have set WHAM_maxround to maxround, in that case we will have min(min(30,30) - 31 - 1,drnd) meaning 30 - 31 - 1 i.e. -2 which definitely is less than kill_rounds meaning we will skip all options as being too risky, and since we now have no valid attack options the script is going to try and delevel until we have one (which'll never happen).

I guess adding a check for endscombat = true at the top of the attack_option() function so that if the action is marked as a combat ender it is deemed ok and sent as the action to use.

version 5.5 adds that, let me know if it has any unintended side-effects such as making you dead...
 
Ok, I think I see what the problem is.
BatBrain sets round to maxround + 1 when any option is fed through to_event that ends combat. WHAM goes through all available options in attack_option() and hen the monster HP gets below the threshold where it can kill the monster it is going to be marked as endscombat and set round to maxround + 1.
This then gets plugged into:
Code:
//Reduce RNG risk for stasisy actions
        if (kill_rounds(opt.dmg) > min(min(maxround, WHAM_maxround) - round - 1,drnd)) {
            vprint("Skipping " + opt.id + " since it is too risky.", "purple", 9);
            continue;
        }

Say we have set WHAM_maxround to maxround, in that case we will have min(min(30,30) - 31 - 1,drnd) meaning 30 - 31 - 1 i.e. -2 which definitely is less than kill_rounds meaning we will skip all options as being too risky, and since we now have no valid attack options the script is going to try and delevel until we have one (which'll never happen).

I guess adding a check for endscombat = true at the top of the attack_option() function so that if the action is marked as a combat ender it is deemed ok and sent as the action to use.

version 5.5 adds that, let me know if it has any unintended side-effects such as making you dead...
I saw the -2 thing, but it took me a while to figure out how rounds got so high. I'll give it a run tomorrow.
 
I'll give it a run tomorrow.
I finished my run. No infinite loops. No refusing to fight. No tower items burned. I'm about to ascend, but I doubt that will change. One odd thing. When WHAM throws my blue balls, it always seems to combine it with another combat item, if I have any left. Even in a combat where toss is going to be used for the kill. Not an issue for me in softcore, but I don't remember that happening a few weeks ago.
 
If you have funkslinging WHAM will choose a second item to combine with it in order to get more out of the same round (if you have any), this has been the case for quite a while. I'm not sure if that's what you're seeing perhaps?
 
New version seems to have addressed my problem. In particular it is no longer aborting automation because it can't delevel when it doesn't need to delevel. Thank you.
 
If you have funkslinging WHAM will choose a second item to combine with it in order to get more out of the same round (if you have any), this has been the case for quite a while. I'm not sure if that's what you're seeing perhaps?
I guess that's it. I haven't had item usage turned on very long. I did mostly HCNP for a long time. If that's nothing new, I'll look into it and see if I have a useful suggestion.

EDIT: I agree with fronobulax. Thanks.
 
I'm getting a bit fed-up with issues due to Yellow Rays. WHAM has YR'd a few times on my behalf when I otherwise wouldn't have... Just because I have the He-Boulder out doesn't mean the FIRST Monster I see needs YR'ing.

So I'm backfarming an acoustic guitarrr because I had no more clovers and needed a stringed instrument. I go to belowdecks with my he-boulder out (I had a spare yellow ray and it was the absolute last item I needed to backfarm).

And WHAM decides to YR a grassy pirate. Ugh. Luckily I got it to drop with a fairy on the next turn anyway, but is there logic behind whether or not WHAM will YR a monster?

Code:
	You're fighting a grassy pirate
HP: 270, Atk: 290, Def: 276, Type: pirate, Insults: 7 (62.50%)
Drops: grassy cutlass (10)

	Grort swings his eyestalk around and unleashes a massive ray of yellow energy, completely disintegrating your opponent.
	You acquire an effect: Everything Looks Yellow
(duration: 150 Adventures)

You win the fight!
Your backpack speaks: "Maintenance of Camp Scout cleanliness must not be left to chance. Infectious agents, of both natural and enemy origin, threaten the individual operative, and in doing so, threaten the organization."

A little bottle falls from the pack.

	You acquire an item: CSA all-purpose soap [use]
	Grort gives you an invigorating hot rock massage.
	You gain 26 hit points.
	You gain 22 Mojo Points.
	Grort winks at you with his giant central eye.
	You gain 289 Meat
	You acquire an item: grassy cutlass [equip]
You gain 20 Strengthliness.
You gain 16 Mysteriousness.
You gain 40 Cheek.
 
I'm getting a bit fed-up with issues due to Yellow Rays. WHAM has YR'd a few times on my behalf when I otherwise wouldn't have... Just because I have the He-Boulder out doesn't mean the FIRST Monster I see needs YR'ing.

So I'm backfarming an acoustic guitarrr because I had no more clovers and needed a stringed instrument. I go to belowdecks with my he-boulder out (I had a spare yellow ray and it was the absolute last item I needed to backfarm).

And WHAM decides to YR a grassy pirate. Ugh. Luckily I got it to drop with a fairy on the next turn anyway, but is there logic behind whether or not WHAM will YR a monster?

Code:
    You're fighting a grassy pirate
HP: 270, Atk: 290, Def: 276, Type: pirate, Insults: 7 (62.50%)
Drops: grassy cutlass (10)

    Grort swings his eyestalk around and unleashes a massive ray of yellow energy, completely disintegrating your opponent.
    You acquire an effect: Everything Looks Yellow
(duration: 150 Adventures)

You win the fight!
Your backpack speaks: "Maintenance of Camp Scout cleanliness must not be left to chance. Infectious agents, of both natural and enemy origin, threaten the individual operative, and in doing so, threaten the organization."

A little bottle falls from the pack.

    You acquire an item: CSA all-purpose soap [use]
    Grort gives you an invigorating hot rock massage.
    You gain 26 hit points.
    You gain 22 Mojo Points.
    Grort winks at you with his giant central eye.
    You gain 289 Meat
    You acquire an item: grassy cutlass [equip]
You gain 20 Strengthliness.
You gain 16 Mysteriousness.
You gain 40 Cheek.

It would be more helpful with the session log output or the CLI output rather than the relay browser output since that will actually tell me what it was that used the YR. That said, WHAM has no own speical code for YR, but BatBrain and SmartStasis does, meaning that WHAM will YR any monster you have in your ftf_yellow zlib-variable.
 
It would be more helpful with the session log output or the CLI output rather than the relay browser output since that will actually tell me what it was that used the YR. That said, WHAM has no own speical code for YR, but BatBrain and SmartStasis does, meaning that WHAM will YR any monster you have in your ftf_yellow zlib-variable.

Thank you! I'll be sure to turn that off.

FYI I pulled this out of the session log.
Code:
[683] Belowdecks
Encounter: grassy pirate
Round 0: josmul123 wins initiative!
 > WHAM: Running SmartStasis
Round 1: josmul123 executes a macro!
Round 1: josmul123 tries to steal an item!
 > WHAM: Starting evaluation and performing of attack
 > WHAM: We are going to 1-shot with Point at your opponent.
Round 2: josmul123 executes a macro!
Round 2: josmul123 casts POINT AT YOUR OPPONENT!
Round 3: josmul123 wins the fight!
You acquire an item: CSA all-purpose soap
You gain 26 hit points
You gain 22 Mojo Points
You gain 289 Meat
You acquire an item: grassy cutlass
You gain 20 Strengthliness
You gain 16 Mysteriousness
You gain 40 Cheek
 
Last edited:
Thank you! I'll be sure to turn that off.

FYI I pulled this out of the session log.
Code:
[683] Belowdecks
Encounter: grassy pirate
Round 0: josmul123 wins initiative!
 > WHAM: Running SmartStasis
Round 1: josmul123 executes a macro!
Round 1: josmul123 tries to steal an item!
 > WHAM: Starting evaluation and performing of attack
 > WHAM: We are going to 1-shot with Point at your opponent.
Round 2: josmul123 executes a macro!
Round 2: josmul123 casts POINT AT YOUR OPPONENT!
Round 3: josmul123 wins the fight!
You acquire an item: CSA all-purpose soap
You gain 26 hit points
You gain 22 Mojo Points
You gain 289 Meat
You acquire an item: grassy cutlass
You gain 20 Strengthliness
You gain 16 Mysteriousness
You gain 40 Cheek

Oh... That is actually a WHAM issue since it actually used the YR to kill the monster. That should not happen and I should fix that :)
 
WHAM tried to funksling two dictionaries in the Orc Chasm. I shouldn't have been there anyway, so it saved me turns!
 
Back
Top