Monster frequency

dj_d

Member
I know the command to get the frequency with which an item drops. Is there a similar command to get the frequency with which a monster occurs? This information is shown in the UI (e.g. Raver Giant - 12%) but I don't know how to get it programmatically.

If no such thing exists already, it would be very helpful for a Big New Script I'm writing. For my purposes, non-random monsters (e.g. ultrarares, yam monsters, etc) could be 0 or -1.

Much thanks!
 

dj_d

Member
And I can get it by parsing the relevant mafia text files, but every time I write code to do that JH immediately writes a much better API to get it programmatically. So I'm kinda hoping to eliminate the middle man this time. :)
 

jasonharper

Developer
Keep in mind that the frequency data in Location Details isn't very accurate:

* It doesn't know about various special monster appearance mechanics, such as apply in the Isle War battlefield, Slime Tube, Wreck of the Edgar Fitzsimmons, and Seaside Megalopolis. (It does know about monsters that only appear in even/odd ascensions.)

* It doesn't take queue effects into account, so any location with unequal appearance rates shows numbers that really only apply to your very first visit per ascension.

* It doesn't consider Olfaction or any of the monster banishment methods.

Any script access to this data would have to come with a caveat that the data is broken, and any attempt at a fix to work around the broken data might itself be broken without warning if the original brokenness gets fixed. Understood?
 

Bale

Minion
Keep in mind that the frequency data in Location Details isn't very accurate:

* It doesn't know about various special monster appearance mechanics, such as apply in the Isle War battlefield, Slime Tube, Wreck of the Edgar Fitzsimmons, and Seaside Megalopolis. (It does know about monsters that only appear in even/odd ascensions.)

Does it properly consider the Hole in the Sky or the Knob Laboratory? They each have slightly unusual mechanisms.
 

Veracity

Developer
Staff member
We have the following:

Code:
Knob Goblin Laboratory	100	Knob Goblin Mad Scientist: 3	Knob Goblin Very Mad Scientist: 1
Hole in the Sky	100	The Astronomer: 3	One-Eyed Willie: o2	The Burrowing Bishop: o2	The Family Jewels: o2	The Hooded Warrior: o2	The Junk: o2	The Pork Sword: o2	The Skinflute: o2	The Trouser Snake: o2	The Twig and Berries: o2	The Axe Wound: e2	The Beaver: e2	The Box: e2	The Bush: e2	The Camel's Toe: e2	The Flange: e2	The Honey Pot: e2	The Little Man in the Canoe: e2	The Muff: e2
This looks to me like this:

in the laboratory, the Mad Scientist occurs 3/4 and the Very Mad Scientist occurs 1/4
in the Hole in the Sky, the Astronomer occurs 3/21, and the male or female monsters occur 2/21 each, but only male or female in a particular ascension.

Is this correct?
 

dj_d

Member
That seems right to me, based on the kolwiki entries. I should add that for my purposes (and I realize others may vary) it would be great to just indicate the frequency given the current state. Thanks for looking at it, Veracity!
 
Last edited:

dj_d

Member
@JH: I missed your post, sorry. So noted - I'm primarily interested in conventional monsters appearing conventionally. To the extent that I'm going to deal with special cases (e.g. floaty sand drops) I'll do that directly with the understanding (nay, hope!) that a fundamental fix appears.

While I'm thinking about it, what about noncombats? Is there any support for enumerating them, their frequency, and/or their resulting meat/item drops?

(bonus points to anyone who figures out what I'm working on - if you guess, please PM it to me so you don't spoil the surprise ;) )
 

jasonharper

Developer
KoLmafia has no knowledge of the complete list of noncombats that can occur in a particular location. Even if it had such a list, there are too many factors affecting their appearance rate for an exact number to be given.

The overall combat rate is known for each location, at least the ones for which this has been spaded. That info could certainly be made available to scripts...
 

jasonharper

Developer
Ok, r7572 adds:
float[monster] appearance_rates(location)
The map will contain an entry for $monster[none] giving the noncombat rate. Values will normally be 0-100 (and will total to approximately 100); zero indicates a boss or other 1-time monster, negative indicates an ultra-rare monster or unknown noncombat rate.
 

Bale

Minion
Sorry, no rock. I'm pretty sure that this doesn't give the appearance rates of rock monsters.
 
Top