View Full Version : Discoveries.ash
This script will list (almost) every recipe that is missing from your discovery pages. Additionally there are boolean toggles that will create the missing items.
Items that don't show up on the discovery pages are unlisted, as well as items that require using an item to learn the recipe. I also ignore depleted items by default. Also the Frost™ brand sword because the ™ makes contain_text() return false.
This script will also check for gender and not create a skirt/kilt if it's not possible. I remembered I can check the effect of mysteriously handsome instead of your character image (which won't work for anyone with a custom avatar).
matt.chugg initially had this idea and I took his initial script and added a lot of functionality.
I believe these are all the items with multiple recipes, mafia only knows about one way so unless you make the other by hand this scrip will keep trying to create them the way mafia knows how.:
staff of ed
makeshift SCUBA gear
plain pizza
pr0n cocktail
rum and cola
whiskey and cola
meatloaf helmet
sticky meat kilt
dripping meat crossbow
dripping meat staff
dripping meat sword
green beer
bloody beer
Wads also can't be created by cooking through mafia.
Wads also can't be created by cooking through mafia.
They can if you're clever about it (http://kolmafia.us/showthread.php?t=1929). But I guess you already know that...
Yeah I just meant automatically using mafia's create functions.
I made a typo which I fixed. It was putting items in the incorrect index of the basic smithing group (always index 0).
sulfur
07-04-2009, 01:24 PM
Try setting the Frost Brand sword to this text:
concoctions[$item[Frost™ brand sword]] = "UNLISTED";
I made that change, and it appears to work on my Mac.
You'd actually have to unlist the original one first. I can't test if it actually worked though, I already made it.
concoctions[$item[Frost™ brand sword]] = "UNLISTED";
concoctions[$item[Frost™ brand sword]] = "SMITH";
matt.chugg
07-06-2009, 09:21 AM
i'm being dumb!
oh, and nicely done Rinn :)
Presto Ragu
08-12-2009, 08:48 AM
I like this script a lot, since discoveries were implemented during my long break of KoL.
Just for informational purposes, it incorrectly counts the number of existing discoveries if your account is set to not display images. (0 for all current discoveries.)
The listing functions just fine, although again, the count is off. (You have X/X discoveries. Where X is always the same.)
matt.chugg
08-12-2009, 10:08 AM
ahh, I didn't think of that! it uses visit_url to get the pages, then determines the number of instances of /itemimages/ to detect how many you have. obviously without images displayed this will fail!
replacing lines 88 - 111 with the following should fix this, i'm sure rinn will update as soon as he has chance!
print("Getting list of discovered meat-pastables...");
string pastepage = visit_url("craft.php?mode=discoveries&what=combine");
int currentpastecount = count(split_string(pastepage,"descitem")) - 1;
print(currentpastecount + " current meat-pasteable discoveries.");
print("Getting list of discovered food...");
string foodpage = visit_url("craft.php?mode=discoveries&what=cook");
int currentfoodcount = count(split_string(foodpage,"descitem")) - 1;
print(currentfoodcount + " current food discoveries.");
print("Getting list of discovered arms & armor...");
string smithpage = visit_url("craft.php?mode=discoveries&what=smith");
int currentsmithcount = count(split_string(smithpage,"descitem")) - 1;
print(currentsmithcount + " current arms & armor discoveries.");
print("Getting list of discovered booze...");
string boozepage = visit_url("craft.php?mode=discoveries&what=cocktail");
int currentboozecount = count(split_string(boozepage,"descitem")) - 1;
print(currentboozecount + " current booze discoveries.");
print("Getting list of discovered jewelry...");
string jewelrypage = visit_url("craft.php?mode=discoveries&what=jewelry");
int currentjewelrycount = count(split_string(jewelrypage,"descitem")) - 1;
print(currentjewelrycount + " current jewelry discoveries.");
Presto Ragu
08-12-2009, 02:29 PM
I tried that change, and it works like a charm.
Thanks for the effort, on a rather minor bug.
matt.chugg
08-20-2009, 11:44 AM
ok, heres a version with the fix for inventories with images turned off (as posted above)
This version also only displays "of which x require someskill" if x > 0
rinn.. I incremented to 3.2, hope you don't mind, also if a mod wants to lock my thread and post a url to this one, its all good
NastyPeasant
10-06-2009, 05:02 PM
Using the Discovers.ash in the first post of this thread (says ver 3.1 in the script), I'm getting the following error:
> call scripts/Discoveries.ash
Bad item value: "Frostô brand sword" (Discoveries.ash, line 36)
I don't even have a Frostô brand sword in my inventory.
Is it something I did?
(does the same thing with Matt's ver 3.2, except it says "line 37" at the end)
Spiny
10-06-2009, 09:22 PM
Using the Discovers.ash in the first post of this thread (says ver 3.1 in the script), I'm getting the following error:
I don't even have a Frostô brand sword in my inventory.
Is it something I did?
(does the same thing with Matt's ver 3.2, except it says "line 37" at the end)
Whichever line is the offending one, try changing it to:
concoctions[$item[Frost™ brand sword]] = "SMITH";
See if that works.
Be advised, mafia recently changed how evil potions are categorized from SAUCE to COOK. It still requires Advanced Saucecrafting, but this script will have them listed under no-special skills required due to the COOK category.
matt.chugg
10-07-2009, 11:10 AM
ignore it using the item number in 3.3
concoctions[to_item(1712)] = "UNLISTED";
just have to make it manually if you don't have it.
Will look at the evil potions later
Pantsless
01-25-2010, 06:16 AM
please disregard this post. i am dumb.
icon315
02-03-2010, 04:59 AM
Update? To include the Discoveries from the Miscellaneous section
matt.chugg
02-03-2010, 08:29 AM
Update? To include the Discoveries from the Miscellaneous section
I'll look into it, but im' not sure quite how mafias concoctions file handles things like this, and how mafia handles multi use creation, investigation needed!
matt.chugg
02-03-2010, 09:09 AM
Update to 3.4
support added for the new miscellaneous/multi-use section
Nikadaemus
02-20-2010, 01:45 PM
I posted in an earlier message before I saw the title of this one (before anyone stomps on me for double posting...). Thanks for all the hard work. Is there a way in Mafia to export results to a file, since I cannot copy text out of the result window? TIA
I can copy text from the gCLI tab, but you can also find that text in the session log in /sessions.
Nikadaemus
02-23-2010, 08:11 PM
DUH!!! I can Ctrl-A to get the text. I was trying to just highlight parts of it, as I didn't want the top part of the report. I LOVE THIS SCRIPT!!! Too bad it just couldn't go make the stuff for you. Oh yeah, and suddenly make a Tiny Plastic Sword appear for you. :)
matt.chugg
02-23-2010, 08:33 PM
Well I can't help on the tiny plastic sword, but have a look at the script source...
// modifying the following to auto create items.
//
boolean createbooze = false;
boolean createfood = false;
boolean createequipment = false;
boolean createjewelry = false;
boolean createitems = false;
boolean createmisc = false;
just be aware that mafia may spend meat to create items based on your settings, and WILL use items out of your inventory to create them is they are available. so for example, if you have a lump of time your saving, this script may turn it into a time sword!
matt.chugg
03-16-2010, 09:45 AM
Looks like KoL doesn't include brick of sand, or sandcastle as a discovery so unlist them from the script.
Update to 3.5.
Iaoth
04-16-2010, 03:56 PM
I'm in HCO so I can't try this out right now, but is there a function that allows me to tell it how much meat I'm willing to spend on discoveries? Or do I have to buy the pieces.
(Now that I'm asking... I assume I can just tell mafia to NOT buy things from the mall...)
icon315
04-16-2010, 08:34 PM
It will buy anything in the mall, unless the amount per item exceeds a certain price (which i don't know).
Shiverwarp
11-09-2010, 11:47 PM
Cool, I've been looking for this
Cool, I've been looking for this
This is probably well out of date by now. I'd recommend you use another script HERE (http://kolmafia.us/showthread.php?3001-bumcheekcity-s-Easy-Wiki-Snapshot-Maker).
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.