Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 46

Thread: DCQuest

  1. #1
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,757

    Default DCQuest

    DCQuest 1.5
    DCPrune 1.3.1

    DCQuest is an information gathering script for the Display Case completest. It looks at every displayable item that your version of Kolmafia knows about and writes tab delimited files with some annotation in the data subdirectory.

    DC_"YourUserName".txt has two columns. The first is the name of an item that you do not have in your display case. The second is either:
    • A number that is an historical mall price for the item
    • "Gift" for an item that is available in the Gift Shop
    • "Not in Mall" for an item that can be sold, but is not presently in the Mall
    • "Work" for an item that can be obtained by some other means such as ascending and adventuring


    DCQJW_"YourUserName".txt has six columns. The first is the name of an item you do have in your display case. The second is how many of those items you have in the display case. Next is where your collection ranks according to the collections database at Jicken Wings, with zero meaning you don't rank. Next is the number of items the next rank has followed by the number of items the #1 rank has. Last is a yyyymmdd string for when the collections database was checked.

    Both of these files are tab delimited and can be viewed and manipulated in a spreadsheet. However, it is not recommended that changes be made to DCQJW_"YourUserName".txt in case such changes make the file unreadable by the scripts. DC_"YourUserName".txt is only written, never read, by these scripts.

    The script will emit a line into the gCLI window if an item is available to you but not in your display case. Finally it will check for your rank in the Jicken Wings "percent complete of displayable items" leaderboard. A known issue is that the first run of a session will often claim (incorrectly) that you are unranked, whereas subsequent runs will correctly show the rank.

    DCQuest burns no adventures and moves no items (but see DCPrune, below). The most likely use case is to manipulate the data files as spreadsheets to plan shopping trips or adventure strategies.

    As currently configured, it can take a long time to run with 15 minutes being reasonable for a full display case.

    The script contains code originally written by zarqon although it looks like I now get to maintain it. Thanks to zarqon and others who put up with my n00b questions.

    DCPrune works with DCQuest, using the DCQJW_"YourUserName".txt that it creates. It looks for items in your display case that you have more than one of but your collection does not reach a particular rank on the leaderboards. It then moves all but one of those items into your closet. If your closet is cluttered then this will not be helpful, but if your closet is relatively empty then it should be fairly easy to identify the items to sell, pulverize or otherwise dispose of.

    Note that these scripts all require zlib. DCQuest also requires datelib. The use of a zlib variable editor such as this or this is highly recommended but not required.

    Thank you.

    Release V1.01
    • Fix typo that only recognized creatable items if more than one could be created
    • Pulled write of map outside of loop
    • Added counter of meat needed to buy missing items from mall
    • Fixed several typos in comments
    • Fixed error in checking for versions

    Release V1.02
    • Fixed problem when all collections are tied for #1
    • Added verbosity triggered status updates

    Release V1.03
    • Added code to check for % complete leaderboard
    • Status messages for control options
    • Added DCPrune

    Release V1.1
    • Reorganized DCQuest code
    • Prompt for singleton checking in DCQuest
    • DCPrune hardcoded to only consider ranks of 250 or less as keepers.
    • Fixed bug in DCPrune where rank check was wrong.

    Release V1.2
    • First release of DC2Wiki
    • Made threshold a zlib variable in DCPrune
    • Made several parameters zlib variables in DCQuest.
    • Tweaked "use cache" decision making in DCQuest.

    Release 1.3
    • Dropped "v" from version identifier.
    • Changed filenames to conform with <script><user> naming convention.
    • Reduced cache file writes for improved performance on slow devices such as thumb drives.
    • Delete entries from cache if item no longer in DC.
    • Add entries to cache when there is no entry and exactly one in DC. Do this without regard to CHECK ALL flag but only for 25 items per invocation of DCQuest.

    DCQuest Release 1.4
    Tweaked caching a bit. It is now usually true that all cache entries have a corresponding item in the display case and all items in the display case have a corresponding cache entry. Entries older than DCQuest_maxAge will be unconditionally removed from the cache. The number of singletons, with no cache entry, that are updated by hitting JickenWings has been throttled so that the script does not run for hours and make thousands of hits when run against a well stocked display case.

    DCPrune 1.3.1 - Fixed cut and paste typo in version checking.

    22 OCT 2012 - Removed DC2Wiki. See thread for reasons.

    Note - if you upgrade to 1.3 then you probably want to delete "YourUserName"_DC.txt and rename "YourUserName"_JWDC.txt to be DCQJW_"YourUserName".txt. If you were running DCQuest circa September 2012 when JickenWings was unavailable for several days you should upgrade to 1.4 so bad data is eventually replaced or delete DCQJW_"YourUserName".txt. and run 1.4 so that bad data is quickly replaced. Bad data in this case is a cache entry signifying unranked for every item checked while JickenWings was down.

    05 AUG 2013

    DCQuest now maintained in SVN.
    Code:
    svn checkout https://svn.code.sf.net/p/kolmafiascripts/dcq/code/
    1.5 tweaks cache management just a little. Biggest change is moving to SVN.
    Attached Files
    Last edited by fronobulax; 08-15-2013 at 04:22 PM. Reason: Updated scripts

  2. #2
    Senior Member icon315's Avatar
    Join Date
    Nov 2009
    Location
    Kentucky
    Posts
    666

    Default

    The script is giving wrongfull Info on the update message.

    Code:
    string THIS_VERSION = "1.00";
    SHould be
    Code:
    string THIS_VERSION = "v1.00";
    This is the Message given

    Code:
    New Version of DCQuest Available: v1.00
    Upgrade DCQuest from 1.00 to v1.00 here: http://kolmafia.us/showthread.php?t=3640
    Last edited by icon315; 03-13-2010 at 04:29 AM.
    \

  3. #3
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,757

    Default

    Fixed. Thank you. Version unchanged.

    Updating was one thing I could not test until I actually made this thread.

  4. #4
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,757

    Default

    Fixed and found bug where script went into infinite loop when checking a collection where everyone was tied for first. See bucket of anniversary lard for an example.

  5. #5
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,757

    Default

    For reasons as yet undiagnosed, sometimes DCQuest reports that a user does not rank on the Jicken Wings leaderboard when in fact the user does rank. This may be related to a timeout in fetching the Jicken Wings page or the sheer size of the returned results. The workaround is to re-run the script, since it has never been observed to fail twice in a row. Investigation continues.

  6. #6

    Default

    If it's related to a timeout, you may want to check that the returned string length is a reasonable value right after your visit_url() call, and if not, perhaps wait() for a short bit, then try again. Abort if you still don't have a string.

    If it's a size-of-string issue, I could be wrong, but it might be a little safer to use a buffer. But again, I could be very wrong. (Both because buffer may have the same limits, and because visit_url() returns a buffer anyway, and I'm not sure when it's converted to a string, exactly.)

  7. #7
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,757

    Default

    Thanks. I had a version that checked the return string length and re-visited if it was zero. It still failed to find and I didn't bother to see why. I also turned on the debug log and, of course, it didn't fail. Given the size of the page I probably should consider a buffer. I tend to avoid them for no rational reason. For performance reasons buffer.add(stuff) is faster than buffer += stuff in almost every language/implementation I can think of but I really like using the plus sign as the concatenation operator.

  8. #8
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,757

    Default

    Just to bump the thread...

    New versions available. See first post.

    Jicken Wings is updating their database but the updates occur irregularly.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

  9. #9
    Senior Member icon315's Avatar
    Join Date
    Nov 2009
    Location
    Kentucky
    Posts
    666

    Default

    Function 'abs( int )' defined multiple times (zlib.ash, line 14)

    i realize that it says zlib, but this never happened on the last version
    \

  10. #10
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,511

    Default

    There's a conflict between zlib and datelib: both define an abs() function.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •