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

I've no idea. The map that is being iterated over in that part of the code does not remove anything. It just creates a new map with the items it thinks are good.
 
Which version of eatdrink do you use? There is one in the "unofficial ascend"-thread that has a lot of bugfixes in it.

Edit: Never mind that. Mine is also stopping. SOmethign happened in Mafia between 8735 and 8739 that made eatdrink stop working because when I went back to 8735 is worked just fine.

Edit, edit: Could however not reproduce this error on my other character, who is in Hardcore though.

I just ran the old version in update 8740. It decided that with the value per adventure set to 750 the best thing for me to drink was 19 cans of swiller.
 
Same error. I can add that it's appearing at the drinking phase. EatDrink ate fine for me, but now stops with the error every time now that we're in the booze phase. Drinking something manually and trying again doesn't help.

Further testing shows normal functioning in the spleen phase when I drank my limit manually. It gets prices and consumes fine in food and spleens, but not booze.
 
Last edited:
That's interesting as mine stopped at the eating-part... This makes it appear more random than would be good for testing purposes :)

I just ran the old version in update 8740. It decided that with the value per adventure set to 750 the best thing for me to drink was 19 cans of swiller.

Do you have access to the mall/allowing mafia to buy from the mall? That sounds like something it would do if you have no access to the mall and have a lot of swiller in your inventory...
 
Today it works. Eat, drink, spleen all pulled prices and consumed fine. Nothing has changed as I'm level 28 so it's not a mall/non-mall or anything else. How very odd. Maybe 8743 altered something but it sure doesn't look like anything on the list would touch EatDrink.

I do a lot of testing for my job and this is making me crazy, not being able to file a decent bug report...
 
Most likely, the reason it's fine now is that pumpkin juice now properly has its plurals of mugs of pumpkin juice. But maybe not. :)
 
Odd.
For what it's worth mine is still failing with r8746.

Edit: Doing "update data" to get a new version of fullness.txt did not help so it is probably not that which is the problem.

Edit, edit: It might still be the pumpkins that are the problem. I set the script to super verbose and got the following in the CLI:

Code:
Pass 1: food.
food: At 0, consuming to 15.
Loading food map from     Mafia's datafiles
Loading fullness.txt.
fullness.txt loaded     successfully.
Importing mafia info for 4763
Map     modified within foreach (eatdrink.ash, line 961)

Interested I tested:
Code:
> ash to_item(4763)

Returned: none

According to the wiki 4763 is the pumpkin pie and the following seems to tell me that Maifa knows that but not what to do with the number:

Code:
> ash to_int($item[pumpkin pie])

Returned:     4763

> ash to_item(4763)

Returned:     none

All this with r8746.

Edit: Never mind that. One "update clear" later and I'm all set :)
 
Last edited:
FWIW - EatDrink has been working just fine with Daily Builds. In other words, it seems to me that keeping mafia up to date has solved all of the reported problems. Obviously, if that is not the case then a detailed report would be helpful.
 
Seems like most of the people having issues probably got manual override data and need to do an update clear.
 
Historical price checking, in mine at least...
PHP:
    if(var_check("eatdrink_daily_"+ replace_string(to_string(it)," ","_")) ||
 (historical_age(it) > to_float(vars["eatdrink_maxAge"])))
    {
      price = mall_price(it);
      if(var_check("eatdrink_daily_"+ replace_string(to_string(it)," ","_")))
 verbose2("CHECKDAILY:"+it+" = "+price);
      else
 verbose2("STALE     :"+it+" = "+price);
    }
    else
    {
      price = historical_price(it);
      if (price == 0)
      {
 price = mall_price(it);
 verbose2("ERROR     :"+it+" = "+price);
      }
      else
 verbose2("HISTORICAL:"+it+" = "+price);
    }
  }

Summary: If an item is not in your daily eats list, and historical price is new enough, use it. Else, check if historical price is != 0. If so, use it. If it equals 0, grab from mall_price.
 
Isn't it supposed to use historic information if the age matches?

It does so in a very odd and largely non-functional way. (It only cares about historical data for items that you have previously eaten with this script. I have no idea why.)
 
Actually, in the section I posted, it only uses non-historical for items you've previously eaten. If there's historical data for items not-eaten, it uses that instead of mall price...
 
quick question on how to do something...

NVM i fiqured it out... just a quick glance above what i was talking about :D
-------------------------------------------------------------------------
edit
 
Last edited:
Feature request:
Considering the mechanics of Fullness atm, is it possible ot make Eatdrink get a new Milk of Magnesium by itself before eating something that will cause the Got Milk-effect to run out? To do it manually I have to cancel the script (mafia give me a prompt to do so at the right time), get a new Milk, use it and restart the script.
Make Mafia check what duration I will get from potions (if I have Impetuous Sauciness or not) and if lower than how much Fullness I want to get, calculate for a 2nd milk and also use it before the curent effect run out.
 
Meh, I'll throw my copy of EatDrink up here. I think it takes care of milk needs (and ode) properly, though it's been a while since I did my reworking.
 

Attachments

Back
Top