BatBrain -- a central nervous system for consult scripts

Sounds like a problem with the version checker.

Nope, it's a "feature" of multiple changes happening the same day. It saves the version number to zversions, and only checks again tomorrow. :) Saves server hits, which is a good thing. Even when it's only mafia forum server hits, not KoL server hits. :)
 
I meant that a mouse with a tail on the left is clearly better than one on the right, and any software suggesting otherwise is faulty.
 
roippi is correct. A version checker not being able to recognize that is just as buggy as if it could not recognize that version r37 is better than r36.
 
I've found a severe bug in BatBrain's build_skillz function...

On line 1020 the fvars["spelldmg"] is set to your current spell damage bonus, then on line 1035 that same fvars i lowered by 10 if you have intrinsic spiciness and the skill is not a sauceror skill. The fvars is never reset to its original value so after a few loops through the foreach-loop the favrs["spelldmg"] is < 0 and all spells will be discarded due to having a damage output less than 0.
Easiest fix I've found so far is to add a fvars["spelldmg"] = numeric_modifier("Spell Damage"); at the end of build_skillz' foreach-loop. You could, I guess, only do the change if teh variable has changed but I'm not sure if that is faster or not.
 
Ew. Good catch. I'd moved it outside the for loop as a teensy speed improvement, but obviously I missed something important there. I think the best of both worlds would be to retain the declaration above the for loop, but then if you have spiciness, reset the variable each time before checking for/making the compensatory deduction for non-sauce skills. That way players without spiciness can still just declare it once and have done. This fix will be in the next update, which ought to be soon as that's a pretty major error.
 
Yeah, version /\/\^v^/\/\ was my April Fool's release, and then Cute Mouse was too irresistible to pass up. We'll be back to numbers now.
 
Everything was working fine yesterday then today I am getting...

Code:
[606] South of the Border
Encounter: mariachi calavera
Strategy: C:\7lMafia\ccs\xenthes.ccs [default]
Round 0: Xenthes wins initiative!
Bad phylum value: "object" (BatBrain.ash, line 967)
Consult script 'WHAM.ash' not found.
You're on your own, partner.
Click here to continue in the relay browser.

The only change I did was snagged the newest daily build of mafia.
 
For those playing along at home:
crimbo -> elf
demihuman -> humanoid
humanoid -> dude
object -> construct
strange -> weird

Edit: Actually, wasn't it supposed to be humanoid -> dude? Eh, whatever. Just working based on the revision, I don't have any manuel to check with. :)

Edit2: Note that both BatBrain and SmartStasis need updatings. BatBrain has 4 or so spots where it checks phylum, and SmartStasis needs to be updated both for changed fields (demihuman/object) and changed phyla needing new entries (crimbo/strange paste no longer match phyla names).

Edit3: Right. The humanoid became the dude, the demihuman became the humanoid. Whee.

Edit4: Hopefully the attached files should work. Just tried to change the right parts, but I might have gotten confused around the humanoid stuffs. :)
 

Attachments

Last edited:
Mang, all these changes to Manuel are really cramping my update style. I'll have updates to BB and SS tomorrow (further changes were needed beyond Theraze's useful temporary bandage), but BatMan RE will have to wait a bit longer despite having a phylum error, as Manuel's update has delayed my implementation of the blacklist editor. As yet it's only partially implemented, and not in a way that's releasable.
 
Hi everyone, and Theraze!
Thanks for the continual upkeep!
I've just updated this script, and I get the following error when running Harvest.ash:

Bad phylum value: "construct" (BatBrain.ash, line 968)
Consult script 'WHAM.ash' not found.
You're on your own, partner.


That line from BatBrain is:
case 5233: if (monster_phylum(m) == $phylum[construct]) fields.dmg = monster_stat("hp")*6; break; // box of hammers

I have updated to the latest build.
Any thoughts? Is it odd that Harvest reports that it can't find WHAM.ash, even though prior to updating it worked fine (with the old BatBrain, SmartStasis and WHAM)?

Many thanks in advance! As always, I'm very grateful for any assistance as I am a TOTAL n00b.
 
Last edited:
At the top of this page you'll see a link to "Daily Builds" where you can download a more recent version of KoLmafia. Do that. Your problem is that the point release of KoLmafia is too old.
 
Back
Top