BatBrain -- a central nervous system for consult scripts

BigVinnie

New member
I'm back with a new ascension, and the error in my combat scripts has returned:
Code:
[15] The "Fun" House
Encounter: lemon-in-the-box
Round 0: BigVinnie wins initiative!
Round 1: BigVinnie executes a macro!
Loading batfactors...
...batfactors loaded (2,419 factors in 16 categories).
1 HP costs 9μ. ( 83 / 83 )
1 MP costs 9μ. ( 21 / 104 )
WHAM: We currently think that the round number is: 0 and that the turn number is 14.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for lemon-in-the-box.
WHAM: No need to do anything with lemon-in-the-box.
WHAM: Setting up variables via BatBrain
Setting monster to lemon-in-the-box...
Unknown value for tradeable item: box
Unknown value for tradeable item: box
box (20.0 @ +170.94): 1,000μ * 54.19% = 541.87
lemon (50.0 @ +170.94): 35μ * 100% = 35
Value of stat gain: 350.34μ
Factoring in Smokin': 7 damage, retal
Events created: Smokin'
Events created: Gelatinous Cubeling
Base round: 0 damage, 0 player damage, 0 meat
ATT: 27 (6% × 0.43, death in 83)
DEF: 25 (95.45% × 32.9 (3) (10) (20), win in 1)
HP: 22, Value: 927.22 μ, RES: 0.04 (0.04) (0.04) (0.04) (0.04) (0.04), Happenings: 0, ID: 109
Parsed round number: 1 (real: 2)
Building options...
Evaluating '7.25'...
Evaluating '3.375'...
Events created: attack, (blank)
Events created: use 232, use 829
Evaluating '19.0/5+25'...
Evaluating '1.2*(48+0.5*40.0+10.0+7.5)'...
Evaluating '2*1.2*min(50,22+0.2*40.0+10.0+skill(4010)*min(10,L)+0.0)'...
Evaluating '-0.03*27.0'...
Evaluating '-0.03*25.0'...
Evaluating 'skill(4030)'...
Evaluating '16.5'...
Evaluating '2+0.0+I'...
Evaluating '-(3+I)'...
Evaluating '-(3+I)'...
Evaluating '7+0.0+(4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '9+0.0+(6*I)'...
Evaluating '-(7+6*I)'...
Evaluating '-(7+6*I)'...
Events created: skill 19, skill 2022, skill 3004, skill 3007, skill 4005, skill 4034, skill 5021, skill 5019, skill 5003, skill 5005, skill 5008, runaway; repeat
Events created: Gelatinous Cubeling
Base round: 0 damage, 0 player damage, 0 meat
Options built! (15 actions)
WHAM: We currently think that the round number is: 2 and that the turn number is 14.
WHAM: Current MP = 21 out of 104.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 83 out of 83.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a lemon-in-the-box. Mafia considers that this monster has an attack of 27 or 27 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 25 or 25 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 22 or 22 when given a monster name.
WHAM: Your current ML-adjustment is: 10.
WHAM: You have muscle = 14, mysticality = 40, and moxie = 34
WHAM: Monster HP is 22.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: Currently checking none which has a reported damage of 22.0 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 18.327272727272728 (stench), 2.749090909090909 (spooky), 9.163636363636364 (sleazy) and 30.15065498241078 (physical).
WHAM: Currently checking Suckerpunch which has a reported damage of 1.0 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 1.0 (physical).
WHAM: Currently checking Disco Dance II: Electric Boogaloo which has a reported damage of 8.64 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 8.64 (physical).
WHAM: Currently checking Saucestorm which has a reported damage of 22.0 and is ok.
WHAM: Raw damage is estimated at 46.08 (cold), 46.08 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 0.0 (physical).
WHAM: Currently checking Disco Dance of Doom which has a reported damage of 6.72 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 6.72 (physical).
WHAM: Currently checking Stuffed Mortar Shell which has a reported damage of 22.0 and is ok.
WHAM: Raw damage is estimated at 16.415999999999997 (cold), 16.415999999999997 (hot), 16.415999999999997 (stench), 16.415999999999997 (spooky), 16.415999999999997 (sleazy) and 16.415999999999997 (physical).
skill 19 is not OK since it is marked as a custom action.
WHAM: Currently checking Transcendent Olfaction which has a reported damage of 0.0 and is not ok.
skill 19 is not OK since it is marked as a custom action.
WHAM: Currently checking Disco Eye-Poke which has a reported damage of 1.92 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 1.92 (physical).
WHAM: Currently checking Tango of Terror which has a reported damage of 15.84 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 15.84 (spooky), 0.0 (sleazy) and 0.0 (physical).
WHAM: Currently checking Spectral Snapper which has a reported damage of 22.0 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 27.648 (spooky), 0.0 (sleazy) and 0.0 (physical).
WHAM: Currently checking Entangling Noodles which has a reported damage of 0.0 and is ok.
WHAM: Currently checking anti-anti-antidote which has a reported damage of 0.0 and is not ok.
WHAM: Currently checking Doc Galaktik's Ailment Ointment which has a reported damage of 0.0 and is not ok.
WHAM: Currently checking Curse of Weaksauce which has a reported damage of 0.0 and is ok.
runaway; repeat is not OK since it is marked as a custom action.
WHAM: Currently checking none which has a reported damage of 0.0 and is not ok.
runaway; repeat is not OK since it is marked as a custom action.
attack does hurt the monster for 22.0 and is ok.
WHAM: We currently think that the round number is: 2 and that the turn number is 14.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 2 and that the turn number is 14.
attack does hurt the monster for 22.0 and is ok.
WHAM: No need to stun this monster
Monster HP is 22 according to Mafia and 22.0 according to BatBrain.
WHAM: We estimate the round number to currently be 2 (loop variable 0)
Monster HP is 22 according to Mafia and 22.0 according to BatBrain (loop variable i = 0).
Evaluating '22.0'...
Evaluating '1.0'...
Queued round 2: attack
Building options...
Evaluating '7.25'...
Evaluating '3.375'...
Events created: attack, (blank)
Events created: use 232, use 829
Evaluating '14.0/5+25'...
Evaluating '1.2*(48+0.5*40.0+10.0+7.5)'...
Evaluating '2*1.2*min(50,22+0.2*40.0+10.0+skill(4010)*min(10,L)+0.0)'...
Evaluating '-0.03*27.0'...
Evaluating '-0.03*25.0'...
Evaluating 'skill(4030)'...
Evaluating '16.5'...
Evaluating '2+0.0+I'...
Evaluating '-(3+I)'...
Evaluating '-(3+I)'...
Evaluating '7+0.0+(4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '9+0.0+(6*I)'...
Evaluating '-(7+6*I)'...
Evaluating '-(7+6*I)'...
Events created: skill 19, skill 2022, skill 3004, skill 3007, skill 4005, skill 4034, skill 5021, skill 5019, skill 5003, skill 5005, skill 5008, runaway; repeat
Events created: Gelatinous Cubeling
Base round: 0 damage, 0 player damage, 0 meat
Options built! (15 actions)
Parsed round number: 1 (real: 2)
Building options...
Evaluating '7.25'...
Evaluating '3.375'...
Events created: attack, (blank)
Events created: use 232, use 829
Evaluating '14.0/5+25'...
Evaluating '1.2*(48+0.5*40.0+10.0+7.5)'...
Evaluating '2*1.2*min(50,22+0.2*40.0+10.0+skill(4010)*min(10,L)+0.0)'...
Evaluating '-0.03*27.0'...
Evaluating '-0.03*25.0'...
Evaluating 'skill(4030)'...
Evaluating '16.5'...
Evaluating '2+0.0+I'...
Evaluating '-(3+I)'...
Evaluating '-(3+I)'...
Evaluating '7+0.0+(4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '9+0.0+(6*I)'...
Evaluating '-(7+6*I)'...
Evaluating '-(7+6*I)'...
Events created: skill 19, skill 2022, skill 3004, skill 3007, skill 4005, skill 4034, skill 5021, skill 5019, skill 5003, skill 5005, skill 5008, runaway; repeat
Events created: Gelatinous Cubeling
Base round: 0 damage, 0 player damage, 0 meat
Options built! (15 actions)
WHAM: Evaluating the attack but not performing it took 0.11 seconds.
WHAM: Debug printing the damage dealt by your options.

WHAM: Currently checking none which has a reported damage of 22.0 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 18.327272727272728 (stench), 2.749090909090909 (spooky), 9.163636363636364 (sleazy) and 16.405200436956232 (physical).
WHAM: Currently checking Suckerpunch which has a reported damage of 1.0 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 1.0 (physical).
WHAM: Currently checking Disco Dance II: Electric Boogaloo which has a reported damage of 8.64 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 8.64 (physical).
WHAM: Currently checking Saucestorm which has a reported damage of 22.0 and is ok.
WHAM: Raw damage is estimated at 46.08 (cold), 46.08 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 0.0 (physical).
WHAM: Currently checking Disco Dance of Doom which has a reported damage of 6.72 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 6.72 (physical).
WHAM: Currently checking Stuffed Mortar Shell which has a reported damage of 22.0 and is ok.
WHAM: Raw damage is estimated at 16.415999999999997 (cold), 16.415999999999997 (hot), 16.415999999999997 (stench), 16.415999999999997 (spooky), 16.415999999999997 (sleazy) and 16.415999999999997 (physical).
skill 19 is not OK since it is marked as a custom action.
WHAM: Currently checking Transcendent Olfaction which has a reported damage of 0.0 and is not ok.
WHAM: Currently checking Disco Eye-Poke which has a reported damage of 1.92 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 0.0 (spooky), 0.0 (sleazy) and 1.92 (physical).
WHAM: Currently checking Tango of Terror which has a reported damage of 15.84 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 15.84 (spooky), 0.0 (sleazy) and 0.0 (physical).
WHAM: Currently checking Spectral Snapper which has a reported damage of 22.0 and is ok.
WHAM: Raw damage is estimated at 0.0 (cold), 0.0 (hot), 0.0 (stench), 26.688 (spooky), 0.0 (sleazy) and 0.0 (physical).
WHAM: Currently checking Entangling Noodles which has a reported damage of 0.0 and is ok.
WHAM: Currently checking anti-anti-antidote which has a reported damage of 0.0 and is not ok.
WHAM: Currently checking Doc Galaktik's Ailment Ointment which has a reported damage of 0.0 and is not ok.
WHAM: Currently checking Curse of Weaksauce which has a reported damage of 0.0 and is ok.
runaway; repeat is not OK since it is marked as a custom action.
WHAM: Currently checking none which has a reported damage of 0.0 and is not ok.
WHAM: Attack with your weapon: 22.00 potential damage (raw damage: 46.65) and a hitchance of 95.45%.
WHAM: Saucestorm: 22.00 potential damage (raw damage: 92.16) and a hitchance of 100.00%.
WHAM: Stuffed Mortar Shell: 22.00 potential damage (raw damage: 98.50) and a hitchance of 100.00%.
WHAM: Spectral Snapper: 22.00 potential damage (raw damage: 26.69) and a hitchance of 100.00%.
WHAM: Tango of Terror: 15.84 potential damage (raw damage: 15.84) and a hitchance of 100.00%.
WHAM: Disco Dance II: Electric Boogaloo: 8.64 potential damage (raw damage: 8.64) and a hitchance of 100.00%.
WHAM: Disco Dance of Doom: 6.72 potential damage (raw damage: 6.72) and a hitchance of 100.00%.
WHAM: Disco Eye-Poke: 1.92 potential damage (raw damage: 1.92) and a hitchance of 100.00%.
WHAM: Suckerpunch: 1.00 potential damage (raw damage: 1.00) and a hitchance of 100.00%.
WHAM: Transcendent Olfaction: 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: anti-anti-antidote: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Doc Galaktik's Ailment Ointment: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Curse of Weaksauce: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.

WHAM: Evaluating the attack but not performing it took 0.14 seconds.
Round 1: BigVinnie executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Verbosity of 10 or more is set. Data files for debugging have been generated. Aborting.
You're on your own, partner. (Macro Aborted ("abort "WHAM: Verbosity of 10 or more is set. Data files for debugging have been generated. Aborting.""))

I've switched over to SimpleSmack, and it also seems to die:
Code:
Request 1 of 14 (Nemesis Cave: The Fungal Nethers) in progress...

[32] The Fungal Nethers
Encounter: angry mushroom guy
Round 0: BigVinnie wins initiative!
Round 1: Rubix dissolved some of your opponent's flesh, making it a bit weaker. Now you know what these cubes are for: making awesome skeletons.
Round 1: angry mushroom guy drops 13 attack power.
Round 1: angry mushroom guy drops 13 defense.
Round 1: BigVinnie executes a macro!
1 HP costs 9μ. ( 90 / 122 )
1 MP costs 9μ. ( 41 / 201 )
Setting monster to angry mushroom guy...
fizzing spore pod (70.0 @ +192.54): 1,325μ * 100% = 1,325
Knob mushroom (20.0 @ +192.54): 16μ * 58.51% = 9.36
Value of stat gain: 384.31μ
Monster information loaded from cache.
Events created: Gelatinous Cubeling
Base round: 0 damage, 0 player damage, 0 meat
ATT: 28 (6% × 2.7, death in 90)
DEF: 23 (95.45% × 12.9 (10) (20), win in 1)
HP: 29, Value: 1,718.67 μ, RES: 0.04 (0.04) (0.04) (0.04) (0.04) (0.04), Happenings: 0, ID: 1800
Parsed round number: 1 (real: 2)
Building options...
Evaluating '7.25'...
Evaluating '3.375'...
Events created: attack, (blank)
Evaluating '0.6'...
Evaluating '0.5'...
Evaluating '2.5'...
Events created: use 27, use 232, use 452, use 747, use 829, use 8428
Evaluating '325.5'...
Evaluating '19.0/5+25'...
Evaluating '1.2*(48+(0.5*70.0)+0.0+0.0)'...
Evaluating '1.2*(48+0.5*70.0+0.0+7.5)'...
Evaluating '2*1.2*min(50,22+0.2*70.0+0.0+skill(4010)*min(10,L)+0.0)'...
Evaluating '-0.03*28.0'...
Evaluating '-0.03*23.0'...
Evaluating 'skill(4030)'...
Evaluating '16.5'...
Evaluating '2+0.0+I'...
Evaluating '-(3+I)'...
Evaluating '-(3+I)'...
Evaluating '7+0.0+(4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '9+0.0+(6*I)'...
Evaluating '-(7+6*I)'...
Evaluating '-(7+6*I)'...
Evaluating ''...
Expression syntax errors for 'modifier_eval()':
Unexpected end of expr (zlib.ash, line 201)
  at eval (zlib.ash:201)
  at to_event (BatBrain.ash:291)
  at add_skill (BatBrain.ash:1462)
  at build_skillz (BatBrain.ash:1499)
  at build_options (BatBrain.ash:1538)
  at act (BatBrain.ash:2274)
  at main (SimpleSmack.ash:22)
1 HP costs 9μ. ( 90 / 122 )
1 MP costs 9μ. ( 41 / 201 )
Setting monster to angry mushroom guy...
fizzing spore pod (70.0 @ +192.54): 1,325μ * 100% = 1,325
Knob mushroom (20.0 @ +192.54): 16μ * 58.51% = 9.36
Value of stat gain: 384.31μ
Monster information loaded from cache.
Events created: Gelatinous Cubeling
Base round: 0 damage, 0 player damage, 0 meat
ATT: 28 (6% × 2.7, death in 90)
DEF: 23 (95.45% × 12.9 (10) (20), win in 1)
HP: 29, Value: 1,718.67 μ, RES: 0.04 (0.04) (0.04) (0.04) (0.04) (0.04), Happenings: 0, ID: 1800
Parsed round number: 1 (real: 2)
Building options...
Evaluating '7.25'...
Evaluating '3.375'...
Events created: attack, (blank)
Evaluating '0.6'...
Evaluating '0.5'...
Evaluating '2.5'...
Events created: use 27, use 232, use 452, use 747, use 829, use 8428
Evaluating '325.5'...
Evaluating '19.0/5+25'...
Evaluating '1.2*(48+(0.5*70.0)+0.0+0.0)'...
Evaluating '1.2*(48+0.5*70.0+0.0+7.5)'...
Evaluating '2*1.2*min(50,22+0.2*70.0+0.0+skill(4010)*min(10,L)+0.0)'...
Evaluating '-0.03*28.0'...
Evaluating '-0.03*23.0'...
Evaluating 'skill(4030)'...
Evaluating '16.5'...
Evaluating '2+0.0+I'...
Evaluating '-(3+I)'...
Evaluating '-(3+I)'...
Evaluating '7+0.0+(4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '-(5+4*I)'...
Evaluating '9+0.0+(6*I)'...
Evaluating '-(7+6*I)'...
Evaluating '-(7+6*I)'...
Evaluating ''...
Expression syntax errors for 'modifier_eval()':
Unexpected end of expr (zlib.ash, line 201)
  at eval (zlib.ash:201)
  at to_event (BatBrain.ash:291)
  at add_skill (BatBrain.ash:1462)
  at build_skillz (BatBrain.ash:1499)
  at build_options (BatBrain.ash:1538)
  at act (BatBrain.ash:2274)
  at main (SimpleSmack.ash:22)
You're on your own, partner.
Any ideas?
 

zarqon

Well-known member
Ok, that gives us a clue! The last skill BatBrain was evaluating before the error was Disco Dance II: Electric Boogaloo.

Since they are common and have not caused any such errors in the preceding years, I'm guessing you don't have any of the class skills which are underneath that (please confirm!):

batfactors said:
skill 5012 Disco Face Stab {15,16.5,18}+bonusdb+(4*I)+{0.1,0.15,0.2}*bestknife*1.25 0 once, att -9, def -9
skill 5019 Tango of Terror {15,16.5,18} spooky 0 att -8, def -8
skill 5021 Suckerpunch 1 0 att -1, def -1
skill 5023 Stealth Mistletoe 0 0 once, quick
skill 5033 Knife in the Dark {15,16.5,18}+bonusdb+(4*I)+{0.1,0.15,0.2}*bestknife*1.25*2 none, spooky 0 once, att -9, def -9
skill 5035 Disco Shank 0.3*buffedmox*I+{0.1,0.15,0.2}*bestknife*1.25 0 once
skill 5036 Disco Dance 3: Back in the Habit 26+(9*I) 0 once, att -(14+9*I), def -(14+9*I)
skill 5037 Disco Inferno 5*I^2+25*I+20 hot 0 once, aoe 3
skill 5040 Silent Knife max(0.15*bestknife*2,17) 0 once, stun, !! damage formula unspaded
skill 6025 Sing 2.5 0
skill 6029 Dissonant Riff 1.5+mainhand(accordion)*3.5 0 att -2*(mainhand(accordion)+1), def -2*(mainhand(accordion)+1)
skill 6030 Cadenza 0 0 once
skill 6032 Accordion Bash 0 0 once, stun mainhand(accordion)*3+max(0,songduration-10)/3
skill 6034 Concerto de los Muertos (mainhand(accordion)+1)*10 spooky 0 once, !! ongoing damage and range unspaded
skill 6037 Bawdy Refrain 1+(0.25+mainhand(accordion)*0.1)*buffedmox sleaze 0
skill 6040 Cone of Zydeco 1+mainhand(accordion)*0.4*buffedmox 0 aoe 5

which means the error probably happened somewhere in the 7000 bloc (skills granted by equipment). What items did you have equipped when the error happened?
 

BigVinnie

New member
Ok, that gives us a clue! The last skill BatBrain was evaluating before the error was Disco Dance II: Electric Boogaloo.

Since they are common and have not caused any such errors in the preceding years, I'm guessing you don't have any of the class skills which are underneath that (please confirm!):



which means the error probably happened somewhere in the 7000 bloc (skills granted by equipment). What items did you have equipped when the error happened?
I have a bunch of permed DB skills, but they’re all non-combats. Dance II was my highest-level DB combat skill at the time.

My loadout was:
  • Daylight Shavings Helmet
  • Paraffin Poncho
  • Coat of Paint
  • Curdflinger
  • Familiar Scrapbook
  • Loofah Lederhosen
  • Combat Lover’s Locket
  • Loofah Legwarmers
  • Astral Bracer
The Poncho, Scrapbook, and Loofah stuff all give combat skills. Does that help?
 

zarqon

Well-known member
Aha! Whoever added the Loofah skills to batfactors wasn't paying attention and, like a chump, forgot to put some of the values after the keywords rather than before. That person should perhaps get more sleep and be more focused when editing batfactors.

Anyway, that same person has now uploaded a version of batfactors with those things in the correct order. Make sure BatBrain grabs you the latest batfactors and try again. I'm pretty sure we've solved it! Thanks for your patience.
 

BigVinnie

New member
Aha! Whoever added the Loofah skills to batfactors wasn't paying attention and, like a chump, forgot to put some of the values after the keywords rather than before. That person should perhaps get more sleep and be more focused when editing batfactors.

Anyway, that same person has now uploaded a version of batfactors with those things in the correct order. Make sure BatBrain grabs you the latest batfactors and try again. I'm pretty sure we've solved it! Thanks for your patience.
Sweet, I am so glad that you found it!
 

fronobulax

Developer
Staff member
I'll put this here because it didn't happen yesterday.

Running VMF with SimpleSmack handling combat. VMF stops because SS thinks I am on my own.

[1798714] Barf Mountain
Encounter: garbage tourist
Round 0: fronobulax wins initiative!
You won during stasis!
You won during stasis!
You're on your own, partner.
Click here to continue in the relay browser.

Relay browser at this point does not have option to enable BatManRE and running the combat script does nothing. I attack my way out of it.

Manually adventuring sometimes gives me a message about BatBrain being unable to parse something but it doesn't tell me what.

When it happened today it seemed to always be a Garbage Tourist but it isn't happening for every Garbage Tourist.

Never ascended Pastamancer although I suspect that is not relavent.

I have seen the unable to parse messages before but not recently.
 

adeyke

Member
BatBrain will need handling of the new dino modifiers. I've preliminarily put this in my local copy:
Code:
      case "pterodactyl": setmatt("dodge","1"); break;
      case "dilophosaur": setmatt("autohit",""); break;
      case "velociraptor": setmatt("maxround","1"); break;
      case "archelon": setmatt("spellres","1"); break;
 

Magus_Prime

Well-known member
For anyone looking to do the same I added the above at line 1852 in the section that deals with handing OCRS modifiers.

Every "normal" dinosaur in the path seems to generate "This monster is stun immune! That information should be added to batfactors." when encountered by BatBrain.

Edit: FWIW I think that the "flatusaurus" deserves some special handling too but I'm not sure what. If SmartStasis kicks in, or BatBrain isn't aggressive enough the flatusaurus attack can easily overwhelm a character.

The velociraptor requires a round one kill and that isn't happening.
The pterodactyl fight frequently hits max round out because BatBrain isn't choosing a strategy that can hit it.
The archelon is being attacked with spells by BatBrain.

I guess it's time to dig into BatBrain and Batfactors.

Edit: The following helped with the velociraptor
case "velociraptor": setmatt("maxround","1"); setmatt("nostun",""); setmatt("nostagger",""); break;
Still working on better handling for the archelon and pterodactyl.

Archelon - only physical attacks work
Pterodactyl - only attack spells work

'nother edit: the change for velociraptor only works sometimes.
 
Last edited:
Running the fishbot script today I am getting this with batbrain

(BatBrain.ash, line 2279)
Script execution aborted (java.lang.NullPointerException: Cannot invoke "net.sourceforge.kolmafia.textui.parsetree.Value.dump(java.io.PrintStream, String, boolean)" because "value" is null): (BatBrain.ash, line 2279)
(BatBrain.ash, line 2279)
Script execution aborted (java.lang.NullPointerException: Cannot invoke "net.sourceforge.kolmafia.textui.parsetree.Value.dump(java.io.PrintStream, String, boolean)" because "value" is null): (BatBrain.ash, line 2279)
You're on your own, partner.
 

heeheehee

Developer
Staff member
Line 2279 of BatBrain.ash, for reference:
Code:
// for context
boolean[monster, int, string, int] happenings;  // m, lastCombatStarted, action id, round => playeraction
...
map_to_file(happenings,"BatMan_happenings_"+replace_string(my_name()," ","_")+".txt");   // do this here (once) rather than in set_happened()

Indeed, RuntimeLibrary#map_to_file contains:
Code:
map_variable.dump(writer, "", compact);
which seems consistent with the reported errors. I'm curious what could cause the variable to actually be null (given that it's just a cast of an existing variable, and an invalid cast throws an InvalidCastException).

The changes in Value.java seem like the only no-ops from a cursory read, but I don't understand how they could have caused this.

edit: non-no-ops. ops?
 
Last edited:

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
I clearly introduced the issue somehow but I also can't see how - and I can't replicate the issue consistently, though I've also experienced it
 

zarqon

Well-known member
Many of my scripts import BatBrain so the latest 20 builds or so are basically unusable for me. I first noticed this when the auto-updater grabbed 26744, hadn't a clue how to fix it and figured it was a wrinkle that would get de-wrinkled in a few days (either via reversion or some other fix). I reverted to 26376 (the previous build I'd downloaded) and continued automating for a few days (I'm currently hosting some out-of-town guests and don't have time to do more than just run some daily routine scripts).

I fear this situation will drive away whatever remaining users there are of my script. Is there anything I can do to help debug this in a few days when my guests leave? I don't even understand what the error message is saying.
 

Magus_Prime

Well-known member
My hopes were the same as yours. A quick fix or a reversion. I think that there are quite a few people using BatBrain in one way or another.
 

Ryo_Sangnoir

Developer
Staff member
I had a brief look at this. Like everybody else, I can't see anything that could have caused this, which makes me think it might be a race condition: some code runs to set "happenings" on import, and maybe the control flow moves on while the value is getting set? Because if you don't try to set it at all, it's an empty array instead of null.

We (on Mafia) could try checking the value for null and assuming an empty array if we find it is.

On the ASH side, can you catch the Mafia error? One problem is that if we can't reproduce this reliably, it's harder to find a fix.

Edit: one other thing to try: could you move the declaration of "boolean[monster, int, string, int] happenings;" to the top of the file?
 
Last edited:

heeheehee

Developer
Staff member
I suggest just reverting the problematic commit until we can figure out what broke / how.

edit: that said, looks like we'd also need to revert r26745, and/or manually fix that merge conflict.
 
Top