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

Lxndr

Member
Code:
> call scripts\EatDrink.ash

Checking for updates (running EatDrink ver. 3.2)...

It's hanging on this. Not continuing on to actually consume. How do I make it NOT hang?

(an svn update tells me it's at HEAD, so what the heck is it checking for?)
 

crazybone

New member
Code:
> call scripts\EatDrink.ash

Checking for updates (running EatDrink ver. 3.2)...

It's hanging on this. Not continuing on to actually consume. How do I make it NOT hang?

(an svn update tells me it's at HEAD, so what the heck is it checking for?)

It not working for me as well, tried to update with the latest version, still does not work.

I also tried with older versions of kolmafia. :(
 

Sytras

Member
I was able to bypass the hang by commenting out line 2468 in eatdrink.ash


Code:
//check_version("EatDrink", "eatdrink", EATDRINK_VERSION,EATDRINK_VERSION_PAGE);

As best I can tell, this code uses zlib to check for svn updates to eatrink.ash. I don't know why individual scripts do this rather than relying on the overall mafia svn update functionality, as this caused a bunch of scripts to not run a while back when sourceforge crashed.

After commenting out the version check, it is working for me.
 

icon315

Member
Is there a way to get the cost for the bartender/chef to see if it's cheaper just to buy them crafted?
Code:
autoBuyPriceLimit => 6250.0
Verifying ingredients for chef-in-the-box (1)...
Verifying ingredients for nothing-in-the-box (1)...
You need 1 more spring to continue.
autoBuyPriceLimit => 20000
Unable to get your chef for under 5000 meat!
mallprice for ingridients chef skull+nothing-in-the-box: ~=5,700
mallprice for chef-in-the-box : ~4,100
Code:
autoBuyPriceLimit => 25000.0
Verifying ingredients for bartender-in-the-box (1)...
Creating 5 meat paste...
You acquire meat paste (5)
You lose 50 Meat
Successfully created meat paste (5)
Verifying ingredients for nothing-in-the-box (1)...
You need 1 more spring to continue.
autoBuyPriceLimit => 20000
Unable to get your bartender for under 30000 meat!
mallprice for ingredients (bartender skull +nothing-in-the-box ): ~20,200+~900=~21100
mallprice for bartender-in-the-box: ~16,900


Not sure why it said it couldn't get it under 30,000
 

Theraze

Active member
Code:
    if (getitem(1, $item[bartender-in-the-box], (GET_BARTENDER > 0 ? GET_BARTENDER : 999999)))
      use(1, $item[bartender-in-the-box]);
And then the actual part of the code that pulls it:
Code:
  try
  {
    set_property("autoBuyPriceLimit", max((initialvalue >= 1000 ? 1000 : 0), min(initialvalue * PRICE_FLEXIBILITY, floor(price * PRICE_FLEXIBILITY))));
    retrieve_item(needed, it);
  }
  finally
  {
    set_property("autoBuyPriceLimit", initialvalue);
    return item_amount(it) >= needed;
  }
It's just using mafia's retrieve_item for that. So we don't know how or why or where mafia will decide to purchase, but it's supposed to do it the cheapest possible way. I've asked about exposing the logic in the past, but that was rejected due to it potentially being used for mallbotting.

Your error only comes up if you have it set to abort on failure, which only happens (especially with an aBPL that's well over) if you're either limited in mall or otherwise purchase limited. Based on what you quoted, I'm guessing you've disabled buying from the mall. Either acquire your servant manually, change your failure to a warning, or allow mafia to acquire things from the mall and set yourself what seems like a reasonable aBPL.
 
The possibility that houeland's diet list could shut down has been raised on the game forums. So I figured I ought to check out this eatdrink.ash thing I've heard so much about.

So I can't find the answer, and I did search the thread. Does anyone know is eatdrink uses frosty mugs and scratches forks when its optimal?

Posts 1362-1365 had conversation about helpers, and then there was a new challenge path and I got distracted. Or something like that. Of course, the forks are new since then, so we'd need to actually reconsider additional items that have been added to KoL since that list was compiled.

Is it still true that eatdrink doesn't handle mugs/forks? I don't see any mention of them in the code, so I'd imagine so.
 

Theraze

Active member
Yep. Nobody's figured out what exists and should possibly get used in any way. And my only standard helpers (that the script does use consistently) are from the mayo clinic. If someone will give me an exhaustive list of helpers, what they do, what they affect, etc, then I'll add it. We do already have addition/helper code built in from both mojo filters and mayos in their various ways, which will be used when their mall-price justifies it, it just takes knowing what to use when.
 

Crowther

Active member
A helper that I think would be very useful is the time-spinner meal. I use it well in run, but in aftercore I haven't even thought out how to optimally use it. It seems like some pricey high MPA foods might become worthwhile.
 

lostcalpolydude

Developer
Staff member
A helper that I think would be very useful is the time-spinner meal. I use it well in run, but in aftercore I haven't even thought out how to optimally use it. It seems like some pricey high MPA foods might become worthwhile.

That math is further complicated by the fact that it might make sense to get two meals from the time-spinner instead of 3, depending on the food and the price of a replicator item that you can sell. It seems like calculating a truly optimal diet is becoming hopelessly complicated, when you consider that mayo also favors eating smaller items that would generally be less good with the time-spinner.
 

Crowther

Active member
That math is further complicated by the fact that it might make sense to get two meals from the time-spinner instead of 3, depending on the food and the price of a replicator item that you can sell. It seems like calculating a truly optimal diet is becoming hopelessly complicated, when you consider that mayo also favors eating smaller items that would generally be less good with the time-spinner.
Yeah. I was worried about that. I'm still amazed it works as well as it does.
 

Theraze

Active member
If you let it and depending on how good your aftercore farming zone is, mayo actually generally goes with the good stuff since the mayolus sells better than the extra adventure.

But yeah, mayo and everything else makes things messy and confused. No clue on making the timespinner optimal. Don't have one currently. Don't plan on likely having one in the next year.
Basic helpers like shrink forks and the like were the sum extent of the prior 'helper' discussion, and at that point it was just waiting to find out which ones exist and affect what, so that could be calculated. Somehow. Would probably take having two 'value' functions, one for helped and one for base, tracking which one was used, and... yeah.

If the complete list ever gets posted, I'll figure out the specifics then. Until that point, it works well enough for me to type one command in aftercore for completing manuel through fax, consumption, lazy adventure-farming whatever zone is calculated as best today, mallselling, and overdrinking. Yay.
 
In all honesty, considering how many options the timespinner gives that are mutually exclusive with using it to eat, it's probably not worth the effort to have a full-on analysis. I can see having the option to just automatically use it to make food items last longer(especially in ronin/HC), but that's not always going to be more profitable than a fight, and maybe sometimes you just want to go play in the future a couple times, or prank more than one person today, or...
 

Crowther

Active member
If you let it and depending on how good your aftercore farming zone is, mayo actually generally goes with the good stuff since the mayolus sells better than the extra adventure.
Some day I'll have to sit down and do some serious math to figure that all out, but I did a quick look yesterday and it seems we are only talking about 10-20K meat per day for the way I have things set up (advValue=3000). There are much better things I (and others) should be worried about.

The time-spinner is pretty nice in run, but I eat manually in run.
 

Theraze

Active member
Ha. Shrink forks.

Anyways, looks like there's a new choco - LOV Extraterrestrial Chocolate - with a 3/2/1 reduction. Hopefully ED should handle it properly now.
 

Skittius

New member
[Bah... Keep getting an error with the new Chocolate on line 1609. =/ My Code-Fu is so weak these days I can't even find it in notepad to adjust the offending line anymore. =(
 

Theraze

Active member
Not a problem. With an updated since, it should now complain properly for people who try to run ED without the proper mafia version. :)
 
Top