How I can has item image?

zarqon

Well-known member
Anyone know how to get the item image for a given item? I have a relay script where I'd like to include item pictures in front of the item names.

I checked mafia's image cache and the filenames don't have a consistent naming pattern.

Looks like I might be able to parse the HTML of the relevant item description from itemdescs.txt -- but that's a server hit per image name. Anyone know of a purely client-side method I'm missing?
 

jasonharper

Developer
Mafia doesn't track the item image filenames; the best you're going to be able to do is maintain your own cache of filenames once determined. The item descriptions would probably be the least server-intensive way of determining individual filenames, but you may be able to find them in bulk by something like the crafting discovery pages if there's some common theme to the items your script will be displaying.
 

holatuwol

Developer
You could probably also check the people at Coldfront to see if they have that information handy (since all the item images are included in the wiki).
 

zarqon

Well-known member
Great! This is why it's good to ask questions here. Thanks to your solutions I believe I can get all the image names with just a single server hit (maybe not even KoL), and cache them for later. Thanks!
 

Catch-22

Active member
Although the editors of KoLwiki do tend to keep the image names the same, there's no guarantee that they will have the same name because they are uploaded by users.

Good luck on your quest though :)
 

zarqon

Well-known member
Yeah, I've noted before that there can be capitalization issues with image names on the Wiki. I'll probably do something like kain suggested (it's actually a Display Case manager script).
 
Top