Harvest – A highly customisable farming script

Theraze

Active member
Yeah... it's late and my brain isn't working quite as well as it should. :D Edited the post above to hopefully make more sense. Basically, if you're making 2500 meat per adventure, try not to spend that much. Basically, (VOA*adventures)-cost=value of item. It was meant to be a warning against over-estimating your VoA, since you can screw your profits. :)

In run, as a muscle class, with a VoA of 1250, my best current drink (fuzzbump, 12 adventures, 35 muscle stat, 4 drunk) has a value of 3593. Then it fills up with lesser stuff (imported beer, 2 adventures, 1 drunk) for a value of 2400.
My food does similar... best (pr0n m4nic0tti, 11 adventures, 29 moxie stat, 4 fullness) has a value of 3368. The last bits fill up with worse stuff (large cocoa eggshell fragment, 2 adventures, 1 fullness) for a value of 2072.

Could I go higher? Sure. Would it change much? Not really... I'm in run, so the only merchants I can use are NPCs. As soon as I get into aftercore, with these settings, it would probably still use fuzzbumps for alcohol, but it would decide it's cheaper/better to buy from the mall instead of 'spending' the 1250 meat for the adventure to craft it. With a bartender in the box, it would probably still happily craft away... but that logic gets done by mafia, so the script can rest easily there. :)
 

Banana Lord

Member
OK, makes more sense now :). You make 4400 MPA (minus a few hundred), or you set your VoA to 4400 and your MPA is less than that, sorry? 4400 MPA (minus a few hundred) is ridiculous! I'd consider a consistent 2500 MPA to be a solid average value to get while (item) farming, and 3K to be very good.
 

Galanodel

Member
To be fair, I like to over estimate my MPA, since I still have bounty hunting to do. Therefore, when I use ED, I always add say, 500 MPA onto what I actually make. Seems to work okay for me, since I made 900k, and spent 100k in food.
 

Galanodel

Member
Also, I finally have a feature request. Would it be possible to implement CSS switching based on the different activities, ie. bounty, farming, etc? I would like to use a separate script for bountying (ie, harvest combat), then swap to my own for my farming.
 

Banana Lord

Member
800K MPD sounds about right to me. A very healthy profit :).

That's probably a useful feature. Unless I have a better idea I'll implement that. In the meantime you could try something else, if you felt like it... Harvest updates a mafia property as it runs to keep track of what it's up to. The property is "har_current_activity" and it'll be set to "bountyhunt" and to "farm" at the appropriate times. You could use that to write an ash script which could be consulted from a single CCS. Just an exercise for the interested reader :)
 
Last edited:

alexsqian

New member
I'm sorta a beginner at this, and so far with farming at the castle the MPA is around 700 or so. As such, it's usually unprofitable to use any spleen, but Harvest won't run for me until I get up to full spleen, even if EatDrink already confirms that I should have 0 spleen. Any solutions? Or should I just search for a way to up my MPA. 4000 sounds freaking, crazy, and even 2500 sounds like a dream to me.
 

Theraze

Active member
Yeah... the only time when ED wouldn't use twinkly or whatever the cheapest current wad is, would be if you've disabled buying from the mall or if you set StepMeat to something less than the cost of a single item (<500), so it can't buy anything...

But having the mall turned off would be the most likely case.
 

Banana Lord

Member
Listen to Theraze, for she is wise and knows many things :).

alexsqian, go to kolmafia/data/vars_CHARACTERNAME.txt and open it up in a plain text editor like Notepad (Windows) or TextEdit/TextWrangler (Mac). I can't remember the names of the settings you'll need to change off the top of my head and I can't currently check, so hopefully Theraze or someone else won't mind posting them ;)
 

Theraze

Active member
Quick[ish] talking through my settings.
eatdrink_accordionGet true
Get accordion automatically if you don't have one yet. Stolen if nothing else, Rock and Roll Legend if possible. Saves meat immediately if you're using any type of familiar besides 100% starfish.
eatdrink_accurateMake true
Make sure you have enough ingredients to complete before starting. Disable if you have a VERY slow computer, awesome if it works though.
eatdrink_autosellWhileRonin false
Makes you use much better stuff while in a run. This would happily use cranberry go-goo at a 100k mall value with a 500 meat Value of Adventure, so don't enable this if you're ever going to be selling stuff in the mall. Ever.
eatdrink_avoid_booze-soaked_cherry false
eatdrink_avoid_giant_marshmallow false
eatdrink_avoid_gin-soaked_blotter_paper false
eatdrink_avoid_sponge_cake false
eatdrink_avoid_wet_stew false
Various quest items. If I end up with these in my inventory and they're the best item, I'm happy using them. This isn't the default. You'll need to decide if you'd rather have better food or more adventures spent picking up the wet stew again, etc.
eatdrink_budget 10000
How much is the most a single item should be worth? You can set this to 50000 or higher if you're finding EatDrink is missing items that you'd want, but since I'm mostly ascending at the moment, 10k single item limit protects my rare holiday stuff from errant consumption.
eatdrink_considerCostWhenOwned true
If you set this to false, anything in inventory will be used regardless of value. Generally a bad thing, but amusing if you're planning on quitting and you're wanting to torment the G-D forums.
eatdrink_fav_pr0n_chow_mein true
eatdrink_fav_rockin'_wagon true
eatdrink_fav_twinkly_wad true
eatdrink_favUse false
Left these on defaults, but disabled the favUse, so it ignores them. This is where you'd set white canadians and spaghettis with skullheads for the trophies.
eatdrink_getBartender false
eatdrink_getChef false
If you have these set to true, mafia will try to make helpers for you automatically. I don't generally stay in aftercore long enough for it to matter, but if you're farming for any period of time, set them to true.
eatdrink_loopCount 3
How many times/steps should it go through looking for ingredients? More steps extends how long it runs, but also might get you slightly better food. During my testing, 3 got me supercocktails and so forth, which was good enough for me, but if you want it to craft hi-meins, you might need to put it up to 4 or 5.
eatdrink_make true
If this is set to false, it won't make food unless it's the best option, but it won't even consider creating food to be a possibility. That doesn't mean that mafia won't decide it's the best later, but that's on mafia then.
eatdrink_maxAge 2.0
If our mall prices are 2 hours or less, they're accurate enough. Anyways, mafia won't update older prices checked this session unless we buy them, so...
eatdrink_minimumAverage 1.0
If it doesn't give at least 1 adventure, don't consider it. This eliminates stat-only spleen items.
eatdrink_minimumQuality 1
If it doesn't have at least decent (>1 adventure) quality, eliminte the booze/food. This doesn't eliminate spleen, since they don't officially have quality.
eatdrink_ode true
We want ode if it's castable.
eatdrink_pause 0
Why wait 3 seconds repeatedly? I want it to run, now! :)
eatdrink_piePriority true
If I have a pie and no associated key, eat it first so I get the key.
eatdrink_priceFlexibility 1.25
Go up to 25% above known mall price maximum when retrieving the item.
eatdrink_priceOfNontradeables 999999999
eatdrink_priceOfQuestItems 10
eatdrink_priceOfUnknowns 999999999
If it's a rare or special item, keep it. If it's a quest item I'll be losing on ascension anyways, eat it immediately. Don't set it to 0 or 1, because that means it's skipped (probably), but 10 will make quest items first if it's any good.
eatdrink_simConsume false
eatdrink_simLevel 0
eatdrink_simRonin false
Normally I want to consume, not simulate. But if I'm simulating, use my actual level and ronin status.
eatdrink_stepMeat 20000
Don't spend more than 20k total for food, 20k total for booze, 20k total for spleen, and 20k total for overdrinking per day. This allows them to fill up, but avoids crazy-expensive stuff I really don't care about while mainly ascending, not farming. If you're farming and making good meat, set stepMeat to -1 and it won't cut off your meat spending.
eatdrink_suppressNoMilk true
eatdrink_suppressOverdrink true
If I run EatDrink in run, I know I'm not going to have milk. Don't ask me to confirm it. Same goes for ode... if I don't have enough meat to pay for ode in run, don't ask me to confirm it. Similarly, if I'm asking EatDrink to overdrink, I know I've told it to do that, I don't need another confirmation box.
eatdrink_valueOfNonPrimeStat 2
eatdrink_valueOfPrimeStat 10
Primestat is nice, but not really that important compared to adventures. It's better than regular stats though. If you're trying NOT to level up, set primestat to -1000 or something similar, and EatDrink will try to drop your primestat.

Those are the ones in the vars_<name>.txt file. In mafia's preferences themselves (General->Preferences) you should find:
Buy items from NPC stores whenever needed
If you are out of Ronin, pull items from storage whenever needed
Buy items with tokens at coin masters whenever needed
Buy items from the mall whenever needed
Take items from the closet whenever needed

Set anything you want to true. Only one I have disabled is taking items from the closet, because it leaves me with a way to keep safe items safe.

One more option... this one is in Item Manager->Creatable->Fine Tuning. Value of a turn spent crafting is the visible version of VALUE_OF_ADVENTURE that people talk about often, regarding EatDrink. Figure out how much a turn adventuring is worth to you and set it. This defaults to 500, but if the script is pulling in 2000 meat or more on average, you'll find yourself with significantly more turns if you set this to a more accurate number. I'm currently using 1250 here, because it gives me supercocktails while in-run without a box servant. It all depends on how much meat you'd like to spend and the quality of consumables you'd like to use.

Anyways, that's probably enough of an EatDrink tutorial for now. Yell if you have specific questions about other things and I'll try to clarify.
 
Last edited:

Winterbay

Active member
May I humbly suggest adding a post of that type to the beginning of EatDrink's own thread? It looks like a perfect post to have there... :)
 

Theraze

Active member
If fronobulax or another minion would like to do that, I wouldn't object. I just don't have those sorts of powers, and when people actually spur on development on the ED thread, I talk enough that anything I add disappears off people's radar within a day or two. :)
 

Banana Lord

Member
Wasn't there a plan to write an ED relay script? I know there are zlib variable editors out there, but I've never been a fan of one-size-fits all. A relay script to quickly modify ED's settings, along with tooltips (or suitable analogue) to describe what each setting does would be incredibly handy. I suppose I could even write one myself. Maybe later in the year, if no-one else has done it by then.

EDIT: Oh and I second Winterbay's suggestion :)
 

Theraze

Active member
I suppose I could eventually write something similar... I'd probably borrow from my favourite variable/preference editors, but would use zarqon's built-in variable documentation... if I could figure out how that works. :D Hardcode the mafia property descriptions unless there's some sort of documentation thing for that, but... much less of a pain than I would have considered it to be when doing most of the ED recode.

Current script project is TheSea, but I figure that's about a week or two away from being done, completing all underwater content, until someone figures out how to wake up grandma. Next version with faxing for the neptune flytrap is planned for tomorrow if there are no more problems, and then I keep that version up until someone says that faxing works, at which point temporary/final version gets released. :) And I can move on to new projects.
 

Craggles

New member
Code:
******************************************
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.5).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from inventory Hagnk's Coinmasters NPCs the mall. Per-item budget cap is 25000.0.
Retrieval cap is 20000. Price will be a factor if you own it already.
An adventure has the value of 1000 meat. Mysticality subpoint is 10.0. Nonprime stat subpoint is 2.0.
food: At 1, consuming to 15 with 30000 meat.
0: milk of magnesium price: 1243 value: 8757.0
0: milk of magnesium price: 1243 value: 2757.0
1: spooky lo mein lev:6 gain:4.0 adv:18.0 musc:0.0 myst:0.0 mox:33.5 meat:1200 own:0 value:4216
2: spooky lo mein lev:6 gain:4.0 adv:18.0 musc:0.0 myst:0.0 mox:33.5 meat:1200 own:0 value:4216
3: spooky lo mein lev:6 gain:4.0 adv:18.0 musc:0.0 myst:0.0 mox:33.5 meat:1200 own:0 value:4216
4: handful of nuts and berries lev:12 gain:1.0 adv:3.5 musc:0.0 myst:55.0 mox:0.0 meat:447 own:0 value:3603
5: handful of nuts and berries lev:12 gain:1.0 adv:3.5 musc:0.0 myst:55.0 mox:0.0 meat:447 own:0 value:3603
drink: At 0, consuming to 19 with 25506 meat.
1: Crimbojito lev:2 gain:2.0 adv:11.5 musc:15.0 myst:37.5 mox:15.0 meat:5000 own:0 value:3467
2: Crimbojito lev:2 gain:2.0 adv:11.5 musc:15.0 myst:37.5 mox:15.0 meat:5000 own:0 value:3467
3: Crimbojito lev:2 gain:2.0 adv:11.5 musc:15.0 myst:37.5 mox:15.0 meat:5000 own:0 value:3467
4: Crimbojito lev:2 gain:2.0 adv:11.5 musc:15.0 myst:37.5 mox:15.0 meat:5000 own:0 value:3467
5: Crimbojito lev:2 gain:2.0 adv:11.5 musc:15.0 myst:37.5 mox:15.0 meat:5000 own:0 value:3467
6: Crimbojito lev:2 gain:2.0 adv:11.5 musc:15.0 myst:37.5 mox:15.0 meat:5000 own:0 value:3467
7: a little sump'm sump'm lev:4 gain:4.0 adv:12.0 musc:0.0 myst:26.0 mox:9.0 meat:980 own:0 value:2824
spleen: At 0, consuming to 15 with 23405 meat.
1: groose grease lev:1 gain:4.0 adv:7.5 musc:25.0 myst:25.0 mox:25.0 meat:3500 own:0 value:1087
2: groose grease lev:1 gain:4.0 adv:7.5 musc:25.0 myst:25.0 mox:25.0 meat:3500 own:0 value:1087
3: groose grease lev:1 gain:4.0 adv:7.5 musc:25.0 myst:25.0 mox:25.0 meat:3500 own:0 value:1087
4: spooky wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:27.0 mox:18.0 meat:504 own:0 value:820
5: spooky wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:27.0 mox:18.0 meat:504 own:0 value:820
6: spooky wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:27.0 mox:18.0 meat:504 own:0 value:820
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate pasta spoon with a value of 0. That's no good, so not consuming and moving on.
Finished.
Spent 54218 meat. Gained Fullness: 14. Inebriety: 16. Spleen: 15.
Adventures: 176. Muscle: 192. Moxie: 319. Mysticality: 489.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

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


Code:
eatdrink_accordionGet	false
eatdrink_accurateMake	true
eatdrink_ate_choco	Jarlsuary 2:0
eatdrink_ate_fancy	Jarlsuary 2:0
eatdrink_ate_vitac	Jarlsuary 2:0
eatdrink_autosellWhileRonin	false
eatdrink_avoid_booze-soaked_cherry	true
eatdrink_avoid_giant_marshmallow	true
eatdrink_avoid_gin-soaked_blotter_paper	true
eatdrink_avoid_sponge_cake	true
eatdrink_avoid_wet_stew	true
eatdrink_budget	20000
eatdrink_considerCostWhenOwned	true
eatdrink_costOfPull	3000
eatdrink_fav_pr0n_chow_mein	false
eatdrink_fav_rockin'_wagon	false
eatdrink_fav_twinkly_wad	false
eatdrink_favUse	false
eatdrink_getBartender	true
eatdrink_getChef	true
eatdrink_loopCount	1
eatdrink_make	true
eatdrink_maxAge	2.0
eatdrink_minimumAverage	1.0
eatdrink_minimumQuality	0
eatdrink_ode	true
eatdrink_pause	0
eatdrink_piePriority	true
eatdrink_priceFlexibility	1.25
eatdrink_priceOfNontradeables	999999999
eatdrink_priceOfQuestItems	999999999
eatdrink_priceOfUnknowns	999999999
eatdrink_simConsume	false
eatdrink_simLevel	0
eatdrink_simRonin	false
eatdrink_stepMeat	30000
eatdrink_suppressNoMilk	false
eatdrink_suppressOverdrink	true
eatdrink_valueOfNonPrimeStat	2
eatdrink_valueOfPrimeStat	10
 

Craggles

New member
I ran it again and it drank

1: Crimbojito lev:2 gain:2.0 adv:11.5 musc:15.0 myst:37.5 mox:15.0 meat:5500 own:0 value:3217
2: melted Jell-o shot lev:10 gain:1.0 adv:3.0 musc:10.8 myst:10.8 mox:10.8 meat:300 own:0 value:2851
 

Banana Lord

Member
@Theraze: Yeah, TheSea's well in advance of what I was expecting. Very nice work :).

@Craggles: I always hesitate to give advice on ED's behaviour, I don't understand the script well enough to have much confidence in what I say. From that log it looks like both Harvest and ED are working correctly, you'll just need to tweak your ED settings a bit, and I'm sure Theraze will be able to suggest a suitable adjustment... :) If I had to guess I'd say you should set eatdrink_stepMeat to -1 (also, please bear in mind that it's 2:35am where I am, and I am so sleep deprived I can barely see what I'm typing *yawn*).
 

Theraze

Active member
Craggles, you gave it a budget of 30,000 meat per step. It spent 25,506 meat the first time and 5,800 (5500+300) meat the second time. That is more than 30,000 meat.

Also, you skipped posting the part where it said what it tried to retrieve and so on... it's possible/probably that there was another item retrieved that failed. Quite possibly the Crimbojito went up in price enough to make it fail to work, since it visibly cost 5000 in your first and 5500 in your second and it pulled more than 5, meaning that mall_price becomes irrelevant.

But yeah, as I said above:
If you're farming and making good meat, set stepMeat to -1 and it won't cut off your meat spending.
 
Top