Arrrbor Day

Veracity

Developer
Staff member
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:
[color=green]> call Arrrbor Day[/color]

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

Code:
[color=green]> call Arrrbor Day[/color]

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:
[color=green]> call Arrrbor Day[/color]

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 git 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:
git checkout Veracity0/arrrbor-day
 

Veracity

Developer
Staff member
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.
 

Veracity

Developer
Staff member
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:
[color=green]> call Arrrbor Day[/color]

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:
[color=green]> call Arrrbor Day[/color]

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.
 

fronobulax

Developer
Staff member
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.
 

Veracity

Developer
Staff member
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
 

Veracity

Developer
Staff member
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.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Thank you so much Veracity!

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

Veracity

Developer
Staff member
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.
 

Veracity

Developer
Staff member
Today I migrated this from sourceforge using SVN to github using GIT.
Future updates will be pushed only to the latter.

I suggest you delete the SVN version (make sure you have KoLmafia r27304!) and then install it via GIT:

Code:
git checkout Veracity0/arrrbor-day
 

Veracity

Developer
Staff member
Lsst time my main ran this script, she was wielding a June cleaver.
The first adventure in the Arrrboretum was a free June cleaver choice adventure.
The script got confused, since it was not the choice adventure it was expecting.

Arrrbor Day is in 5 days.

I'll come up with something before then - and hopefully test it on that day with a June cleaver in hand.
I just have to make sure I am in aftercore that day. :)

I am also thinking of changing the name to ArrrborDay.ash so you can invoke it without using the "call" command, which will allow optional command-line parameters.

Stay tuned.
 

Veracity

Developer
Staff member
Today is Arrrbor Day!

I fixed the "unexpected June cleaver" choice - and tested it on my character who owns a June cleaver; I equipped the June cleaver and ran a fight, called this script, and, as expected, the June cleaver adventure showed up - and as hoped/expected, the script handled it and then proceeded as expected in the Arrrboretum.

Note that you have to have defaults configured for all June cleaver adventures. Surely you do?

Revision 2.
 
Top