Veracity's Garden Harvester

Veracity

Developer
Staff member
I detected it myself when I saw it was not harvesting a colossal free-range mushroom, even though it had previously done that with no problems.
 

taltamir

Member
Revision 237 adds support for Your Mushroom Garden.

Along with all the other garden crops, you can include one of the following crops for that garden:

free-range mushroom
plump free-range mushroom
bulky free-range mushroom
giant free-range mushroom
immense free-range mushroom
colossal free-range mushroom

If you have the appropriate mushroom in your garden, it will fight through piranha plans (using "garden pick") and pick it.
If you have a lesser mushroom in your garden, it will fight through piranha plants (using "garden fertilize") and fertilize it.

The built-in "garden" command does all the work: pre-fight restoration, combat using your chosen battle action (or CCS), between battle script, and so on.
It works like a charm if you've been visiting Your Mushroom Garden via KoLmafia and therefore know the actual state of your garden.
If not, you may be farther along than KoLmafia knows. I suppose I could reproduce that logic and pick if you are actually at the desired goal.
But sans that, KoLmafia will synch up when it sees The Mushy Center, so you'll be good to go tomorrow.
A thing to note on mushroom garden is that it has a completely separate counter. one that does not reset when changing gardens.

So if you own mushroom + beer and want to be growing mushroom. you can do the following:
harvest 1 day from beer
switch to mushroom
fertilize mushroom
switch to beer
rollover
harvest 1 day from beer
switch to mushroom
fertilize mushroom
switch to beer
rollover

It does not work in the reverse though. The regular gardens like beer do lose their growth when you switch gardens.
 

Magus_Prime

Well-known member
I just wanted to say that the addition of handling for the mushroom garden is very much appreciated.
 
Last edited:

Veracity

Developer
Staff member
Today I migrated this from sourceforge using SVN to github using GIT.
Future updates (like the rock garden) 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/garden
 

Veracity

Developer
Staff member
Done.

Revision #3:

Add support for the Rock Garden.

This has 3 different plots, which are configured individually.
Code:
// Rock Garden (plot 1)
//    "groveling gravel"                day 1: 1 groveling gravel
//    "2 groveling gravel"              day 2: 2 handfuls of groveling gravel
//    "3 groveling gravel"              day 3: 3 handfuls of groveling gravel
//    "fruity pebble"                   day 4: 1 fruity pebble
//    "2 fruity pebbles"                day 5: 2 fruity pebbles
//    "3 fruity pebbles"                day 6: 3 fruity pebbles
//    "lodestone"                       day 7+: lodestone
// Rock Garden (plot 2)
//    "milestone"                       day 1: 1 milestone
//    "2 milestones"                    day 2: 2 milestones
//    "3 milestones"                    day 3: 3 milestones
//    "bolder boulder"                  day 4: 1 bolder boulder
//    "2 bolder boulders"               day 5: 2 bolder boulders
//    "3 bolder boulders"               day 6: 3 bolder boulders
//    "molehill mountain"               day 7+: molehill mountain
// Rock Garden (plot 3)
//    "whet stone"                      day 1: 1 whet stone
//    "2 whet stones"                   day 2: 2 whet stones
//    "3 whet stones"                   day 3: 3 whet stones
//    "hard rock"                       day 4: 1 hard rocks
//    "2 hard rocks"                    day 5: 2 hard rocks
//    "3 hard rocks"                    day 6: 3 hard rocks
//    "strange stalagmite"              day 7+: strange stalagmite
As always, specify your desired crops in VGH.GardenCrops.

A setting that will harvest all the normal aftercore crops:
Code:
set VGH.GardenCrops="pumpkin|peppermint sprout|skeleton|3 beer labels|frost flower|15 cornucopias|very tall grass|colossal free-range mushroom|lodestone|molehill mountain|strange stalagmite"
 

GwynMyrddin

New member
Done.

Revision #3:

Add support for the Rock Garden.

This has 3 different plots, which are configured individually.
Code:
// Rock Garden (plot 1)
//    "groveling gravel"                day 1: 1 groveling gravel
//    "2 groveling gravel"              day 2: 2 handfuls of groveling gravel
//    "3 groveling gravel"              day 3: 3 handfuls of groveling gravel
//    "fruity pebble"                   day 4: 1 fruity pebble
//    "2 fruity pebbles"                day 5: 2 fruity pebbles
//    "3 fruity pebbles"                day 6: 3 fruity pebbles
//    "lodestone"                       day 7+: lodestone
// Rock Garden (plot 2)
//    "milestone"                       day 1: 1 milestone
//    "2 milestones"                    day 2: 2 milestones
//    "3 milestones"                    day 3: 3 milestones
//    "bolder boulder"                  day 4: 1 bolder boulder
//    "2 bolder boulders"               day 5: 2 bolder boulders
//    "3 bolder boulders"               day 6: 3 bolder boulders
//    "molehill mountain"               day 7+: molehill mountain
// Rock Garden (plot 3)
//    "whet stone"                      day 1: 1 whet stone
//    "2 whet stones"                   day 2: 2 whet stones
//    "3 whet stones"                   day 3: 3 whet stones
//    "hard rock"                       day 4: 1 hard rocks
//    "2 hard rocks"                    day 5: 2 hard rocks
//    "3 hard rocks"                    day 6: 3 hard rocks
//    "strange stalagmite"              day 7+: strange stalagmite
As always, specify your desired crops in VGH.GardenCrops.

A setting that will harvest all the normal aftercore crops:
Code:
set VGH.GardenCrops="pumpkin|peppermint sprout|skeleton|3 beer labels|frost flower|15 cornucopias|very tall grass|colossal free-range mushroom|lodestone|molehill mountain|strange stalagmite"


Thank you!!
 

AlbinoRhino

Active member
Veracity, I noticed yesterday that now that the script's name is "Garden Harvester.ash" that typing that into the CLI will fail (I believe due to the 'garden' cli command only accepting 'pick' as a parameter)...the failure is silent and of course I at first assumed the script wasn't working. After trying 'call Garden Harvester.ash' and the script worked fine, I realized what was going on. Just thought I'd let you know in case anyone else uses the cli and thinks the script isn't working.
 

adeyke

Member
I noticed that the script sees my ginormous pumpkin (house) as a ginormous pumpkin (crop) and thus thinks it's harvest time. I actually have a rock garden.
 

Veracity

Developer
Staff member
Huh. I wonder if it does that with a Giant Pilgrim Hat or a Mushroom House, too?
I wonder if this is a KoLmafia issue or just a Garden Harvester issue.

1) What does it it say if you type "garden" in gCLI? (i.e., KoLmafia's command to report on your garden.)
2) I won't be able to work on this until I get home in a couple weeks, but if you could post a DEBUG log of visiting your campsite, it will make it easier to write tests.

I have multis with no gardens at all, and I should be able to test some things on my own.

Thanks for the report.
 

adeyke

Member
I think it's specific to the pumpkin. For other two, there's a harvestable item that, when used, gives you the housing item (in one as a drop from a fight). It's only with the pumpkin that the housing item is harvested directly.

I suppose it is a KoLmafia issue in the sense that the output of get_campground() is ambiguous, but I don't see an obvious solution that wouldn't break things. My campground does have a ginormous pumpkin in it, and that's getting accurately reported.

I have the garden harvester in by login script. When I ran my turns earlier today, it harvested the tier 1 items. I started KoLmafia again for the purpose of this post, and it tried to harvest but got nothing.

The output of "garden" output is currently:
Your rock garden has nothing in it.

get_campground() says:
Returned: aggregate int [item]
meat golem => 1
spooky scarecrow => 1
Certificate of Participation => 1
Dramatic™ range => 1
Queue Du Coq cocktailcrafting kit => 1
chef-in-the-box => 1
bartender-in-the-box => 1
pagoda plans => 1
clockwork maid => 1
Discount Telescope Warehouse gift certificate => 7
ginormous pumpkin => 1
saltwaterbed => 1
tin roof (rusted) => 1
potted tea tree => 1
haunted doghouse => 1
Witchess Set => 1
Source terminal => 1
model train set => 1
packet of rock seeds => 0
groveling gravel => 0
milestone => 0
whet stone => 0

And I've attached the debug log.
 

Attachments

  • DEBUG_20230503.txt
    14.2 KB · Views: 1

Veracity

Developer
Staff member
Your campground has:

/otherimages/campground/resta.gif

The "resta" means your dwelling is the Ginormous Pumpkin
KoLmafia puts a ginormous pumpkin into get_campground()

Since you have a rock garden, it also has:

/otherimages/rockgarden/a0.gif
/otherimages/rockgarden/b0.gif
/otherimages/rockgarden/b0.gif

Indicating you have a rock garden with 3 empty plots.
KoLmafia puts a packet of rock seeds (0) into my_campground()
The (0) means all of the plots are empty. If it were (1), at least once patch has something.
KoLmafia also puts groveling gravel (0), milestone (0), and whetstone (0) into my_campground

If you had a pumpkin patch, my_campground() would contain packet of pumpkin seeds (X), X = 5 if ginormous pumpkin.

So, basically, the seed packet indicates which garden you have and the count indicates the progress.
Apparently this script is looking for ginormous pumpkin directly.

Should be fixable.

More on the ambiguity:
ginormous pumpkin (1) + packet of pumpkin seeds (5) => you have the crop
ginormous pumpkin (1) + (any other seed packet) => you have the dwelling
ginormous pumpkin (2) + packet of pumpkin seeds (5) -> you have both?

That MIGHT be how it works. If so, that would be extra work for a script that wants to see which dwelling you have.
I don't see a solution in KoLmafia itself.
 

Veracity

Developer
Staff member
Yeah.

get_dwelling: ginormous pumpkin
get_campground: packet of pumpkin seeds (5) & ginormous pumpkin

get_dwelling: giant pilgrim hat
get_campground: packet of thanksgarden seeds (7) & megacopia

get_dwelling: house sized mushroom
get_campgroun: packet of mushroom spores (11) & colossal free range mushroom

Scripts concerned with dwelling use get_dwelling.
Scripts concerned with gardens can use get_campground and the seed packets.
 

adeyke

Member
The seeds will be at 11 for ginormous pumpkin, not 5 (that's just a huge pumpkin, referred to as giant in the image name).

Also, I think if you have both, the get_campground() count for ginormous pumpkin will still just be 1, since KoLmafia treats dwellings differently from other campground stuff.

I've decided to plant the pumpkin seeds and disable the garden script, so in 11 days, I'll be able to confirm what the behavior there is.
 
Top