BatBrain -- a central nervous system for consult scripts

It seems that r77 or r78 changed something that breaks WHAM. I took a quick look but the solution didn't jump out at me. Here's the error in the gCLI:

Code:
Unknown variable 'special' (BatBrain.ash, line 1190)
Consult script 'WHAM.ash' not found.
You're on your own, partner.

Any guidance would be appreciated.
 
It seems that r77 or r78 changed something that breaks WHAM. I took a quick look but the solution didn't jump out at me. Here's the error in the gCLI:

Code:
Unknown variable 'special' (BatBrain.ash, line 1190)
Consult script 'WHAM.ash' not found.
You're on your own, partner.

Any guidance would be appreciated.

I was able to get it running again by changing line 1190 to the below. I have no idea if I ended up breaking anything or not, but if I did it'd only apply if you have the "feed" skill (from vampire fangs I guess? I don't have them anyway, man this game is complicated). Edit: Actually you should probably just comment out that line. That'd just remove Feed as an option rather than potentially break something if you have it.

Code:
//case 7116: if (m.phylum == $phylum[dude]) fields.special = list_add(fields,special,"stun"); break;    // feed
 
Last edited:
Using current BatBrain (r79) and WHAM (r43) with current batfactors 2015-06-09T02:47:57-05:00.

Expression syntax errors for 'modifier_eval()':
Can't understand buffedmys0.2*168.0 (zlib.ash, line 188)
You're on your own, partner.

That's probably because I'm fighting a filthy monster. I guess. But I cannot find the source of the problem.

You're fighting a dancin', ghostly, filthy, turgid, haunted, yuletide, optimal pygmy witch accountant
 
Are you sure buffedmys0.2 shouldn't be buffedmys*0.2?

ETA: I have not used WHAM nor BatBrain since the latest changes so I may have missed something :)
 
I'm also drawing a blank. Neither batfactors nor BatBrain contains that text. And regardless of whether it should have a * in between, the keyword is not getting replaced as it should. Perhaps a high-verbosity CLI output could narrow it down.
 
It's in BatBrain.ash line 1170:

Code:
        case 3025: switch (equipped_item($slot[weapon])) {    // utensil twist
              case $item[hand that rocks the ladle]: fields.dmg += "0.2*buffedmys|55 hot,cold,spooky,sleaze,stench"; break;
              case $item[Dinsey's pizza cutter]: fields.dmg = "0.5*monsterhp"; break;
           } break;

Changing
Code:
fields.dmg += "0.2*buffedmys
to
Code:
fields.dmg = "0.2*buffedmys
might not fix it but it will let WHAM run.

Code:
Can't understand buffedmys0.2*168.0 (zlib.ash, line 188)
In that error message the 168.0 is the value of buffedmys.
 
Last edited:
Obviously I copy/pasted it since only a crazy person copies their error messages letter for letter. :cool:

I was actually thinking it could've been a batfactor error with a missing * in the formula. That it could be a typo didn't even enter my mind... :)
 
I've been looking at my losing fights and I think I see a pattern. Based on "Death in" and how WHAM kills things too slow, I believe BatBrain considers auras to fire only if a monster attacks. So if a monster is cowardly and wet, it says I can survive 100+ turns when in truth I'm going to get beaten up in five or so rounds.
 
Last edited:
Does batbrain make that mistake for electrified also?
I believe so. At first I thought WHAM/BatBrain were stasising for MP, which is reasonable as long as you win, but if you look at how many round BatBrain says it will take to die, you can tell it's off.
Probably. Important note is that ticking only counts down if the monster acts, which is different.
BatBrain's handling of ticking is probably it's biggest weakness in OCRS, but things that happen over multiple rounds are hard to handle.

A side note (probably for hee^3). There are a bunch of modifiers that stop monsters from attacking (cowardly, frozen, lazy, spinning, etc). BatBrain lists most of them as 50%, but many of them are much closer to 100%. However, they're unspaded as far as I can tell and 50% is generally safer.
 
It appears that the shaky multiattack is currently unsupported. At least, I don't find it anywhere in r80 besides this line:
Code:
      case "shaky": setmatt("multiattack","3"); break;  // evidently overridden by mayo wasp and Chilled to the Bone?
 
@Crowther: BatBrain correctly handles auras, adding them to the base round. That "death in X" message doesn't actually simulate those rounds to determine your death (an expensive method for an informational message); it uses die_rounds(), which simply calculates the number of monster attacks necessary to kill you, ignoring effects, gear, familiars, auras, etc. If WHAM is using die_rounds() to make important decisions, I could see it getting you killed.

Expanding die_rounds() to include all the environmental information would be a bit slower but would make a script's life easier. I'll do that.

By the way, are hobos' "special attacks" actually just auras? Presently BatBrain has special code for them, adding them to the monster event. But if they hit regardless of being stunned, they can be specified in batfactors as auras and we can remove that code from BatBrain.

@Theraze: Yes, there's no support for that keyword presently. I need to look into it.
 
Staggering and stunning seem to prevent most OCRS auras from firing. I'm really confused as to what the exact rule is. Or if auras are really auras.
 
Back
Top