Feature - Implemented Learn monster image names

zarqon

Well-known member
Monsters have an "image" proxy record field. This is very useful to to display our fancy new adventure queue using both images and text. Or it would be, if the monsters actually had any information in that field.

Unfortunately only a handful of monsters have known image names -- the monsters where mafia needs to use the image name to determine the monster rather than the name (such as basement monsters, Nemesi, nightstands, etc.). For all the other monsters, a blank string, which is rather less useful.

Would it be possible to flesh this out the rest of the way? Perhaps some temporary code to make mafia learn the image names as it adventures? I could start scraping image names and saving them in a map for later custom insertion if you like, but a more future-proof solution would be lovely.
 

Fluxxdog

Active member
I remember there being 2 problems using images to tell apart monsters. 1 was the Dataspider. Wasn't the other frat orcs?
 

zarqon

Well-known member
That's an issue different enough as to be basically unrelated. Mafia uses image names to identify only 40 specific monsters, and that is all well and good. But mafia seems to have no idea what the image names are for the 1,160 remaining monsters -- likely because mafia has no functional need to know that information, so it was never added. Scripters such as myself, on the other hand, may have a functional need for that information, and since the proxy field is available to contain that information, it would be handy to help it contain the information it indicates that it ought to.

Mafia contains complete image information for all 6,243 items and 1,178 effects, so there's consistency as an argument in favor as well.
 

lostcalpolydude

Developer
Staff member
The only thing that stopped me before was the large amount of effort it would take to copy-paste them all into monsters.txt, since someone already had a data file (in a different format) listing monster images with their names as parsed from Manuel for their Manuel-checking script. I suppose automating that process was an option, but I never did anything with that.
 

Veracity

Developer
Staff member
I think I'd do it like this:

- Add field #2 in monsters.txt to have the image. Bump the version #
- remove Image: from the "attributes" field of those monsters that currently have it and put the image into that field
- check in the new monsters.txt

- Create MonsterDatabase.writeMonsters( final File output ) a la ItemDatabase.writeItems which writes out a properly formatted monsters.txt from what is stored in the internal tables. If done correctly, it should reproduce the current file exactly, except for the order of the monsters, which will end up alphabetized - not a bad thing, in my opinion.

- Then, write a one-time function which reads the other data file, "sets" the monster image for each monster, and calls writeMonsters() to generate the updated file.
- check in the new monsters.txt

That's still a fair amount of work, but it's not mind-numbing data entry, at least.
 

zarqon

Well-known member
If mind-numbing data entry would significantly reduce the amount of work needed to do to implement this, I offer my mind to be numbed. I've already tracked down and entered who knows how many thousands of data for BatBrain's various and sundry, what's another thousand?

I suspect it's likely to be more a case of scraping and programmatically generating as much as possible, then filling in the holes by hand, though.
 

ckb

Minion
Staff member
I have all this info parsed into an excel format for my monster manuel checker script. This includes monster name, image, atk, def, hp, phylum, element, and init. Order of monsters is the same as it appears in the Manuel in the Questlog.
Trimmed and pasted here if it helps.

Note I add some extra characters to the monsters with the same names (grelmins and constructs).
 

Attachments

  • kolmondata.txt
    98.1 KB · Views: 133

Darzil

Developer
Monster.txt updated to include image names from Monster Manuel, based off r12168. Also added Phylum to five monsters that somehow missed it last time I updated the file.

I have not added quite all the monsters. I haven't put the later version of Ed, as I don't know the file names, Slime monsters, as I didn't like including noart.gif, or Pickle Factory (as I wasn't around that day). Not added due to not being in Manuel include Cyrus, Whole Kingdom, Sea Horse and Ultrarares.

It should be checked that the image entry for Your Shadow doesn't cause an issue, as it has \'s in it, and references another directory than \adventureimages.

View attachment monsters_with_images.txt
 

lostcalpolydude

Developer
Staff member
I expect I'll get those added next Tuesday or Wednesday, after a camping trip and playing through the new content. There are few enough missing that the remaining ones can be filled in from elsewhere (already got some of them). Your shadow's image with Manuel depends on your class/gender, so that should be left out.
 

Veracity

Developer
Staff member
What do you think of making image a distinct field in monsters.txt, rather than something in the "miscellaneous attributes" field?
 

lostcalpolydude

Developer
Staff member
That seems fine. I don't have much interest in doing the work for that at the moment, though maybe it's easier to change the data file while there are fewer Image: attributes.
 

Veracity

Developer
Staff member
Revision 12227 adds a field to monsters.txt for the image, bumps the revision number of that data file, and adds all the images that Darzil provided. Thank you.
 

Veracity

Developer
Staff member
I think this (mostly) implements this Feature Request. It doesn't scrape the image name from newly discovered monsters and include that when it (temporarily) registers a new monster. I suppose it could do that, but since we never write out an override file for monsters, it wouldn't do much good.

I'm going to mark this implemented.
 

zarqon

Well-known member
Thank you, Veracity and Darzil! I'm excited to watch BatMan RE start showing all these lovely monster images later today.
 
Top