BatBrain -- a central nervous system for consult scripts

zarqon

Well-known member
ARGH. The mobile version of this site keeps deleting my posts when I go to edit them. So, I guess I shall retype it again.

Bale, what you recall is correct, but only for physical resistance. Elemental resistance, however, still needs to be in batfactors, because that information is not accessible from mafia.

@Albino: Unfortunately, due to the way the Map Manager works, we cannot add comments to data files, as they will be removed by mafia when it loads the file from the URL. A link to that page is in the first post, though.
 
Last edited:

AlbinoRhino

Active member
So ... the first thing I happened to look at in this file, since having the fields explained, was an oil cartel.
I see this line:
PHP:
monster    1238    oil cartel    3.0 hot,spooky,stench,sleaze|0.5 cold    0    group 3, nostun, autohit

According to what I understand from reading the batfactors wiki page, that line should be:

PHP:
monster    1238    oil cartel    2.25 hot,stench,sleaze|1.0 spooky,cold    0    group 3, nostun, autohit

However, I find it unlikely that I found a mistake in the first thing that I looked at, which leads me to believe that I'm reading something wrong. Could anyone clarify why the monster resistance is written the way it is ?
 

zarqon

Well-known member
I find it unlikely that I found a mistake in the first thing that I looked at, which leads me to believe that I'm reading something wrong.

Not so unlikely, actually. New information is often added to batfactors before it's completely spaded. I don't know what the oil cartel information should be at the moment as I'm on a bus, but it's quite likely you found an error.

Also, I fixed cow pokers yesterday.
 

Bale

Minion
according to the wiki,

Oil Cartel resists 75% of all elemental damage. With simultaneous resistance and vulnerability to Cold Damage and Spooky Damage, the damage penalty is only 50% for these elements.
 

Magus_Prime

Well-known member
Another L & T issue with Batbrain: cow cultists can have the "Vile" or "Reprehensible" label. Vile reduces elemental damage by quite a bit (the wiki says it's approximately 80%). The reprehensible label reduces all elemental damage to 1.

I just saw SimpleSmack try to kill a reprehensible cow cultist with twenty-seven rounds of Stream of Sauce to little effect. I tried again with WHAM and had the same result (not surprising).

Edit: Just checked batfactors and the neither variant of the cow cultist is in the file. That would explain it. :)

I took a look at the batfactors documentation in the wiki. I was prepared to make my first stab at creating a batfactors entry but I don't think it will help. The base cow cultist monster doesn't have elemental resists and the vile and reprehensible variants don't have a separate Monster Manuel entry.
 
Last edited:

Veracity

Developer
Staff member
Yeah. KoLmafia reduces them to the same monster object since they have the same monster id. All LT&T monsters have three variants, depending on whether you find them in the Easy, Medium, or Hard quest. I don't know if we track that, but if, rather than batfactors handling it itself, we wanted to have an additional array of attributes a la OCRS attributes for "vile" or "reprehensible", KoLmafia would have to use that info itself.
 

zarqon

Well-known member
Yes, BatBrain has no particularly handy way of accounting for the additional attributes of the L&T monsters, since according to mafia they are the same monster as the base version. Those aren't the only two ways they get harder that BatBrain doesn't know about yet, either.

Since the random_modifiers proxy field recently got multipurposed to also include Intergnat-added modifiers, perhaps it could be multipurposed yet further to include L&T modifiers? That would be extremely handy and might be worth a feature request. And while we're at it, maybe it could include procedural skeleton modifiers, heh.
 

Magus_Prime

Well-known member
might be worth a feature request.

Submitted.

....and rejected. The prevailing sentiment of the developers is that

  1. More spading is needed on the effects of the modifiers
  2. Using the "lttQuestDifficulty" preference in addition to the monster ID should allow scripts to cope with most things

heeheehee made some excellent points. Among which is the fact that some of the L & T modifiers have the same name as OCRS modifiers.

I never even got to the procedural skeletons part of the request. I don't have access to the tower right now and that should probably be a separate request.
 
Last edited:

zarqon

Well-known member
Ok, just had a read through the feature request thread. Looks like for starters BatBrain will need to add delevel resistance depending on the difficulty property. The initiative bonus based on difficulty doesn't concern BatBrain, but may be a thing that other scripts would want to know about.

Also, I had assumed the adjectives appeared variably, but the responses in the thread appear to indicate that they do not vary. Hard difficulty cow cultists are always reprehensible, etc.

So, this is what I've taken from the thread so far. I note a disturbing amount of question marks.

MonsterMediumHard
Coal snakehot aura dealing ?? damage110 hot aura
Drunk cowpoke10% maxhp per hit20% maxhp per hit
Cow cultist80% elemental res100% elemental res
Camp cooktalented: ??very talented: ??
CaugrN/Acannot be stunned or staggered
Grizzled bearN/Adamage cap 50, exponent 0.7
Hired gun??% maxhp per hit30% maxhp per hit
Moomy (note: no easy moomy)hulking: ??60% all res
Mountain lionvicious: ??rabid: ?? (NOT init bonus?)
PyroboveN/Aset you on fire for ?? damage
Restless ghostvengeful: ??shrieking: 75% elemental res
Spidercowterrifying: spooky aura (?? dmg)horrifying: spookier aura (?? dmg)
Wannabe gunslinger??cannot be stunned or staggered
Diamondback rattlerbig: ??huge: ??
Frontwinderticked-off: ??N/A
Buzzardsmelly: ?? stench damage every roundN/A
Surly gamblerfat: ?? (perhaps more hp?)N/A
Skeletal gunslingerspooky: ??terrifying: ?? (confirmed: no spooky aura)

I'm quite tempted to treat all Medium monsters as having half the bonus given to the Hard monsters. I'm also wanting to reduce the number of question marks in the above table.

I'll get to work adding support for what's here so far, but more information to go on would be welcome.
 
Last edited:

heeheehee

Developer
Staff member
Grizzled bear is damage mitigation ("tough-as-nails grizzled bear has a softcap of 50, and an exponent of 0.7 (possibly higher softcap at lower difficulties"). Other than that, everything seems to agree with what I've seen.
 

zarqon

Well-known member
Ok, r98 brings us improved support for these peskily ramping telegram monsters. Rather than writing out swathes of logic for monster names and property checks, I simply added an lttdifficulty fvar, which batfactors can now avail itself of. I've added everything in the table above (thanks very much to Magus and heeheehee for doing most of the info-supplying). The only things I had to add to BatBrain itself were the delevel resistance in the zone and the special X% of maxhp attacks.

In the event that you, an alert reader and Loather, discover better information and decide to inform BatBrain by adding it to batfactors yourself, do note that the lttdifficulty fvar is one less than the lttQuestDifficulty property, meaning it ranges from 0 to 2. This simplifies most formulas.

Enjoy!

@AlbinoRhino: By the way, it does appear the very first thing you found when looking at batfactors was an error. And then a correct solution. Congratulations!
 

fxer

Member
Did something about this change make BB stop casting Extract? Starting today it just does pocket crumbs and air dirty laundry for me...
 

Magus_Prime

Well-known member
SmartStasis is still casting Extract for me. Is it possible that Batbrain/SmartStasis decided that you would get beaten up if it took the extra round to cast Extract?
 

zarqon

Well-known member
Is Extract actually available to you in vanilla? If you ascended, your terminal reset and you have to re-activate Extract.

Extract is currently not specified in SS as a custom skill -- it's only chosen using the regular logic as a "stasis" option when it is profitable. We could add it to SmartStasis as a custom skill, in which case it would always attempt to cast it, even unprofitably. It would still try to avoid getting you killed, but the profitability logic would be ignored. On the plus side, it would be cast in the right order -- i.e. before combat-enders such as yellow rays or banishers. But 20MP is an awful lot to be casting every fight in early game, which is why I haven't added it to SS yet. Opinions?

Also, I've just started my first Actually Ed the Undying run, and it's good fun. I've always found Ed particularly hilarious, and they did a good job keeping that same spirit running in the banter. I've been playing the whole thing manually for my first run. But I did notice something that made me curious: none of Ed's skills are listed as "Ed" skills when checking $skill[].class. Is that an oversight or a Decision? If it was an oversight, I have an informational script that would really like that being changed and I'll go BR/FR it.
 

heeheehee

Developer
Staff member
Another point: if you're running an outdated build of Mafia (but not too outdated), then $skill[extract] fuzzy-matches to $skill[extract oil]. If casting extract in the relay browser yields something like "playername casts CHANCE!", then this is the case.
 

lostcalpolydude

Developer
Staff member
Also, I've just started my first Actually Ed the Undying run, and it's good fun. I've always found Ed particularly hilarious, and they did a good job keeping that same spirit running in the banter. I've been playing the whole thing manually for my first run. But I did notice something that made me curious: none of Ed's skills are listed as "Ed" skills when checking $skill[].class. Is that an oversight or a Decision? If it was an oversight, I have an informational script that would really like that being changed and I'll go BR/FR it.

Can you explain what you mean? Everything in the range of 11001 through 11031 (and I expect the code is just skillId % 1000 == 11) gives Avatar of Boris for me.
 

fxer

Member
Extract is currently not specified in SS as a custom skill -- it's only chosen using the regular logic as a "stasis" option when it is profitable.

Oh so SS must have just decided it's unprofitable now to cast extract, and I do have the skill enabled in aftercore for 5mp. Since it also has a chance of a .edu/.enh/.ext item dropping that ups the profitability quite a bit, but I can just add it to the beginning of my ccs before SS is called
 
Top