Feature - Implemented Monsters have an integer associated with them

Bale

Minion
r16163 is amazing! I've got a relay script which disambiguates monster names in Manuel. It's got a lot of hardcoded stuff which I'm just going to yank out and replace with this!

It requires me to rewrite most of the script, but it'll be fun once I get into it.
 

Bale

Minion
The mimics need to be disambiguated. There are 5 monsters whose manuel name is mimic.

they should be
177 - mimic (obsolete)
183 - mimic (Dungeon of Doom)
287 - mimic (bottom barrels)
288 - mimic (middle barrels)
289 - mimic (top barrels)

Manuel HTML for all mimics:
HTML:
<a name='mon177'></a><table width=95%><tr><td colspan=6 height=1 bgcolor=black></td></tr><tr><td rowspan=4 valign=top width=100><img src=/images/adventureimages/barrel.gif width=100></td><td width=30><img src=/images/itemimages/nicesword.gif width=30 height=30 alt="Attack Power (approximate)" title="Attack Power (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>15</font></b></td><td width=30><img src=/images/itemimages/weirdflavor.gif alt="This monster is Weird" title="This monster is Weird" width=30 height=30></td><td rowspan=4 width=10></td><td rowspan=4 valign=top class=small><b><font size=+2>mimic</font></b><ul><li>You should hear the mimic's Goblin King impersonation; it really nails that weird Goblin accent.<li>Mimics can only mimic things of the same mass as they are. Which means, unfortunately, when they mimic a swarm of bees, it's a HUUUGE swarm.<li>No one's ever seen a mimic in its natural form, but scientist speculate it looks kind of like a duck crossed with a buffalo.</ul></td></tr><tr><td width=30><img src=/images/itemimages/whiteshield.gif width=30 height=30 alt="Defense (approximate)" title="Defense (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>13</font></b></td><td width=30><img src=/images/itemimages/circle.gif width=30 height=30 alt="This monster has no particular elemental alignment." title="This monster has no particular elemental alignment."></td></tr><tr><td width=30><img src=/images/itemimages/hp.gif width=30 height=30 alt="Hit Points (approximate)" title="Hit Points (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>25</font></b></td><td width=30><img src=/images/itemimages/watch.gif alt="Initiative +90%" title="Initiative +90%" width=30 height=30></td></tr><tr><td></td><td></td></tr></table><a name='mon283'></a><table width=95%><tr><td colspan=6 height=1 bgcolor=black></td></tr><tr><td rowspan=4 valign=top width=100><img src=/images/adventureimages/lowerm.gif width=100></td><td width=30><img src=/images/itemimages/nicesword.gif width=30 height=30 alt="Attack Power (approximate)" title="Attack Power (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>45</font></b></td><td width=30><img src=/images/itemimages/weirdflavor.gif alt="This monster is Weird" title="This monster is Weird" width=30 height=30></td><td rowspan=4 width=10></td><td rowspan=4 valign=top class=small><b><font size=+2>mimic</font></b><ul><li>A mimic in its natural form kind of looks like an upside-down squirrel with tentacles.<li>The only thing a mimic can't mimic is itself. Think about that, man.<li>Like all shapeshifters, mimics store their extra mass in a pocket dimension when they mimic something smaller than they are.</ul></td></tr><tr><td width=30><img src=/images/itemimages/whiteshield.gif width=30 height=30 alt="Defense (approximate)" title="Defense (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>40</font></b></td><td width=30><img src=/images/itemimages/circle.gif width=30 height=30 alt="This monster has no particular elemental alignment." title="This monster has no particular elemental alignment."></td></tr><tr><td width=30><img src=/images/itemimages/hp.gif width=30 height=30 alt="Hit Points (approximate)" title="Hit Points (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>50</font></b></td><td width=30><img src=/images/itemimages/watch.gif alt="Initiative +70%" title="Initiative +70%" width=30 height=30></td></tr><tr><td></td><td></td></tr></table><a name='mon287'></a><table width=95%><tr><td colspan=6 height=1 bgcolor=black></td></tr><tr><td rowspan=4 valign=top width=100><img src=/images/adventureimages/barrel.gif width=100></td><td width=30><img src=/images/itemimages/nicesword.gif width=30 height=30 alt="Attack Power (approximate)" title="Attack Power (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>15</font></b></td><td width=30><img src=/images/itemimages/weirdflavor.gif alt="This monster is Weird" title="This monster is Weird" width=30 height=30></td><td rowspan=4 width=10></td><td rowspan=4 valign=top class=small><b><font size=+2>mimic</font></b><ul><li>Mimic eggs greatly resemble gold coins. When newly-hatched, the larva are flat and leathery, and look like lost wallets.<li>The largest mimic on record was a bank vault belonging to King Gerald IX. Weirdly, nobody ever noticed.<li>Besides treasure chests and barrels, mimics have also been discovered in the shape of crates, end-tables, trash cans, and toilets.</ul></td></tr><tr><td width=30><img src=/images/itemimages/whiteshield.gif width=30 height=30 alt="Defense (approximate)" title="Defense (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>13</font></b></td><td width=30><img src=/images/itemimages/circle.gif width=30 height=30 alt="This monster has no particular elemental alignment." title="This monster has no particular elemental alignment."></td></tr><tr><td width=30><img src=/images/itemimages/hp.gif width=30 height=30 alt="Hit Points (approximate)" title="Hit Points (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>25</font></b></td><td width=30><img src=/images/itemimages/watch.gif alt="Initiative +90%" title="Initiative +90%" width=30 height=30></td></tr><tr><td></td><td></td></tr></table><a name='mon288'></a><table width=95%><tr><td colspan=6 height=1 bgcolor=black></td></tr><tr><td rowspan=4 valign=top width=100><img src=/images/adventureimages/barrel.gif width=100></td><td width=30><img src=/images/itemimages/nicesword.gif width=30 height=30 alt="Attack Power (approximate)" title="Attack Power (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>25</font></b></td><td width=30><img src=/images/itemimages/weirdflavor.gif alt="This monster is Weird" title="This monster is Weird" width=30 height=30></td><td rowspan=4 width=10></td><td rowspan=4 valign=top class=small><b><font size=+2>mimic</font></b><ul><li>The least pleasant part of being a barrel-mimicing mimic is when someone fills you full of wine.<li>Okay, that's actually pretty pleasant. The least pleasant part is when some poor person tries to wear you.<li>Barrel-mimicing mimics frequently spend a dozen years hibernating, pleasantly full of scotch.</ul></td></tr><tr><td width=30><img src=/images/itemimages/whiteshield.gif width=30 height=30 alt="Defense (approximate)" title="Defense (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>22</font></b></td><td width=30><img src=/images/itemimages/circle.gif width=30 height=30 alt="This monster has no particular elemental alignment." title="This monster has no particular elemental alignment."></td></tr><tr><td width=30><img src=/images/itemimages/hp.gif width=30 height=30 alt="Hit Points (approximate)" title="Hit Points (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>35</font></b></td><td width=30><img src=/images/itemimages/watch.gif alt="Initiative +90%" title="Initiative +90%" width=30 height=30></td></tr><tr><td></td><td></td></tr></table><a name='mon289'></a><table width=95%><tr><td colspan=6 height=1 bgcolor=black></td></tr><tr><td rowspan=4 valign=top width=100><img src=/images/adventureimages/barrel.gif width=100></td><td width=30><img src=/images/itemimages/nicesword.gif width=30 height=30 alt="Attack Power (approximate)" title="Attack Power (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>35</font></b></td><td width=30><img src=/images/itemimages/weirdflavor.gif alt="This monster is Weird" title="This monster is Weird" width=30 height=30></td><td rowspan=4 width=10></td><td rowspan=4 valign=top class=small><b><font size=+2>mimic</font></b><ul><li>The only thing a mimic can't mimic is another mimic mimicking a mime!<li>One downside to mimicking a barrel is that broke people try to use you for clothing.<li>If you force the mimic to assume a shape you find amusing, your laughter will really hurt its feelings.</ul></td></tr><tr><td width=30><img src=/images/itemimages/whiteshield.gif width=30 height=30 alt="Defense (approximate)" title="Defense (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>31</font></b></td><td width=30><img src=/images/itemimages/circle.gif width=30 height=30 alt="This monster has no particular elemental alignment." title="This monster has no particular elemental alignment."></td></tr><tr><td width=30><img src=/images/itemimages/hp.gif width=30 height=30 alt="Hit Points (approximate)" title="Hit Points (approximate)"></td><td width=50 valign=center align=left><b><font size=+2>45</font></b></td><td width=30><img src=/images/itemimages/watch.gif alt="Initiative +90%" title="Initiative +90%" width=30 height=30></td></tr><tr><td></td><td></td></tr></table>
 

Veracity

Developer
Staff member
We have the following mimics:

Code:
mimic	283	lowerm.gif	BOSS Atk: 45 Def: 40 HP: 50 Init: 70 P: weird	dead mimic (n100)
mimic (Bottom 2 Rows)	287	barrel.gif	Atk: 15 Def: 13 HP: 25 Init: 90 P: weird Manuel: "mimic"
mimic (Middle 2 Rows)	288	barrel.gif	Atk: 25 Def: 22 HP: 35 Init: 90 P: weird Manuel: "mimic"
mimic (Top 2 Rows)	289	barrel.gif	Atk: 35 Def: 31 HP: 45 Init: 90 P: weird Manuel: "mimic"
mimic (obsolete)	177	barrel.gif	Atk: 15 Def: 13 HP: 25 Init: 90 P: weird Manuel: "mimic"
The only thing I changed was to add "Manuel: mimic" to each one. If by "disambiguated", you mean "recognize in combat", well, that would depend on us choosing monster based on location and, perhaps, page text. When we see "mimic" we assume it is the monster we call "mimic" - the dungeon of doom one. We could look for "barrel.gif" and realize that it is not that one, but choosing which of the three it is would depend on us knowing which barrel smash redirected to the fight that got us here.

Would you prefer that we name them "mimic (top barrels)", "mimic (middle barrels)" and "mimic (bottom barrels)", rather than (Top 2 Rows)" etc.? I might like that better, myself.

I am also thinking of changing the names of the obsolete animated nightstands:

Code:
animated nightstand (mahogany combat)	399	darkstand.gif	Atk: 162 Def: 149 HP: 170 Init: 30 P: construct Manuel: "animated nightstand"	old coin purse (25)	old leather wallet (25)	half of a memo (c0)
animated nightstand (mahogany noncombat)	407	darkstand.gif	Atk: 162 Def: 149 HP: 170 Init: 30 P: construct Manuel: "animated nightstand"	old coin purse (25)	old leather wallet (25)	half of a memo (c0)
animated nightstand (white combat)	391	nightstand.gif	Atk: 159 Def: 153 HP: 180 Init: 40 P: construct Manuel: "animated nightstand"	grouchy restless spirit (80)
animated nightstand (white noncombat)	406	nightstand.gif	Atk: 159 Def: 153 HP: 180 Init: 40 P: construct Manuel: "animated nightstand"	grouchy restless spirit (80)
Rather than "(White 1)", "(Mahogany 2)" and so on. Hmm. I seem to recall that "half of a memo" only came from one of the mahogany nightstands - the "combat" one. May as well fix the item drops...
 

Bale

Minion
Oh. I was getting a weird bug that kept me from seeing those mimic monsters in the Manuel override I'm rewriting, so I thought they weren't in the system yet. That was my mistake.

As for renaming the monsters as suggested, I would like that better. Especially the animated nightstands.

The half of a memo drop was changed. Now it comes from a non-combat from the noncombat mahogany. "Fixing" that would be a regression.
 

Veracity

Developer
Staff member
You misunderstand. I was planning on "fixing" the item drops on the obsolete nightstands to agree with how they used to actually operate. Nothing would change for the current bedroom nightstands.
 

Bale

Minion
AH! I totally misunderstood. Yeah, fix that. My memory matches yours as to which nightstand used to drop it.

Edit: Just checked the wiki and it agrees with our memory.
 
Last edited:

Veracity

Developer
Staff member
OK, revision 16168 changes the names of some (diambiguated) monsters:

mimic (bottom barrels)
mimic (middle barrels)
mimic (top barrels)
animated nightstand (mahogany combat)
animated nightstand (mahogany noncombat)
animated nightstand (white combat)
animated nightstand (white noncombat)
 

Bale

Minion
Monster #906 has name 'Mob Penguin goon' but Manuel calls it 'Mob Penguin Goon'



Just got r16168 and it does nice things for my script. I'm going to update it now. This is probably the first script to make use of your newly disambiguated monster names and manuel_name proxy field. Thank you for all your hard work.

If you aren't currently using my Monster Manuel: Improved script, then you should. Everyone who frequently looks at their Manuel should use it since KoL does ugly things to non-standard sized images. The extra annotations to disambiguate monsters is just a bonus, although a very nice bonus. It's surprising how much nicer it makes things.
 
Last edited:

Veracity

Developer
Staff member
Monster #906 has name 'Mob Penguin goon' but Manuel calls it 'Mob Penguin Goon'.
Yeah. I have that on my list of things to look at.

Code:
Mob Penguin goon	753	penggoon.gif	Scale: 6 Cap: 10000 Floor: 10 Init: 75 P: penguin	penguin thesaurus (0)
Mob Penguin Goon	906	penggoon.gif	Scale: 0 Cap: 10000 Floor: 10 Init: -10000 P: penguin	Crimbuck	herringcello	penguin focaccia bread
We have the monsters entered in with KoL's capitalization. What is the issue?

- That message was from KoLmafia itself. It SHOULD have looked up monster by ID, so why the wrong name?
- When looking up monsters by name, do we ignore case?
- ASH itself ignores case in string comparisons:

> ash ( "Mob Penguin goon" == "Mob Penguin Goon" )

Returned: true
so an ASH script really can't be used to check KoLmafia monster names vs. Monster Manuel monster names.

I have no idea why ASH was coded that way. heeheehee recently noted it with bemusement. I also have no idea how many scripts exist that depend on that - perhaps comparing user input vs. strings in the script is better, but there is no reason that comparing strings in the script with item names, monster names, etc. should depend on inexact comparisons. Perhaps we should start a Bug/Feature to discuss the implications of changing ASH string equality to be case sensitive, since that would allow scripts to do things with KoL page text that it can't do right now. We certainly would have to augment the Runtime Library with case-sensitive and case-insensitive string matching functions, just like Java has.

In any case, I also noticed this issue. I COULD disambiguate those monsters into Mob Penguin goon (2008) and Mob Penguin Goon (2009) - and ASH might require that, given it cannot distinguish the case difference - but I want to understand why KoLmafia itself is having issues with them.

By the way, here is MY "check Kolmafia vs. Manuel" script, which no longer needs to do name disambiguation to match Manuel's monsters with KoLmafia's monsters:

Code:
record mon_data
{
    string image;
    string name;
};

static mon_data [int] monsters;

void parseManuel(string URL)
{
	string page = visit_url(URL);
	matcher entry_matcher = create_matcher( "<a name='mon(.*?)'></a><table width=95%>(.*?)</table>", page );
	while ( entry_matcher.find() ) {
	    int id = entry_matcher.group( 1 ).to_int();
	    string entry = entry_matcher.group( 2 );

	    matcher image_matcher = create_matcher( "/.*images/(.*?.gif) width=([(100)(60)])", entry );
	    string image = image_matcher.find() ? image_matcher.group( 1 ) : "";

	    matcher data_matcher = create_matcher( "<font size=.2>(.*?)</font>", entry );
	    if ( data_matcher.find() && data_matcher.find() ) {
		string name = data_matcher.group( 1 );
		monsters[ id ] = new mon_data( image, name );
	    }
	}
}

void parseall()
{
    monsters.clear();
    parseManuel("questlog.php?which=6&vl=a");
    parseManuel("questlog.php?which=6&vl=b");
    parseManuel("questlog.php?which=6&vl=c");
    parseManuel("questlog.php?which=6&vl=d");
    parseManuel("questlog.php?which=6&vl=e");
    parseManuel("questlog.php?which=6&vl=f");
    parseManuel("questlog.php?which=6&vl=g");
    parseManuel("questlog.php?which=6&vl=h");
    parseManuel("questlog.php?which=6&vl=i");
    parseManuel("questlog.php?which=6&vl=j");
    parseManuel("questlog.php?which=6&vl=k");
    parseManuel("questlog.php?which=6&vl=l");
    parseManuel("questlog.php?which=6&vl=m");
    parseManuel("questlog.php?which=6&vl=n");
    parseManuel("questlog.php?which=6&vl=o");
    parseManuel("questlog.php?which=6&vl=p");
    parseManuel("questlog.php?which=6&vl=q");
    parseManuel("questlog.php?which=6&vl=r");
    parseManuel("questlog.php?which=6&vl=s");
    parseManuel("questlog.php?which=6&vl=t");
    parseManuel("questlog.php?which=6&vl=u");
    parseManuel("questlog.php?which=6&vl=v");
    parseManuel("questlog.php?which=6&vl=w");
    parseManuel("questlog.php?which=6&vl=x");
    parseManuel("questlog.php?which=6&vl=y");
    parseManuel("questlog.php?which=6&vl=z");
    parseManuel("questlog.php?which=6&vl=-");
}

void main()
{
    print("Checking Monster Manuel...", "blue");
    parseall();
    print("Done checking Monster Manuel!", "blue");
    print( "Monster Manuel has told you about " + monsters.count() + " different monsters" );
    map_to_file( monsters, "monster_map.txt" );
    print( "Raw data saved to monster_map.txt in your 'data' directory." );
    foreach id, data in monsters {
	string name = data.name;
	string image = data.image;
	monster mon = to_monster( id );

	if ( mon.to_string() == "none" ){
	    print( "Discrepancy: KoLmafia could not find monster '" + name + "' with id " + id );
	}

	if ( !( mon.images contains image ) ) {
	    print( "Discrepancy: Manuel says monster '" + name + "' has image " + image + " but KolMafia thinks it is " + mon.image );
	}
    }
}
When I run that script (with 1570 monsters in my Manuel) I get:

> call scripts/Utilities/manuel.ash

Checking Monster Manuel...
Monster #906 has name 'Mob Penguin goon' but Manuel calls it 'Mob Penguin Goon'
Monster #1667 has name 'Your winged yeti' but Manuel calls it 'Mraderick'
Monster #1669 has name 'You the Adventurer' but Manuel calls it 'Veracity the Adventurer'
Done checking Monster Manuel!
Monster Manuel has told you about 1570 different monsters
Raw data saved to monster_map.txt in your 'data' directory.
Discrepancy: Manuel says monster '(shadow opponent)' has image shadows/61.gif but KolMafia thinks it is ../otherimages/shadows/20.gif
Discrepancy: Manuel says monster 'Mob Penguin goon' has image pengbook.gif but KolMafia thinks it is penggoon.gif
Discrepancy: Manuel says monster 'Mother Slime' has image slimetube/stboss.gif but KolMafia thinks it is ../otherimages/slimetube/stboss.gif
Discrepancy: Manuel says monster 'Veracity the Adventurer' has image classav6c_f.gif but KolMafia thinks it is
This issue is why I am spending all of my KoL time in aftercore these days: I am focussed on getting factoids and getting KoLmafia to have the correct names, ids, and stats for all the obsolete monsters that the Dec of Every Card is giving us.

On the bright side, except for major coding projects, like yesterday's, this is a whole lot less time-intensive than ascending. :)
 

heeheehee

Developer
Staff member
Yeah. I have that on my list of things to look at.

Code:
Mob Penguin goon	753	penggoon.gif	Scale: 6 Cap: 10000 Floor: 10 Init: 75 P: penguin	penguin thesaurus (0)
Mob Penguin Goon	906	penggoon.gif	Scale: 0 Cap: 10000 Floor: 10 Init: -10000 P: penguin	Crimbuck	herringcello	penguin focaccia bread
We have the monsters entered in with KoL's capitalization. What is the issue?

- That message was from KoLmafia itself. It SHOULD have looked up monster by ID, so why the wrong name?
- When looking up monsters by name, do we ignore case?
- ASH itself ignores case in string comparisons:

There is no monster in Mafia that has monster ID 906, and there is only one Mob Penguin goon (no Goon). Only the first listed monster is stored. Why? I have no idea.
 

Theraze

Active member
- ASH itself ignores case in string comparisons:

Sort of. A "==" is case insensitive, contains_text is case sensitive. It was discussed a few years ago and left (or set?) that way because it allows for control of case sensitivity. If memory serves.
 

Veracity

Developer
Staff member
No "sort of" about it: "contains_text" is not "string comparison". Only "==" is.

We discussed contains_text, index_of, last_index_of up above. and noticed that it was up to the user to use to_lower_case on the arguments to those functions if you want case insensitive matching.

The purpose of this thread is to discuss if we should do the same thing for ==, allowing the user to control case sensitivity there, too; right now, you do not have that control.

Edit: for some reason, I thought "this thread" was the Feature that heeheehee started to discuss ASH string comparison, not, the "monsters have an ID" thread. I might move these posts over to the correct thread. :)
 
Last edited:

Bale

Minion
Edit: for some reason, I thought "this thread" was the Feature that heeheehee started to discuss ASH string comparison, not, the "monsters have an ID" thread. I might move these posts over to the correct thread. :)

It was on topic at first. I pointed out the error, "Monster #906 has name 'Mob Penguin goon' but Manuel calls it 'Mob Penguin Goon'." and then discourse evolved into a discussion of case sensitivity.
 

Veracity

Developer
Staff member
Here are the issues I have identified regarding discovering new monsters via Manuel:

1) There are two monsters with the same name, except for case sensitivity:

Code:
Mob Penguin goon	753	penggoon.gif
Mob Penguin Goon	906	penggoon.gif
When you visit the "M" page of Manuel, we report:

Code:
Monster #906 has name 'Mob Penguin goon' but Manuel calls it 'Mob Penguin Goon'.
Apparently, when parsing monsters.txt, we don't do the right thing with those two monsters; (probably) we register case-insensitive ("canonicalized") monster names. This should be fixed - or, perhaps, we should (also) make "Mob Penguin goon (2008)" and "Mob Penguin Goon (2009)", with appropriate Manuel: "NAME" attributes.

2) Monster images are assumed to be relative to images.kingdomofloathing.com/adventureimages. We have two exceptions:

Code:
Your Shadow	210	../otherimages/shadows/20.gif
Mother Slime	792	../otherimages/slimetube/stboss.gif
We should say that images are relative to adventureimages, unless the image name contains a "/", in which case they are relative to the root of images.kingdomofloathing.com. The net result is that the two monsters I cited would lose the messy "../" from their image path.

3) When we discover a newly id-ed monster on a Manuel page, we say:

New monster #17 found in Manuel with name 'Gnollish Sorceress' and image 'gnollmage.gif'

We should scrape the rest of the data - Atk, Def, HP, Phylum, Element, Init -and build an "attributes" string"

'Atk: X Def: Y HP: Z Init: XX E: YY P: ZZ"

or

'Scale: 0 Init: XX E: YY P: ZZ"

and omitting "E: YY" if there is no element

We should include that info in the message we log for the new monster (and include the attributes string in the temporary monster we register). Perhaps giving an actual line we can copy into monsters.txt, as if it is a brand-new monster, although I suspect that the message will mostly come up for monsters with newly discovered monster ID.

Code:
Gnollish Sorceress	17	gnollmage.gif	HP: 5 Def: 9 Atk: 11 Init: 60 P: humanoid
When I got that factoid, Manuel also taught me that in addition to the missing monster ID in monsters.txt, we had Def: wrong and no Init: or P: attribute.

With all of the above changes, this Feature might be done. Yes, we will still have missing monster IDs for months, probably - but we will add those, as we fax in the monsters and learn them.
 

Bale

Minion
Hee hee hee! I love it when you reply to your own posts as if you were talking down to a person with whom you have lost patience.

People should look at how you reply to yourself the next time they think you're being too curt with them.
 

Veracity

Developer
Staff member
Heh.

Revision 16172 normalizes monster images to no longer have "../" in them. Turns out, KoL itself had "adventureimages/xxx.gif" or "adventureimages/../otherimages/shadows/yyy.gif", for example. We will now turn those into "xxx.gif" and "otherimages/shadows/yyy.gif", respectively. We don't actually use that info, but it is available in the monster .image proxy field. Users of that should understand that if there is no / in the image path, it is relative to "adventureimages/", otherwise, it is used as is.

That same revision also parses the whole Manuel entry when it finds a monster ID that is not currently known to KoLmafia. It will log a message that contains the monster name, image, monster ID, and an "attributes" string with the Atk:, Def:, HP:, P:, E:, and Init: attributes in the same format as monsters.txt uses.

That leaves only figuring out what is up with the two Mob Penguin goons.
 

Veracity

Developer
Staff member
There is no monster in Mafia that has monster ID 906, and there is only one Mob Penguin goon (no Goon). Only the first listed monster is stored. Why? I have no idea.
MonsterDatabase.MONSTER_DATA is a map from (lower cased) name to MonsterData
MonsterDatabase.MONSTER_IDS is a map from monster ID to MonsterData

The former is used for, among other things, fuzzy matching monster names - which requires "canonicalized" lower case strings, since want to ignore case sensitivity in user input.

The implication of this is that we cannot have two monsters who names differ only in case, even though KoL does. To us, the two monster names will be treated as equal. So, just like of KoL monsters whose names are equal, we have to disambiguate them.

I'm going to name them Mob Penguin goon (2008) and Mob Penguin Goon (2009).

Note also that we have MonsterDatabase.MONSTER_IMAGES which maps from image name to MonsterData. We register all the various images for monsters that have multiple images. Ad if there are multiple monsters that have the same image (there are), we only remember the last one registered. This is used only by the ASH function image_to_monster(). Caveat programmer.

Revision 16176 deals with the goons.
 

Veracity

Developer
Staff member
I figured we'd use this thread to work out issues or bugs resulting from adding those monsters that need disambiguation, but considering that the one instance of that that I've seen was written up as a separate Bug Report, that's obviously not going to happen.

Modulo adding monster IDs for obsolete monsters, as they are discovered (which we also have a separate thread for), this is done.
 
Top