BatBrain -- a central nervous system for consult scripts

Just dropped a HC AoJ run (so slow) - now getting this error when trying to Consult WHAM.ash:

"Script execution aborted (java.lang.OutOfMemoryError: Java heap space): (BatBrain.ash, line 1770)"

Line 1770 is:

"string log = session_logs(1)[0]; // load today's log"
 
Last edited:
I've been updating batfactors a fair bit lately. Information for various monsters, combat items, skills, familiars, and chefstaves added. Also, we are down to just five monsters left in batfactors that have an ID of 0: all the Hard Mode Dread bosses and the Whole Kingdom. That is particularly satisfying.

Also holy crap I just added a feature to BatMan RE which has been in the back of my mind to do ever since I refactored happenings tracking -- a convenient option to submit your previous fight vs. a specific monster as a complete macro. It's a little bit awesome, you guys. Plus I feel like my implementation ended up being better than my original plan of having special macros on the right, because it integrates into the Quick Menu! Usually the end result doesn't quite match my imagination. What a nice feeling.

That is all.
 
This error appeared in my log:

BatBrain unable to parse log entry: plays Garin's Harp and uses the DNA extraction syringe
That's happening because you tried to use Combat Item #2 without specifying #1. That works, and is logged by KoLmafia in that way. However, BatBrain doesn't understand that "Garin's Harp" isn't a KoL item. Not sure how best to fix it: BatBrain-side or KoLmafia-side.
 
"Plays Garin's Harp" is holatuwol's invention for logging a combat action it can't interpret from the URL that was submitted. I don't understand the reference - and I am sure there is one - but I am amused.
 
I thought it was also a reference to general "usefulness" of bards in (j)cRPGs. But enough about Gilbert.
 
My character in our D&D campaign started out as a bard. She went Fochlucan Lyrist - the V3.5 version of a 1st edition bard - and, aside from being the party leader, is a powerhouse in her own rights. She's the 2nd best healer, the 2nd best mage, the 2nd best rogue, a decent 2nd rank melee fighter, the best archer, and the diplomatic "face" of the party.

Bards get bad press from gamers who think that the only thing that matters in the game is raw combat power. If you actually interact with NPCs and, you know, role-play, they are outstanding characters.
 
Veracity, your post made me realize how much I miss by not playing D&D. No better time to start than now... anyway, back on topic: I bet fixing this issue is relatively simple; special case "Garin's Harp" as something not to look up in KoLmafia's database, and logging the action as unknown.
 
r85 ought to fix that fun little error by simply being a bit more flexible in where it looks for "uses the".

Bards make me think three things:

1) I find them silly by default (perhaps unexpected as I am in real life a musician). It stretches the limits of my disbelief that in a world of might and magic a person would venture into a den of powerful evil creatures wielding a LUTE. Particularly when such options exist as "cut or blast them to bits". But I have also played with people who overcame that default silliness, nay, who completely flipped it to awesomeness, and of course as Veracity pointed out bards are also good for all kinds of things besides singing.

2) "Hide behind the mound of dead bards!"

3) In my old 3.5 group we had a bard whose go-to support act in combat was Inspire Courage, a general buff to the party (that and he always tried to trip enemies with his whip, which I think he knew he would fail at but kept trying anyway, for fun). It engendered many an excited shout in tense moments as various players would tally their attacks and barely miss, only to be quietly reminded by the bard, "Inspire Courage?" The player, of course, had forgotten to include that bonus and actually hit after all. "Inspire Courage!!" the player would answer victoriously, over the slain body of his foe. That player also kept a private tally of all the times his Inspire Courage had made the difference between success and failure, and it was a rather massive number.
 
I'm getting a weird error:

Expression syntax errors for 'modifier_eval()':
Can't understand {3,4,5} (zlib.ash, line 188)

which I think is being passed to zlib by BatBrain, but I'm not sure. The script was working the day before yesterday - nothing I have done has changed.

I'm attempting to consult WHAM.ash combats in Chinatown (for the bounty) if that is important to anyone.

I've tried updating all my scripts.

Edit: stopped consulting WHAM and I now don't get the error. This is probably a WHAM bug, then?
 
Last edited:
Nay, good AssHandy, 'tis almost certainly a BatBrain error.

You didn't happen to have a clockwork crossbow equipped, did you? That particular little bit of formula only appears on the clockwork crossbow, Heroic Belch, and a handful of combat items. If you weren't wearing the bow, did you have Heroic Belch available at the time? I kind of doubt it was the combat items since those are commonly owned and no one else has reported this error.

I'd probably need to see a high-verbosity fight output (say verbosity 10) to debug further.
 
Nay, good AssHandy, 'tis almost certainly a BatBrain error.

You didn't happen to have a clockwork crossbow equipped, did you? That particular little bit of formula only appears on the clockwork crossbow, Heroic Belch, and a handful of combat items. If you weren't wearing the bow, did you have Heroic Belch available at the time? I kind of doubt it was the combat items since those are commonly owned and no one else has reported this error.

I'd probably need to see a high-verbosity fight output (say verbosity 10) to debug further.

Natch on Heroic Belch and the Clockwork Crossbow. How do I increase fight logging verbosity?
 
Code:
zlib verbosity = 10

With verbosity set to ten the combat won't run but a LOT of logging information will dump to the console.
 
I'll have to try to remember this if it comes up again. It's working now. It might have been something to do with finishing a AoSP run?
 
Hullo all. Today, I have two things to ask.

1. First, I'd like more spadey players than myself to confirm BatBrain's knowledge in an area that I'm vague on: melee skills. I'm guessing that any melee skill will

1) Damage seals when wielding a club,
2) Cause you to take damage from spiky monsters such as the cactuary, and
3) Trigger special events that happen "on a critical hit" when it crits.

That last one I'm especially unsure of. Anyway, I believe that presently BatBrain only supports these qualities for your regular attack with weapon, not any of the skills.

And which skills are melee skills, precisely? BatBrain presently assumes that all skills which use the melee damage formula are de facto melee skills:

  • Clobber
  • Club Earth
  • Thrust-Smack
  • Lunge-Smack
  • Lunging Thrust-Smack
  • Harpoon!
  • Furious Wallop
  • Northern Explosion
  • Headbutt
  • Shieldbutt
  • Kneebutt
  • Summer Siesta
  • Bashing Slam Smash
  • Turtle of Seven Tails
  • Kodiak Moment
  • Grizzly Scene
  • Bear Hug
  • Mighty Axing
  • Cleave
  • Ravenous Pounce
  • Distracting Minion

Your assistance in verifying this list would be appreciated.

2. My second request is: is there a way to identify a combat uniquely? For example, suppose we want to set a flag uniquely identifying our current combat, so that when the script next runs, it could tell whether we are in the same combat or not (really only an issue for relay scripts, but a big one).

Before anyone suggests it, using your turncount as a flag doesn't work, due to fights that don't take turns. A combination of monster plus turncount is mostly effective but can still be defeated by faxputtying, whereby you encounter multiple of the same monster on the same turncount.

I'm fairly well stymied in this regard and would appreciate suggestions. Thanks!
 
Only thing I can think of is the brute force solution of having mafia uniquely number combats (probably per session) in a variable that can be referenced by relay scripts, but that may or may not be a little much.
 
Before anyone suggests it, using your turncount as a flag doesn't work, due to fights that don't take turns. A combination of monster plus turncount is mostly effective but can still be defeated by faxputtying, whereby you encounter multiple of the same monster on the same turncount.
It also fails when during free fights from the goth kid or hipster if you get lucky enough to get the same free monster twice in a row. I assume that BRICKO monsters could be trouble too, but I've not tested that.
 
Back
Top