BatBrain -- a central nervous system for consult scripts

Also, if the basic support is there then WHAM can make Mr Yoghurt a special monster and handle it properly. I think. Marking combat items as "once" for a specific monster doesn't sound too difficult to do in BatBrain.
 
Yeah. Those basic support sections are easy. Yog-urt into the section of mobs with just physical resistance, like ghosts. And into the section for all-stun avoiders with Clancy.

It's the other stuff that's more complicated.
 
I guess I could add an abort to WHAM for Yog-Hurt if your max HP is too high (so that your healing items won't be enough). That's probably a good start anyway.
 
If you are seriously talking about making WHAM work for Yog-Urt, then shouldn't you consider the issues involved with fighting Shub-Jigguwatt? Specifically, to never do anything that causes damage to him other than "attack"? That is a bajillion times easier.
 
If you are seriously talking about making WHAM work for Yog-Urt, then shouldn't you consider the issues involved with fighting Shub-Jigguwatt? Specifically, to never do anything that causes damage to him other than "attack"? That is a bajillion times easier.
I did Jick's tower today. That seems like another alternative. It's hundreds of combats. I only expect to fight the sea bosses a couple dozen times.
 
Oooh, exciting!

I've added the following for Shubbie J:

  • Immunity to all elements.
  • Immunity to all stunning.
  • Actions that deal damage are removed from opts unless they are "attack".

I've added the following for Yoggie U:

  • Immunity to physical damage.
  • Immunity to all stunning.
  • In build_items(), filter out any items that have already happened().
  • Actions that deal damage are removed from opts unless round + equipped prayerbeads > 8.
  • Use the same criterion to skip calling build_skills() altogether.

I think that ought to do it! Preparation and in-combat decisions will still be up to the calling script / player, but those decisions can be made much more smartly now that results are accurately known.

This will be in the next update -- or you can try it here if you're curious. This is obviously all untested, so some verification that it works would be helpful.

ETA: removed attachment
 
Last edited:
Ah, I misunderstood. Thought the prayerbeads had their reductive effect each round. Fixed in the above post.

Also, "Shubbie J" is my new favorite monster nickname.
 
Last edited:
If you are seriously talking about making WHAM work for Yog-Urt, then shouldn't you consider the issues involved with fighting Shub-Jigguwatt? Specifically, to never do anything that causes damage to him other than "attack"? That is a bajillion times easier.


I did Jick's tower today. That seems like another alternative. It's hundreds of combats. I only expect to fight the sea bosses a couple dozen times.

Well, if I had been even remotely close to encountering any of those two I would've considered that yes. But I've so far only done the sea twice since it rolled out and both times as a scholar (will do all scholars first) and I have not touched anything to do with the Dreamjars at all.
 
In build_items(), filter out any items that have already happened().

I think this is the place where it would be great to get a non-funkslinging enqueue since if you want to macro teh entire fight you need to sling healing items only (well or healing + safe deleveler I guess).

ETA:
Just toying around with ideas at the moment. What do people think of this? WHAM_yoghurt_healing is a map of the top-healing items (just used for making sure we have enough different good healing items), which can probably be done in a better way, but it's fun to have a second folder on the SVN as well... :)
Code:
case "Yog-Urt, Elder Goddess of Hatred":
            if(have_effect($effect[More Like a Suckrament]) > 0) {
                int j;
                advevent heal;
                sort opts by dmg_taken(value.pdmg);
                foreach i, opt in opts {
                    if(-1 * dmg_taken(opt.pdmg) > 0.9 * my_maxhp())
                        j +=1;
                }
                if(j < 8 - equipped_amount($item[Mer-kin prayerbeads]))
                    abort("WHAM: You have too few good healing items to fight Yog-Hurt. I suggest you run away.");
                else if(dmg_dealt(basecache.dmg) > 0)
                    abort("WHAM: You have a passive damage source active. The fight will be lost if you automate it. I suggest you run away.");
                else if(!have_skill($skill[ambidextrous funkslinging])) {
                    for i from 0 to 7 - equipped_amount($item[Mer-kin prayerbeads]) {
                        sort opts by dmg_taken(value.pdmg);
                        foreach i, opt in opts {
                            if(dmg_taken(opt.pdmg) < 0) {
                                heal = opt;
                                break;
                            }
                        }
                        enqueue(heal);
                    }
                } else {
                    for i from 0 to 7 - equipped_amount($item[Mer-kin prayerbeads]) {
                        sort opts by dmg_taken(value.pdmg);
                        foreach i, opt in opts {
                            if(dmg_taken(opt.pdmg) < 0) {
                                heal = opt;
                                break;
                            }
                        }
                        enqueue(heal);
                        if(delevel_option(true).id != "")
                            enqueue(delevel_option(true));
                        else
                            macro();
                    }
                }
            }
 
Last edited:
Just toying around with ideas at the moment. What do people think of this? WHAM_yoghurt_healing is a map of the top-healing items

Needless. Just sort opts and check all healing items in inventory. The data is already there!

Not sure if you are joking or not. She is Yog-Urt, not Yog-Hurt. You knew that right? Just playing with her name?
 
This does bring to my attention another case where auto-funk is undesirable. If you have queued two healing items and the first item tops you off, don't merge it with the second item.

I'm thinking about making Yogi a huckleberry. Might test that out whenever I get around to that encounter.
 
Autofunking works just fine against the sea horse, I must've missed something teh first time. That said: When you are doing the scholar quest and use the killscroll or healscroll you get a clue in the response and can apparently only sling one item.

ALso, the batbrain attached above has a small bug for Yog-Urt (and yes, Yog-Hurt is a joke), as written it seems to remove all options when you are not done with the healing-part. I changed it to
Code:
if (dmg_dealt(a.dmg) > 0 && round + equipped_amount($item[mer-kin prayerbeads]) <= 8) return; break;  // don't kill yourself
instead of count(a.dmg) which helped me correctly automate the fight. Code has been committed to the SVN :)
 
As interesting as this SVN-debate is I have a legitimate BatBrain issue to report. The Beer Golem blocks spells and BatBrain currently identifies a spell according to
Code:
boolean is_spell(skill s) {
   if ($classes[pastamancer,sauceror] contains s.class) return true;
   if (s.to_int() > 27 && s.to_int() < 44) return true;   // hobopolis spells
   return ($skills[noodles of fire,saucemageddon,volcanometeor showeruption] contains s);
}
which is fine. However the Crimbo-hobopolis added two new Hobopolis spells Wassail (skill ID 56) and Toynado (skill ID 57) which are currently not classified as spells by BatBrain leading to their potential usage against said basement monster and horrific death by the player :(
 
I had trouble this morning in the Mer-kin Library. WHAM tried to stun the monsters there and lost because those monsters don't stun. I believe that's handled in m_hit_chance(). Sorry, I don't know which sea monsters are immune to stun/stagger. I think it's the library, coliseum, and temple, but might be more places.
 
I'm definitely very late to the party, but I've finally started looking into BatBrain. Any reason why the only damage values available are averages (I assume, anyhow, since the wiki pages for BatBrain / batfactors just say that damage in each element is just a number)? For relay use, I'd definitely find a range more useful (min/max, at the very least), and if I wanted to write my own CCS, I might want the actual distribution (although this wouldn't help _much_ more than just min/max values, since it's mostly symmetric).

edit: I just opened up the actual datafile, and I see what looks like ranges. Hmm. How do I access min/max values from BatBrain? Why are these spreads deranged, to take a term from BatBrain itself?
 
Last edited:
The datafile uses ranges, however batbrain reduces those to averages. There has been discussion earlier to add a pessimism setting that would allow you to define how close to the max or min values you want to be.
 
Back
Top