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

fronobulax

Developer
Staff member
Sorry about your purchases. FWIW I run EatDrink from Ascend and I modified it so that it closets most of my beat before it runs.

I don't really have a way to test for you, at the moment, and while mafia is getting better I'd probably not mess with the script until it accommodates all of the changes.

You might also consider setting eatdrink_getBartender and eatdrink_getChef to false.
 

Banana Lord

Member
OK, those're both good ideas. Thanks!

Oh and is there any chance of making your maintaining of the script slightly more official, just for the sake of versioning? I've gotten used to not having to periodically check this thread for updates.
 

bumcheekcity

Active member
Sometimes, EatDrink gets stuck into an infinite loop, where it tries to buy ItemXYZ at 123 meat, but there are none, it costs 125 meat or something, so it fails and tries to buy the next most expensive item at 126, which is again greater than 123 meat and just progressively failes to buy stuff. I'll add a screenshot ASAP. It's a fairly common one.

Edit: Oh, and how do I suppress the milk prompt?

Edit 2: And is there a way to make it calculate, then just buy and eat/drink everything? Would seem a lot faster.eatdrink.png
 
Last edited:

Winterbay

Active member
You can call it with the following as an alias:
Code:
ashq import <eatdrink.ash>; eatdrink(15,19,15,false,%%,12,6,1000,true);

Set %% to whatever you think an adventure is worth and it will simulate away.
 

Theraze

Active member
I think the calculate and buy everything was a feature that never quite got finished... that would be an offshoot of the "consume last" variable that was in there somewhere. Mine is set, if memory serves, but it still consumes normally during creation despite that.
 

fronobulax

Developer
Staff member
@BananaLord - I suppose if there is enough interest I could start a new EatDrink thread so that version checking was useful. (I would be able to edit the first post in a new thread). I don't know whether Board permissions can be adjusted to allow me to edit dj_d's post, but I kind of hope that is not possible. What we really need is something like a Subversion repository for scripts so that the latest was always labeled and available. Biggest problem with that is I'm not sure what to do for version checking for people who don't have SVN clients. But just musing out loud unless a host is found.

@bumcheek - That looks an awful lot like something that I fixed a while ago and should be available here. Can you verify you are using "my" latest version or reproduce it with mine?

Would the preference eatdrink_suppressNoMilk (which suppresses the milk prompt) work for you? Again, that is something that is in "my" version and may not be elsewhere.

I think there was an intention to make it calculate and buy/eat at once but as Theraze says the pieces are not all there. Personally I run EatDrink automatically with a character that has very little meat and so it often happens that I can eat afford to buy something later in the session that I could not have bought at the beginning. So not doing things all at once is actually an advantage.

I have found that setting eatdrink_pause to 1 has change my perception of how efficient EatDrink is in terms of time.
 

zeryl

New member
I know I'm new, but would creating an SVN server for use by KOLMafia scripters be something that others would want as well? Using externals and such, you could easily have someone checkout an item, and get it's dependents (i.e. zLib when needed).

Edit: As a quick proof of concept:

http://zeryl.mine.nu/svn/kol

There's the repo, with eatdrink and zlib loaded (only to show externals).

Pulling eatdrink should also pull zlib in as well.

Anyone think this may be worthwhile? If not, I'll pull it all down
 
Last edited:

fronobulax

Developer
Staff member
This is probably not the thread for this discussion but...
Presently there is no way for a user to know that a script has a newer version unless the script writer has used code provided in zLib. The zLib code uses the first post on a thread here (Kolmafia.us) and does a string compare to find out whether a new version has been posted. That works but presently EatDrink is being marginally maintained by me and I cannot edit the first post of the thread to announce an update. Confusion and inefficiency ensue.

I like Subversion and so many script problems would go away if ASH scripts were in a repository. You would always go to the same place to get updates and people with Subversion clients could be able to see differences between version, assign blame and revert. The problem, of course, is that we cannot assume that mafia users already have, and know how to use Subversion clients. There are probably ways around that, but I have not gotten there yet. But yes, we could probably engineer a way to have mafia or a script verify that the latest version, and dependencies, are what is in use. Maybe continue this in Community Support?
 

fronobulax

Developer
Staff member
@BananaLord - I have had another report of EatDrink buying an excessive amount of boxen so maybe I need to look at this as a unwanted feature and not just a fluke. In other words it is on the top of my To Do list although I am not working items off of it particularly fast.

Everyone else - closet your meat and be careful with mafia's must use box and repair settings.
 

illarion

Member
Just wanted to add, a multi of mine also suffered from the infinite buy -in-a-box loop,though this was with the vanilla EatDrink.ash rather than fronobulax's modified version (which I wasn't even aware of - I have now switched). I think she was just the unlucky one of my characters to happen to have her chef explode since the serverside changes to cooking - my other characters weren't affected.

But yes, it is definitely a real issue.
 

Theraze

Active member
And just verifying... using latest copy of daily build still, right? Didn't just do an update once and happened to be using the version where KoLmafia would infinitely try to generate them if repair was enabled, ignoring the require setting?
 

Winterbay

Active member
That depends on your definition of "works" :)

It will create and use a MoM which will (if you are someone who only gain 10 turns of Got Milk) run out before it is finished. Mafia will then ask you if you want to eat anyway and if you still have fullness left after that it will use another potion. Since I generally do without Ode at the moment I can't comment on that but I'd guess that it works in the same way.
 

fronobulax

Developer
Staff member
Does the script still work, with all the changes to ode of booze and Got Milk?

Not sure what you mean by work. If you set things so you never get asked about MoM or Ode then it still works. If you are asking whether it will maintain the effect for the duration of the consumption then probably not. That is something that should be looked at but I don't expect it will be especially trivial.
 

Banana Lord

Member
Getting an "Map modified within foreach (eatdrink.ash, line 969)" error. I have absolutely no time to look any further into it, I just thought I should post it in case it was unknown.
 

Winterbay

Active member
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.
 
Last edited:

xKiv

Active member
Could it be the addition of pumpkins? They cost a lot (50k yesterday when I looked).
 
Top