Feature - Implemented Add Monsters to the Encyclopedia

ckb

Minion
Staff member
Is there any reason that we need to use the correct monster ID to make this work? If it never comes up in actual KoL, using a Mafia-only psudo ID for the purposes of the Encyclopedia may work just as well, as long as it is identified as such.

Also, apparently there is a Mafia Encyclopedia! neat!
 

Bale

Minion
Is there any reason that we need to use the correct monster ID to make this work? If it never comes up in actual KoL, using a Mafia-only psudo ID for the purposes of the Encyclopedia may work just as well, as long as it is identified as such.

Perhaps a negative number for monsters whose actual number is unknown? That way anyone using it is aware it isn't the actual KoLmafia number and that it would get changed to a positive number if we ever get a method to determine them.
 

Veracity

Developer
Staff member
Revision 17368 is a proof of concept for this. It has all the monsters with IDs and puts them in two columns: monster name and ID. Just like any of the Encyclopedia sections, you can click on the header to sort by that column.

When you double click on a monster, it pops up a hand-crafted monster description which is supposed to be just like what Monster Manuel shows you for that monster in the quest log.

Issues:

- I don't put in a "?" for scaling monsters
- I don't handle never wins initiative/always wins initiative
- Java's built-in HTML renderer doesn't seem to vertically align the attack/defense/HP values correctly
- Java's built-in HTML renderer doesn't pop up a tooltip when you hover over the attack/defense/hp/phylum/element/initiative icons like a regular Browser does. A pity, since I built the same tooltips that KoL does - "This monster is Stinky. Stench is weak against Cold and Sleaze", for example.

I was thinking of having the tooltip for scaling monsters show the current values, based on Scale, Base, and Cap, above the "?". But, first I have to get tooltips to work. If I can't figure that out, I'll have to come up with something else.

In any case, try it out and tell me if this is more or less what you had in mind.
 

Bale

Minion
I'm very happy about it! (Though it would be nice to have the non-id monsters listed also.) The hand-crafted monster descriptions are a very nice touch!

Why do I see factoids for some monsters and not others? Also, some monster show just one factoid. (I actually have all factoids except for the Thanksgolem.)
 

Veracity

Developer
Staff member
Give me an example of a monster with incomplete factoids, please. I also have all the factoids except for the Thanksgolem, so I should be able to test.

Yes, non-ID monsters will come, by and by.
I also want it to use the image cache.
 

Bale

Minion
That was my error. I tested it on a character that is not my main and forgot which character I was playing. Everything is great with the factoids. Yeah, that was kinda dumb. LoL.

Sorry about that. I think you did an amazing job.
 

Veracity

Developer
Staff member
Yeah, it can only show factoids that this particular character knows. Now, if you log out and log in again, it will retain any factoids for which you have all three, but otherwise, it refetches.

I am definitely seeing glitches, and am about to submit a patch that gets the "raw" attack, defense, and HP for each monsters - which will evaluate expressions and scaling and such. That's not quite what I had in mind - show a "?" or a "0" and have the hover text show the evaluated versions. But, we don't have hover text yet.
 
Last edited:

Veracity

Developer
Staff member
Revision 17360 does that. I'll look into getting hover text in the little Description Frame tomorrow. And the image cache.
 

Veracity

Developer
Staff member
As of revision 17374, hover text works and, for scaling monsters, the hover text for Attack, Defense, and HP shows you the scale factors. Additionally, simply removing "valign=center" from the numeric values centers them vertically next to the icon, rather than aligning with the top edge. Seems like a Java bug, to me. And 17375 shows images at full size, like Bale's Monster Manuel relay script.

Things I am thinking about:

- Go through our image cache so that we, like a Browser, only go to the KoL server once.
- Monsters with unknown ID
- Showing other stuff. For example:

WANDERER, BOSS, ULTRARARE, SEMIRARE
For non-WANDERERs, the locations where you can find the monster
Meat drop
Item drops

I like the Monster Manuel style, but that latter info would be useful, if I can figure out how to display it tastefully.
 
Well, there is more than one script attempting to provide that information, so at least it wouldn't be difficult to fill out the majority of the entries.
 

Veracity

Developer
Staff member
I don't understand what you think you are saying.

All of that information is currently built-in to KoLmafia itself. I am completely uninterested in looking at "scripts" which take KoLmafia's data and display it to the user as some sort of inspiration for making KoLmafia display the data itself.
 
I assumed that since scripts like Manuel Progress and similar attempt to note things like wanderer, boss, semirare and other potential special conditions, but rely on users to help them fill out the missing entries, that they were working off their own database. I would not expect the information to be missing quite so many chunks were said scripts taking it from mafia. I am aware that mafia already tracks things like stats and such; I was not referring to those parts.
 

Veracity

Developer
Staff member
monsters.txt has the following tags we can apply to a monster:

BOSS
NOBANISH
WANDERER
ULTRARARE
SEMIRARE
SUPERLIKELY
FREE

Those are part of the "attributes". ASH has a monster proxy field called "attributes". For example:

Code:
[color=green]> ash $monster[ Bram the Stoker ].attributes[/color]

Returned: SEMIRARE Atk: 164 Def: 148 HP: 170 Init: 50 P: undead
If scripts have their own lists of such monsters and "depend on users to help fill them out", rather than using the data which KoLmafia already has, it seems like they are going to a lot of unnecessary work.

Now, if KoLmafia is missing the data for certain monsters, that would be a bug, and we "depend on users to submit bug reports".

If I display things like this, I will use the data from KoLmafia's monsters.txt, rather than look at scripts for lists of monster data that SHOULD already be there.
 

Bale

Minion
I would not expect the information to be missing quite so many chunks were said scripts taking it from mafia..

I have no idea which scripts you are talking about. I hope they know to get the info from mafia. If you see something missing, please report. If it is the script's fault the scripter should fix his script to use mafia's info. If the information is missing from mafia, then our devs will fix it.
 
I do not appear to have a monsters.txt, only the mskc_mp_monsters.txt that Manuel Progress uses to denote special circumstance monsters. Perhaps that is what was causing some of my issues? I would expect there to have been much larger consequences of having no list of monsters at all, but I am continually reminded that if I think about this how I would have made it I will almost certainly be wrong.
 

Bale

Minion
monsters.txt is part of the jar file. (You can see this if you load kolmafia.jar in winzip.) It isn't in /data.
 
Top