Feature - Implemented Outfits have images

Veracity

Developer
Staff member
I think it's the image of the tattoo associated with them.

Seems like outfits.txt could have a field to hold the image name. Not that we use it, but we don't use the effect and item images either. I suppose a script might want this, much as scripts want the other images, and we could expose it via an outfit_image() function or something (no proxy field, since there is no $outfit type).

I suggest we bump the version number of outfits.txt and add a column between the outfit name and the outfit pieces to hold the image file name.
 
Adding the outfit image field would allow someone to do a single-hit tattoo check. Well, two hits since we don't have $outfits[], since you'd need to parse through the outfits on the equip page to get the list. But then you could do a single hit to the tattoo page and if !contains.text(tattoopage).$outfit[item].image then you should wear that outfit and go visit the artist. No more 45 server hits to change gear for each of the pages that doesn't work QUITE right on the wiki and so need to be tested every time, even after you've already unlocked the tattoo. :)
 
Revision 14094 bumps the version of outfits.txt to 2. It adds a column for the image, and that file now has all the images. There is no way, yet, for ASH to access that internal data.

If we had started out with a $outfit type, that would have been fine, I guess. outfits have IDs, names, pieces, and tattoos. However, I think adding it now would be problematic, since we want built-in data type names to be reserved words, and I bet that lots of scripts have variables named "outfit" and would break.

There's also the question of custom outfits. We now handle those reasonably well, since we look at the outfits page when you log in and learn the ids and outfit pieces, and also notice when you save a new outfit. The exception is the KoL-created "Your Last Outfit", made by it whenever you put on an outfit, and assigned a new (negative) ID every time you do that - with no feedback whatsoever to allow us to deduce that ID.

I figure I'll just implement outfit_tattoo( string name ) or something. Until then, this is still open...
 
Revision 15102 adds these ASH functions:

string [int] all_normal_outfits() -> returns map of all outfit names indexed by outfit number.
string outfit_tattoo( string name ) -> returns image file name of outfit tattoo
 
Awesome... this lets me check outfits so easily...

Possible, but unclaimed tattoos:
> ashq string tattooList = visit_url( "account_tattoos.php" ); foreach it,val in get_outfits() if (!tattooList.contains_text(outfit_tattoo(val))) print(val);

Crimbot Crimboutfit
Ghast Iron Gear
Gladiatorial Glad Rags
High-Radiation Mining Gear
Violent Vestments
Workoutfit

Here's one (no content on this one, because that would just be messy) to show all outfits which you don't currently possess which have un-learned tattoos:
> ashq string tattooList = visit_url( "account_tattoos.php" ); foreach it,val in all_normal_outfits() if (!have_outfit(val) && !tattooList.contains_text(outfit_tattoo(val))) print(val);

Awesomely, each one only takes a single server hit now. No scraping of the wiki or out-of-date data maps required.
 
Back
Top