Results 1 to 6 of 6

Thread: Veracity's Garden Harvester

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

    Default Veracity's Garden Harvester

    If you have more than one type of garden available to you, perhaps you have noticed that "breakfast" doesn't handle that as well as you might wish. Sure, you can say "Harvest Anything" and it will pick whatever is available, no matter what type of garden you have, but many of the gardens are worth waiting some number of days before harvesting.

    Unfortunately, "breakfast" will only let you specify that for exactly one garden at a time and if you switch gardens, you have to adjust your breakfast settings.

    Until now. Here is a script that will let you specify what you want from all six garden types. It will detect your garden type from the crop, will compare against what you want for that type of garden, and will harvest when appropriate.

    You configure it with a single property - VGH.GardenCrops. Here is the documentation:

    Code:
    // ***************************
    //       Configuration       *
    // ***************************
    
    // Pumpkin Patch
    //    "pumpkin"			days 1-4: 1 pumpkin per day
    //    "huge pumpkin"		days 5-10: 1 huge pumpkin
    //    "ginormous pumpkin"	day 11+: 1 ginormous pumpkin
    // Peppermint Patch
    //    "peppermint sprout"	days 1-4: 3 peppermint sprouts per day
    //    "giant candy cane"	day 5+: 1 giant candy cane
    // Bone Garden
    //    "skeleton"		days 1-5: 5 skeletons per day
    //				day 6+: fight with skulldozer
    // Beer Garden
    //    "barley"			days 1-7: 3 handfuls of barley and 3 clusters of hops per day
    //    "beer label"		day 3: + 1 fancy beer bottle and 1 fancy beer label
    //    "2 beer labels"		day 5: + 2 fancy beer bottles and 2 fancy beer labels
    //    "3 beer labels"		day 7+: + 3 fancy beer bottles and 3 fancy beer labels
    // Winter Garden
    //    "ice harvest"		days 1-7: 3 ice harvests and 3 snow berries per day
    //    "frost flower"		days 3-7+: + 1 frost flower
    // Thanksgarden
    //    "cornucopia"		day 1: 1 cornucopia
    //    "3 cornucopias"		day 2: 3 cornucopias
    //    "5 cornucopias"		day 3: 5 cornucopias
    //    "8 cornucopias"		day 4: 8 cornucopias
    //    "11 cornucopias"		day 5: 11 cornucopias
    //    "15 cornucopias"		day 6: 15 cornucopias
    //    "magacopia"		day 7+: 1 megacopia
    //
    // You may specify one crop from each kind of garden, separated by "|".
    // If you specify no crops, picking your garden will be deferred to
    // breakfast.
    //
    // A setting that will harvest all the normal crops:
    //
    // "pumpkin|peppermint sprout|skeleton|3 beer labels|frost flower|15 cornucopias"
    //
    // You don't have to specify crops for all types of garden. If you do
    // not include crops from a particular garden, this script will not
    // harvest that kind of garden.
    
    boolean [string] garden_crops = define_property( "VGH.GardenCrops", "string", "pumpkin|peppermint sprout|skeleton|3 beer labels|frost flower|15 cornucopias", "set" ).to_set_of_string();
    Get the script via SVN.

    Code:
    svn checkout https://svn.code.sf.net/p/veracity0/code/garden
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    Only a few months ago, scripting was a thing you almost never did despite being the principle architect of ASH scripting language. Now you're really getting into it with script after script. Is it interesting finally getting involved with the language which you've worked so hard to create? I've enjoyed your creation very much, so I'm happy to see you indulging.

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

    Default

    It's my primary contribution, these days. I leave it to lost and Darzil to handle New Content and I focus on Bugs - and, as somebody who is actually scripting, ASH features that I now realize are useful to ASH scripters.

    Also part of the motivation my sequence of scripts is that I really do want to be able run all my multis by doing: log in, press script button 3, log out when it completes. In other words, cut my real-life time running my testing multis by a lot.

    And, yes - ASH is a real programming language, and I am enjoying it a lot.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

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

    Default

    Also keep in mind that my focus is The One (farming) Script to Rule Them All - and a lot of the intention is to publish code that people can pull out and use for their own purpose - but some of that is so big and (potentialy) useful on its own, that I trouble to make it available by itself.

    Using my own coding standards and libraries and such.

    I could probably do the same with some other VMF modules, but the ones I published individually (vprops, VGC, VGH) are especially big and/or complicated that I want to support them individually.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

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

    Default

    Registry info:

    Code:
    {
      "repo": "https://svn.code.sf.net/p/veracity0/code/garden/", 
      "author": "Veracity", 
      "name": "Veracity's Garden Harvester", 
      "forumThread": "http://kolmafia.us/showthread.php?21651", 
      "shortDesc": "Harvest any kind of garden", 
      "category": "action", 
      "longDesc": "This script lets you configure what you want from all possible gardens and will detect garden type and pick the right thing."
     }
    Bale, notice something I did there:

    Code:
    "forumThread": "http://kolmafia.us/showthread.php?21651"
    rather than, for example "http://kolmafia.us/showthread.php?21651-Veracity-s-Garden-Harvester", which incorporates the title of the thread. Or, at least, a title the thread once had, since you can edit the title. Or the URL, for that matter; "http://kolmafia.us/showthread.php?21651-Any-Old-Garbage" brings you straight to this thread.

    You could similarly trim all such "forumThread" URLS in the registery, should you care to.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  6. #6
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    I know how that stuff works on this forum. I just like it when the link has informative information in the title.

    I'll add this to the repository.

Posting Permissions

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