BatBrain -- a central nervous system for consult scripts

Another tiny problem. Tattle does att -7, def -7, not att -7, def -12. At least most of the time. Rarely, it does more or less, but when has not been spaded. It seems to be a popular spell for WHAM right now, so that got me wondering why. It's still popular after switching to 7/7, so that wasn't it.
 
BatBrain version /\/\^v^/\/\ Update!

You may have questions, such as:

  • What exciting new features did you add in this update?
  • What previously unsupported things are now supported in this update?
  • Did you, in fact, rename one of BatBrain's data files?
  • Do you greatly enjoy bulleted lists?
  • Why is the version number a really crappy ASCII bat?
For all but the last, I have answers.

What's New in This Update: The Answers

Added "endscombat" flag to actions; adding "endscombat" to the special field of an action in batfactors (or in to_event()) now causes that to be saved to the new boolean endscombat field of the resulting advevent. BatBrain does not yet handle these actions any differently, but the upcoming SS release will definitely benefit from this change.

Added soft damage caps for all twenty-four (24) previously listed monsters with such caps. In the process, I had to handle elemental forms differently -- now if you have an elemental form, all the damage is converted to that element in to_event() rather than dmg_dealt(), which I believe should also save some time, as dmg_dealt() can be called many times per round (or round simulation), whereas to_event() basically only happens once per action per round.

Renamed happenings_<playername>.txt to BatMan_happenings_<player_name>.txt If you like, you can rename your old happenings file (the one without the "BatMan_" prefix) to retain that information, or simply delete it.

Action Blacklist! Action Blacklist! Users may now blacklist actions. The data file used for this is BatMan_blacklist_<player_name>.txt, which is read (but not written) by BatBrain. This data file will be GUI-editable in the upcoming BatMan RE release, but in the meantime users need to create and edit the file directly. The format is int[string], where the string is the action ID you wish to blacklist, such as "use 2" or "skill 7013". The integer is 0 to completely blacklist an action. For items, a nonzero means to blacklist that number of items. For skills, a nonzero is treated as the maximum casts of that skill per combat. Some actions will be blacklisted by BatBrain automatically whether you blacklist them or not:

  • Tower items. BatBrain uses ZLib's tower_items() function to blacklist 1 of each tower item you may need.
  • For Avatars of Jarlsberg, "attack" is auto-blacklisted.
  • Richard skills are all completely blacklisted to avoid the associated KoL bug.
  • Imp airs and bus passes (5 of each) are blacklisted until you complete the quest.
  • A single flaregun is blacklisted until you complete the Islewar, just in case you are going for a Wossname.
  • Burrowgrub and Stress Ball skills are auto-blacklisted beyond the amount you can actually cast for the day.
For all the above which are partial blacklists, completely blacklisting the action in your data file will override said partiality.

Correctly track the jiggling of chefstaves by normalizing KoL's "chefstaff" back to "jiggle". Also, don't check for "once", just check happened().

Fix damage type for Weapon of the Pastalord.

In addition to gremlins, the following monsters also never miss:

  • various Oil Peak monsters
  • all reanimated skeletons

Added immunity to multi-stuns for the following monsters:

  • Oil Peak monsters
  • trophyfish
  • Hobopolis bosses

Better filtering of certain actions, thanks to perusing Winterbay's ok() function:

  • Ignore goodfella contracts unless you have a penguin familiar and enough meat to use it.
  • Ignore Boris skills that need Trusty if you don't have Trusty equipped.
  • Ignore Shieldbutt skills if you don't have a shield (because then it would just be a butt skill).
  • Ignore Harpoon! if unarmed. Today's modern monsters are unfazed by imaginary harpoons.

Many monster resistances added! BatBrain now knows about the following monsters' special elemental/physical resistances:

  • BRICKO vacuum cleaner
  • All Nemesis monsters' Volcanic Cave form (Demonform was already known)
  • War frat mobile grill unit
  • All Oil Peak monsters
  • Crys-Rock
  • Vanya's creature
  • The Whole Kingdom (also knows about the 11-round combat limit and removes items)
  • Don Crimbo
  • Cyrus the Virus
  • The Landscaper
  • Ancient Ghost
  • Contemplative Ghost
  • Lovesick Ghost
If you had previously been getting killed when fighting these monsters, this update should help.

This update is good for several things:

  • Paving the way for other scripts to update.
  • Fighting Oil Peak monsters. Note that three important fixes for these monsters were added (never-miss, multistun-immunity, and resistances).
  • Being a Jarlsberg. You may want to blacklist "jiggle" once you get staves with 5/day uses. Either that or remove those particular staves from your copy of batfactors.
  • Facing monsters with soft damage caps. Previously, BatBrain was severely overestimating damage in excess of monster soft damage caps, because it just didn't know about them. Now it knows, and knowledge is power. Power and survival. Knowledge is power and survival... and surprise. Ah. Amongst our weaponry are such diverse elements as... I'll come again.
  • Bulleted lists.

  • Enjoy!
 
I still want to know why the version number is a really crappy ASCII bat!

Also getting this in the cli now:

The string "/\/\^v^/\/\" is not an integer; returning 0 (zlib.ash, line 181)
The string "/\/\^v^/\/\" is not an integer; returning 0 (zlib.ash, line 182)
 
Yeah... Zarqon knows that he does this to us, and he knows that zlib (which is also his) does the to_int conversion... but it still amuses him to throw letters and symbols into his version numbers anyways. It'll go away when the next version comes, probably. The sad thing about this specific one is that since it converts to 0, as you showed, people on 1.31.1 won't get update notifications, since 0 is less than 1. Ah well. :) Next version...
 
I have to say, I laughed pretty hard when I saw that version number come up. I'm looking forward to cute mouse: (^._.^)~
 
It looks like something in the hookspear logic is sending bad input into zlib's eval function. When I have one equipped, I get this error:

Code:
Expression syntax errors for 'modifier_eval()': Can't understand monstermeat*((zone(sea)+1)*0.125+0.05) (zlib.ash, line 162)

and Mafia gets stuck after combat ends, I have to stop it manually. At least, I'm pretty sure this is a BatBrain error.
 
Not a BatBrain problem, but batfactors...
Code:
gear	3591	mer-kin hookspear	0	0	meat monstermeat*((zone(sea)+1)*{0.1,0.125,0.15}+0.05), oncrit
is your problem. what should it use instead of monstermeat? No clue. :) Or if you haven't updated to the latest version, mine has this:
Code:
   if (have_equipped($item[mer-kin hookspear])) fvars["monstermeat"] = meat_drop(m);
in its BatBrain. That being said, it ONLY changes that if you have the hookspear equipped... could probably safely set that value always. Probably.
 
Hello, I am using the auto-Basement script which in turn use BatBrain.

Whenever I get an encounter in basement (havent check elsewhere) I get this:
EDIT: All combats

[6413] Fernswarthy's Basement (Level 302)
Encounter: 18 Stone Golem
Round 0: tarko loses initiative!
Map modified within foreach (BatBrain.ash, line 241)
You're on your own, partner.
Click here to continue in the relay browser.




Any idea?
 
Last edited:
I must be retarded. I have the following in my BatMan_blacklist_JoeDerp.txt, which lives in my data directory. Why am I still jiggling my staff?

0 skill jiggle
 
IN which way are you jiggling? WHAM will currently jiggle to banish and olfact monsters even if you've blacklisted jiggle, which should probably be fixed.
 
Well, BatBrain does contain the followin:
Code:
  // 2. get jiggy with it
   if (item_type(equipped_item($slot[weapon])) == "chefstaff" && contains_text(page,"chefstaffform") &&
       !happened("jiggle") && factors["chef"] contains to_int(equipped_item($slot[weapon])) && !(blacklist contains "jiggle")) {
      if (isseal) factors["chef",to_int(equipped_item($slot[weapon]))].dmg = "1";
      addopt(to_event("jiggle",factors["chef",to_int(equipped_item($slot[weapon]))],1),0,0);
   }
So either the blacklist isn't working as intended on things that are not items or skills (as possibly indicated by the fact that "attack" for AoJ is also added to the same blacklist and that appear to be not working perfectly either) or something else is afoot...
 
On a completely different matter: It appears to me as if Clancy ignores your buffed moxie and goes directly at your unbuffed moxie. Has anyone else experienced this?
My stats:
[TABLE="class: chit_brick nospace"]
[TR]
[TD="class: label"]Muscle[/TD]
[TD="class: info"]314 (91)[/TD]
[TD="class: progress"][/TD]
[/TR]
[TR]
[TD="class: label"]Myst[/TD]
[TD="class: info"]463 (154)[/TD]
[TD="class: progress"][/TD]
[/TR]
[TR]
[TD="class: label"]Moxie[/TD]
[TD="class: info"]353 (95)[/TD]
[/TR]
[/TABLE]

Clancy's stats according to Manuel (and Mafia):
HP: 530, Atk: 180, Def: 195

WHAM did the following:
Code:
Encounter: Clancy
Round 0: winterbay wins initiative!
[COLOR=#880000]1      HP costs 6,667μ. ( 258, / 372 )[/COLOR]
[COLOR=#000088]1 MP      costs 8,μ. ( 297, / 695 )[/COLOR]
ATT: [B]180,[/B] (100,% × 5,29,      death in 68)
DEF: [B]195,[/B] (95,45% × 121,18[B] [COLOR=blue](40,)[/COLOR]      [COLOR=red](5,)[/COLOR][/B], win in 4)
HP: [B]530,[/B],      Value: [COLOR=green][B]422,5 μ[/B][/COLOR], RES: 0
[COLOR=purple]WHAM:      You have no profitable MP restoratives.[/COLOR]
[COLOR=purple]WHAM:      You have no profitable HP restoratives.[/COLOR]
[COLOR=purple]WHAM:      Monster HP is 530.0.[/COLOR]
[COLOR=purple]WHAM: Running      SmartStasis[/COLOR]
Profit per round:       [TABLE="width: 100%"]
       [TR]
         [TH]           Action         [/TH]
         [TH]           Profit         [/TH]
         [TH]           Damage         [/TH]
         [TH]           Other         [/TH]
       [/TR]
       [TR]
         [TD="align: left"]           base (0μ)         [/TD]
         [TD="align: right"]           [B]0μ[/B]         [/TD]
         [TD="align: center"]           --         [/TD]
         [TD="align: center"]                    
[/TD]
       [/TR]
     [/TABLE]
     
     [COLOR=purple]WHAM: SmartStasis complete.[/COLOR]
[COLOR=purple]WHAM:      SS did not finish the fight, continuing with script execution. [/COLOR]
[COLOR=purple]WHAM:      Starting evaluation and performing of attack[/COLOR]
[COLOR=purple]WHAM:      Enqueueing Slice (macroid skill 14013).[/COLOR]
[COLOR=purple]WHAM:      Enqueueing Boil (macroid skill 14003).[/COLOR]
[COLOR=purple]WHAM:      We are going to 2-shot with Slice and Boil.[/COLOR]
Round 1: winterbay      executes a macro!
Round 1: winterbay casts SLICE!
Round 2: clancy      takes 307 damage.
Round 2: clancy drops 16 attack power.
You lose 86      hit points
Round 2: winterbay casts BOIL!
Round 3: clancy takes 140      damage.
You lose 67 hit points
[COLOR=purple]WHAM: Current      monster HP is calculated to 83.0[/COLOR]
[COLOR=purple]WHAM:      Starting evaluation and performing of attack[/COLOR]
[COLOR=purple]WHAM:      Enqueueing Boil (macroid skill 14003).[/COLOR]
[COLOR=purple]WHAM:      We are going to 1-shot with Boil.[/COLOR]
Round 3: winterbay executes a      macro!
Round 3: winterbay casts BOIL!
Round 4: clancy takes 140      damage.
Round 4: winterbay wins the fight!
You gain 5 hit points
You      gain 3 Mana Points
You gain 12 Fortitude
You gain 26 Wizardliness
You      gain 13 Sarcasm

Now, I have modified BatBrain before to set clancy's hitchance to 1 because otherwise WHAM killed me all the time. But to me 86 (and 67 after losing 16 attack power) sounds more like what I would expect from 180 vs. 95 rather than 180 vs. 353...
 
Back
Top