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

Veracity

Developer
Staff member
In-game, do they add to your fullness? If so, yes, they are competing with other things you "eat". If not, you are playing games with words.
 

Hellno

Member
You eat chocolates. At least I do.

Not sure what you mean by this. If the skill was called 'Chew on jerky" you would consider it 'eating'?

In-game, do they add to your fullness? If so, yes, they are competing with other things you "eat". If not, you are playing games with words.

I'm really confused by what you're trying to say :p This script is all about valueOfAdventure (primarily). Right now blue mana is selling for 10k, if you have a valueOfAdventure >= 3334 meat, it's profitable to cast 10 times, otherwise it's not. To me it makes completely sense in the context of this script. You don't actually need to the deck to get the skill either, since Gift cards exist.
 

Cool12309

Member
The latest revision breaks consumption
Code:
0: milk of magnesium price: 1081 value: 43919.0

Worshiping at the Shrine to the Barrel God
You acquire an effect: Barrel of Laughs (50)
Using 1 Mayoflex...
Finished using 1 Mayoflex.
Eating 1 hot hi mein...
You gain 40 Adventures
You gain 82 Beefiness
You gain 20 Enchantedness
You gain 51 Roguishness
You acquire an effect: Hot Breath (5)
You gain 5 Fullness
You lose some of an effect: Got Milk (-5)
You lose some of an effect: Barrel of Laughs (-25)
Finished eating 1 hot hi mein.
1: hot hi mein using Mayoflex lev:13 gain:5.0 adv:29.5 musc:72.5 myst:17.5 mox:32.5 meat:5021 own:0 value:16860
You have already prayed to the Barrel God today.
FAIL: <b>hot hi mein</b> using <b>Mayoflex</b> lev:13 gain:5.0 adv:29.5 musc:72.5 myst:17.5 mox:32.5 meat:5021 own:0 value:16860
You have already prayed to the Barrel God today.
FAIL: <b>snow crab</b> using <b>Mayoflex</b> lev:1 gain:1.0 adv:7.0 musc:15.0 myst:15.0 mox:15.0 meat:4970 own:135 value:16240
You have already prayed to the Barrel God today.
FAIL: <b>snow crab</b> using <b>Mayoflex</b> lev:1 gain:1.0 adv:7.0 musc:15.0 myst:15.0 mox:15.0 meat:4970 own:135 value:16240
You have already prayed to the Barrel God today.
FAIL: <b>snow crab</b> using <b>Mayoflex</b> lev:1 gain:1.0 adv:7.0 musc:15.0 myst:15.0 mox:15.0 meat:4970 own:135 value:16240
You have already prayed to the Barrel God today.
FAIL: <b>snow crab</b> using <b>Mayoflex</b> lev:1 gain:1.0 adv:7.0 musc:15.0 myst:15.0 mox:15.0 meat:4970 own:135 value:16240
You have already prayed to the Barrel God today.
FAIL: <b>snow crab</b> using <b>Mayoflex</b> lev:1 gain:1.0 adv:7.0 musc:15.0 myst:15.0 mox:15.0 meat:4970 own:135 value:16240
food: At 5, consuming to 15 with 8106 meat.
autoBuyPriceLimit => 5151.0
Verifying ingredients for hot hi mein (1)...
Verifying ingredients for hot and sour sauce (1)...
Searching for "scrumdiddlyumptious solution"...
Search complete.
Purchasing scrumdiddlyumptious solution (1 @ 2,000)...
Purchases complete.
Searching for "hot wad"...
Search complete.
Purchasing hot wad (1 @ 578)...
Purchases complete.
Creating hot and sour sauce (1)...
You acquire an item: hot and sour sauce
Successfully created hot and sour sauce (1)
Verifying ingredients for savory dry noodles (1)...
Creating savory dry noodles (1)...
You acquire an item: savory dry noodles
Successfully created savory dry noodles (1)
Creating hot hi mein (1)...
You acquire an item: hot hi mein
Successfully created hot hi mein (1)
autoBuyPriceLimit => 20000
You have already prayed to the Barrel God today.
FAIL: <b>hot hi mein</b> using <b>Mayoflex</b> lev:13 gain:5.0 adv:29.5 musc:72.5 myst:17.5 mox:32.5 meat:5021 own:0 value:16860
You have already prayed to the Barrel God today.
FAIL: <b>hot hi mein</b> using <b>Mayoflex</b> lev:13 gain:5.0 adv:29.5 musc:72.5 myst:17.5 mox:32.5 meat:5021 own:0 value:16860
food: At 5, consuming to 15 with 4750 meat.
You have already prayed to the Barrel God today.
FAIL: <b>hot hi mein</b> using <b>Mayoflex</b> lev:13 gain:5.0 adv:29.5 musc:72.5 myst:17.5 mox:32.5 meat:5021 own:1 value:16860
You have already prayed to the Barrel God today.
FAIL: <b>hot hi mein</b> using <b>Mayoflex</b> lev:13 gain:5.0 adv:29.5 musc:72.5 myst:17.5 mox:32.5 meat:5021 own:1 value:16860
food: At 5, consuming to 15 with 4750 meat.
You have already prayed to the Barrel God today.
FAIL: <b>hot hi mein</b> using <b>Mayoflex</b> lev:13 gain:5.0 adv:29.5 musc:72.5 myst:17.5 mox:32.5 meat:5021 own:1 value:16860
You have already prayed to the Barrel God today.
FAIL: <b>hot hi mein</b> using <b>Mayoflex</b> lev:13 gain:5.0 adv:29.5 musc:72.5 myst:17.5 mox:32.5 meat:5021 own:1 value:16860
food: At 5, consuming to 15 with 4750 meat.
You have already prayed to the Barrel God today.
Those last few lines were repeated over and over until I aborted.
 

Theraze

Active member
Might be fixed. Might not. The danger of implementing features when you don't have any testing characters for it.
 

Metraxis

Member
A similar issue

I'm having a similar problem, whether I run EatDrink directly, or through the aegis of my farming script, the booze pass hangs up repeating the following:

Variable "EATDRINK VERSION" is already defined (EatDrink.ash, line 18)
 

Theraze

Active member
Sounds like you have something that double-defines eatdrink version. Since nobody else has that problem, it's something about how you've done your system. Though you say "a similar issue" without quoting or linking to anything, so who knows what it's similar to. *shrugs*
 

fronobulax

Developer
Staff member
I understood "similar problem" to be an attempt to say "There are two different ways I can recreate this problem" as opposed to "there is someone else with another problem that is kind of like mine".

That said it sounds like some kind of local scripting error. Perhaps EatDrink.ash is being included multiple times? But in any event I don't think this is an EatDrink error, or rather one that will be solved by releasing a new version of EatDrink.
 

Metraxis

Member
I was referring to Cool12309's post about broken consumption. Here is the script I use, and have been using for months:

Code:
mood barf
//cheat knife
//cheat coins
//cheat mantle
maximize meat
adv 1 barf
maximize meat
call Gravity.txt
create * field gar
call EatDrink.ash (15,19,15,false,false)
adv * barf
maximize adv
call EatDrink.ash (15,19,15,true,false)
call DailyCleanup

This is some of the output:
Code:
FAIL: <b>Psychotic Train wine</b> lev:11 gain:6.0 adv:19.5 musc:200.0 myst:0.0 mox:0.0 meat:3000 own:1 value:39475
Pass 4: booze.
At drunkenness of 19. Overdrinking with 4883175 meat.
Since 19.5 is more than 18.0 we are using a speculative stack of 1650.
Waiting to consume...
<b>Psychotic Train wine</b> lev:11 gain:6.0 adv:19.5 musc:200.0 myst:0.0 mox:0.0 meat:3000 own:1 value:39475
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Variable EATDRINK_VERSION is already defined (EatDrink.ash, line 18)
FAIL: <b>Psychotic Train wine</b> lev:11 gain:6.0 adv:19.5 musc:200.0 myst:0.0 mox:0.0 meat:3000 own:1 value:39475
Pass 4: booze.
At drunkenness of 19. Overdrinking with 4883175 meat.
Since 19.5 is more than 18.0 we are using a speculative stack of 1650.
Waiting to consume...
<b>Psychotic Train wine</b> lev:11 gain:6.0 adv:19.5 musc:200.0 myst:0.0 mox:0.0 meat:3000 own:1 value:39475
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Variable EATDRINK_VERSION is already defined (EatDrink.ash, line 18)
FAIL: <b>Psychotic Train wine</b> lev:11 gain:6.0 adv:19.5 musc:200.0 myst:0.0 mox:0.0 meat:3000 own:1 value:39475
Pass 4: booze.
At drunkenness of 19. Overdrinking with 4883175 meat.
Since 19.5 is more than 18.0 we are using a speculative stack of 1650.
Waiting to consume...
<b>Psychotic Train wine</b> lev:11 gain:6.0 adv:19.5 musc:200.0 myst:0.0 mox:0.0 meat:3000 own:1 value:39475
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Variable EATDRINK_VERSION is already defined (EatDrink.ash, line 18)
FAIL: <b>Psychotic Train wine</b> lev:11 gain:6.0 adv:19.5 musc:200.0 myst:0.0 mox:0.0 meat:3000 own:1 value:39475
Pass 4: booze.
At drunkenness of 19. Overdrinking with 4883175 meat.
Since 19.5 is more than 18.0 we are using a speculative stack of 1650.
Waiting to consume...
<b>Psychotic Train wine</b> lev:11 gain:6.0 adv:19.5 musc:200.0 myst:0.0 mox:0.0 meat:3000 own:1 value:39475
Countdown: 3 seconds...
KoLmafia declares world peace.

Given that the problem occurs when calling EatDrink from the Scripts menu as well, what am I doing wrong? It's interesting to note that this only happens on an a booze pass. Food and spleen proceed without a hitch if I manually drink first.
 

Theraze

Active member
Might be because you're using it with multiple calls in your CLI script. Or maybe your script has been modified and you need to restore back to the base SVN version. But I definitely don't have that error. Though I don't use CLI scripts personally.
 

Metraxis

Member
Might be because you're using it with multiple calls in your CLI script. Or maybe your script has been modified and you need to restore back to the base SVN version. But I definitely don't have that error. Though I don't use CLI scripts personally.

It turns out to have been an issue with the version of Mafia I was using. Updating to 16338 has made the issue go away, where previous remove/reinstalls of EatDrink itself had failed.
 

Big Money Sylvia

New member
Given that this thread is downright monstrous, this has probably been suggested already.
But I'd love if this script would skip checking for subpar food that can't possibly be selected, i. e. food that gives less adventures than the gross turn value gain of the best found same-size food.
For example, if the script is supposed to fill 2 units of stomach and has already retrieved the information for a bunch of square grapes (6.5 adv for 130 meat), gooey lava globs (8 adv for 250 meat) or a popular tart (10 adv for ~1500 meat), if one of them costs less meat than the turn difference between them and rat scrapple (4.5 adv) would be worth, there's no need to consider rat scrapple because rat scrapple would be worse even if it was free.

If the script had this feature, it could do searches in a smart order probably based on older mall data and your adventure value setting. Default items (for example square grapes, the advanced martinis, lasagna, fettucini etc) would work too. Unless the price of these has exploded in the meantime, the script wouldn't have to bother with checking the price of anything that's worse than those consumables' gross value.
 

Theraze

Active member
You can already eliminate classes of food based on quality level or average adventures. If you do that, it will entirely skip them.

Otherwise, mall prices vary, a lot. I keep hoping that anapests will finally leave forever, but it keeps coming back...
 

xKiv

Active member
You can already eliminate classes of food based on quality level or average adventures. If you do that, it will entirely skip them.

I think the request is, effectively, to automatically adjust minimal quality withing a consumable type (food, booze, spleen) to ... something like ... X=(i.average_adventures*mpa - i.cost)/(i.size*mpa)=i.quality - i.cost/(i.size*mpa)
every time you check mall price for an item, and its X is higher than any previous item's.
 

Theraze

Active member
Nope. Unless it was really badly described. As explicitly stated, the requested goal was making it not do as many mall searches, not to make it eliminate items that are too expensive and not reasonable.

Problem is that you need to do those mall searches to find out what's going to be trash. And if you know you want a minimum average of 2.5 adventures or better... well, you can already tell the script to do so and it will eliminate the items while parsing mafia's data files and never run the mall search at all...
 

xKiv

Active member
Nope. Unless it was really badly described. As explicitly stated, the requested goal was making it not do as many mall searches, not to make it eliminate items that are too expensive and not reasonable.

Problem is that you need to do those mall searches to find out what's going to be trash. And if you know you want a minimum average of 2.5 adventures or better... well, you can already tell the script to do so and it will eliminate the items while parsing mafia's data files and never run the mall search at all...

Except you do NOT need to do a mall search to find out *some* items are going to be trash, because they would be trash even for free. I even postulated an explicit formula to find out which ones.
(you still need to do a mall search for many other items that will turn out to be trash)

(actually, you can't get items from mall for less than 100, so when comparing to my X, I should take consideredItem.quality, but rather consideredITem.quality-100/(consideredItem.size*mpa), which may rule out slightly more consumables)
 

Theraze

Active member
*shrugs* If you have an actual code update you'd like to propose, go ahead. Otherwise, it works and the end results are the same, so...
 

xKiv

Active member
Yeah .. I *considered* mentioning a "but I don't want to be the one to implement that, after looking at the code". It's not as trivial change as it looks from the "drawings of what we want it to do" table.
 
Top