Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: clan_raidlogs.ash override: mimic the clan raid log manager!

  1. #1
    Developer
    Join Date
    Aug 2009
    Posts
    2,763

    Default clan_raidlogs.ash override: mimic the clan raid log manager!

    This is a follow-up to the scripts I posted in some other thread.

    Once again: dungeonlog.ash populates the loot tables used by relay_DungeonParser.ash. The .txt file should go in your /data folder, dungeonlog.ash should go in your /scripts folder, and everything else should go in your /relay folder.

    For now, it's Hobopolis only. Slime tube doesn't really have that much to track -- but yes, I should do this eventually. Slime tube drops, however, are at the bottom of the loot logs, just not formatted nicely like the hobo stuff.

    clan_raidlogs is a relay override that mimics the Hobopolis component of the GM raid log manager script (css file was essentially lifted from that script's code). Main reason to use this is if you don't like being constrained to just FF because of GM.

    No script dependencies whatsoever, aside from those included here.

    Enjoy and have fun!

    Improvements from the previous version I posted:
    • More functionality mimicking, in the form of properly sorting entries and hiding entries/tables if they didn't have anything worthwhile in them.
    • Fixed a bug in the detection of defeats.
    • Linking of the files.
    • Efficiency improvements to dungeonlog.ash.
    • Links added to clan_raidlogs.ash, headers now clickable (autoloads jquery, btw), reduced server hits.
    Attached Files
    Last edited by heeheehee; 07-12-2011 at 02:33 AM.

  2. #2
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,510

    Default

    I haven't looked at the scripts closely yet (and the clan I'm running dungeonparser.ash in is taking a loooong time). I did have a question: does relay_DungeonParser.ash only show the loot present in dungeonLoot.txt that was parsed from the current clan? Or all the loot from dungeonLoot.txt?
    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

  3. #3
    Developer
    Join Date
    Aug 2009
    Posts
    2,763

    Default

    All the loot, since if, say, I've gotten my hamster out-of-clan but everything else in-clan, and I run the script in both locations, regardless of how I display it, I still have a hamster. :P

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

    Default

    It managed to go through 1334 instances before: Unexpected error, debug log printed.
    Code:
    java.lang.OutOfMemoryError: Java heap space
    I moved the map_to_file() inside the while loop. Maybe I'm going to try running this in a small sideclan first.
    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

  5. #5
    Developer
    Join Date
    Aug 2009
    Posts
    2,763

    Default

    Huh. I could always attempt to make some optimizing changes so it doesn't use as much memory, or perhaps split it up into several files, of which only one would be loaded at a given time.

    (But yeah, it's hilarious that ASH can make Java run out of heap space. )

  6. #6
    Developer
    Join Date
    Aug 2009
    Posts
    2,763

    Default

    slyz -- try the most recently updated version. It now only stores one int per clan, which should be significantly less bloat. I made various other minor efficiency / speed tweaks. The clan I'm in doesn't quite have thousands of dungeon logs -- we've got just shy of 600 -- but I suppose I could simulate it by looping through the instances 5 times.

    Also, note that the super-long runtime is only for the first time that you manage to run it successfully.

    edit: alternatively, experimental (read: untested because of rollover) version (in which I attempt to decouple some things) posted below. Probably entirely pointless, since java is not going to execute a finally {} block if it runs out of memory, I'd imagine.

    double edit: the version up top leads to at least a 25% increase in speed. And the majority of the time either way is spent with visit_url() calls, which I can't get around. :P
    Attached Files
    Last edited by heeheehee; 06-12-2011 at 03:44 AM.

  7. #7
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,510

    Default

    I'll try it, but I moved the map_to_file() back in the loop, just in case =)

    EDIT:

    Hodgman's skivvies (407)
    Slimy Eyeball (447)
    Slimy Tooth (683)

    That should be 1537 logs.
    Last edited by slyz; 06-12-2011 at 04:02 AM.
    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

  8. #8
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,317

    Default

    (But yeah, it's hilarious that ASH can make Java run out of heap space. )
    Originally Posted by heeheehee View Post
    Code:
    int [int] map;
    for i from 1 to 1000000000 {
    	map[i] = i;
    }
    Exception in thread "CommandQueueHandler" java.lang.OutOfMemoryError: Java heap space

    It's really not a surprise, I hope.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  9. #9
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,510

    Default

    dungeonlog.ash worked like a charm this time around, thanks Heeheehee. I'm going to post the resulting data files on our forums so that people who wish to use this don't have to go through all those logs again

    Now, on to clan_raidlogs.ash. Our current hobopolis run has 14 participants, and I see that on its first run there is a visit_url() for each player to extract the name from showplayer.php. I think this could probably be avoided. Here is what the Raid Manager does to extract player names:
    PHP Code:
    var dataArray sectionData.split("<br>");

    for (var 
    j=0dataArray.lengthj++ )  // Cycle through each line entry
    {
      var 
    character getPlayer(dataArray[j]);

      if (
    character != "" && charArray.indexOf(character) < 0
        
    charArray[charArray.length] = character;
    }

    function 
    getPlayer(theString)
    {
          var 
    player theString.replace("<b>","").replace("</b>","").match(/^[\w\s]+\(#\d+\)/);
          
    if (player != null){
             return 
    player[0];
          }
          return 
    "";

    Would it be possible to add something like this?

    Another small feature request: links to the clan basement and the sewers
    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

  10. #10
    Developer
    Join Date
    Aug 2009
    Posts
    2,763

    Default

    Code:
    int [int] map;
    for i from 1 to 1000000000 {
    	map[i] = i;
    }
    Exception in thread "CommandQueueHandler" java.lang.OutOfMemoryError: Java heap space

    It's really not a surprise, I hope.
    Originally Posted by Veracity View Post
    Well, I mean in the context of a "reasonable" use, of course.

    And slyz: Yeah, I should really parse names from context (i.e. the current page). Server hits are bad. Also, those links should be doable / simple. Could also attempt a crude semblance of formatting.

    Edit: Done, and added a bonus with this update.
    Last edited by heeheehee; 06-12-2011 at 04:20 PM.

Similar Threads

  1. Replies: 3
    Last Post: 02-01-2015, 07:30 PM
  2. Replies: 0
    Last Post: 07-04-2014, 12:43 PM
  3. Replies: 0
    Last Post: 09-11-2013, 03:02 AM
  4. Clan Raid Log Parser Library -- Raid.ash
    By mredge73 in forum Informational Scripts
    Replies: 24
    Last Post: 10-20-2011, 12:15 AM
  5. clan manager issue
    By kethoth in forum Community Support
    Replies: 3
    Last Post: 11-14-2007, 03:51 PM

Posting Permissions

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