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

Perhaps the eatdrink_budget preference? (i.e., "zlib eatdrink_budget = whatever") I'm not completely certain that's what it does, but it seems a reasonable guess...
 
"value of adventure" is the thing to change. The budget is really just an insanity cap (abort if exceeded) that should never actually come in to play. There is no notion in the current incarnation of the code of "get me the best diet for $_____". It always assumes that there's some amount more you'd pay for one more adventure, since you can use that adventure to get more meat.
 
Does eatdrink check the value of the new non-crimbo chocolates (i.e. turtle totems, disco balls, pasta spoons, etc.)? If not is this a script issue where it has to be written in or a mafia issue where mafia doesn't know what they do yet?
 
It does not. The script is hard-coded to consider those chocolates that it does consider. (It doesn't consider the cars from this Crimbo, either.)

If you want to check out the code, it's in a function called sim_choc(). Recall that vitachoconutriment capsules have a different countdown than everything else, which is why they are treated separately.
 
It does not. The script is hard-coded to consider those chocolates that it does consider. (It doesn't consider the cars from this Crimbo, either.)

If you want to check out the code, it's in a function called sim_choc(). Recall that vitachoconutriment capsules have a different countdown than everything else, which is why they are treated separately.

Thanks. I'll see if I can make it consider the new chocolates and the cars. Crossing my fingers that I don't break it.

Edit: Had a look and I'm not sure where the part is that tells sim_choc() to check the various kinds of chocolates so I can add chocolate pasta spoons etc. Should I be looking in vars_charname rather than eatdrink?

Going to try editing the chocolates into the eatdrink_daily section of vars_charname of my multi and seeing if it works.

Edit 2: Didn't break the script but also didn't seem to make it work.
 
Last edited:
You'll have to actually change the code so it knows about the extra chocolates.

See the comment "//choose cheaper of evil-or-not" in sim_choc()?

Well, you want to choose the cheaper of fancy, evil fancy, the car, and all the nemesis trick-or-treats. So you'll have to make the if statement following that comment into something rather more complicated than it currently is. (Hint -- you don't want to leave it as one long if statment. Find the historical_price() of each of your possible chocolates, then choose the cheapest and make con_choc.it = that item.)

(At least, that seems like it should work. I haven't tried it myself.)
 
How do you make it so that when the item it is trying to get is over the budget it doesn't loop.....like this
Code:
Choosing drink to consume.
Waiting to consume...
Supernova Champagne lev:8 gain:3.0 adv:9.5 musc:10.0 myst:10.0 mox:10.0 meat:360 own:0 value:1510
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Shopping for a Supernova Champagne in 3 seconds
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
budgeting 450 for 1 additional Supernova Champagne. You have 266695 meat. You have 0 in inventory already.
Using cached search results for Supernova Champagne...
Stopped purchasing Supernova Champagne @ 629.
Purchased 0 Supernova Champagne for 0 meat.
Tried to get 1 Supernova Champagne but got 0. Pricing error.
Seen a problem with this one before at a price of 650.
Setting new effective price to the greater of 450 and 651
Failed to get Supernova Champagne for a max price of 1.25*360=450.0
FAIL: Supernova Champagne lev:8 gain:3.0 adv:9.5 musc:10.0 myst:10.0 mox:10.0 meat:360 own:0 value:1510
Choosing drink to consume.
Waiting to consume...
Supernova Champagne lev:8 gain:3.0 adv:9.5 musc:10.0 myst:10.0 mox:10.0 meat:360 own:0 value:1510
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Shopping for a Supernova Champagne in 3 seconds
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
budgeting 450 for 1 additional Supernova Champagne. You have 266695 meat. You have 0 in inventory already.
Searching for "supernova champagne"...
Stopped purchasing Supernova Champagne @ 629.
Purchased 0 Supernova Champagne for 0 meat.
Tried to get 1 Supernova Champagne but got 0. Pricing error.
Seen a problem with this one before at a price of 651.
Setting new effective price to the greater of 450 and 652
Failed to get Supernova Champagne for a max price of 1.25*360=450.0
FAIL: Supernova Champagne lev:8 gain:3.0 adv:9.5 musc:10.0 myst:10.0 mox:10.0 meat:360 own:0 value:1510
 
valueOfAdventure is a KoLMafia property. You can set it by typing set valueOfAdventure = 1000 in the gCLI.

Maybe someone should edit the first post to reflect that? Took me a while to find out why the script ignored the settings from zlib after upgrading from an older version.
 
How do you make it so that when the item it is trying to get is over the budget it doesn't loop.....like this
Code:
Choosing drink to consume.
Waiting to consume...
Supernova Champagne lev:8 gain:3.0 adv:9.5 musc:10.0 myst:10.0 mox:10.0 meat:360 own:0 value:1510
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Shopping for a Supernova Champagne in 3 seconds
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
budgeting 450 for 1 additional Supernova Champagne. You have 266695 meat. You have 0 in inventory already.
Using cached search results for Supernova Champagne...
Stopped purchasing Supernova Champagne @ 629.
Purchased 0 Supernova Champagne for 0 meat.
Tried to get 1 Supernova Champagne but got 0. Pricing error.
Seen a problem with this one before at a price of 650.
Setting new effective price to the greater of 450 and 651
Failed to get Supernova Champagne for a max price of 1.25*360=450.0
FAIL: Supernova Champagne lev:8 gain:3.0 adv:9.5 musc:10.0 myst:10.0 mox:10.0 meat:360 own:0 value:1510
Choosing drink to consume.
Waiting to consume...
Supernova Champagne lev:8 gain:3.0 adv:9.5 musc:10.0 myst:10.0 mox:10.0 meat:360 own:0 value:1510
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Shopping for a Supernova Champagne in 3 seconds
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
budgeting 450 for 1 additional Supernova Champagne. You have 266695 meat. You have 0 in inventory already.
Searching for "supernova champagne"...
Stopped purchasing Supernova Champagne @ 629.
Purchased 0 Supernova Champagne for 0 meat.
Tried to get 1 Supernova Champagne but got 0. Pricing error.
Seen a problem with this one before at a price of 651.
Setting new effective price to the greater of 450 and 652
Failed to get Supernova Champagne for a max price of 1.25*360=450.0
FAIL: Supernova Champagne lev:8 gain:3.0 adv:9.5 musc:10.0 myst:10.0 mox:10.0 meat:360 own:0 value:1510

Next time it does this can you go to the purchases tab and check to see the price of the items in the mall? I think it may be the script or Mafia not handling purchases correctly when the lowest price in the mall is limit of 1@lowvalue (which you have bought) which is now geyed out and the rest are much more expensive.

best regards
Dave
 
I've looked several places for how to fix this issue, but I'm stumped. How can I get ascend.ash (or perhaps eatdrink.ash) to quit overdrinking until I'm at max drunk and at 0 adventures remaining? I've tried changing settings in my var file but to no avail. I have 120 adventures remaining and ascend.ash calls eatdrink.ash and begins to overdrink for me.
 
How can I get ascend.ash (or perhaps eatdrink.ash) to quit overdrinking until I'm at max drunk and at 0 adventures remaining? ... I have 120 adventures remaining and ascend.ash calls eatdrink.ash and begins to overdrink for me.
This behaviour was a design decision which dj_d commented about somewhere higher in this thread. To change this you have to modify the Ascend.ash script where it calls eatdrink. The eatdrink script documentation will help you understand which parameters to change and what to change them to.
I would recommend reading dj_d's reasoning for the design decision first though: reasoning for eating, adventuring, then drinking and spleening. The adventures gained from drink and spleen today will be available tomorrow while leaving drink and spleen room for using recovery and other items while adventuring. You still get to play the adventures - tomorrow. :-)

Check your session logs - you should have 0 adventures remaining before the call to eatdrink when it drinks, and spleens. The 120 adventures should be from drinking and spleening. If you have adventures remaining before this call, then there is another issue.
 
Last edited:
I think the easy workaround would be adding eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false); in the beginning of the main function. Of course, if you're using sliders and the like, add a eatdrink(0, 0, spleen_limit(), false); right before that.
 
Check your session logs - you should have 0 adventures remaining before the call to eatdrink when it drinks, and spleens. The 120 adventures should be from drinking and spleening. If you have adventures remaining before this call, then there is another issue.

No, the 120 adventures were at 15/19/15 fullness. Each time I tried to run ascend.ash it would start overdrinking. Not certain what I need to change to fix this.
 
"eatdrink.ash 15, 19, 15, false" (without the quotes) should do what you want, providing that you have Liver of Steel.
 
"eatdrink.ash 15, 19, 15, false" (without the quotes) should do what you want, providing that you have Liver of Steel.

r8277. This doesn't work for me -- in fact, calling scripts in the CLI with more than one argument specified has never worked for me. Am I just doing something wrong? Because this would be pretty handy.
 
Back
Top