Results 1 to 10 of 10

Thread: Arrrbor Day

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

    Default Arrrbor Day

    I have been collecting rewards from Arrrbor Day for years now. I occasionally forget. So, I have created a script to do it for me, which I will eventually call from VMF.

    This is semi-tested; the configuration and prize selection is tested, but it hasn't been run on actual Arrrbor Day yet. That comes next week, on May 1.

    I'm offering this now so that people can give me feedback on my configuration options.

    Here's the script description, from the script itself:

    Code:
    // Run this script on Arrrbor Day and it will collect the prize you
    // earned for planting saplings last Arrrbor Day and will adventure
    // sufficiently to get the prize of your choice next Arrrbor Day.
    
    // You can either specify the prize you desire (a potion or an outfit
    // piece from one of three kinds of tree) or let this script pick for
    // you using the following rules:
    //
    // If you do not have the outfit (in inventory, closet, storage or your
    // display case), pick a missing piece of equipment and spend 100+ turns
    // adventuring in the Arrrboretum to set it up. (Optional; if you don't
    // have the outfit and don't care, you can disable this.)
    //
    // Otherwise, pick the potion that you have the least of in those
    // locations and spend 3 turns in the Arrboretum setting it up.
    Here is the configuration:

    Code:
    // If you are collecting a particular item, we can get it.
    
    // A potion after 3 turns
    //	handful of Crotchety Pine needles
    //	lump of Saccharine Maple sap
    //	handful of Laughing Willow bark
    //
    // Equipment after 100 turns
    //	crotchety pants
    //	Saccharine Maple pendant
    //	willowy bonnet
    //
    // If you want this script to choose for you:
    //	none
    
    item target_item = define_property( "VAD.TargetItem", "item", "none" ).to_item();
    
    // If you have no target item, we can adventure for 3 turns and get a potion
    // or for 102 turns to get an outfit piece.
    //
    // We'll either pick an outfit piece you don't have or the potion you have the fewest of.
    //
    // If you don't want to worry about the outfit, set this to false.
    
    boolean should_complete_outfit = define_property( "VAD.CompleteOutfit", "boolean", "true" ).to_boolean();
    So, there are two options:

    VAD.TargetItem - specific prize you want. "none" (default) lets the script pick, as described above
    VAD.CompleteOutfit - true (default) if you want to complete the outfit, 100 adventures per piece, false if you don't care.

    I have an internal "testing" variable. Set to false, I got the following today:

    Code:
    > call Arrrbor Day
    
    Today is not Arrrbor Day.
    Set to true on character #1:

    Code:
    > call Arrrbor Day
    
    Validating configuration.
    All is well!
    Updating display case...
    Potions
        handful of Crotchety Pine needles -> 7
        lump of Saccharine Maple sap -> 7
        handful of Laughing Willow bark -> 6
    Equipment
        crotchety pants -> 1
        Saccharine Maple pendant -> 1
        willowy bonnet -> 1
    Rarest potion = handful of Laughing Willow bark
    Plant 2 saplings today to get that item next Arrrbor Day.
    Done testing
    Set to true on character #2:

    Code:
    > call Arrrbor Day
    
    Validating configuration.
    All is well!
    Updating display case...
    Potions
        handful of Crotchety Pine needles -> 5
        lump of Saccharine Maple sap -> 4
        handful of Laughing Willow bark -> 4
    Equipment
        crotchety pants -> 0
        Saccharine Maple pendant -> 0
        willowy bonnet -> 1
    First missing outfit piece = crotchety pants
    Plant 100 saplings today to get that item next Arrrbor Day.
    Done testing
    Note that I said to "plant 2 saplings" to get the potion. That's what the Wiki says - but for many years, I've planted 1 sapling and got the potion just fine. Perhaps "get the sack of saplings" and "plant 1 sapling" is all that is needed. Or perhaps for a character who has never done Arrrbor day - and therefore doesn't get the choice adventure with the reward from last Arrrbor Day - you really do need to plant 2 saplings?

    Or, perhaps the Wiki was once correct, but KoL changed something, and the WIki is simply wrong now, as my session logs for many years demonstrate.

    I don't want to mislead a character who hasn't done this holiday before, but I'm pondering this and may just change it plant a single sapling, agreeing with my experience.

    Here's the svn to get the script. I'll add it to the Script Manager after I've actually confirmed that it works live on May 1.

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

  2. #2
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    One thing I will change is to track saplings you've planted so you can run the script more than once and not waste turns.

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

    Default

    Revision 20028 adds the _saplingsPlanted property to KoLmafia. This way I don't depend on my script looking at every adventure you spend in The Arrrboretum.

    I also munged this script to recognize when you have already visited the Arrrboretum and selected a bacg of saplings by recognizing the "Plant a Tree, Plant a Tree!" non-combat.
    Additionally, it uses the new property to decide how many saplings you still need to plant.

    An unascended character:

    Code:
    > call Arrrbor Day
    
    Validating configuration.
    All is well!
    Updating display case...
    Saplings
        bag of Crotchety Pine saplings -> 5
        bag of Saccharine Maple saplings -> 5
        bag of Laughing Willow saplings -> 5
    Potions
        handful of Crotchety Pine needles -> 5
        lump of Saccharine Maple sap -> 4
        handful of Laughing Willow bark -> 4
    Equipment
        crotchety pants -> 0
        Saccharine Maple pendant -> 0
        willowy bonnet -> 1
    
    Choosing best prize
    First missing outfit piece = crotchety pants
    Plant 100 saplings today to get that item next Arrrbor Day.
    
    Choosing best prize using available saplings
    Missing outfit piece = crotchety pants
    Plant 100 saplings today to get that item next Arrrbor Day.
    A character who has ascended since the last Arrrbor Day:

    Code:
    > call Arrrbor Day
    
    Validating configuration.
    All is well!
    Updating display case...
    Saplings
        bag of Crotchety Pine saplings -> 0
        bag of Saccharine Maple saplings -> 0
        bag of Laughing Willow saplings -> 0
    Potions
        handful of Crotchety Pine needles -> 10
        lump of Saccharine Maple sap -> 9
        handful of Laughing Willow bark -> 9
    Equipment
        crotchety pants -> 1
        Saccharine Maple pendant -> 1
        willowy bonnet -> 1
    
    Choosing best prize
    Rarest potion = lump of Saccharine Maple sap
    Plant 2 saplings today to get that item next Arrrbor Day.
    
    Choosing best prize using available saplings
    No sacks of saplings available
    
    Done testing
    Version 247 of (my collection of) scripts.

  4. #4
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,674

    Default

    Neat. Would you consider exposing the testing variable as a user preference? Alternatively, have the information controlled by testing just printed unconditionally? (I can and did edit it but the information is useful for planning, especially across multiple characters so it wouldn't hurt, IMO, if it were easier to access). Thank you.

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

    Default

    OK. Revision 248 adds this:

    Code:
    // If you want to test what this script will recommend for you, given your current
    // collection of rewards and sacks of saplings, set this parameter to "true"
    
    boolean testing = define_property( "VAD.Testing", "boolean", "false" ).to_boolean();
    It will always print the informative logging, but "testing" now does three things:

    - It allows you to run the script even if it is not Arrrbor Day
    - It allows you to run the script even if today IS Arrrbor day and you have already completed your run with this script
    - It quits after printing the informative logging, before going to the Arrrboretum

    Speaking of "already completed your run", this script now sets a property after it has completed planting saplings:

    _VAD.Completed

  6. #6
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,674

    Default

    Thank you.

  7. #7
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    Revision 249 gets 1 sapling to get a potion - which agrees with my experience for many years now - as opposed for the 2 saplings the Wiki claims is necessary. I suspect that KoL fixed an off-by-one error a long time ago.

  8. #8
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,674

    Default

    Worked as expected once I realized it was VAD.Testing and not VAD.testing. Thank you.

  9. #9

    Default

    Thank you so much Veracity!

    One minor point - the sobriety check should be a gt rather than a gte!

  10. #10
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,177

    Default

    Thanks! Revision 265 fixes the over-drunk check.

    I just ran this with a character who had the outfit and also one who did not have the outfit. It planted 1 and 100 saplings, respectively.

Posting Permissions

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