BatBrain -- a central nervous system for consult scripts

With r15734 and the just updated version of BatBrain the problem is still visible. Factroid isn't recognizing that I have all three Monster Manuel factroids for Cbzzter. Should I move this discussion to the BatMan thread?
 
I'm not a proper spade, but these settings will allow SS and WHAM to work together and actually kill the wall of meat. First, BatBrain needs to know that the Wall of Meat is evil and bypasses your defenses. I experimented with a few things, but ultimately found that the easiest was giving an 8 round target-window, by putting
Code:
      case $monster[wall of meat]:
between the landscaper and Vanya, like so:
Code:
      case $monster[the landscaper]: return to_spread(my_maxhp()*0.49);
      case $monster[wall of meat]:
      case $monster[vanya's creature]: return to_spread(my_maxhp()*0.125);
Additionally, batfactors needs to know that the wall of meat WILL hit you. I've done that with the following:
Code:
monster	215	wall of meat	0	0	autohit
It's not in order, but that is the next open number, so...

It may not be QUITE right, but at least you shouldn't have SS try to stasis the meat to help your Cocoabo anymore. :)
 
any cure for this error?

Code:
Function 'galaktik_cures_discounted( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (BatBrain.ash, line 526)
 
In both places where that error occursyou can replace to_int(galaktik_cures_discounted()) with the number 0. The inaccuracy should then be ingored. (Changes to Doc Galaktik are such that it will be wrong without a whole rework of the relevant function in BatBrain, but it is automatically corrected if you also use Universal Recovery.)
 
Last edited:
r67 and r68 fix BatBrain to work post-Galaktik-revamp and add the wall of meat's unique damage formula, respectively.

EDIT: Just added all the missing Bandersnatch skill actions to batfactors. Also added the wall of meat's autohit ability since it looks like Theraze didn't get to uploading that fix yet.

P.S. Theraze, here's my "sortmonsters" alias!
Code:
sortmonsters => ashq import "BatBrain.ash"; file_to_map("batfactors.txt",factors); sort factors["monster"] by value.ufname; map_to_file(factors,"batfactors.txt"); print("Monsters sorted!");
 
Last edited:
Nifty. Yes, I didn't want to add in something to batfactors which I couldn't validate 100 percent. While the auto-hit did seem correct, it appears I slightly underestimated the WoM's evil power. :) Since I'd put it at .125 rather than .15.

Anyways, thanks for getting that in! Should make people who auto-tower-fight have an easier time of it.

One more automation-related thing, while I think about it. While BatBrain happily suggested the beehive for the WoS, I don't think it actually told me to use the electric boning knife for the WoB. WHAM kept aborting and so I'd just use_item electric boning knife to throw the knife and finish the fight. While BCA manually throws the OHKO items, it'd probably be useful to fix that up for BatMan and WHAM users.
 
While BatBrain happily suggested the beehive for the WoS, I don't think it actually told me to use the electric boning knife for the WoB.

I've got Garbage Nova now so as far as I am concerned that boning knife can go bone itself. That would be good though for people who are less karmapocalyptic than myself.
 
I've also noted the boning knife not showing up as a custom action when fighting the wall of bones in the relay browser. Also, looks like this wall also has a custom damage formula, and we need to tell BatBrain about its always hitting and being a group of 100. I just updated batfactors with those keywords.

I'll investigate the boning knife issue but in the meantime we have improved support for people who wish to knifelessly bone the wall.
 
Oh man. Blue text on combat items.

Anyone able to help comb through the items and confirm the formulas in batfactors? If not, I'll eventually get around to it I'm sure. Like I eventually got around to Zombiecore and warbear support. :P
 
Oooh. It is helpful.

EDIT: It only goes up to item number 3150 though. So it's helpful... to a point.
 
Last edited:
Today I had time to finally add support for Fun-Guy Playmates. All turn-offs are now completely supported. r70.

And shortly after heeheehee's pastebin post, I went through and range-checked all the items listed there (up to 3150). Made quite a few corrections, actually. However you scraped that all into one place, heeheehee, it made the job much easier than otherwise and I'd appreciate seeing the rest of the items done that way too if possible. Thanks.
 
Thanks heeheehee! Range-corrected batfactors has now been uploaded. There were quite a lot of things that got tweaked.

I'm realizing there are quite a few items now that have a stronger effect vs. a specific phylum. Thinking about some kind of keyword that would enable us to include that in the formulas rather than needing custom handling in the script.
 
Hello!
BatBrain appears to have stopped working for me. I have the latest build of Mafia and have all of my SVN scripts updated (I'm using WHAM as my combat script), but when I attempt to automatically adventure, I get the following output with Zlib verbosity set to the max:
[4227] Barf Mountain
Encounter: angry tourist
Round 0: CrankyOne wins initiative!
You lose 1 hit point
1 HP costs 6.684μ. ( 827 / 925 )
1 MP costs 2.985μ. ( 404 / 1994 )
WHAM: We currently think that the round number is: 0 and that the turn number is 4226.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for angry tourist.
WHAM: No need to do anything with angry tourist.
WHAM: Setting up variables via BatBrain
Setting monster to angry tourist...
Value of stat gain: 338.33μ
Evaluating '3'...
Factoring in Jalapeño Saucesphere: 3 damage, retal
Evaluating '3'...
Evaluating '0'...
Evaluating '6'...
Factoring in Scarysauce: (6) damage, retal
Evaluating '6'...
Evaluating '0'...
Events created: Jalapeño Saucesphere, Scarysauce
Base round: damage, player damage, 0 meat
Evaluating '0'...
ATT: 141 (6% × (2.25), death in 827)
DEF: 141 (100% × 787.64 (132), win in 1)
HP: 141, Value: 338.33 μ, RES: 0.16 (0.16) (-0.67) (0.16) (-0.67) (1), Happenings: 0
Parsed round number: 0 (real: 1)
Building options...
Evaluating '0'...
Evaluating '0'...
Evaluating '20.0'...
Evaluating '15.0'...
Evaluating '0'...
Events created: attack, (blank)
Evaluating '1'...
Evaluating '0'...
Evaluating '0'...
Evaluating '0'...
---------snipped a bunch of "Evaluating" lines"------------
Evaluating '-(300+zone(sea)*(925.0-827.0))'...
Evaluating '45'...
Evaluating '0'...
Evaluating '0'...
Evaluating '0'...
Evaluating '141.0*0.15'...
Evaluating '0'...
Evaluating '-141.0*0.1 def -141.0*0.1'...
Expression syntax errors for 'modifier_eval()':
Expected end, found def -141.0*0.1 (zlib.ash, line 189)
You're on your own, partner.

Is there any way I can diagnose what's causing this?

coandco
 
That looks like the slime stack bug just discovered and diagnosed yesterday. LINK HERE.

Unfortunately nobody thought to fix the problem. Sigh. I've just gone and edited batfactors with a new comma as suggested by Crowther. To apply the fix to your system all you have to do is to go to the /data directory and delete /data/zversions.txt to cause BatBrain to download a new copy of that file the next time you automate a combat.

If you want to be more precise in your fix, only one line actually needs to be deleted from /data/zversions.txt so you can edit it to delete the line starting with map_batfactors.txt
 
Last edited:
Back
Top