BatBrain -- a central nervous system for consult scripts

Winterbay

Active member
Question: How is BatBrain/WHAM surviving in the wonderful world of random modifiers that is the current challenge path?
 

Bale

Minion
Question: How is BatBrain/WHAM surviving in the wonderful world of random modifiers that is the current challenge path?

If the modifiers change monster stats, then Manuel was enough to let BatBrain adjust to them. (Without Manuel, the changes just made today should serve the same purpose.) Those modifiers are handled with grace.

If the modifiers do something else, like an elemental aura, electrified, ticking, ghostly or untouchable, then it is easily a death sentence to use WHAM.
 

zarqon

Well-known member
If I know the canonical names of the random attributes and how they are delimited in the proxy field I can add support for the vast majority of them.
 

Bale

Minion
If I know the canonical names of the random attributes and how they are delimited in the proxy field I can add support for the vast majority of them.

last_monster().random_attributes
Returns: aggregate boolean [string]

The trick is that it only works with the last_monster() function. You can't just check the proxy field of a given monster.
 

fronobulax

Developer
Staff member
Typo in the Ravioli line of BatFactors. I deleted it in my copy cause I was in too much of a hurry to fix it. Perhaps the benefits of letting everyone edit BatFactors are overstated or underutilized?
 

zarqon

Well-known member
Woops, I added support for Bringing Up the Rear but didn't push the corresponding update to BatBrain. Done. r71

Thanks, all. I'll get on that random attribute support this week.
 

Bale

Minion
Time for you to push out a new update, bringing it to r72.

Unfortunately your support for bringuprear doesn't define the fvar unless it is some number other than 1. This mean I get an error if I am not a Pastamancer. Fortunately the fix is simple.

Expression syntax errors for 'modifier_eval()':
Can't understand bringuprear,24+0.25*193.0+min(10.0,60)+0.0)*1.5
Expected ,, found
Unexpected end of expr
Expected ), found (zlib.ash, line 188)
You're on your own, partner.
 

Theraze

Active member
While waiting for r72, the self-fix is to do this:
Code:
   if (my_thrall() != $thrall[none] && (have_skill($skill[ravioli shurikens]) || have_skill($skill[cannelloni cannon]) || have_skill($skill[stringozzi serpent])))
      fvars["bringuprear"] = 1 + to_int(have_skill($skill[bringing up the rear]));  // functions as cap multiplier
   else
      fvars["bringuprear"] = 1;
Just search for bringuprear and put the else bit afterwards.
 

cambot

New member
While waiting for r72, the self-fix is to do this:
Code:
   if (my_thrall() != $thrall[none] && (have_skill($skill[ravioli shurikens]) || have_skill($skill[cannelloni cannon]) || have_skill($skill[stringozzi serpent])))
      fvars["bringuprear"] = 1 + to_int(have_skill($skill[bringing up the rear]));  // functions as cap multiplier
   else
      fvars["bringuprear"] = 1;
Just search for bringuprear and put the else bit afterwards.

Much obliged for the fix, it's done the trick for me and my complete lack of knowledge at code.
 

Bale

Minion
last_monster().random_attributes
Returns: aggregate boolean [string]

The trick is that it only works with the last_monster() function. You can't just check the proxy field of a given monster.

I just checked and discovered that set_monster() is called with a parameter of last_monster() so it should work fine to check m.random_attributes
 

zarqon

Well-known member
r72 Brings us initial support for random monster attributes.

Still seem to be a fair number of unknowns (how much elemental damage is the "additional" damage? What percentage is "occasionally"?), but this will keep BatBrain from making obvious blunders. For now, I've treated unknown rates as being a fairly aggressive 80%, or 50% if it's a nerf.

Also wondering how many of these mafia will support in its functions. For example, some of the attributes adjust the monster's meat drop or add item drops. Are those handled in things like meat_drop() or item_drops_array()?

The support also has the usual disclaimer: it does not include support for calculating adjusted monster stats, so it's recommended that you either have Manuel or don't use BatBrain for this challenge path.

And one further note: The current support for "ticking" simply sets the maxround to 3. This is a hack (since the combat may extend beyond that if you stun the monster) but may hopefully prevent your being killed while I consider more accurate support.

Out of curiosity, has anyone ventured into Jick's skeleton tower during this path? I'm extremely curious to know how/if these modifiers stack.
 

Bale

Minion
I have a question. If I want to ensure that a monster doesn't block an action, how do I properly add BALLS around an equeued action. I know that the following code does not work, but how do I make it work...

Code:
enqueue("while hasskill Curse of Weaksauce");
enqueue(get_action($skill[Curse of Weaksauce]));
enqueue("endwhile");

Also wondering how many of these mafia will support in its functions. For example, some of the attributes adjust the monster's meat drop or add item drops. Are those handled in things like meat_drop() or item_drops_array()?

At this moment, meat_drop() is modified by the random modifiers. Item drops are not yet supported.

Out of curiosity, has anyone ventured into Jick's skeleton tower during this path? I'm extremely curious to know how/if these modifiers stack.

I've heard that procedurally generated monsters don't get random modifiers.
 

lostcalpolydude

Developer
Staff member
The support also has the usual disclaimer: it does not include support for calculating adjusted monster stats, so it's recommended that you either have Manuel or don't use BatBrain for this challenge path.

Veracity has been adding those. If there are any missing, they should be straightforward to add to mafia once they are pointed out and spaded.
 

zarqon

Well-known member
@lost: Thanks, that will allow BatBrain to stay relevant for non-Manuel owners during this path.

@Bale: BatBrain is deliberately designed not to allow enqueueing actions with repeat conditions or other macro flow controls since they completely throw off its predictive abilities. By design, it allows you to submit such actions with repeat conditions but not to enqueue them (since the information after queueing would be essentially meaningless). So if you want to use BatBrain for this situation, your best option is the macro(skill,repeat) function, which will submit a macro (including any actions enqueued thus far) with the repeat conditions you specify. After that, you can continue to enqueue the rest of your actions with accurate information.

If you don't care about predictive accuracy (because you are far more powerful than the monster, for instance), then you could build your own custom action and specify your custom BALLS code as the id of the advevent, but that would not be using BatBrain as intended. :)
 

Bale

Minion
Thank you for the advice. I'll consider what to do about cartwheeling and annoying monsters. I really should probably just try to run away when it is annoying and give up the fight.
 

heeheehee

Developer
Staff member
r72 Brings us initial support for random monster attributes.

Still seem to be a fair number of unknowns (how much elemental damage is the "additional" damage? What percentage is "occasionally"?), but this will keep BatBrain from making obvious blunders. For now, I've treated unknown rates as being a fairly aggressive 80%, or 50% if it's a nerf.
Seems to be 18-22% of max HP (rounded down) elemental damage for the auras, and 20% of max HP for electrified. Rates are for the most part unknown because no effort has been put forth into spading them (and there's really nothing to do but stasis a lot in Fernswarthy's basement).

I've heard that procedurally generated monsters don't get random modifiers.
That's incorrect. They do get modifiers, but the modifiers don't display as part of the name (the ocrs variable still gets set, though).
 

Bale

Minion
BatBrain needs:

If m.random_attributes["untouchable"] then the damage cap on physical and all elements is 5.

If m.random_attributes["unstoppable"] then the monster cannot be staggered or stunned.

I'm not sure how much physical damage resistance monsters have if m.random_attributes["ghostly"]. Can anyone fill in that information for me?
 
Top