BatBrain -- a central nervous system for consult scripts

Appears from the Wiki and also WHAM under-killing him that Peanut does indeed have 25% elemental resistance. My workaround was forcing weapon of the pastalord rather than letting WHAM handle him, but... should probably get BatBrain updated as well. :)

Edit: Since the blocks appear to be ascending, and he's a rare exception with not having additional physical resistance, I put him near the top, like so:
Code:
      case $monster[BRICKO vacuum cleaner]: foreach el in $elements[] mres[el] = 0.1; mres[$element[none]] = 0.1; break;
      case $monster[peanut]: foreach el in $elements[] mres[el] = 0.25; break;
      case $monster[gorgolok, the infernal seal (volcanic cave)]:
 
Last edited:
Error with mosquito (and possibly other, equally relevant, familiars)

Recently I decided to start doing "boring" 100% familiar runs. And what could be more boring than starting with familiar #1, the trusty Mosquito?

Doing that, I found out that WHAM would always abort with an error:

Expression syntax errors for 'modifier_eval()':
Can't understand dmg (zlib.ash, line 162)
You're on your own, partner.

I eventually traced this back to the famevent() function in BatBrain passing "-dmg" to zlib's eval() function. After that, it was easy to locate the offending "-dmg" in the Mosquito section of batfactors.txt

I have not dug deeper than that, and just replaced that -dmg with a 0, which made it work again (probably ignoring the huge contribution my mosquito makes to killing the monster). I have found similar "-dmg" lines for the Adorable Seal Larva and the Robot Reindeer.

Any ideas where to go from here? Is there anything better than "0" that we can put into those fields?
 
Hmmm, it seems that with the to_event() refactor, the "dmg" fvar is not being set prior to evaluating the familiar's action. I'll fix that (and add Peanut resistance, remove moxman, and use the new ranged damage calculations) for the upcoming update.

Changing it to 0 doesn't make it ignore your familiar damage, but it does make it ignore your familiar's corresponding healing. That keyword is also used for all starfish-types.

The next update also has some neat fixes for Your Shadow -- you will be able to automate your shadow fight with BatBrain-powered scripts.
 
1.36 Update!

The version number is 1.36, which is an amazing coincidence because there are exactly 36 things updated in this update.

  1. Moved fvar declarations into set_monster() to reduce overhead when importing the script.
  2. Moved monster multi-stun immunities into to_event() to cut them off at the source rather than waiting till later.
  3. Added Clancy's immunity to all stuns, also in to_event(). Other monsters may also have total stun immunity and can be added there.
  4. Wrap blacklist construction in a function build_blacklist() for use by external blacklist editors which may import BatBrain.
  5. The refactored dmg_dealt() wasn't correctly assessing monster healing. Fix that.
  6. Skip familiar calculations for AoJ.
  7. Wrap effects and gear calculations for the base event in a function fxngear(), and call that in set_monster(), again to reduce overhead when importing.
  8. Your Shadow always hits.
  9. Your Shadow is immune to multi-stuns.
  10. Your Shadow deals 95 + (my_maxhp()/6 damage.
  11. Added healing moves for gaunt ghuol and gluttonous ghuol.
  12. Moxious Maneuver is no more. Removed those calculations from regular().
  13. Ranged damage uses Moxie rather than Muscle for bonus damage now. I didn't look at it in great detail (or even test it) yet, so I suspect there are other changes I missed. But this is probably better than what was there.
  14. Don't auto-funk consecutive reusable item uses if you only have one of that item.
  15. Added elemental resistance for Peanut.
  16. Convert healing to damage for Your Shadow, and treat all other sources of damage as 0. BatBrain is now predictively accurate when facing shadows.
  17. Postpone Yellow Raying your specified monsters if you are in the clear and have other custom actions to perform.
  18. Changed the version number to 1.36.

Also, every one of those updates was so awesome that it counts as two updates.

Please enjoy all 36 of these amazing updates as you slay monsters (especially Your Shadow) with greater panache (and also derring-do, and possibly aplomb) than you ever have before.
 
Last edited:
Wow. I think you won an award for desperate justification.

Thanks for your hard work, regardless of whether I count 36 updates or only 15.
 
Which two (four) aside from the version number update(s) were you not counting? Because if they're the ones I'm thinking you thought they were, they are necessary fixes for the upcoming BatMan RE 2.0 release, which will blow your socks off, or your feet if you weren't wearing any, so it's probably wise to always wear socks until then.
 
I hadn't checked them out carefully enough to figure out which were being padded aside from the version number.

Taking a closer look at them, they might be distinct enough that it counts as 17 changes. Also... taking a more careful look I wonder why you listed Clancy on line 211. Isn't that a bit redundant? Also, noted an error in your changelog:


12. Moxious Madrigal is no more. Removed those calculations from regular().

It's moxious Maneuver, not Madrigal.
 
See? It was already gone from my head. Never used it anyway, good riddance.

Also, yeah, don't need Clancy there, but it'll be quite harmless sitting there until the next update.
 
Even if that's the case, most players wouldn't even be close to a safe moxie when they face him, so it wouldn't be an issue. If you can confirm that or point to spading that Clancy has a fixed hitrate, though, I'll add it.
 
OK, got an oddity here.
Code:
> zlib verbosity = 10

Previous value     of verbosity: 7
Changed to 10.

> finishhim

Running     ZLib version: r37 (current)
1 HP costs     0.027μ. ( 644 / 644 )
1 MP costs     2.128μ. ( 491 / 1480 )
Running BatBrain     version: 1.36 (current)
Running SmartStasis     version: 3.20 (current)
Building options...
Evaluating     'max(5,floor(0.1*644.0))+25'...
Evaluating     'max(5,floor(0.1*644.0))'...
Evaluating     '192.5*zone(sea)'...
Evaluating     '-0.25*0.0*(zone(sea)-1)'...
Evaluating     '-min(100,ceil(5*sqrt(max(0,min(512.0,1.0)))))'...
Evaluating     'min(50,ceil(5*sqrt(max(0,min(740.0,1.0)))))'...
Evaluating     '15*loc(convention hall lobby)'...
Evaluating     '15+10*min(1,effect(sugar rush))'...
Evaluating     'max(512.0,max(517.0,740.0))'...
Evaluating     'ceil(L/3.0)*4.5*5'...
Evaluating     '-min(0.25*644.0,0.5*(644.0-644.0))'...
Evaluating     '288.5*zone(sea)'...
Evaluating     'spelldmgpercent*(40+(0.35*740.0)+0.0+0.0)*3'...
Expression     syntax errors for 'modifier_eval()':
Can't understand     spelldmgpercent*(40+(0.35*740.0)+0.0+0.0)*3 (zlib.ash, line 162)
You're     on your own, partner.
Click     here to continue in the relay browser.

> wear

Hat: bounty-hunting helmet
Weapon: bounty-hunting rifle
Off-hand:     (none)
Shirt: flaming pink shirt
Pants: bounty-hunting pants
Container:     Camp Scout backpack

Acc. 1: stinky cheese eye (3)
Acc. 2: stinky     cheese eye (3)
Acc. 3: stinky cheese eye (3)

Pet: Knob Goblin     Organ Grinder (35 lbs)
Item: microwave stogie
My best guess is this is BatBrain doing something as I updated both BB and SS at the same time. The 740 in the above expression is my Mys. I'm guessing this is Saucegeyser being calculated. 20% Spell% bonus from sign and +10 Spell damage from Intrinsic Spiciness.
 
It's not that hard to buff up to really safe levels since he does not remove buffs so in a SC run you have access to a multitude of potions and other things. I could do another softcore run and buff myself up to ridiculous levels and see if he still hits me for the same if that helps?
 
Fluxx, your report has me stymied, as spelldmgpercent is set near the top of set_monster(), which is called near the top of act(), which ought to be called very first thing in any consult script. What script(s) are you using? Does this error happen every combat? If so, what happens if you change line 15 to explicitly initialize m, i.e. monster m = $monster[none]; ?

Winterbay, it's probably not worth spending a run on, unless you were already planning on the run and it wouldn't be too far out of your way. Since it's not the current challenge path anymore and is irrelevant to people who play Jarlsberg as a myst class (hehe), I'd probably just let someone else figure it out someday and add it then for completeness.
 
Fluxx, your report has me stymied, as spelldmgpercent is set near the top of set_monster(), which is called near the top of act(), which ought to be called very first thing in any consult script. What script(s) are you using?
BB, SS, and my own personal consult. upon inspecting my code, I found build_options() is called first. I had to do that in the past, but I can't remember why I did it before. Once I commented it out, the scripts worked as I expected more or less. Thanks for pointing that out.
 
Thanks for this update zarqon, but are the yellow-beams actually being delayed? From my output today it looks like they still happen too early in the fight:

Code:
use 1 Spooky Putty monster

[187691] Spooky Putty Monster
Encounter: clod hopper
Round 0: fxer wins initiative!
 > Auto-funk: merging 'use 5561' and 'use 3665'.
Round 1: fxer executes a macro!
Round 1: fxer tries to steal an item!
Round 2: Morty Goldfarb's yellow eye gazes upon a passing frat boy. There's a gentle *pop,* then just the lingering scent of cheap cologne and desperation.
You gain 72 Meat.
Round 2: fxer casts POINT AT YOUR OPPONENT!
Code:
[187893] Spooky Putty Monster
Encounter: clod hopper
Round 0: fxer wins initiative!
 > Auto-funk: merging 'use 3665' and 'use 185'.
Round 1: fxer executes a macro!
Round 1: fxer tries to steal an item!
Round 2: Morty Goldfarb fixes his yellow eye on a nearby mailbox. A few seconds later, there's a mailbox-shaped pocket of empty space where the mailbox used to be.
Round 2: fxer casts POINT AT YOUR OPPONENT!
 
Just trying, and liking, Bat Man Relay. A little slow, but I guess that's using a 5 year old PC and having nearly all the skills.

I think this is the right place for the potential bug I've come across. I'm in BIG, in HC, at the Giant's Castle Ground Floor. Recommended action is Thrust-Smack, doing 265+45 damage. Only problem is, that my normal attack, Thrust-Smack and Lunging Thrust-Smack all do 116+45 damage every time. Is this a lack of spading issue, and if so, what information do you need ? Or is it an issue with unarmed damage calculation ?
 
I've found a small batfactors issue: BRICKO reactors are listed as doing 50000 damage. This is only true against BRICKO monsters, against normal monsters it does a hundredth of that, so 500. Noticed when WHAM started throwing my reactors at the school of many in the sea and it not working as expected...
 
As a further note: Is there any way of enqueueing two item-actions in a row without BatBrain auto-funking them? This would be for monsters like the sea horse that cannot get funkslinged (at least not the cow bells). Currently I've set it up as four consecutive macro()-calls.
 
As a further note: Is there any way of enqueueing two item-actions in a row without BatBrain auto-funking them? This would be for monsters like the sea horse that cannot get funkslinged (at least not the cow bells). Currently I've set it up as four consecutive macro()-calls.

Uh, yes it can. I always finish the sea horse in two turns... first turn slinging two cowbells, second turn slinging a cowbell and the lasso. I've done this over 10 times now.
 
Huh, I tried that with the relay browser last time using the CAB and right/left clicking on the cow bell and it only used one each time. I'll have to test it again next run then and if it still doesn't work report it as a kol bug. :)
 
Back
Top