Harvest – A highly customisable farming script

The Great Tatro

New member
I know I am a noob

I know close to nothing about scripting and programming so when I tried installing this script to automate my meat farming boy was I in for a surprise. I can't even figure out where the settings are never mind how to change them. I guess I am asking for assistance into how to do this. A PM would do nicely for anyone who could help as I can tell that this forum is about the development of this script then helping noobs like me. I would greatly appreciate any help that anybody can give.

Thanks
- Tatro
 

Banana Lord

Member
This forum is as much about helping people use scripts as it is about developing them, in my experience :) I'll start with the basics so please excuse me if I cover some stuff you're already familiar with. There are three types of script: Custom combat scripts (CCS), ash scripts (all end with the file type .ash), and relay ash scripts (the script name always begins with 'relay').

CCS
You can make a custom combat script very easily by going to the Adventure tab and then to the Custom Combat tab. New makes a new script, and edit makes a script editable. You can select a preexisting CCS with the drop down menu. In the case of Harvest, all you need to do with your CCS is make a new script (I suggest calling it 'meatfarming') and copy pasting the CCS from the example in the first post (those two lines are all you need to get started).

ASH
To 'install' a regular ash script you simply place it in your /kolmafia/scripts folder. Your scripts can be in any number of sub folders within this folder, for example I have a folder for all the scripts I use in aftercore: /kolmafia/scripts/aftercore. To run a script you can either type its name into the gCLI in mafia (under the graphical CLI tab) or find it in the scripts menu in mafia.

Relay
Relay scripts go in your /kolmafia/relay folder. To run a relay script you need to open the relay browser (click the map icon at the top of mafia's main window) and then find the '-run script-' drop down menu at the top of the KoL browser window that mafia opens (it's just to the left of the chat pane). Simply choose the relay script you want to run from that menu.

I think the first post provides clear enough instructions for you to go from there, but here's a quick recap. All you need to do is follow the links provided to download the scripts Harvest needs to run (these are developed by other scripters, so if you are unsure of how to set up a script other than Harvest I suggest you post your question in the script's thread, all the authors on these forums will be happy to help), and then download the three scripts attached to the first post of this thread (Harvest.ash, relay_Harvest.ash and Harvest Combat.ash) and put them in the correct folders. As I say in the first post, to set up Harvest itself and gain access to the script's settings, you just need to run the relay script (relay_Harvest.ash) from the drop down menu in the relay browser.

A small note on setting up the scripts listed under 'Requirements' in the first post: Most of these don't actually require you to do anything special to set them up (you just have to put them in the right folder so that Harvest can use them). The two exceptions to this are OCD Inventory Control.ash and eatdrink.ash (and maybe CounterChecker.ash if you have special requirements, but we'll leave that for now). Because of the amount of time it takes to set OCD up for the first time, Harvest comes preloaded with all of the data OCD needs to run (assuming you're farming the castle). You should aim to properly set OCD when you get a chance, but it'll work quite happily as is (just make sure you run relay_OCD_db_Manager.ash once before running Harvest for the first time). You should have no trouble setting eatdrink up as long as you follow the instructions in the first post of that thread (linked in the first post) carefully.

If you're still unsure of anything (or everything) post here again saying so and I'll do my best to clarify :)

EDIT: Once you've got Harvest working and you're configuring your settings, if you're not sure what a setting does you can simply mouse over it for a description.
 
Last edited:

The Great Tatro

New member
Now that I got everything going I must say this is the most amazing thing that has happened to me since I began playing KoL. Fantastic script you have going here, it is exactly what I have been looking for. Thank you so much for you help Banana.
 

Banana Lord

Member
No problem! Glad you like it :) If you want even more awesomeness try setting up Bale's amazing OCD script to deal with items that aren't specified in Harvest's default data (run the OCD relay script). Your inventory will never look the same again!
 

igue

New member
Hi! Ive been using this script for quite a while now and all i can say is that it works great! However, is there a way to remove a specific buff after farming? For example i want to remove Cantata so i can Cast Ode before i overdrink?
 

Banana Lord

Member
Are you using EatDrink? If so Harvest and ED should do that automatically for you between them. If they're not then I'd very much like to see some gCLI output so I can fix the issue. Glad you're enjoying the script :)
 

igue

New member
Yes, I use Eatdrink but it doesnt remove the buff, it just fails to cast ode and drinks. >.<

Sorry for this next line, I dont know how to put it in text box.
Overdrinking
Maximizing...
310 combinations checked, best score 0.0 (FAIL)
Maximizing...
310 combinations checked, best score 0.0 (FAIL)
Refreshing stash contents...
Stash list retrieved.
Internal checkpoint created.
Skipping favorites.
Starting EatDrink.ash (version 3.1.5).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's Coinmasters NPCs the mall. Per-item budget cap is 37500.0.
Retrieval cap is 20000. Price will be a factor if you own it already.
An adventure has the value of 500 meat. Moxie subpoint is 10.0. Nonprime stat subpoint is 2.0.
Pass 1: food.
Skipping food.
Pass 2: drink.
Skipping drink.
Pass 3: spleen.
Skipping spleen.
Pass 4: drink.
At drunkenness of 19. Overdrinking with 5000 meat.
Searching for "ice-cold Sir Schlitz"...
Search complete.
Searching for "ice-cold Willer"...
Search complete.
Searching for "ice-cold fotie"...
Search complete.
Searching for "bottle of vodka"...
Search complete.
Searching for "bloody mary"...
Search complete.
.
.
.
.
.
Search complete.
Waiting to consume...
perpendicular hula lev:4 gain:4.0 adv:12.0 musc:0.0 myst:0.0 mox:35.0 meat:1000 own:51 value:5350
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
0: Ode to Booze price: 0 value: 2000
Casting The Ode to Booze 1 times...
Selected target has the maximum number of AT buffs already.
Drinking 1 perpendicular hula...
You gain 11 Adventures
You gain 34 Sarcasm
You gain 4 Drunkenness
Finished drinking 1 perpendicular hula.
1: perpendicular hula lev:4 gain:4.0 adv:12.0 musc:0.0 myst:0.0 mox:35.0 meat:1000 own:51 value:5350
choc: Checking non-filling crimbo chocolates - all 3 kinds
Searching for "fancy but probably evil chocolate"...
Search complete.
Searching for "vitachoconutriment capsule"...
Search complete.
Searching for "chocolate cigar"...
Search complete.
Best find was chocolate disco ball with a value of -1600. That's no good, so not consuming and moving on.
Finished.
Spent 0 meat. Gained Fullness: 0. Inebriety: 4. Spleen: 0.
Adventures: 11. Muscle: 0. Moxie: 34. Mysticality: 0.
 

Banana Lord

Member
That's odd, I thought I'd set Harvest up to shrug an AT buff (if necessary) before running ED. I'll look into it. As for the gigantic-wall-of-text-of-doom, try using code tags
Code:
stuff goes here[/code*], but don't put the * in obviously.

EDIT: Amazing the difference a missing equals sign will make isn't it? :-) Try the version attached below and let me know if it works. If you're using ED and Harvest thinks you're going to want ode it will shrug the least valuable of your AT buffs (the total MP cost of all the turns you currently have of it). If all's well I'll roll an update.
 

Attachments

  • Harvest.ash
    41.4 KB · Views: 39

igue

New member
This is great! Thanks Banana Lord!

Ill post again if everything goes well. :)

Edit:

It still doesnt shrug off the Cantata so it can cast Ode. Heres what happens.

Code:
Overdrinking
Maximizing...
310 combinations checked, best score 0.0 (FAIL)
Maximizing...
310 combinations checked, best score 0.0 (FAIL)
Refreshing stash contents...
Stash list retrieved.
Internal checkpoint created.
Skipping favorites.
Starting EatDrink.ash (version 3.1.5).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's Coinmasters NPCs the mall. Per-item budget cap is 37500.0.
Retrieval cap is 20000. Price will be a factor if you own it already.
An adventure has the value of 500 meat. Moxie subpoint is 10.0. Nonprime stat subpoint is 2.0.
Pass 1: food.
Skipping food.
Pass 2: drink.
Skipping drink.
Pass 3: spleen.
Skipping spleen.
Pass 4: drink.
At drunkenness of 19. Overdrinking with 281 meat.
Getting 1 a little sump'm sump'm in 3 seconds
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
autoBuyPriceLimit => 1243.0
Searching for "fermenting powder"...
Search complete.
Searching for "juniper berries"...
Search complete.
Searching for "olive"...
Search complete.
Searching for "little paper umbrella"...
Search complete.
Verifying ingredients for a little sump'm sump'm (1)...
Searching for "martini"...
Search complete.
Purchasing martini (1 @ 130)...
You acquire an item: martini
Purchases complete.
Creating a little sump'm sump'm (1)...
You acquire an item: a little sump'm sump'm
Successfully created a little sump'm sump'm (1)
autoBuyPriceLimit => 20000
Waiting to consume...
a little sump'm sump'm lev:4 gain:4.0 adv:12.0 musc:0.0 myst:26.0 mox:9.0 meat:995 own:1 value:5147
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
0: Ode to Booze price: 0 value: 2000
Casting The Ode to Booze 1 times...
Selected target has the maximum number of AT buffs already.
Drinking 1 a little sump'm sump'm...
You gain 10 Adventures
You gain 27 Mysteriousness
You gain a Mysticality point!
You gain 8 Chutzpah
You gain 4 Drunkenness
Finished drinking 1 a little sump'm sump'm.
1: a little sump'm sump'm lev:4 gain:4.0 adv:12.0 musc:0.0 myst:26.0 mox:9.0 meat:995 own:1 value:5147
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate disco ball with a value of -1550. That's no good, so not consuming and moving on.
Finished.
Spent 130 meat. Gained Fullness: 0. Inebriety: 4. Spleen: 0.
Adventures: 10. Muscle: 0. Moxie: 8. Mysticality: 27.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
******************************************
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.5).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's Coinmasters NPCs the mall. Per-item budget cap is 37500.0.
Retrieval cap is 20000. Price will be a factor if you own it already.
An adventure has the value of 500 meat. Moxie subpoint is 10.0. Nonprime stat subpoint is 2.0.
At drunkenness of 19. Overdrinking with 281 meat.
0: Ode to Booze price: 0 value: 2000
1: a little sump'm sump'm lev:4 gain:4.0 adv:12.0 musc:0.0 myst:26.0 mox:9.0 meat:995 own:1 value:5147
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate disco ball with a value of -1550. That's no good, so not consuming and moving on.
Finished.
Spent 130 meat. Gained Fullness: 0. Inebriety: 4. Spleen: 0.
Adventures: 10. Muscle: 0. Moxie: 8. Mysticality: 27.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

What other information could i provide so the problem could be traced more easily?
 
Last edited:

Banana Lord

Member
Sorry for not noticing your edit. That's annoying. I haven't got time to do anything with Harvest at the moment, but I'm planning to start work on a proper update in 2-3 weeks. Hope you can hold on until then :)
 

igue

New member
Sure sure. No problem! I can wait. Thank you for your time! All other stuff are working fine except that so I'll live.
 

Tom Sawyer

Member
A question on th still

BananaLord great script

had a question. It was made mention that either this script or Bale's OCD makes use of the still? Is there a setting in your script or in OCD or Eat-Drink that will make supercock drinks?

When I test ran it it never used the still so I manually went back and made 10 tonic waters.

It would seem to me that drinking supercocks would grant more turns but maybe I am overlooking something.

Cheers!
 

Banana Lord

Member
It will use the Still after farming in the most optimal way possible (no setting, it'll do it automatically). Drinking super cocktails might give you more adventures but probably won't be optimal because they're more expensive per adventure. EatDrink is in charge of feeding you and it does a bunch of calculations to determine your most optimal diet based on your setting for value_of_adventure (that's a mafia setting not a Harvest one, but you can change it from the relay script). Make sense?
 

Tom Sawyer

Member
Thanks BL

I use a modified version of izchak's castle farming script and was comparing the two

I think I will run yours for a week or so and see how optimal and cost effective the difference between the 2 ranges

Yours is certainly more configurable with relay options. Mine you have to tell specifically what to eat and drink.

All fun in spading :)
 

Banana Lord

Member
Sure, hope you find something that works for you :) There'll be a largish update to Harvest in a month or so, so you might like to check back in when I'm done with that and see if any of the new stuff is to your liking.
 

BladeLight

Member
umm... sorry but what does followed by a tab mean?

FAQ

Can Harvest get buffs from a buffbot for me?
Open HAR_Buffbot_Buffs.txt (in your KoLmafia>Data folder) and enter the names of the effects you would like to get. Each effect must be on a separate line and must be followed by a tab.

[/LIST]
 

Banana Lord

Member
Just that, followed by a tab. You enter the name of the effect then push the tab key, then hit return to go to a new line should you want to add another effect.
 

ninereal

New member
Probably a dumb question - I've done everything in the OP, but I keep getting a message that says "No matching CCS found!" What gives?
 
Top