BatBrain -- a central nervous system for consult scripts

I believe something is wrong with Frigidalmatian. I get an error when this is running. Maybe this is a batfactors issue and/or a parsing issue.
I am posting here to remind myself to look into it (when I finish my run).

Edit: with this effect active, I get:
Expression syntax errors for 'modifier_eval()':
Can't understand buffedmys)+spelldmg+elembonus)
Expected ), found
Expected ), found (zlib.ash, line 186)


I do not know where this is going wrong.
 
Last edited:
I found a bug with moveable feast that led me to a problem which causes the same bug as fridigalmation, but in a different part of the code. It's probably the same problem though.

Frankly, BatBrain is broke with regards to $elements[]. Not long ago there was a change to KoLmafia that added slime and supercold to $elements[] and BatBrain was never updated to account for this.

I recommend doing a global search and replace on $elements[]
replace it with: $elements[hot, cold, sleaze, spooky, stench]

There are a lot of places where it can cause trouble and I don't think it is helpful anywhere. Please confirm that this fixes your frigidalmation problem also.
 
Ah, that's probably why sometimes I get an error about supercold. I could never figure out what was going on and it was so rare I didn't worry too much.
 
There are a lot of places where it can cause trouble and I don't think it is helpful anywhere. Please confirm that this fixes your frigidalmation problem also.

Sadly, this does not fix my problem with frigidalmation.
 
Ah, that's probably why sometimes I get an error about supercold. I could never figure out what was going on and it was so rare I didn't worry too much.

Yep. That's the reason. I was getting zlib errors from eval() when I equipped the moveable feast which does "perfect" damage because it didn't know how to handle supercold.


Sadly, this does not fix my problem with frigidalmation.

Sad. :( I thought that there was a possibility it would since spell_elem_bonus() iterates over $elements[]. I'll have to investigate more closely when I'm in aftercore.
 
I'm having trouble fighting Dr. Weird monsters on a high level character. BatBrain is doing stuff like "setmatt("aura",rnum(my_maxhp()*0.5)+" spooky");", but those values later get passed to eval(). The problem is, rnum adds "," to numbers over 1000 and eval() doesn't handle them. My work around was to change zlib to not add "," in rnum(), but obviously that's not the right solution. I'm not sure why BatBrain is storing attributes in human readable format at all.
 
Another Dr Weird problem that I can't find the source of. If I'm fighting a monster with exactly two elephant parts, in BatMan RE, they are listed as "cold: 1, sleaze: 1, spooky: 1", but using the recommended Love Song of Smoldering Passion shows them to be 100% resistant to hot as expected. Monsters with many elephants correct show as resisting all five elements 100%. I just found one with three elephats that was listed as "cold: 1, hot: 0.5, sleaze: 1, spooky: 1, stench: 0.5". I'm running -200 ML if that matters.
 
Last edited:
Here's an error I'm getting in aftercore
This has been here for a while but just remembered today when looking for a different error in run.
Pretty sure the error is caused by the "do rock-paper" message.
Code:
1 HP costs 0.994μ. ( 302 / 531 )
1     MP costs 4.348μ. ( 13 / 382 )
Setting     monster to serialbus...
bus pass (25.0 @     +157.99): 975μ * 64.5% = 628.84
Value of stat gain: 252.08μ
Loading     batfactors...
Processing batfactors...
Factoring     in Jalapeño Saucesphere: 3 damage, retal
Factoring in Scarysauce: (6)     damage, retal
Events created: Jalapeño Saucesphere, Scarysauce
Events     created: companion Grimstone Golem, companion Grim Brother
Base     round: 0 damage, 0 player damage, 1,039.5 meat
ATT: 70 (6% × (3.67),     death in 302)
DEF: 57 (95.45% × 389.74 (5),     win in 1)
HP: 70, Value: 981.41 μ,     RES: 0 (1) (-1)     (-1)
Happened:     pickpocket
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     use 185
Happened: use 185
Happened:     attack
Parsed round number: 0
You     snatched a bus pass (975μ)!
Value of stat gain: 252.08μ
Revised     monster value: 352.57
Happened: stolen
You     snatched a grim fairy tale (3,300μ)!
Value of stat gain:     252.08μ
Revised monster value: 352.57
Happened:     stolen
You snatched a grimstone mask     (3,000μ)!
Value of stat gain: 252.08μ
Revised     monster value: 352.57
Happened: stolen
Invalid     pattern syntax (BatBrain.ash, line 1727)
 
I'm getting an unexpected error in aftercore and didn't know whether to post in this thread or the zlib thread:
Code:
Expression syntax errors for 'modifier_eval()':
Expected     end, found supercold (zlib.ash, line 186)
You're     on your own, partner.

I'm adventuring in the Enormous Greater-Than Sign and I'm getting the error every combat. I never opened The Dungeons of Doom in run.
Outside of the area I don't receive the error and once The Dungeons of Doom are open the error goes away.

Something in how BatBrain is handling supercold seems to be throwing off zlib in this area.

This is with r14946 and current SVN versions of BatBrain, SmartStasis, zlib, and WHAM.

Any ideas?
 
Last edited:
Not long ago there was a change to KoLmafia that added slime and supercold to $elements[] and BatBrain was never updated to account for this.

I recommend doing a global search and replace on $elements[]
replace it with: $elements[hot, cold, sleaze, spooky, stench]
 
It isn't connected to the adventuring location. It is probably because you equipped some gear that has potential of doing any element of damage, like the moveable feast and BatBrain is trying to compare it to the monsters in the zone.
 
More monster properties got leaked in the current twitch stream; this is a placeholder reminder for me to go back afterwards and look about 26 minutes in.

edit: maybe something else around 32 minutes. A lot of these are getting leaked :P
 
Last edited:
Help?

Code:
Unexpected error, debug log printed.
Script execution aborted (net.sourceforge.kolmafia.textui.parsetree.Value cannot be cast to net.sourceforge.kolmafia.textui.parsetree.AggregateValue): (BatBrain.ash, line 544)
You're on your own, partner.
View attachment DEBUG_20141124.txt
 
Last edited:
Back
Top