EatDrink.ash: Optimize your daily diet (and see how your old diet stacks up).

What do you want it to do regarding items worse than that... do you want it to go into the freaky-spendy (up to whatever your limit is, 20k per item by default) when it can't fill up on cheaper stuff, or do you want it to still consider the bad stuff but devalued, so if it can find anything better it does but it won't spend 15000 for a mein or similar?

Edit: Bottom line is yes, it's easy to remove items from the list.

My primary goal with such a thing would be to reduce server hits (and speed up first-time operation, I guess). a priori we know that, say, trollhouse cookies are below 3 adv/full, so we don't need to hit the mall to look at them. That seems easy to do; what I wasn't sure on was higher-order effects: spooky mushrooms are less than 3 adv/full, but we can make better stuff with them.

Regarding the freaky-spendy part: I'd imagine if minimumGoodness were set too high for your current valueOfAdventure, eatdrink would just fail to find something to eat. Or really, whatever option is easiest here; my aim was less to add another degree of freedom for tweaking and more to save server hits.
 
Well, if you're sharing prices as is default for mafia, you shouldn't actually be increasing KoL server hits by doing the mall check... or am I not understanding that properly?

Regarding the ingredient issue... if you use leave it on the default settings, it will check for the availability of the ingredients automatically. If you turn off accurateMake it will be faster, but might not actually have ingredients. With accurateMake off, it will plan on eating the same olive lo mein 3 times instead of realizing that items go away when they reach the tummy. :) And while that may have worked for the Romans, it doesn't work too well for the KoLers.

Edit: MINIMUM_AVERAGE (zlib variable - eatdrink_minimumAverage) should be in the next release unless it gets removed before for some reason. Defaulting it to 1.0 currently and putting it into the loading sequence, so none of the other processing should happen if the item doesn't meet requirements.

Edit2: Changed default to 1.5 instead. That should filter out fortune cookies and the like, which may end up being your best on a low-food bee run or something similar, but hopefully won't be.
 
Last edited:
Well, if you're sharing prices as is default for mafia, you shouldn't actually be increasing KoL server hits by doing the mall check... or am I not understanding that properly?

Well.. I've had that option turned on since day 1 and I'm not sure it covers all the bases. For example, just ran a fresh eatdrink and it updated 15 prices from nixietube.info, but then I'm pretty sure it hit the mall to update all of my prices anyway. I'll admit to being completely ignorant about how mall_price works under the hood, so grain of salt and all that.
 
My understanding is that the "Searching for" message is generated when mafia is looking for a price. I don't know whether it is a server hit or whether there is some caching. As soon as I make a guess without looking at the code, someone will come along and tell me what the code actually says. I raised my price age to 7 days and it reduced the number of searching for messages but did not suppress them completely. I think the reference to nixietube as a source has been overtaken by events. I believe the call should be removed or made only if the the standard source for price updates fails. I note that it seems to be searching for prices even when the character does not have mall access. I am willing to ignore all of this until Theraze's version becomes the release version.
 
Hi guys, just want to say right off the bat that i'm a complete noob at using the script func for KOLMafia.

Ran the script, and it gave me this:

0: milk of magnesium price: 980 value: 1020
1: Knoll lo mein lev:6 gain:4.0 adv:17.5 musc:32.0 myst:0.0 mox:0.0 meat:1113 own:0 value:1989
2: Knoll lo mein lev:6 gain:4.0 adv:17.5 musc:32.0 myst:0.0 mox:0.0 meat:1113 own:0 value:2489
3: Knoll lo mein lev:6 gain:4.0 adv:17.5 musc:32.0 myst:0.0 mox:0.0 meat:1113 own:0 value:2489
4: olive lo mein lev:6 gain:3.0 adv:12.5 musc:12.0 myst:0.0 mox:12.0 meat:900 own:0 value:2331
drink: At 0, consuming to 14.
1: plum wine lev:8 gain:2.0 adv:6.0 musc:17.0 myst:0.0 mox:0.0 meat:390 own:0 value:1390
2: plum wine lev:8 gain:2.0 adv:6.0 musc:17.0 myst:0.0 mox:0.0 meat:390 own:0 value:1390
3: plum wine lev:8 gain:2.0 adv:6.0 musc:17.0 myst:0.0 mox:0.0 meat:390 own:0 value:1390
4: plum wine lev:8 gain:2.0 adv:6.0 musc:17.0 myst:0.0 mox:0.0 meat:390 own:0 value:1390
5: plum wine lev:8 gain:2.0 adv:6.0 musc:17.0 myst:0.0 mox:0.0 meat:390 own:0 value:1390
6: plum wine lev:8 gain:2.0 adv:6.0 musc:17.0 myst:0.0 mox:0.0 meat:390 own:0 value:1390
7: plum wine lev:8 gain:2.0 adv:6.0 musc:17.0 myst:0.0 mox:0.0 meat:390 own:0 value:1390
spleen: At 0, consuming to 15.
1: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
2: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
3: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
4: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
5: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
6: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
7: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
8: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
9: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
10: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
11: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
12: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
13: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
14: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
15: twinkly wad lev:6 gain:1.0 adv:1.0 musc:9.0 myst:9.0 mox:9.0 meat:323 own:4 value:303
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate pasta spoon with a value of -2000. That's no good, so not consuming and moving on.
Finished.
Spent 12794 meat. Gained Fullness: 15. Inebriety: 14. Spleen: 15. Adventures: 137. Muscle: 362. Moxie: 147. Mysticality: 135.


This is all awesome & good but the amount of meat spent is kinda steep for me (just started playing like couple days back). I know you're supposed to be able to set your budget, but i cant for the life of me figure out how to. And for spleen, are twinkly wads really my only option? BTW I'm using the version 3.13 from post #1.
 
Yes... it still uses historical_price and mall_price to judge how much your inventory items are worth when generating its effective_price, unless you have CONSIDER_COST_WHEN_OWNED set to false, much like Bale's UR, and probably implemented for the same person or people back in the past...

Anyways, here's an updated version of ED with the new minimumAverage variable. As I said, it currently defaults to 1.5, which eliminates fortune cookies and imp ales from the standard consumption set, but you can set it to whatever you want... I do suggest running a few tests to see what different values do. I found that when I increased it up from 2.5 to 3, my adventures gained stayed the same but my ending doneness changed... Ended up with an appetite left for fortune cookie, which wasn't a bad thing.
 

Attachments

This is all awesome & good but the amount of meat spent is kinda steep for me (just started playing like couple days back). I know you're supposed to be able to set your budget, but i cant for the life of me figure out how to. And for spleen, are twinkly wads really my only option? BTW I'm using the version 3.13 from post #1.

Theraze's fix in #987 might help but you may also be interested in valueOfAdventure. It is a per character preference managed by KoLmafia which means it is in /settings/<charname>_prefs.txt. I change it using a text editor but there are other ways. My guess is that it is set higher than you can afford. I find it awkward to explain what it really means but in general the higher it is the more likely you are to spend more meat to get more adventures.
 
Theraze's fix in #987 might help but you may also be interested in valueOfAdventure. It is a per character preference managed by KoLmafia which means it is in /settings/<charname>_prefs.txt. I change it using a text editor but there are other ways. My guess is that it is set higher than you can afford. I find it awkward to explain what it really means but in general the higher it is the more likely you are to spend more meat to get more adventures.

Nice! Thanks for the info (: Yep setting valueofAdventure lower made the overall price lower. But then what does eatdrink_budget do? Cant seem to change the value, graphical CLI always says its 25000
 
The values in eatdrink.ash are just there to set the variables the first time you run the script. After that, altering them has no effect.

type zlib vars at the CLI to see the various variables that you can change.
 
Problem with 1.5 for MINIMUM_AVERAGE... no wads by default. Guess MA is going back to 1.0 to allow for pulverizing for spleen...
 
Problem with 1.5 for MINIMUM_AVERAGE... no wads by default. Guess MA is going back to 1.0 to allow for pulverizing for spleen...

On the other hand it allows me to manually consume the twinkly wads in my inventory instead of the more expensive colds wads it seems to prefer. Since I have it set to not consider the price of items in my inventory (preferring to use food/booze/spleen related AR tickets and prizes instead of selling them) it seems to prefer alphabetical order when items have the same expected adventure gain.
 
Most likely, the cold wads are being preferred due to stat gains from them, since you've said that the cost of all of the items in inventory is 0.

I'm just doing defaults based on what someone who isn't going to change their settings is likely to want, not what someone who will tweak wildly will use... since those people are likely to end up in the 2.5-3+ for minimum average range anyways. Just remember that all we need to do is set defaults and let people use whatever they want afterwards. :)
 
Feature request: Please fix it so that astral consumables will NOT be consumed until at least level 11.

This is an issue that came up in the thread for my newLife script. Some people do not want me to implement automatic unpackaging on ascension because the rapacious EatDrink will use them up at low level before they reach full potency. At level 11 they have maximum effect so they should not be used by EatDrink until then. Let the user decide for herself if they should be used before them. keep in mind that unlike other consumables, quest food can not be put in the closet.

I think that this problem should be solved here since there are reasons the user might unpack those consumables before level 11 and they just aren't ripe yet.
 
Feature request: Please fix it so that astral consumables will NOT be consumed until at least level 11.

I approve. Let's not forget to do it.

I'm not especially comfortable with #987 but I don't have anything concrete to report. It seems to be refusing to consume items that are already present and in my inventory. I think that is related to some suggestions above but since EatDrink is an automation tool the out of the box settings better mean that if told to consume to a certain level that it will do so.
 
This is one of those feature requests for stuff that's already there... astral consumables are non-tradable, EatDrink already has non-tradable handling and by default sets their acquisition cost to MAXMEAT, which defaults to 1 billion meat. That means that EatDrink will, unless directed, never use astral consumables. If you want to do the math on your personal copy and figure out where your personal value of adventure balances out with the scaling of astral consumables to actually provide a positive number and set your eatdrink_priceOfNontradeables to that... go ahead. But I think the default setting should remain that it doesn't use your unique stuff automatically.

fronobulax, I think the problem is somehow the system is miscounting availability, at least by one... If I have 2 tomatos on a new ascension, it will only make one shot of tomato schnapps. If I rerun EatDrink with only the one available, it will make the second (first, in that case) shot just fine. It's possible this bug has been in for a while, but I've really been noticing it the last day or two.

Edit: Appears that it's due to effective_price considering the usage as well as availability. The EP was doing something like:
Code:
if ((con.have - con.using) > 0) <do stuff>
Problem is, con.have has already subtracted con.using once, so we're doubling our usage there. This version should fix that bug. Note that it hasn't gotten as much testing as I'd like yet, since I've only tested it on one character, but it returned the same results for what should be bought/made, so it should work... Besides the fix to EP, this version also aborts/restarts the stack when you reach one of the reusable special consumables... KLP and TPS. It will now calculate the average aventures per consumption rather then using a straight consumption comparison, since the straight comparison might say it's better to drink 15 overpriced imports rather then 1 TPS drink. It might eventually need a straight check though for if the stacks are both reaching full... On overdrink you just want the most adventures you can, etc. I think I should just be able to check for the repeating flag and if neither VoA nor speculative are repeating, use the pure values... I'll test that a few days though before I shoot another new one out. Unless we find problems with this, in which case it should get a newer release sooner.

Edit2: Using ED for the first time with full consumption in aftercore and yes... it does take freaking forever. Was around a minute trying to decide on food, and it's been waiting for drink for the time I've been writing this update. I think disabling accurateMake if get_ronin is false would be a worthwhile choice, since you're much more likely to buy than create. Does that work for everyone?
 

Attachments

Last edited:
eatdrink has been over drinking, making me drunk. anyone else have this problem? just started yesterday, been using the script long time before that. Using it with the new harvest farming script if that matters.

Thanks if you can help!
 
Back
Top