BatBrain -- a central nervous system for consult scripts

Bale

Minion
It does? That's odd. (I quickly check and confirm that I had already updated to r72.) I wonder why it using Saucecicle against untouchable monsters...

Investigation of Batfactors reveals why it is not using Belch the Rainbow, but still, I'd think that Saucestorm is clearly a better choice.

Is there any way for Belch the Rainbow to recognize that skillLevel117 is relevant to the damage it does?

Edit: Yup. Just encountered another one of those and for some reason my script is picking Wave of Sauce to kill it. There's definitely either a problem with my script or batbrain.
 
Last edited:

Bale

Minion
I found a problem with untouchable. It was BatBrain!

Code:
         case "damagecap": if (is_integer(val)) matt["damagecap"] = min(matt["damagecap"], max(1,to_int(val)));

At first sight that looks good. However 0 is the default value to indicate there is no damage cap. Since matt["damagecap"] starts at 0, obviously min(0, x) will always be zero.
 

Bale

Minion
Actually, removing the min still doesn't seem to have fixed the problem. (Although it is producing the correct value for matt["damagecap"]) Checking the damage done by each skill in battle against an untouchable monster with foreach x,o in opts print(o.id + " : " + dmg_dealt(o.dmg)); is producing this:


Code:
skill 1003 : 106.49
skill 4020 : 28.415999999999997
skill 2015 : 106.49
skill 3003 : 106.49
skill 4005 : 106.49
skill 4003 : 85.24799999999999
skill 7246 : 17.759999999999998
skill 1022 : 33.93
attack : 14.563220378809493
skill 1005 : 106.49
skill 3005 : 106.49
skill 3007 : 106.49
skill 4009 : 106.49
skill 4032 : 106.49
skill 3020 : 13.32
skill 1004 : 10.872207063514708
skill 2023 : 11.1
skill 4012 : 106.49
skill 29 : 106.49
skill 33 : 106.49
skill 1023 : 106.49
skill 3008 : 106.49
skill 5033 : 39.96
skill 97 : 106.49
skill 2003 : 10.406007063514709
skill 5012 : 26.085
skill 1038 : 47.86690070571899
skill 2 : 11.1
skill 31 : 84.8928
skill 37 : 84.8928
skill 5037 : 29.6
skill 5036 : 19.240000000000002
skill 5008 : 6.66
skill 6037 : 17.02
skill 5005 : 5.18
use 1777 : 16.65
use 559 : 2.3125
skill 94 : 35.36460141143798
use 2 : 1.0
skill 17047 : 1.0
skill 5035 : 13.875
skill 6025 : 1.85
skill 28 : 106.49
skill 30 : 106.49
skill 36 : 106.49
skill 32 : 106.49
skill 117 : 5.0
skill 5021 : 1.0
skill 5003 : 1.48
skill 99 : 12.21
skill 6029 : 1.1099999999999999
skill 2028 : 1.0
skill 5019 : 1.0
skill 6034 : 1.0
use 1939 : 1.0
skill 2022 : 1.0
skill 43 : 1.0
skill 3019 : 1.0
use 747 : 2.775
skill 42 : 1.0
use 518 : 0.0
skill 7182 : 0.0
skill 7247 : 0.0
use 2947 : 0.0
skill 7183 : 0.0
use 27 : 0.0
use 829 : 0.0
skill 3004 : 0.0
use 452 : 0.0
skill 4014 : 0.0
skill 4029 : 0.0
use 469 : 0.0
use 474 : 0.0
use 208 : 0.0
skill 3009 : 0.0
use 1922 : 0.0
skill 79 : 0.0
skill 1033 : 0.0
skill 4034 : 0.0
skill 15 : 0.0
skill 2032 : 0.0
use 1958 : 0.0
use 1907 : 0.0
skill 104 : 0.0
use 2091 : 0.0
skill 19 : 0.0
use 7266 : 0.0
runaway; repeat : 0.0
 

zarqon

Well-known member
r73 stops min-ing damagecap by itself, as well as several other changes:

  • A very important bugfix for stun_action(). I had a sign reversed, so it was seldom recommending stuns when it ought to have. I found myself getting killed while flyering, despite having multiple free stunning skills at hand, and getting into the numbers revealed the nasty little bug hiding in a closet talking to his regex friends. Using my tongs, I scared his friends away and then stomped on him by typing a minus, thus negating the bug.
  • Removed support for ID-ing spheres. Who cares about ID-ing spheres? Not us.

I also just updated batfactors with what ought to be the correct formula for Belching Rainbows.

Enjoy!
 
Looks like the removal of id-ing spheres has broken smartstatis

function 'get_sphere( string )' undefined. This script may require a more recent version of KOLmafia and/or its
supporting scripts. (Smartstatis.ash, line 212)


r73 stops min-ing damagecap by itself, as well as several other changes:

  • A very important bugfix for stun_action(). I had a sign reversed, so it was seldom recommending stuns when it ought to have. I found myself getting killed while flyering, despite having multiple free stunning skills at hand, and getting into the numbers revealed the nasty little bug hiding in a closet talking to his regex friends. Using my tongs, I scared his friends away and then stomped on him by typing a minus, thus negating the bug.
  • Removed support for ID-ing spheres. Who cares about ID-ing spheres? Not us.

I also just updated batfactors with what ought to be the correct formula for Belching Rainbows.

Enjoy!
 

zarqon

Well-known member
Thanks, I just committed a fix to SmartStasis.

Also, did you type that entire error message in rather than pasting it? Or is your script actually named Smartstatis.ash?
 

Veracity

Developer
Staff member
Ghostly is 87.5% (7/8) physical resistance.
How strange. How do you know this? Where was it spaded?

Every monster for which we have recorded physical resistance has a nice even divisible-by-five percentage. Hence, internally, we store it as an integer from 0 to 100.

If what you say is true, KoL itself does one of the following:

- physical resistance is a float
- physical resistance is a rational (7/8...)
- physical resistance is an integer, but represents (at least) .1 percentage points

... and in order to model it accurately, we'd have to do the same.

Code:
ancient protector spirit	0	protspirit.gif	HP: 80 Def: 145 Atk: 158 Init: 10 Phys: 100 P: undead
Battlie Knight Ghost	1257	aboo_wars.gif	Atk: 76 Def: 64 HP: 40 Init: -10000 Phys: 100 E: spooky P: undead
booty crab	634	bootycrab.gif	Atk: 100 Def: 90 HP: 70 Init: 10000 Meat: 286-334 E: sleaze Phys: 25 P: beast
chalkdust wraith	383	chalkdust.gif	Atk: 25 Def: 23 HP: 25 Init: 50 ED: spooky Phys: 100 P: undead
Claybender Sorcerer Ghost	1254	aboo_wiz.gif	Atk: 70 Def: 70 HP: 40 Init: -10000 E: spooky P: undead Phys: 100
Demon of New Wave	892	5_4a.gif	BOSS Atk: 200 Def: 180 HP: 500 Init: 100 Phys: 40 P: demon
Dusken Raider Ghost	1255	aboo_dipshit.gif	Atk: 72 Def: 68 HP: 40 Init: -10000 E: spooky P: undead Phys: 100
ghost miner	370	ghostminer.gif	Atk: 30 Def: 27 HP: 31 Init: 50 E: spooky Phys: 100 P: undead
Gorgolok, the Demonic Hellseal	888	1_4a.gif	BOSS Atk: 200 Def: 180 HP: 400 Init: 100 Phys: 40
Heavy Kegtank	504	warfratar2.gif	Atk: 180 Def: 162 HP: 300 Init: 20 E: sleaze Phys: 50 P: orc
Lumpy, the Demonic Sauceblob	891	4_4a.gif	BOSS Atk: 200 Def: 180 HP: 500 Init: 100 Phys: 40 P: demon
Lumpy, the Sinister Sauceblob (Volcanic Cave)	885	4_3.gif	BOSS Atk: 185 Def: 166 HP: 260 Init: 90 Phys: 25 P: slime
Mobile Armored Sweat Lodge	488	warhipar2.gif	Atk: 180 Def: 162 HP: 300 Init: 20 E: stench Phys: 50 P: hippy
Protector Spectre	450	protspect.gif	Atk: 164 Def: 151 HP: 100 Init: 30 Phys: 100 P: undead
Snow Queen	385	snowqueen.gif	Atk: 107 Def: 94 HP: 70 Init: 60 E: cold Phys: 100 P: elemental
Space Tourist Explorer Ghost	1256	aboo_trek.gif	Atk: 74 Def: 66 HP: 40 Init: -10000 E: spooky P: undead Phys: 100
swarm of Knob lice	1059	kg_lice.gif	Atk: 25 Def: 22 HP: 30 Init: 50 Phys: 50 P: bug
trophyfish	774	trophyfish.gif	Atk: 5000 Def: 4500 HP: 15000 Init: 200 Phys: 25 P: fish
War Frat Kegrider	420	warfratar.gif	Atk: 170 Def: 153 HP: 300 Init: 20 E: sleaze Phys: 25 P: orc
War Hippy Dread Squad	410	warhipar.gif	Atk: 170 Def: 153 HP: 300 Init: 20 E: stench Phys: 25 P: hippy
Whatsian Commando Ghost	1258	aboo_who.gif	Atk: 78 Def: 62 HP: 40 Init: -10000 E: spooky P: undead Phys: 100
wild seahorse	778	seahorse.gif	Atk: 500 Def: 900000 HP: 1000000 Init: 10000 P: fish Phys: 100
X Stone Golem	242	stonegolem.gif	HP: [0.85*ceil(BL^1.4)+ML] Def: [2*ceil(BL^1.4)+ML] Atk: [2*ceil(BL^1.4)+ML] Init: 70 Phys: 50 P: construct
Ghost of Fernswarthy's Grandfather	238	fernghost.gif	HP: [0.425*ceil(BL^1.4)+ML] Def: [2*ceil(BL^1.4)+ML] Atk: [2*ceil(BL^1.4)+ML] Init: 70 Phys: 100 P: undead
X-dimensional horror	592	dimhorror.gif	HP: [1.7*ceil(BL^1.4)+ML] Def: [2*ceil(BL^1.4)+ML] Atk: [2*ceil(BL^1.4)+ML] Init: -10000 Phys: 90 P: horror
cold ghost	1408	dvcoldghost1.gif,dvcoldghost2.gif,dvcoldghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*10] E: cold P: undead Phys: 100
hot ghost	1407	dvhotghost1.gif,dvhotghost2.gif,dvhotghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*60] E: hot P: undead Phys: 100
sleaze ghost	1411	dvsleazeghost1.gif,dvsleazeghost2.gif,dvsleazeghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*10] E: sleaze P: undead Phys: 100
spooky ghost	1409	dvspookyghost1.gif,dvspookyghost2.gif,dvspookyghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*10] E: spooky P: undead Phys: 100
stench ghost	1410	dvstenchghost1.gif,dvstenchghost2.gif,dvstenchghost3.gif	HP: [600+KV*200+ML] Atk: [400+KV*100+ML] Def: [400+KV*100+ML] Init: [15+KV*10] E: stench P: undead Phys: 100
Cyrus the Virus	811	prim_cyru.gif	BOSS HP: 100000 Def: 100000 Atk: 100000 Init: 0 Phys: 100 P: plant
BRICKO cathedral	927	brickocathedral.gif	FREE Atk: 725 Def: 652 HP: 100000 Init: 200 P: construct Phys: 50
BRICKO gargantuchicken	928	brickogchicken.gif	FREE Atk: 1000 Def: 900 HP: 1000000 Init: 300 P: construct Phys: 50
BRICKO vacuum cleaner	925	brickovacuum.gif	FREE Atk: 400 Def: 360 HP: 2500 Init: 150 P: construct Phys: 10
The Landscaper	917	landscaper.gif	BOSS Atk: 100 Def: 90 HP: 100000 Init: -10000 EA: hot Phys: 100 P: demon
The Whole Kingdom	0	wholekingdom.gif	HP: 10000000 Def: 1 Atk: 1 Phys: 100 P: construct
Vanya's Creature	953	cvcreature.gif	BOSS Atk: 1000 Def: 900 HP: 3000 Init: -10000 Meat: 1500 Phys: 50 E: spooky P: construct
Crys-Rock	854	crys_rock.gif	HP: [min(240,HP*2/3)] Def: [min(300,MUS+10)] Atk: [min(300,MOX+10)] Exp: [(min(300,STAT+10))/4] Init: 50 Phys: 50
Don Crimbo	0	doncrimbo.gif	HP: 1000000 Def: 89999 Atk: 99999 Init: 100 Phys: 100
reanimated baboon skeleton	988	foss_baboon.gif	HP: 150 Def: 135 Atk: 150 Init: -10000 Phys: 100 P: undead
reanimated bat skeleton	986	foss_bat.gif	HP: 50 Def: 45 Atk: 50 Init: -10000 Phys: 100 P: undead
reanimated demon skeleton	990	foss_demon.gif	HP: 250 Def: 225 Atk: 250 Init: 50 Phys: 100 P: undead
reanimated giant spider skeleton	991	foss_spider.gif	HP: 300 Def: 270 Atk: 300 Init: 50 Phys: 100 P: undead
reanimated serpent skeleton	987	foss_serpent.gif	HP: 100 Def: 90 Atk: 100 Init: -10000 Phys: 100 P: undead
reanimated wyrm skeleton	989	foss_wyrm.gif	HP: 200 Def: 180 Atk: 200 Init: -10000 Phys: 100 P: undead
Uncle Hobo	0	unclehobo.gif	HP: 15000 Def: 450 Atk: 500 Init: 100 Phys: 100
Chef Boy, R&D	1466	chefboy.gif	WANDERER Scale: 5 Init: -10000 P: dude Phys: 100
 

Veracity

Developer
Staff member
OK, the only place we actually use physical resistance is the $monster.physical_resistance proxy field, which is currently an int. It was easy enough to make it a double internally (and hence an ASH float).

My question: what about a "ghostly" monster that has better than 87.5% physical resistance to start with? does it simply replace the previous value - much as "broke" can give a monster a Meat drop even when it didn't used to have one?
 

Lord_Towers

New member
i didn't play over the weekend and today i get this error as soon as the first battle happens

Switch conditional has type int but label expression has type string (BatBrain.ash, line 1588)
Consult script 'WHAM.ash' not found.

nothing changed over the weekend, WHAM.ash is still in the same exact spot (the scripts directory next to all the others) but i'm guessing that the first error BatBrain is throwing may be causing the issue?
 

heeheehee

Developer
Staff member
How strange. How do you know this? Where was it spaded?

Every monster for which we have recorded physical resistance has a nice even divisible-by-five percentage. Hence, internally, we store it as an integer from 0 to 100.

If what you say is true, KoL itself does one of the following:

- physical resistance is a float
- physical resistance is a rational (7/8...)
- physical resistance is an integer, but represents (at least) .1 percentage points

... and in order to model it accurately, we'd have to do the same.

Not necessarily? It could be that ghostly just divides physical damage by 8 at the end of the day.

For what it's worth, I tested a few 0-variance actions (divines, for instance):
Code:
expected	observed	round(expected/8)	expected / observed	
494	62	62	7.967741935
156	20	20	7.8
10	1	1	10

Granted, I could have tested more datapoints. I also should have tested how it interacts, say, with knob lice (which have innate physical resistance of 50%).

62 / 494 is about 12.55%, so well outside the realm of any "multiple-of-5 percentage" scheme.

edit: 8148 buffed muscle, 1053 damage from a divine noisemaker against a ghostly newt. That seems to correspond to a 13% damage resistance. Hm.
 
Last edited:

heeheehee

Developer
Staff member
and, divine noisemaker vs dancin', ghostly swarm of Knob lice with 7088 buffed muscle did 4430 damage. I think it's safe to say that ghostly doesn't override a monster's innate physical resistance, if present.

edit: that also happens to be 62.5% of the expected damage. Hm. This sounds like deft hands at work.

I'd be happy to say that ghostly is 90% physical resistance. My bad.
 
Last edited:

Veracity

Developer
Staff member
Not necessarily? It could be that ghostly just divides physical damage by 8 at the end of the day.
That sounds like adding special code, rather than overriding a parameter of the monster. I bet it's a numeric parameter.

and, divine noisemaker vs dancin', ghostly swarm of Knob lice with 7088 buffed muscle did 4430 damage. I think it's safe to say that ghostly doesn't override a monster's innate physical resistance, if present.

edit: that also happens to be 62.5% of the expected damage. Hm. This sounds like deft hands at work.
That seems definitive.

I'd be happy to say that ghostly is 90% physical resistance. My bad.
Is this because you were not taking deft hands into account?

If I change physical resistance to a float, I don't really care, from the point of view of the implementation. I just want it to be accurate, so consult scripts will work correctly. Of course, existing consult scripts that use that proxy field presumably assume it is an integer, so they won't be correct if the value is ever not an integer. :)

I'll make ghostly 90% physical resistance which does not override innate physical resistance. I will also leave it a int; it will be easy to change to a float later, if necessary.
 

Bale

Minion
Don't min damagecap to itself, or it will always be 0. Will need another solution for stacking them.

That seems straight forward enough.

Code:
float stack_physres(float start, float new) {
   if(start == 0)
      return new;
   return min(start, new);
}

Also, you're probably already thinking this, but I'll suggest it anyway. You should remove special handling for ghostly monsters and instead implement the proxy field physical_resistance. Since KoLmafia has that information available. Actually, this could eliminate the need for adding many monsters to batfactors. For instance $monster[chalkdust wraith].physical_resistance is 100 so you could use that without needing the information in batfactors.

Code:
> ashq monster [int] resmon; foreach m in $monsters[] if(m.physical_resistance != 0) resmon[ count(resmon) ] = m; sort resmon by value.physical_resistance; foreach x,m in resmon print(m.physical_resistance+" -- "+m);

10 -- BRICKO vacuum cleaner
25 -- booty crab
25 -- Lumpy, the Sinister Sauceblob (Volcanic Cave)
25 -- trophyfish
25 -- War Frat Kegrider
25 -- War Hippy Dread Squad
40 -- Demon of New Wave
40 -- Gorgolok, the Demonic Hellseal
40 -- Lumpy, the Demonic Sauceblob
50 -- BRICKO cathedral
50 -- BRICKO gargantuchicken
50 -- Crys-Rock
50 -- Heavy Kegtank
50 -- Mobile Armored Sweat Lodge
50 -- swarm of Knob lice
50 -- Vanya's Creature
50 -- X Stone Golem
90 -- X-dimensional horror
100 -- ancient protector spirit
100 -- Battlie Knight Ghost
100 -- chalkdust wraith
100 -- Chef Boy, R&D
100 -- Claybender Sorcerer Ghost
100 -- cold ghost
100 -- Cyrus the Virus
100 -- Don Crimbo
100 -- Dusken Raider Ghost
100 -- ghost miner
100 -- Ghost of Fernswarthy's Grandfather
100 -- hot ghost
100 -- Protector Spectre
100 -- reanimated baboon skeleton
100 -- reanimated bat skeleton
100 -- reanimated demon skeleton
100 -- reanimated giant spider skeleton
100 -- reanimated serpent skeleton
100 -- reanimated wyrm skeleton
100 -- sleaze ghost
100 -- Snow Queen
100 -- Space Tourist Explorer Ghost
100 -- spooky ghost
100 -- stench ghost
100 -- The Landscaper
100 -- The Whole Kingdom
100 -- Uncle Hobo
100 -- Whatsian Commando Ghost
100 -- wild seahorse
Useful!

One question though. Does KoLmafia track elemental resistance anywhere? Some of those monsters are resistant to only physical, but others are resistant to both physical and elemental.
 
Last edited:

zarqon

Well-known member
So are we concluding that ghostly grants 90% physical resistance, but does NOT replace existing physical resistance, even if the existing resistance is less?

@Bale: Your suggestion is several years old. The last time we had this discussion, there were enough variances between batfactors and KoLmafia's information that I opted to keep using the batfactors information. Here is the current physical resistance information according to both, bolded where different:

  • ancient ghost (bat: 1 / maf: 0)
  • Ancient Protector Spirit (bat: 1 / maf: 100)
  • Battlesuit Bugbear Type (bat: 0.5 / maf: 0)
  • Battlie Knight Ghost (bat: 1 / maf: 100)
  • Bee Thoven (bat: 0.5 / maf: 0)
  • Black Ops Bugbear (bat: 0.25 / maf: 0)
  • Booty Crab (bat: 0.25 / maf: 25)
  • Box of Crafty Dinner (bat: 1 / maf: 0)
  • BRICKO Cathedral (bat: 0.5 / maf: 50)
  • BRICKO Gargantuchicken (bat: 0.5 / maf: 50)
  • BRICKO Vacuum Cleaner (bat: 0.1 / maf: 10)
  • bugbear drone (bat: 0.5 / maf: 0)
  • Chalkdust Wraith (bat: 1 / maf: 100)
  • Clancy (bat: 0.25 / maf: 0)
  • Claybender Sorcerer Ghost (bat: 1 / maf: 100)
  • cold ghost (bat: 1 / maf: 100)
  • contemplative ghost (bat: 1 / maf: 0)
  • Crys-Rock (bat: 0.5 / maf: 50)
  • Cyrus the Virus (bat: 1 / maf: 100)
  • Don Crimbo (bat: 1 / maf: 100)
  • Dusken Raider Ghost (bat: 1 / maf: 100)
  • Frosty (bat: 1 / maf: 0)
  • Frozen Bag of Tortellini (bat: 1 / maf: 0)
  • Ghost Miner (bat: 1 / maf: 100)
  • ghost of Elizabeth Spookyraven (bat: 1 / maf: 0)
  • Ghost of Fernswarthy's Grandfather (bat: 1 / maf: 100)
  • Gorgolok, the Demonic Hellseal (bat: 0.4 / maf: 40)
  • Gorgolok, the Infernal Seal (Volcanic Cave) (bat: 0.25 / maf: 0)
  • Heavy Kegtank (bat: 0.5 / maf: 50)
  • Hodgman, The Hoboverlord (bat: 0.25 / maf: 0)
  • hot ghost (bat: 1 / maf: 100)
  • Hulking Construct (bat: 1 / maf: 0)
  • liquid metal bugbear (bat: 0.5 / maf: 0)
  • lovesick ghost (bat: 1 / maf: 0)
  • Lumpy, the Demonic Sauceblob (bat: 0.4 / maf: 40)
  • Lumpy, the Sinister Sauceblob (Volcanic Cave) (bat: 0.25 / maf: 25)
  • Mayor Ghost (bat: 1 / maf: 0)
  • Mayor Ghost (Hard Mode) (bat: 1 / maf: 0)
  • Mer-kin specter (bat: 1 / maf: 0)
  • Mobile Armored Sweat Lodge (bat: 0.5 / maf: 50)
  • moister oyster (bat: 0.25 / maf: 0)
  • N-space Virtual Assistant (bat: 0.5 / maf: 0)
  • Possessed Can of Creepy Pasta (bat: 1 / maf: 0)
  • Possessed Can of Linguine-Os (bat: 1 / maf: 0)
  • Possessed Jar of Alphredo™ (bat: 1 / maf: 0)
  • Protector Spectre (bat: 1 / maf: 100)
  • Queen Bee (bat: 0.5 / maf: 0)
  • Servant of Lord Flameface (bat: 1 / maf: 0)
  • Sexy Sorority Ghost (bat: 1 / maf: 0)
  • Sexy Sorority Werewolf (bat: 0.5 / maf: 0)
  • sleaze ghost (bat: 1 / maf: 100)
  • Snow Queen (bat: 1 / maf: 100)
  • Somerset Lopez, Demon Mariachi (bat: 0.4 / maf: 0)
  • Somerset Lopez, Dread Mariachi (Volcanic Cave) (bat: 0.25 / maf: 0)
  • Space Tourist Explorer Ghost (bat: 1 / maf: 100)
  • Spaghetti Demon (bat: 0.4 / maf: 0)
  • Spirit of New Wave (Volcanic Cave) (bat: 0.25 / maf: 0)
  • spooky ghost (bat: 1 / maf: 100)
  • Stella, the Demonic Turtle Poacher (bat: 0.4 / maf: 0)
  • Stella, the Turtle Poacher (Volcanic Cave) (bat: 0.25 / maf: 0)
  • stench ghost (bat: 1 / maf: 100)
  • Swarm of Knob Lice (bat: 0.5 / maf: 50)
  • the ghost of Phil Bunion (bat: 1 / maf: 0)
  • The Landscaper (bat: 1 / maf: 100)
  • The Whole Kingdom (bat: 1 / maf: 100)
  • topiary duck (bat: 0.5 / maf: 0)
  • trendy bugbear chef (bat: 0.25 / maf: 0)
  • Trophyfish (bat: 0.25 / maf: 25)
  • Vanya's Creature (bat: 0.5 / maf: 50)
  • War Frat Kegrider (bat: 0.25 / maf: 25)
  • War Frat Mobile Grill Unit (bat: 0.25 / maf: 0)
  • War Hippy Dread Squad (bat: 0.25 / maf: 25)
  • Whatsian Commando Ghost (bat: 1 / maf: 100)
  • wild seahorse (bat: 1 / maf: 100)
  • X Stone Golem (bat: 0.5 / maf: 50)
  • Yog-Urt, Elder Goddess of Hatred (bat: 1 / maf: 0)
  • Chef Boy, R&D (bat: -- / maf: 100)
  • Demon of New Wave (bat: -- / maf: 40)
  • reanimated baboon skeleton (bat: -- / maf: 100)
  • reanimated bat skeleton (bat: -- / maf: 100)
  • reanimated demon skeleton (bat: -- / maf: 100)
  • reanimated giant spider skeleton (bat: -- / maf: 100)
  • reanimated serpent skeleton (bat: -- / maf: 100)
  • reanimated wyrm skeleton (bat: -- / maf: 100)
  • Uncle Hobo (bat: -- / maf: 100)
  • X-dimensional horror (bat: -- / maf: 90)

That's a pretty huge difference between mafia data and batfactors data. Granted, switching to use mafia's data would result in incomplete information getting filled in more quickly as people report errors, but it would be nice to get rid of most of those divergences prior to making the switch.

Where batfactors has a value and mafia does not, I suspect the batfactors data is correct (unless anyone cares to helpfully point out where it is not). Where mafia has a value and batfactors does not (aside from the X-dimensional horror, which has also been mentioned before), batfactors probably needs to add that information. I'll do that now, but that will still leave a lot of differences in the data.

In short: I'll happily switch to using mafia's data when I'm convinced it's accurate. Since we presently have to foreach all the monsters in batfactors until we find our current monster (or reach the end of the list), the fewer monsters we have in batfactors the better.

EDIT: Just uploaded a new batfactors. Added Chef Boy, and fixed a typo that had been introduced to the Demon of New Wave. So far as I know you can't encounter Uncle Hobo anymore (so omitting him from batfactors is preferable), and the reanimated skeletons don't always have 100% resistance. And as previously mentioned, so far as I know the X-dimensional horror only dodges melee attacks, not physical damage itself.
 
Last edited:

Bale

Minion
@Bale: Your suggestion is several years old. The last time we had this discussion, there were enough variances between batfactors and KoLmafia's information that I opted to keep using the batfactors information.

I don't really remember tht discussion well, but could you tell me if there is a reason that it didn't become a bug report? I just searched and could not find such a bug report so I just want to be sure I understand the situation before I report it. From what you said, it seems that KoLmafia needs to add the following physical resistance information to its data file.


  • ancient ghost 100
  • Bee Thoven 50
  • Black Ops Bugbear 25
  • Box of Crafty Dinner 100
  • bugbear drone 50
  • Clancy 25
  • contemplative ghost 100
  • Frosty 100
  • Frozen Bag of Tortellini 100
  • ghost of Elizabeth Spookyraven 100
  • Gorgolok, the Infernal Seal (Volcanic Cave) 25
  • Hodgman, The Hoboverlord 25
  • Hulking Construct 100
  • liquid metal bugbear 50
  • lovesick ghost 100
  • Mayor Ghost 100
  • Mayor Ghost (Hard Mode) 100
  • Mer-kin specter 100
  • moister oyster 25
  • N-space Virtual Assistant 50
  • Possessed Can of Creepy Pasta 100
  • Possessed Can of Linguine-Os 100
  • Possessed Jar of Alphredo™ 100
  • Queen Bee 50
  • Servant of Lord Flameface 100
  • Sexy Sorority Ghost 100
  • Sexy Sorority Werewolf 50
  • Somerset Lopez, Demon Mariachi 40
  • Somerset Lopez, Dread Mariachi (Volcanic Cave) 25
  • Spaghetti Demon 40
  • Spirit of New Wave (Volcanic Cave) 25
  • Stella, the Demonic Turtle Poacher 40
  • Stella, the Turtle Poacher (Volcanic Cave) 25
  • the ghost of Phil Bunion 100
  • topiary duck 50
  • War Frat Mobile Grill Unit 25
  • Yog-Urt, Elder Goddess of Hatred 100
 
Last edited:

zarqon

Well-known member
The discussion was ages ago, so if it was a bug report it was probably made in the old reporting system, and is now lost to us.

The batfactors values represent a community consensus, but may not always be completely accurately spaded. Though I can't vouch for the exact accuracy of all of them, I'm confident that they are all better than 0.

Your list is also missing:
  • trendy bugbear chef 25
  • angry cavebugbear 25 (just added this one; the Wiki says they don't resist physical damage but I'm fighting them now and they do seem to).
  • Bugbear Captain 25

I've been adding all the Bugbear Invasion bugbears this run as I go, since it seems the vast majority of them have both elemental and stun resistance (which surprisingly was neither already present in batfactors nor on the Wiki; I guess that path was not terrifically popular in its day). A few of them also reduce physical damage.

By the way, stunt run suggestion: do a Bugbear Invasion run but skip all the bugbear zones and do the Sorceress' Tower instead -- I've just discovered you can still access the Tower in Bugbear Invasion. I just entered the contests and even adventured there once. I've reported it as a bug to KoL but you probably have time to get in a run before they fix it!

EDIT: Added Bugbear Captain, he also has the 25% physical resist going on. And wanted to note something funny -- after defeating the Captain I clicked to behold the Tower with the Sorceress's Chamber blown away and the prism hovering there, but at its base are the three contest zones, still available! Freed the King. Zones still there. Maybe now I should climb the tower?
 
Last edited:

Veracity

Developer
Staff member
KoLmafia does not use the "physical resistance" value itself for anything. It was added to the data files and exposed via the physical_resistance proxy field of the monster object solely for the benefit of consult scripts.

Code:
r9020 | jasonharper | 2011-02-07 21:51:54 -0500 (Mon, 07 Feb 2011) | 19 lines

Added support for scaling monster stats: all numeric stats in monsters.txt
can now be an expression in square brackets (currently limited to the monster
expression dialect).  Note that a normal monster's defense is, for historical
reasons, expected to be the raw database value, and gets reduced to 90% for
the effective defense value - but a defense expression is interpreted as the
effective defense value directly.

Also in progress:
* Added some more numeric monster stats, which can also be specified via
expressions: experience (for bosses that don't give stats equal to 1/4 of
their level), physical resistance, item block rate, skill block rate, spell
block rate.  Only the experience value is used at all (the rest aren't even
being stored yet), but they are being parsed, so that the file format won't
have to change again when they're implemented.
* Added a BL value (for Basement Level) to the monster expression dialect, to
allow stats to be calculated for Fernswarthy's Basement monsters.  This will
require some additional work to disambiguate the varying monster names in the
Basement before this will actually be useful.
Looking at the code in MonsterDatabase.registerMonster, I see the following:

Code:
				else if ( option.equals( "Phys:" ) )
				{
					if ( tokens.hasMoreTokens() )
					{
						physical = StringUtilities.parseInt( tokens.nextToken() );
						continue;
					}
					continue;
				}

				else if ( option.equals( "Item:" ) )
				{
					/* itemBlock = */ parseNumeric( tokens );
					continue;
				}

				else if ( option.equals( "Skill:" ) )
				{
					/* skillBlock = */ parseNumeric( tokens );
					continue;
				}

				else if ( option.equals( "Spell:" ) )
				{
					/* spellBlock = */ parseNumeric( tokens );
					continue;
				}
Looks like Jason never finished the item/spell/skill block rates.

Again, that would have been strictly for the benefit of consult scripts; KoLmafia has no need for them internally.

My opinion: if KoLmafia adds a feature for the benefit of BatBrain (and other consult scripts), but, due to incomplete data or an otherwise flawed implementation, it's not useful as is, it would be more productive to make a Bug Report to get the deficiencies fixed, rather than to code up workarounds in BatBrain (and other consult scripts) and ignoring the feature; we will end up with ALL consult scripts having accurate data, not just those that chose to ignore the feature

And, as zarqon mentioned, it will simplify BatBrain (and other consult scripts).
 
Top