BatBrain -- a central nervous system for consult scripts

Nice. I shall directly go and remove WHAM's support for the skeletons. Any chance the next update will include the Video Game Bosses as well?
 
How do I add stuff to batfactors? I just fought "Frozen Bag of Tortellini" and it's immune to physical (it takes 1 damage).

My Rogue Program and any attacks I did made it take 1 damage, but when it bumped into my hot shield it was taking ~8, and saucegeyser did massive damage when WHAM stopped and told me to kill it on my own (so it looks like it's cold aligned, takes double from hot). :D


EDIT: Reading The Fine Manual now... ;)

Ok, I'm not sure on their vulnerabilities, but I added these two lines (so far) to batfactors.txt and WHAM is now not using wimpy physical attacks, thinking the monsters will take full damage from physical...so I think it's close to what I wanted. ;)

Code:
monster	999	Frozen Bag of Tortellini	1.0	0
monster	998	Possessed Can of Creepy Pasta	1.0	0
 
Last edited:
I just updated batfactors with the monsters. Not sure if the TM-monster works without the TM-character but I don't think adding it to the text-file will help. Possibly I should've added the html-entity instead but I'm lazy...
 
Code:
Bad skill value: "immaculate seasoning" (BatBrain.ash,     line 492)
Hooray for revamp! Immaculate seasoning has been folded in to Saucegeyser and is exclusive to it.
 
Code:
Bad skill value: "immaculate seasoning" (BatBrain.ash,     line 492)
Hooray for revamp! Immaculate seasoning has been folded in to Saucegeyser and is exclusive to it.

How do we go about fixing that?

I keep getting this:
[621] Cobb's Knob Treasury
Encounter: Knob Goblin MBA
Strategy: C:\Users\Lei\Desktop\KOL\ccs\Attack.ccs [default]
Round 0: cheframen wins initiative!
Bad skill value: "immaculate seasoning" (BatBrain.ash, line 492)
Consult script 'WHAM.ash' not found.
You're on your own, partner.
Click here to continue in the relay browser.
 
Change line 492 in BatBrain to
Code:
if (true) {
and you'll get by that for now. The damage normalization will need a severe overhaul due to the myst-revamp so a little band-aid is probably all you can do for now.
 
Change line 492 in BatBrain to
Code:
if (true) {
and you'll get by that for now. The damage normalization will need a severe overhaul due to the myst-revamp so a little band-aid is probably all you can do for now.

In line 492, this is what it shows:

foreach st,v in s {

I've also been seeing this sometimes:
Changing "Haunted Ballroom" to "The Haunted Ballroom" would get rid of this message (charpane.ash, line 291)
Changing "rogue windmill" to "The Rogue Windmill" would get rid of this message (charpane.ash, line 310)
Changing "mouldering mansion" to "The Mouldering Mansion" would get rid of this message (charpane.ash, line 311)
Changing "stately pleasure dome" to "The Stately Pleasure Dome" would get rid of this message (charpane.ash, line 312)
Changing "sleazy back alley" to "The Sleazy Back Alley" would get rid of this message (charpane.ash, line 523)
Changing "haunted pantry" to "The Haunted Pantry" would get rid of this message (charpane.ash, line 524)
Changing "limerick dungeon" to "The Limerick Dungeon" would get rid of this message (charpane.ash, line 525)
Bad location value: "orc chasm" (charpane.ash, line 526)
Changing "Haunted Ballroom" to "The Haunted Ballroom" would get rid of this message (charpane.ash, line 291)
Changing "rogue windmill" to "The Rogue Windmill" would get rid of this message (charpane.ash, line 310)
Changing "mouldering mansion" to "The Mouldering Mansion" would get rid of this message (charpane.ash, line 311)
Changing "stately pleasure dome" to "The Stately Pleasure Dome" would get rid of this message (charpane.ash, line 312)
Changing "sleazy back alley" to "The Sleazy Back Alley" would get rid of this message (charpane.ash, line 523)
Changing "haunted pantry" to "The Haunted Pantry" would get rid of this message (charpane.ash, line 524)
Changing "limerick dungeon" to "The Limerick Dungeon" would get rid of this message (charpane.ash, line 525)
Bad location value: "orc chasm" (charpane.ash, line 526)
Round 1: X casts CANNELLONI CANNON!
Round 2: knob goblin bean counter takes 60 damage.
Round 2: X wins the fight!
After Battle: Grobert winks at you.
You gain 123 Meat
You gain 7 Enchantedness
You gain 3 Chutzpah
Changing "Haunted Ballroom" to "The Haunted Ballroom" would get rid of this message (charpane.ash, line 291)
Changing "rogue windmill" to "The Rogue Windmill" would get rid of this message (charpane.ash, line 310)
Changing "mouldering mansion" to "The Mouldering Mansion" would get rid of this message (charpane.ash, line 311)
Changing "stately pleasure dome" to "The Stately Pleasure Dome" would get rid of this message (charpane.ash, line 312)
Changing "sleazy back alley" to "The Sleazy Back Alley" would get rid of this message (charpane.ash, line 523)
Changing "haunted pantry" to "The Haunted Pantry" would get rid of this message (charpane.ash, line 524)
Changing "limerick dungeon" to "The Limerick Dungeon" would get rid of this message (charpane.ash, line 525)
Bad location value: "orc chasm" (charpane.ash, line 526)
 
That means you have a charpane.ash relay script that hasn't been updated. And you should either update it or post in its thread. But posting about it here won't fix anything...
 
Which makes sense with the out of date version of BatBrain.

If you are using the SVN version, type svn update now.
Then make sure that, in the svn/batbrain/scripts folder, there is only one "BatBrain.ash" file. If there are more, you've managed to make BatBrain conflict itself. Check the date stamp as well. Now look at the main scripts folder and check if BatBrain.ash has the same date. It should, and it should be no earlier than 2013-11-10, as that's when zarqon pushed the latest version with its procedural support, etc.

Repeat for ChIT. I'd skip the images folder, because that will drive you crazy, but do make a point of looking at the svn/bale-chit/relay folder at the charpane.ash file and comparing that to the main relay folder's charpane.ash, since that's the file that's definitely out of date that you mentioned.

The easiest way to fix it if you've gotten them out of sync and haven't made any changes is to either svn delete <script>, svn checkout <location>, or, if you are having problems remembering where it's at, svn dec <script>, svn update... that one doesn't ALWAYS fix it when you've told the script to break and not update files anymore, but it's faster and doesn't take you remembering the original checkout location.
 
r27 Update

Brief update to fix preexisting sauce skills. Sauceror skills are no longer tuneable. Saucegeyser (and Saucemageddon, until more is known) automatically deals immaculately seasoned damage. Immaculate Seasoning doesn't exist anymore. Also updated batfactors to specify hot and/or cold where applicable rather than "sauce".
 
Drat, and here I'm at work without being able to connect to the SVN-servers.

Allthough... it appears that the code-server is not blocked... Huh... Oh well. I now have the latest version without having to check it out first :)
 
Being in a Bad Moon run, I've tried to run Mosquito and got the error mentioned in post #1110 (and earlier):
Code:
Expression syntax errors for 'modifier_eval()':
Can't understand dmg (zlib.ash, line 185)
I've done a bit of debugging and the source seems to be in the line 180 of BatBrain:
Code:
if (!bittles.find()) { if (bit != "") res[$element[none]] += eval(bit,fvars); continue; }
Specifically, in the call to "eval(bit,fvars)": if the "bit" equals "-dmg", for some reason "fvars" don't contain "dmg", so the evaluation fails. Someone more knowledgeable than me might find a true source of this error, but in the meanwhile you can fix it by replacing line 180 of BatBrain with:
Code:
if (!bittles.find()) { if (bit != "") {if (dmg == "-dmg") {fvars["dmg"] = to_float(dmg);} res[$element[none]] += eval(bit,fvars);} continue;}

I'm not sure this fix results in accurate calculations, but at least it doesn't fail.
 
Last edited:
Can you make sure that your parse_factors()-call in build_opts is above the fxngear()-function? That solved the entire issue for me.
 
Can you make sure that your parse_factors()-call in build_opts is above the fxngear()-function? That solved the entire issue for me.
As soon as I've got that error, I made sure that BB/SS/WHAM are at the svn head. Then I've tracked down your exact suggestion and went to see what it looked like in the current script.
It turns out I don't even have build_opts anywhere (just to be sure, searched in BatBrain, SmartStasis and WHAM) - instead fxngear()/parse_factors() are in the BatBrain's set_monster(), and they were already in the proposed order:
Code:
1466:   parse_factors();
1467:  // initialize effects/gear
1468:   fxngear();
Just to be double-sure, I've tried to put fxngear() before parse_factors, without any effect.
Only after I've exhausted all the conventional solutions, I've started my own research.
 
Thanks for the update, zarqon. I actually had no idea what a crude voodoo doll did until I read the wiki to find out why you'd need to add custom code to handle it.

That's a pretty neat combat item! I'm looking forward to using it!
 
As discussed in the WHAM thread I've been looking into the differences between the new spell updates and what BatBrain.ash and batfactors.txt currently know. I believe this is the right patch to fix Intrinsic Spiciness.
Code:
Index: BatBrain.ash
===================================================================
--- BatBrain.ash        (revision 28)
+++ BatBrain.ash        (working copy)
@@ -1073,7 +1073,7 @@
       fvars["mpcost"] = mp_cost(to_skill(sk));
       if (have_skill($skill[intrinsic spiciness])) {
          fvars["spelldmg"] = numeric_modifier("Spell Damage");  // reset since it may have previously been decremented
-         if (to_skill(sk).class != $class[sauceror]) fvars["spelldmg"] -= min(my_level(),10.0);
+         if (to_skill(sk).class == $class[sauceror]) fvars["spelldmg"] += min(my_level(),10.0);
       }
       rate = 0;
       d = to_spread(0);
I've confirmed this by testing Saucegeyser with the new formula from the wiki and WHAM's predictions match KoL.

I've uploaded a batfactors.txt with the new Saucegeyser formula, but sadly, I've got surprise babysitting tonight instead of what I was looking forward to.
 
Back
Top