Harvest – A highly customisable farming script

You don't own the origami IotM do you PartyBasher?

Sorry I haven't been able to look into the handful of feature requests and bugs posted earlier, I've had a busy week. Hopefully I'll have some time this evening, or at least tomorrow.
 
OK, cool. That's an easy fix. As Slyz says, I need to check for torso before trying to fold for the shirt. It's part of the autofolding. If Harvest detects that you have origami and you're farming the castle it assumes that you'll want to use it in pastie form.
 
Harvest and Harvest Combat updated for the pastie/shirt fix and better handling for stasising.

About apenny's request regarding getting ode to booze from a buffbot if you can't cast it yourself, I'm thinking that you might be better off using Rinn's excellent acquireBuff.ash as part of a login script to make sure you have ode before calling Harvest. If it was a simple change I'd be more inclined to implement it myself but as things stand it's decidedly non-trivial to do neatly. I've been planning to re-write the buffbot code in Harvest so when that happens I'll take another look at adding that feature.
 
Hi, I just started using this today. I'm very impressed, but also a little scared.

Can you tell me if there's a way to stop the bounty hunter from accepting Frat House & Hippy Camp quests & to choose something else instead?

Thanks!
 
Hey Kotinka! Glad you like it. Why would you rather it didn't do bounties there? Are you using the script on a character that hasn't broken the prism yet? I never gave any consideration to in-run characters when I wrote Harvest so I'd be surprised if that was your only problem, if that is what you're doing.
 
If you've done a wossname, neither of those zones are available. For that matter, one or the other is unavailable whatever you do.
 
Hmm. I put some logic in the script to detect the availability of those locations. Maybe I didn't put in handling for the case when BOTH are unavailable. I'll look into it.

EDIT:

In theory Harvest SHOULD avoid choosing the camp/frat house if you can't access one or both of them (the relevant function is can_access_hunt at about line 928, depending on your version). I can't actually test for the Frat House being unavailable, or for both being unavailable though, but it definitely works for the case where the camp cannot be accessed. Can anyone confirm if the script is or is not working in the other two cases?

Anyway, if that was the problem to which kotinka was referring, then I'd expect the script to abort when it tried to adventure in what it considers to be the best bountyhunt location and is unable to. Could you clarify your problem for me kotinka? If I understand why you want to be able to tell Harvest not to choose to do a bounty at the camp/Frat house then I'll be better able to solve your problem.
 
Hmm. I put some logic in the script to detect the availability of those locations. Maybe I didn't put in handling for the case when BOTH are unavailable. I'll look into it.

EDIT:

In theory Harvest SHOULD avoid choosing the camp/frat house if you can't access one or both of them (the relevant function is can_access_hunt at about line 928, depending on your version). I can't actually test for the Frat House being unavailable, or for both being unavailable though, but it definitely works for the case where the camp cannot be accessed. Can anyone confirm if the script is or is not working in the other two cases?

Anyway, if that was the problem to which kotinka was referring, then I'd expect the script to abort when it tried to adventure in what it considers to be the best bountyhunt location and is unable to. Could you clarify your problem for me kotinka? If I understand why you want to be able to tell Harvest not to choose to do a bounty at the camp/Frat house then I'll be better able to solve your problem.

Hiya, thanks for not telling me to get stuffed!

I did the island war & did a fairly poor job of it, it's my first ascension. Since doing it, I can't get the dreads from the hippy camp or the other item from the frat house, but I can adventure there. I've only used your script once, but trust my luck, my first time, I get frat house from the bounty hunter. I shot through 60 turns I think, before I realised what was going on.

I did the island war before I started using KOLmafia, so perhaps this is why the program doesn't recognise that I can't bounty hunt in these areas?

Thanks again,

k
 
Last edited:
Not at all, I like it when people post about things that have confused them or that turn out to be bugs because then I can continue to improve the script! :) And no, doing the war before starting to use mafia shouldn't have an impact on Harvest's behaviour.

Something here isn't adding up. To (hopefully) avoid confusion please excuse me while I state some obvious facts (or more accurately, facts which seem obvious to me, but about which one or both of us may be unclear). When you finish the war the base of the side that lost is replaced by a 'bombed back to the stone age' version (or both sides are, if you got the Wossname). Harvest checks island.php to see which images are present on the island and if the image associated with the frat house bombed back to the stone age is present Harvest should ignore that bounty, with the same applying to the hippy camp. Are you saying that Harvest is trying to adventure in a 'bombed back to the stone age' area while bounty hunting? If you can't remember, or are unsure, try looking in your /kolmafia/sessions folder for the relevant log. Perhaps it would be simplest if you posted that here as an attachment?

One more thing while I think about it. Could you set Harvest's Verbosity setting to 3 (from the relay script), then copy paste the following code into the mafia gCLI and post the output?
Code:
ash import <harvest.ash>; can_access_hunt($location[hippy camp]); can_access_hunt($location[frat house]);
 
Last edited:
Hi Banana Lord,

Yup, frat house is accessible & hippy camp is bombed back to the stone age.

Now for an embarrassing admission - having looked through the session log for the relevant day, I can see I WAS actually picking up the empty aftershave bottles! I can see from the log too, that the script does check that locations are accessible before bounty hunting.

I've now gone an interesting shade of mauve. I hope my immense noobishness hasn't put you to too much trouble.

huggs,

k
 
Haha, that's OK. Glad it's something simple. Don't worry about it, a quick search of these forums would turn up a dozen (or more) similar 'bug' reports posted by me :P Luckily for us both the people around here aren't big on lynch mobs ;-)
 
Last edited:
Hi, apologies if this is an easy question, but I can't get past this error:

apply_prerun_settings
battleAction => attack with weapon
CCS set to Harvest-CCS
(but battle action is currently set to attack with weapon)


The next line is always a red-text fail line - either about bounty, or eating if I'm not all full, but the real error seems to be tied to the CCS somehow. Any tips? The CCS titled "Harvest-CCS" is as follows:

[ default ]
consult harvest combat.ash
attack with weapon
 
Would you mind copy pasting the red text too? And it might be handy if you set Verbosity to 3 (from the relay script) and then copy pasted the output when the error occurs. I'll just go and re-familiarise myself with that part of the script :)

EDIT: OK, so the apply_prerun_settings function simply puts a handful of settings (like your CCS, mood, battle action etc.) back the way they were before you called Harvest - it's a bit of good housekeeping. It's called when the script is finishing up for the day after farming or when it needs to abort because something hasn't gone the way it expected it to. I'm almost certain that we're looking at the latter case, yes? After applying your pre-reun settings it'll spit out an error message in red text that it believes describes whatever went wrong. The fact that you're getting several different error messages is a little strange, but I'll hold off passing judgement until I know what they are :).

So in short, I need to see those red-text errors.
 
Last edited:
I'll try posting tomorrow, sorry, away from computer. Basically, if I had full/drunk/spleen left, the red text acted like EatDrink failed. If, however, I filled up, the red text became about failing to choose a bounty.

I kept thinking I screwed up the CCS stuff, and I'm not sure I really know what I'm doing there -- could you post a quick note on what that should look like? Otherwise, I'll post the error text tomorrow after trying again, thanks!
 
KK, you can always look at your session logs in /kolmafia/sessions if you don't want to have to boot up mafia. I'm fairly sure I now know which error messages you're getting though.

Harvest is running EatDrink, then noticing that for some reason you're not as full as should be (that's odd, so we'll come back to that problem). As you noticed, manually filling your organs allows Harvest to pass that error as you're now as full as it expects you to be. When it gets on to bounty hunting one of the first things the script does is choose the bounty that will take the fewest turns to complete. Now, today's bounties are fernswathy's tower, the hippy camp, and the haunted wine cellar. The first of these you may well not have unlocked, the second of these may be unavailable depending on how you completed the war, and if you haven't completed the level 11 quest (which involves unlocking the haunted cellar) then you won't be able to do the third bounty either. I noticed that the in-game character cobalt60 is at level 12, so could you confirm if you are able to reach any of the locations I mentioned above? If you can't do any of the available bounties it's hardly surprising that Harvest is unable to find a bounty for you to do :). I should also point out that Harvest was written with aftercore characters in mind (ie: ones that have defeated the NS) so you may or may not have problems using the script in-run.

The error about not filling your organs is more interesting. How full are your organs when Harvest gives you that error? Do you have the option to do semi-rares ticked? When ED starts up it will give you some output about what it intends to do, I'd like to see the line that follow the form "Consuming up to X food, X booze, and X spleen" (it's the 4th or 5th line displayed after ED starts running).

EDIT: Regarding your concern about your CCS, I'd be surprised if that was the cause of your problem. The only reason it's even mentioned in the gCLI is that Harvest has what you might call a "clean abort" function in it (I borrowed that idea from the script that inspired me to write Harvest, NeoCowFarm.ash). Because there is the possibility that the script will encounter a situation that requires user intervention (e.g.: your organs aren't as full as they should be, or the script couldn't find a bounty for you to do) it needs to be able to abort to return control to the user so that they can fix the problem manually. Since the script knows it's going to abort it can tidy things up before it does so by putting some of the settings it changes back to the way they were before you ran Harvest (for example your mood and your CCS). The CCS that you posted looks fine to me, and as I said, the fact that it mentions your CCS before aborting is irrelevant.

Disclaimer: I've been wrong before and will be again, so if it turns out that your CCS was causing the problem after all I reserve the right to laugh at myself and make use of a comical emoticon ;-)
 
Last edited:
Thanks, and yeah sorry my in-game-name is different -- I should have thought that out better.

I ran it again today, and here's the results (after eating to 14/15 full and drinking to 18/19, last line is the red text):

6: elven squeeze lev:4 gain:3.0 adv:0.0 musc:6.5 myst:25.0 mox:25.0 meat:190 own:0 value:41
Best find was none with a value of 0. That's no good, so not consuming and moving on.
spleen: At 0, consuming to 15.
Best find was yellow paisley oyster egg with a value of -19. That's no good, so not consuming and moving on.
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate disco ball with a value of -1898. That's no good, so not consuming and moving on.
Finished.
Spent 3355 meat. Gained Fullness: 13. Inebriety: 18. Spleen: 0. Adventures: 66. Muscle: 139. Moxie: 138. Mysticality: 614.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

apply_prerun_settings
CCS set to Harvest-CCS
(but battle action is currently set to attack with weapon)
EatDrink.ash failed to fill your organs completely





EDIT: to clarify your questions, this is a test account, lvl 30, NS killed.
 
Last edited:
Hmm. This is potentially partly my fault :) Where did you get your version of ED from? The first post in the ED thread (linked in the first post in this thread) isn't always up to date. I'm not sure how much you know about the development of that script, but the original author is on hiatus and so the most up to date version of the script is buried in the thread somewhere. Try using this version of ED and see if you have more luck. I'll also ask the current developers of ED where I should link new users to.

EDIT: Regarding your claficiation, that's odd. So you can definitely access the wine cellar. Could you set Verbosity to 3 (relay script) and paste the following code into the gLCI and show me what the output is?
Code:
ash import<Harvest.ash>; best_hunt();
Then try this:
Code:
ash import<Harvest.ash>; can_access_hunt($location[haunted wine cellar (automatic)]);

Finally, could you confirm if you've already done a bounty hunt today or not?
 
Last edited:
Awww man. I'm so sorry. Got the correct version of ED and everything seems to work fine. My apologies for crapping up your thread with errors that weren't even yours!

Thanks for making this -- now that I can test it, I'm looking forward to seeing if it works for me!
 
Not at all! If anything it was my fault for linking to an old version of ED. Your bounty hunting issue was a bug, I think. Even if it wasn't it led me to find one in the script, which I think I've fixed (we'll see when I run it after rollover :D).
 
Back
Top