BatBrain -- a central nervous system for consult scripts

I will try that on Thurday at the end of the new run. I was getting the error in multiple location that worked ok in-run, and failed in aftercore.
is WHam verbosity seperate from zlibs (I already had verbosity at 9 for the bug report)

best regards
Dave
I tried again in the same locations, and could not reproduce the problem ...

Dave
 
Okay, I finally got a chance to test the Mer-kins for stunning. Gym and elementary school mer-kins can be stunned (stagger and multiround). Colosseum ones can't be stunned at all. Library ones can be single round stunned (stagger), but not multi round stunned. I've updated batfactors.txt to reflect this information. The rumored damage caps are not in batfactors. I hate spading damage formulas ever since Jarlsberg.
 
Thanks Crowther, glad this info could be added to batfactors. I'm finally delving into the Sea to experience the new content myself. Seems pretty cool -- there's a point to diving again! I bitterly stopped going to the Sea after my hard-earned sushi mat became un-permanent, but I'm liking all the changes and new stuff I've noted so far.

I've added lassoing and seahorse training to SS, fixed various entries in batfactors, and will see if any other changes are needed as I go.
 
I'm finally delving into the Sea to experience the new content myself. Seems pretty cool -- there's a point to diving again! I bitterly stopped going to the Sea after my hard-earned sushi mat became un-permanent, but I'm liking all the changes and new stuff I've noted so far.
Yeah, I'm still a bit bitter about the sushi mat. The feeling I got was, "I'm too lazy to do this right, so screw you for ascending." Today I mostly use the free fish pipe, the fishy semi-rare and if that's not enough a couple pieces of fish meat with sake. Which isn't too bad.

Anyway, the sea has been a lot of fun and BIG! is a great compliment for it. I've been playing the game a bit much recently. I've got one of everything and killed dad twice now.
 
I was annoyed, too, when they took away my sushi mat, but I really don't think it's a problem in-game any more.

The sushi mat is 50 sand dollars and the Mer-kin stashbox gives 30-50 sand dollars, so simply running the sea quest almost pays you back, even if you don't find any sand dollars or thingpouches containing sand dollars along the way. I always eat sushi when I'm doing the sea - and I end up with plenty of turns of Fishy for doing so - and I always end up with more sand dollars than I started.

(And if I have 40 or so turns left after I am done with the quest, I buy the skate park map, drive off both kinds of skates, and farm for 30 turns with the 3 skate park buffs, yielding 30 more sand dollars, for a net gain of 5.)
 
I was annoyed, too, when they took away my sushi mat, but I really don't think it's a problem in-game any more.

The sushi mat is 50 sand dollars and the Mer-kin stashbox gives 30-50 sand dollars, so simply running the sea quest almost pays you back, even if you don't find any sand dollars or thingpouches containing sand dollars along the way.

Even better, the damp old boot costs 50 sand dollars and you can trade it for a damp old wallet that will give you 55-70 sand dollars, so that is the rest of the expense.
 
Since I found +item doesn't matter for the quest, I've been running Happy Medium for the sea, and sometimes Stomping Boots, getting me drinks and pastes which give Fishy. I often finish with just fishy pipe and semi-rare, but if RNG is unkind I now have a large stockpile of drinks and pastes for that circumstance. So many people are in the sea that most of the drops have crashed in price, so I don't feel I miss much.
 
Yeah, TPTB have finally earned my forgiveness for that. Like I said, I'm liking all the changes, even (*obligatory grumble*) the sushi mat. As people have pointed out, getting one is not that big an accomplishment anymore, so having to do it every time (or at least farm extras beforehand) is likewise not a big deal. My only lingering bitterness comes from the fact that I liked that it was a big deal. But with the new mega-outfits, there are now far bigger fish to fry (!), so all is forgiven.

ISSUE! I noted yesterday in the Mer-kin Elementary School that the monsters were frequently hitting me for about 20 damage (BatBrain calculated more like 12), despite the fact that I far and away outmoxied them. So all of BatBrain's numbers for their attack rate and damage appear to be incorrect. Anyone have any ideas what's going on here? Do they hit based on unbuffed moxie? Has anyone been able to "safe adventure" against them (they can't hit you)?

It looks like several more runs before I attempt the Gladiator path -- when I do, it appears that some autoresponses need adding to batround().
 
They tell me over in the WHAM thread that this is a BatBrain problem :-)

Expression syntax errors for 'modifier_eval()':
Can't understand dmg (zlib.ash, line 162)

(zLib line number will not be the latest zLib since message was generated 7/17 before most recent update).

It's your familiar... and it's a BatBrain problem, not a WHAM one. The mosquito-type familiars have -dmg as one of their batfactors fields, but BatBrain doesn't currently override it properly.
 
That's been mentioned first in post 982, zarqon commented in 983, mentioned again in 1008, zarqon thought it may still be a problem in 1011 and said no code had changed to fix it in 1013.

Any chance the problem is that it's doing an exact match? This appears to be the code line in question:
Code:
      fvars["dmg"] = dmg_dealt(res.dmg);   // this is used for starfish/mosquitos and as a dmg_dealt cache
What it's actually trying to match though is -dmg, so we could throw:
Code:
      fvars["dmg"] = dmg_dealt(res.dmg);   // this is used as a dmg_dealt cache
      fvars["-dmg"] = -dmg_dealt(res.dmg); // this is used for starfish/mosquitos
to replace it and explain what each does.
 
Yes, I don't know what's causing that and haven't been able to duplicate it, even when using any of those familiars.

This problem occurs because "dmg" is not being replaced with a number in the string "-dmg", which means that fvars somehow doesn't contain "dmg" at the time the formula is evaluated. I don't know why this is, since the code setting "dmg" happens before other formula evaluations in to_event(), but evidently something's happening out of order for you which isn't happening for me.

Adding an fvar for "-dmg" would be pointless, as if the first fvar isn't present, the second one wouldn't be either.
 
So it's not an exact matcher? I was thinking that fvars["dmg"] was trying to match dmg and only dmg... and fvars["-dmg"] is not fvars["dmg"], so it wouldn't match and be replaced...
 
Here's what the matcher in ZLib's eval() makes of the formula "-dmg":

> ash string expr = "-dmg"; matcher m = create_matcher("\\b[a-z_][a-zA-Z0-9_]*\\b", expr); m.find(); m.group(0)

Returned: dmg

It doesn't also grab the minus sign. So it's identifying "dmg" and then checking if fvars contains "dmg". If it does, it replaces "dmg" with a number. If it doesn't, it generates the error.
 
r14 Update

Some very nice goodies in this update!

  • The first goodie is a squashed bug! Since moving monster data to batfactors, multistun immunities were not actually correctly handled -- in fact, BatBrain ignored those immunities because it was checking the wrong number. I have flattened that bug. Who knew crushed arthropods could be so satisfying?
  • The second goodie is an enhancement which I believe will drastically increase the satisfaction level of results attained through BatBrain-powered action selection. BatBrain now ignores HP/MP profit from out-of-combat restore items, such as MMJ, seltzers, casts, etc. This will not only prevent restoratives from being preferred as stasis actions or attack actions (which I've seen more times than I like), it will also keep recovery handling more in the hands of your recovery script, in addition to not squandering combat rounds restoring HP/MP you could just as easily restore out of combat. BatBrain still recognizes the HP/MP gain from these actions (so if a combat script wanted to recover up to a target MP, it could), but it ignores the profit from them.

Next, my recent diving has resulted in not only my first wicked cool outfit piece, but also a few Sea enhancements for this script!

  • I added monster healing for Mer-kin Outpost monsters. I assumed a 50% rate at 250 HP, for an average of +125 HP/round, capped at the monsters' max HP. That ought to help your script to choose actions which will actually kill the monsters before the combat runs out.
  • The Pufferfish is now treated as having a special attack and never missing (much like Mammon the Elephant). Also, I now make exceptions for these two monsters in die_rounds(), calculating the actual number of rounds remaining rather than dividing your HP by the expected damage on that one round (quite inaccurate for these two monsters). These changes ought to help your BatBrain-powered script defeat pufferfish rather than losing to them.
  • I've also added the Ball/Net/Blade gladiatorial skills to batfactors, so if you should be diving with those weapons equipped, BatBrain will know what those skills can do (until you summon a dolphin and mafia forgets you're in the Sea -- but that squishy insect has been reported so hopefully it won't last too long). When I get around to that path next run I'll have a go at adding auto-responses for the monsters with the keywords.

Enjoy these deaths of segmented creepy beasties!
 
I've also added the Ball/Net/Blade gladiatorial skills to batfactors, so if you should be diving with those weapons equipped, BatBrain will know what those skills can do (until you summon a dolphin and mafia forgets you're in the Sea -- but that squishy insect has been reported so hopefully it won't last too long). When I get around to that path next run I'll have a go at adding auto-responses for the monsters with the keywords.
Well... you can use those skills in any underwater combat and they will do things for you. You can use them exactly once each per combat - unless you are in the Colosseum and are using the correct skill in response to a special move by your opponent.

Are you taking that into effect - i.e. Net Loss vs. a balldodger who is about to "lose control" (which leaves Net Loss available for you to use again this combat) vs. Net Loss at any other time - even against a balldodger - which delevels him, but makes the skill unavailable to use again this combat?
 
Yep. Adding those skills to batfactors makes them work (although I hadn't realized they all were once-only) in the majority of underwater combats. Adding the auto-responses (not yet done) will make them work against the special monsters.
 
Probably needs override handling when the auto-response code is added to remove the once, but only when the response is right. Or just re-read available skills.

Since you can't macro-fy those combats, since they need to happen a round at a time, right? Or can you make a pure-KoL macro string that will automatically match combat-text and pick the right attack for you? My brain says no, but... that would be pretty nifty if you could, and would save 3-25 server hits (depending on how buffed you are) per fight.
 
According to the Wiki, every skill except for Ball Sack, Net Neutrality, and Blade Runner - all of which temporarily stun your opponent - is marked "once per combat". Presumably the other three can be used to re-stun your opponent, after it pulls itself together again.
 
I marked all the skills with "once" that say so in the Wiki (Although I'd missed marking Ball Sweat; that's now fixed). Auto-responses, just like all the other auto-responses that are automatically added to every macro submitted, will use BALLS checks to determine whether to reactively cast the skill, so they will work against the special monsters regardless of their presence in opts. You will then be able to defeat these monsters by simply enqueueing your normal attack action over and over (or by simply clicking any attack action in BatMan RE).
 
Back
Top