Harvest – A highly customisable farming script

OK, hopefully the version attached to this post will fix both those issues. I'd appreciate it if you could set Verbosity to 3 from the relay script before you test it out and then let me know how it runs. If it still doesn't work at least I'll have a better idea of what to fix.

Everything has been working great for me since this update above. Thanks, Banana Lord!
 
Harvest updated! Version 2.0.1 fixes a couple of bugs and introduces automatic dolphin whistling. If you are sea farming and your dolphin counter is up and the last item stolen was worth more than the price of a sand dollar or dolphin whistle (whichever is cheaper) Harvest will acquire and use a whistle. This feature is currently automatic (there's no option to turn it on or off) and will occur before Zarqon's Best Between Battle script is called, preempting its dolphin whistling feature. I don't use BBB, but if this behaviour annoys you please post here saying so and I'll look at adding an option for it.

@Theraze: I decided to just leave it at inebriety_limit() for now. If someone complains I'll think about changing it, but like you said, it's not going to be an issue for most people.

@Ioeth: Thanks for that, you've been a very helpful bug-reporter :).

EDIT: Heh, obviously not many people are farming with Olfaction, looks like I broke that feature when I updated to 2.0. I only just noticed because I made it to 200 lucre today and finally got to test that code out. I'll test the patched code for a couple of days then roll the update.
 
Last edited:
Quick bug report: seems there is an error with disco combos. When I have them enabled, I get the following error:

Begin index 0 greater than end index -1 (Harvest Combat.ash, line 220)
 
Bugger. I was really hoping I wouldn't have to debug that >_<. But thanks for your report :). The first thing I'll get you to do is set Verbosity to 3 (relay script) and try out the version of Harvest Combat attached to this post.

EDIT: Actually... I think I know already. I've tweaked the version of Harvest Combat attached to this script. Fingers crossed it works (still run it with verbosity set to 3, just in case I need to do some more debugging). Thanks! :)
 

Attachments

Last edited:
I have some requests/suggestions:
  • Could you please lift the "Clan VIP Lounge key" requirement for getting a buff from the hatter?
  • When 'Finishing up for the day', is it possible to either include using free fights (such a clubbing seals) or to allow calling a script so can I automate that?
  • Would it be possible to include using other once-a-day actions (such as ballpit, buying chips, and Legendary Beat) before starting to farm?
  • Could you add duck hunting to the combat CSS so that it uses the hobo monkey's stealing macro?

p.s. Thanks for the awesome script. I just tried it out today.
 
Could you please lift the "Clan VIP Lounge key" requirement for getting a buff from the hatter?
Yes.
When 'Finishing up for the day', is it possible to either include using free fights (such a clubbing seals) or to allow calling a script so can I automate that?
I'll allow calling a script.
Would it be possible to include using other once-a-day actions (such as ballpit, buying chips, and Legendary Beat) before starting to farm?
What is the benefit of using the ball pit to farming? If you're too low level it might be more profitable to just level up first. What do you mean by "buying chips"? I'll add using the legendary beat.
Could you add duck hunting to the combat CSS so that it uses the hobo monkey's stealing macro?
Will do.

Thanks for your suggestions (and compliment)! :)
 
Last edited:
What is the benefit of using the ball pit to farming? If you're too low level it might be more profitable to just level up first. What do you mean by "buying chips"? I'll add using the legendary beat.
Now that you mention it, I've just realised that the jumping in the ball pit and buying chips from Snack Machine in clan rumpus room wasn't actually useful for farming. I was needlessly calling them.

Thanks for your suggestions (and compliment)! :)
..and thank you for such a friendly response :D
 
Harvest updated! A few bug fixes and eegee's requests implemented. All three scripts have been updated. Since I can't test a lot of the stuff I've just done there'll probably be a couple of things to fix, so thanks for your help and patience :). Aside from minor fixes and modifications this'll probably be the last update to Harvest for a while, I'm back to being busy.

and thank you for such a friendly response :D
We could do this all day :D.
 
So, Mr. Banana Lord, I tried both your updated combat script you posted just a few posts ago, and your newly updated one on the front page. While it doesn't not give off errors, it doesn't use the combos sadly. Also, it has stopped using my putty to putty bounty monsters as well :-(.

I will turn on verbosity level 3 when I farm tomorrow for you.

Edit: Also, how do I use the OCD inventory control part of your script? I don't see any data in the inventory control relay, and it isn't selling the farmed items everyday it seems.
 
OK, thanks for letting me know. I'll take a look at the script in a moment.

If you're farming the castle it should pass data for any items you come across on to OCD (won't show up in the relay script, but should still sell the items). Otherwise you'll have to set the data yourself. Do you have the "Use default OCD Data" setting checked?

EDIT: Just a couple of obvious questions for you Galanodel: Are you a DB? Do you have "Use disco combos" checked? Could you put this in the CLI and tell me what it prints out?
Code:
ashq import<zlib.ash>; print(vars["har_farming_disco_combos"]);

I'm not sure about the putty/bountyhunting thing. I didn't change any of the relevant code, or so I thought. Are you absolutely sure Harvest isn't behaving the way it should?

EDIT2: Here's another version of Harvest Combat to try. It's exactly the same as the one in the first post, I've just added a bunch of level 3 verbosity comments which might help.

EDIT3: Regarding OCD, does Harvest call OCD at all? What's the output after "Tidying your inventory"?
 

Attachments

Last edited:
So, I have a heap-load of bugs for you. Here is a section from my farming in the castle, with disco combos turned on and verbosity set to 3
Visit to Beanstalk: Giant's Castle in progress...

[47766] Giant's Castle
Encounter: Procrastination Giant
Strategy: attack with weapon
Round 0: Lilinmall wins initiative!
Round 1: Lilinmall executes a macro!
Round 1: Lilinmall tries to steal an item!
You acquire an item: procrastination potion
You gain 89 Meat.
Round 2: Lilinmall attacks!
Round 3: Lilinmall wins the fight!
You gain 1357 Meat
You gain 4 Muscleboundness
You gain 6 Enchantedness
You gain 24 Chutzpah

finished_farming
false
prep_for_adventure
file_empty
is_underwater

Visit to Beanstalk: Giant's Castle in progress...

[47767] Giant's Castle
Encounter: Raver Giant
Strategy: attack with weapon
Round 0: Lilinmall wins initiative!
Round 1: Lilinmall executes a macro!
Round 1: Lilinmall tries to steal an item!
You acquire an item: Mick's IcyVapoHotness Rub
Round 2: Lilinmall attacks!
You gain 58 Meat.
Round 3: Lilinmall wins the fight!
You gain 1389 Meat
You acquire an item: Angry Farmer candy
You gain 7 Strongness
You gain 11 Wizardliness
You gain 19 Cheek

It then errored out about here 30 combats later. Here is the last one:

Visit to Beanstalk: Giant's Castle in progress...

[47800] Giant's Castle
Encounter: Alphabet Giant
Strategy: C:\Users\Galanodel\Documents\KOL Mafia\ccs\default.ccs [default]
Round 0: Lilinmall wins initiative!
Checking for updates (running Harvest Combat ver. 1.2.1)...
Running Harvest Combat version: 1.2.1 (current)
_har_nemesis_completed => true
Beginning farming...
db combos
Beginning db combos...
can_dnirvana: true
can_dconcentration: true
can_rave: true
combo: concentration
first_comma: -1
last_comma: -1
the_skills: Pop and Lock It,Run Like the Wind,Break It On Down
Begin index 0 greater than end index -1 (Harvest Combat.ash, line 268)
Round 1: Lilinmall attacks!
Round 2: Lilinmall wins the fight!
You gain 895 Meat
You gain 13 Muscleboundness
You gain 8 Wizardliness
You gain 19 Cheek

I am going to try the updated harvest combat from the front page to see if it works.

Negatory, same bug :(

I've swapped over to using Smart Stasis for now, so I can finish the day and see if it is calling the OCD script.

Last, but not least, here is the dump from the OCD section:

All item information is corrupted or missing. Whoooah! I hope you didn't lose any data...
Putting on filthy knitted dread sack...
Equipment changed.
Wielding bottle-rocket crossbow...
Equipment changed.
Holding Bag o' Tricks...
Equipment changed.
Putting on duct tape shirt...
Equipment changed.
Putting on filthy corduroys...
Equipment changed.
Putting on Uncle Hobo's belt...
Equipment changed.
Putting on stinky cheese eye...
Equipment changed.
Putting on monster bait...
Equipment changed.

Looks like OCD wasn't able to sell anything. Make sure you've set up OCD properly
_har_ocd_profit => -1
_har_endmeat => 8591557
_har_endadventures => 47981
finished_farming

I can verify I have run the OCD manager from the relay, as instructed on the front page.
 
Last edited:
That's very odd. And it's strange that no-one else has posted with the same errors. If the script was as broken as it appears from your post I'd expect other people to have been affected too. Is "Use default OCD data" ticked? Hmm. Actually... One other thing. Go to /kolmafia/data/OCDdata_HAR_Default.txt and confirm that the file is a) there, and b) has data in it. I seem to remember someone mentioning that Zarqon's Map Manager was in need of fixing (and that it has since been fixed). I didn't pay much attention because I'm quite busy at the moment, but maybe that was part of the problem?

Have you specified a CCS? No typos in the name?

Paste this into the CLI and tell me what it prints out: ashq for p from 1 to 6 print(get_property("raveCombo"+p));

Would you mind uploading the log from that day here please (/kolmafia/sessions/)? I'll try and take a look at it.

One last thing, try using
Code:
 tags instead of [QUOTE] ones when you're pasting large amounts of text, it keeps everything neat and tidy :).
 
That file is indeed missing sadly.

Here is the pasta from the command you gave me:

> ashq for p from 1 to 6 print(get_property("raveCombo"+p))

Pop and Lock It,Run Like the Wind,Break It On Down

Break It On Down,Pop and Lock It,Run Like the Wind
Break It On Down,Run Like the Wind,Pop and Lock It
Pop and Lock It,Break It On Down,Run Like the Wind

Here is the log from that day as well.
 

Attachments

Don't be sad! That's brilliant news! It means that Harvest (probably) isn't broken. You were just unfortunate that you tried to set Harvest up when you did. Go to /kolmafia/data/zversions.txt and delete any lines beginning with "map_har_" or "map_OCDdata_HAR_". The next time you run Harvest it should download a new version of the associated data files. After you've done that, including running Harvest (doesn't matter if you're out of adventures/drunk, just run it anyway), go into your data folder and give me the filenames of the Harvest data files you find there (they all begin with "HAR_", apart from "OCDdata_HAR_Default.txt").

Are you sure that that is the entire log for the correct day (and that on that day you had verbosity set to 3)? I don't see anything that suggests you ran Harvest at all on that day (in fact the word "Harvest" doesn't occur even once), nor do I see any post-farming activities taking place in that log. And could you confirm that in Mafia's Preferences>Session Logs window every option is ticked except for "Log adventures left instead of adventures used"?

I suspect that disco combos are still broken (though if anyone else can let me know if they're working for them or not I'd appreciate it), but the rest of the script should work a lot better once you have the data files you need :D.
 
So, I followed your instructions, and deleted the lines. It downloaded the following data files:

HAR bounty data
HAR buffbot buffs
HAR Buffbot info
HAR daily profit
HAR Effects to remove
HAR old daily profit
HAR options

I don't have the OCD data har default file though :(

I may have attached the wrong day. I will attach todays, after it runs. I disabled disco combos for the moment.

and yeah, I attached the wrong day. I have today's right though!
 

Attachments

Last edited:
Huh. Well that is odd. Looks like I accidentally deleted some code. You're quite right about the OCD data file not downloading.

You'll notice that during duck hunting Harvest Combat doesn't correctly stop statsising with your monkey and end the combat. That's because you're using the SBIP. I'm not sure why you're doing that, but I'll change the phrase to match in the combat macro to avoid that issue.

Hah. Made a stupid mistake in the disco combo section. Hopefully that's that problem sorted.

Attached is a new version of Harvest. Because I can't test this stuff I don't want to release it until I can confirm that it works. So tomorrow would you mind doing again what you did today? Verbosity 3, run Harvest, post the log?
 

Attachments

It seems that there might be a bug in the buffbot functionality. Harvest seems to consider everything in har_buffbot_buffs.txt to be an AT buff, even if they are not. For instance, when I put my 3 AT buffs plus empathy in the file, it complains that there are more AT buffs specified than I can currently fit in my head. Empathy, of course, is not an AT buff, though.
 
Yep, eegee already caught that one. It'll be in the next update, I'm just holding off releasing it until I know if the bugs Galanodel reported have been fixed. Perhaps as a temporary workaround you could get a large number of turns from buffy manually? Then you wouldn't have to worry about getting more each day. Sorry for the inconvenience, hopefully it'll all be back up and running smoothly in a few days.
 
Here is the log from today. Had to solve a quick bug in my own choice advs, as I hadn't told it what to do in the spooky forest by default. I also got stuck in an infinite loop briefly while trying to use my spooky sheet, but I knew refreshing my items would solve that error. Also, I still couldn't turn on disco combos, I assume because you didn't put out the updated Harvest combat yet. Glad to help overall btw, let me know if I can do something else to make the script even better!
 

Attachments

Oh, my mistake. I meant to include that in the post. I'll get you to try out the new version of Harvest Combat before I post it, but there's no need to post the log this time unless something doesn't work properly. Thanks!
 

Attachments

Back
Top