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

Razorsoup

Member
For some reason, EatDrink hasn't been filling my spleen. When I start at 0 and tell it to fill it up to 15, it instead just fills it up to 14 (e.g. 3 x groose grease, 1 x antimatter wad). And when it's already at 14 and I tell it to fill it to 15, it does nothing. My valueOfAdventure is set to 1250, so just filling that last space with a twinkly wad would be profitable (though other choices may be better).

What is your eatdrink_minimumAverage set to? You can find it (and other ED variables) by entering "zlib eatdrink" into the gCLI. If it is set higher than 1, ED won't consume wads as they are only an average of 1 adventure per spleen.
 

Theraze

Active member
Regarding zekaonar's suggestion, went with something more in line with hee^3's suggestion instead. Just removed the skill check entirely, since apparently can_equip is robust enough as it knows about the required skills...

Edit: Regarding adeyke's 'problem' might I suggest setting mQ to 1 rather than mA to 1.5? The mQ of 1 should only accept the items higher than 1 for food/drink, but accept any spleener. The thing that will filter out that you might not want it to would be items have have dynamic quality levels, like dusty wines. Anything else should get filtered properly though.
 
Last edited:

edgy

Member
Ran into a unexpected result where eatdrink preferred lasagnas over cheaper hi meins for a Sauceror with Saucemaven. Best guess is that eatdrink doesn't consider saucemaven.

Setup: Sauceror with Saucemaven and got milk, Budget: 200.000, Stepmeat: 100.000, valueOfAdventure: 3.000.

Expected (using today's lowest mall prices):
3 sleazy hi meins (4640 meat) giving 115,5 adventures for a combined cost of 13.920 meat.

Got (using today's lowest mall prices):
5 fishy fish lasagnas (3545 meat) giving 110 adventures for a combined cost of 17.725 + 7.990 (potion of the field gar) = 25.715 meat.

edit: A fix to get eatdrink to consider saucemaven. Add the following check to con_rec extra_items(con_rec con) (line 1771):
Code:
if ($items[cold hi mein, hot hi mein, sleazy hi mein, spooky hi mein, stinky hi mein, hell ramen, fettucini Inconnu, gnocchetti di Nietzsche, spaghetti with Skullheads, spaghetti con calaveras] contains con.it && have_skill($skill[saucemaven]))
{
	if (my_class() == $class[Sauceror] || my_class() == $class[Pastamancer])
	{
		con.adv.min += 10;
		con.adv.max += 10;
	}
	else
	{
		con.adv.min += 5;
		con.adv.max += 5;
	}
}
 
Last edited:

Theraze

Active member
As you discovered, the new skill Saucemaven isn't supported yet. Rather than hardcoding items, I'd much rather check for ingredients with sauces, since that's what TPTB appear to use and it's more robust for the future. However, in r13991, mafia appears to have a bug/feature that makes it not find any ingredients for items that require skills you don't possess. That means that for characters with Saucemaven but not the cooking skills, get_ingredients fails to resolve any ingredients, which makes it impossible to check for "sauce" ingredients. Currently.

If the devs decide that's the way they want it to work, then I'll find some other way to do what I need. Or just put a disclaimer on that SVN update that nobody will ever read that says that due to the way that mafia works, Saucemaven and some similar skills may misreport adventures for low-skill characters. For now, I'll hope that isn't the plan. :)
 

edgy

Member
If/when get_ingredients() gets fixed, please remember that fettucini épines Inconnu is not a saucy dish despite being made with a scrumptious reagent and dry noodles.
 

Theraze

Active member
Well, it's saucy, but doesn't give adventures... so the adventure check just needs to validate that the item offers at least one adventure. Which we need for the Slow and Steady path anyways. :)
 

ereinion

Member
So there is probably some obvious reason for this that I am overlooking, but why is EatDrink acquiring a bartender-in-the-box here?
Code:
Refreshing stash contents...
Stash list retrieved.
Internal      checkpoint created.
[COLOR=black]Skipping favorites.[/COLOR]
Starting      EatDrink.ash (version 3.2).
Consuming up to 0 food, 19 booze, and 0      spleen and then finishing off with the stiffest drink we can find.
Considering      food from inventory Hagnk's Coinmasters NPCs the mall. Per-item budget cap      is 25000.0.
Retrieval cap is 20000. Price will be a factor if you own      it already.
An adventure has the value of [B]1000 meat[/B]. Muscle      subpoint is 0.0. Nonprime stat subpoint is 0.0.
[COLOR=black]Pass      1: food.[/COLOR]
[COLOR=black]Skipping food.[/COLOR]
[COLOR=black]Pass      2: booze.[/COLOR]
[COLOR=black]Skipping booze.[/COLOR]
[COLOR=black]Pass      3: spleen.[/COLOR]
[COLOR=black]Skipping spleen.[/COLOR]
[COLOR=black]Pass      4: booze.[/COLOR]
At drunkenness of 19. Overdrinking with 5813189 meat.
[COLOR=black]Getting      1 bartender-in-the-box in 1 seconds[/COLOR]
Countdown: 1 second...
Waiting      completed.
autoBuyPriceLimit => 25000.0
Searching for      "nothing-in-the-box"...
Search complete.
Searching for      "box"...
Search complete.
Searching for "spring"...
Search      complete.
Searching for "brainy skull"...
Search complete.
Searching      for "disembodied brain"...
Search complete.
Searching for      "smart skull"...
Search complete.
Searching for "beer      goggles"...
Search complete.
Searching for "beer lens"...
Search      complete.
Searching for "bartender skull"...
Search      complete.
Searching for "bartender-in-the-box"...
Search      complete.
Verifying ingredients for bartender-in-the-box (1)...
Verifying      ingredients for nothing-in-the-box (1)...
Using cached search results      for box...
Purchasing box (1 @ 400)...
Purchases complete.
Using      cached search results for spring...
Purchasing spring (1 @ 20)...
You      acquire an item: spring
You spent 20 Meat
Purchases complete.
Creating      nothing-in-the-box (1)...
You acquire an item: nothing-in-the-box
Successfully      created nothing-in-the-box (1)
Verifying ingredients for bartender      skull (1)...
Using cached search results for brainy skull...
Purchasing      brainy skull (1 @ 1,998)...
Purchases complete.
Verifying      ingredients for beer goggles (1)...
Using cached search results for      beer lens...
Purchasing beer lens (2 @ 5,000)...
Purchases complete.
Creating      beer goggles (1)...
You acquire an item: beer goggles
Successfully      created beer goggles (1)
Creating bartender skull (1)...
You acquire      an item: bartender skull
Successfully created bartender skull (1)
Creating      bartender-in-the-box (1)...
You acquire an item: bartender-in-the-box
Successfully      created bartender-in-the-box (1)
autoBuyPriceLimit => 20000
Using      1 bartender-in-the-box...
Finished using 1 bartender-in-the-box.
[COLOR=black]Getting      1 Fog Murderer in 1 seconds[/COLOR]
Countdown: 1 second...
Waiting      completed.
autoBuyPriceLimit => 1000.0
Searching for "Fog      Murderer"...
Search complete.
Purchasing Fog Murderer (1 @      500)...
You acquire an item: Fog Murderer
You spent 500 Meat
Purchases      complete.
autoBuyPriceLimit => 20000
[COLOR=black]Waiting      to consume...[/COLOR]
<b>Fog Murderer</b> lev:6 gain:6.0 adv:15.0      musc:45.0 myst:25.0 mox:25.0 meat:500 own:0 value:20500
Countdown: 1      second...
Waiting completed.
Drinking 1 Fog Murderer...
You gain      20 Adventures
You gain 58 Fortitude
You gain 28 Mysteriousness
You      gain 24 Smarm
You gain 6 Drunkenness
You lose some of an effect: Ode      to Booze
Finished drinking 1 Fog Murderer.
1: [B]Fog Murderer[/B]      lev:6 gain:6.0 adv:15.0 musc:45.0 myst:25.0 mox:25.0 meat:500 own:0      value:20500
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best      find was chocolate seal-clubbing club with a value of -750. That's no      good, so not consuming and moving on.
Finished. You had -Ode to Booze      in effect. Adventures listed above does not reflect that, but this does:
Spent      12558 meat. Gained Fullness: 0. Inebriety: 6. Spleen: 0.
Adventures:      20. Muscle: 58. Moxie: 24. Mysticality: 28.
Eating, drinking, and      spleening complete. Commence merrymaking (at your own discretion).
Eatdrink settings:
Code:
[COLOR=olive]> zlib eatdrink[/COLOR]

[B]Copy/paste/modify/enter      any of the following lines in the CLI to edit settings:[/B]

zlib      eatdrink_accordionGet = false
zlib eatdrink_accurateMake = true
zlib      eatdrink_ate_choco = April 1:0
zlib eatdrink_ate_fancy = April 1:1
zlib      eatdrink_ate_vitac = April 1:0
zlib eatdrink_autosellWhileRonin = false
zlib      eatdrink_avoid_astral_energy_drink = true
zlib      eatdrink_avoid_astral_hot_dog = true
zlib eatdrink_avoid_astral_pilsner      = true
zlib eatdrink_avoid_booze-soaked_cherry = true
zlib      eatdrink_avoid_giant_marshmallow = true
zlib      eatdrink_avoid_gin-soaked_blotter_paper = true
zlib      eatdrink_avoid_sponge_cake = true
zlib eatdrink_avoid_wet_stew = true
zlib      eatdrink_budget = 20000
zlib eatdrink_considerCostWhenOwned = true
zlib      eatdrink_costOfPull = 3000
zlib eatdrink_fav_pr0n_chow_mein = false
zlib      eatdrink_fav_rockin'_wagon = false
zlib eatdrink_fav_twinkly_wad = false
zlib      eatdrink_favUse = false
zlib eatdrink_getBartender = 30000
zlib      eatdrink_getChef = 5000
zlib eatdrink_gloriousLunch = true
zlib      eatdrink_hardcoreServants = 2
zlib eatdrink_loopCount = 5
zlib      eatdrink_make = true
zlib eatdrink_maxAge = 2.0
zlib      eatdrink_minimumAverage = 1.0
zlib eatdrink_minimumQuality = 0
zlib      eatdrink_noNoodles = false
zlib eatdrink_ode = true
zlib      eatdrink_pause = 1
zlib eatdrink_piePriority = true
zlib      eatdrink_priceFlexibility = 1.25
zlib eatdrink_priceOfNontradeables =      999999999
zlib eatdrink_priceOfQuestItems = 999999999
zlib      eatdrink_priceOfUnknowns = 999999999
zlib eatdrink_shrug = false
zlib      eatdrink_simConsume = true
zlib eatdrink_simLevel = 0
zlib      eatdrink_simRonin = false
zlib eatdrink_stepMeat = -1
zlib      eatdrink_suppressNoMilk = false
zlib eatdrink_suppressOverdrink = false
zlib      eatdrink_useInv = true
zlib eatdrink_useStorage = true
zlib      eatdrink_valueOfNonPrimeStat = 0
zlib eatdrink_valueOfPrimeStat = 0
I think this covers most mafia settings, if there are any that's left out, please let me know.


I am in aftercore.
 

Theraze

Active member
Code:
boolean will_servant(int value)
{
  if (value == 0) return false;
  if (HARDCORE_SERVANTS == 0 && get_ronin()) return false;
  return true;
}
So will_servant is true if not 0.
Code:
  if (will_servant(GET_BARTENDER) && !have_bartender() && it.inebriety > 0)
  {
    if (getitem(1, $item[bartender-in-the-box], (GET_BARTENDER > 0 ? GET_BARTENDER : 999999)))
      use(1, $item[bartender-in-the-box]);
    else if (HARDCORE_SERVANTS == 2)
      abort("Unable to get your bartender for under "+(GET_BARTENDER > 0 ? GET_BARTENDER : 999999)+" meat!");
  }
That's in the getitem function. So basically, your settings are currently such that if you CAN get a bartender for under 30k, do it. If you want to disable getting a bartender, set that to 0 instead of 30k.
 

Theraze

Active member
Believe that's the default. I know that it also sets that if you had earlier told it to get servants at any price - the old setting was a true/false check. We threw some sanity checking into that a while ago... but yeah, if you don't want it, just set it to 0. :)
 

ereinion

Member
Ah, yeah, I may have just had it set to the default on some of my lesser played characters, so that may be it :) Again, thanks a ton for the help, and for this amazing script!
 

Theraze

Active member
Happy to help. If you run into more problems or questions, let me know and I'll try to help clarify. I know that ED is a huge bundle of confusion for many people and not all of my design 'improvements' have made things more transparent. But hopefully I either know why I did it or can explain who asked for it to work that way. :)
 

ereinion

Member
Actually I did search for boxen or something, and found that setting in the script (as well as the helpful comments). But I must have forgotten to change it in the cli or something. Sometimes you just can't help dumb ;)
 

fronobulax

Developer
Staff member
Happy to help. If you run into more problems or questions, let me know and I'll try to help clarify. I know that ED is a huge bundle of confusion for many people and not all of my design 'improvements' have made things more transparent. But hopefully I either know why I did it or can explain who asked for it to work that way. :)

Thank you for that. The script is an adopted orphan and the best we have until someone rewrities that. While I would like to do that as an intellectual exercise the fact that it is good enough and being maintained reduces my motivation :)
 

zekaonar

Member
> call EatDrink.ash (0,29,0,false,false);

Refreshing stash contents...
Stash list retrieved.
Internal checkpoint created.
Skipping favorites.
You're in ronin, so no shopping for you.
Starting EatDrink.ash (version 3.2).
Consuming up to 0 food, 29 booze, and 0 spleen
Considering food from inventory NPCs. Per-item budget cap is 37500.0.
Retrieval cap is 20000. Price will be a factor if you own it already.
An adventure has the value of 1000 meat. Moxie subpoint is 3.0. Nonprime stat subpoint is 1.0.
Pass 1: food.
Skipping food.
Pass 2: booze.
booze: At 0, consuming to 29 with 14127 meat.
Getting 1 bartender-in-the-box in 1 seconds
Countdown: 1 second...
Waiting completed.
autoBuyPriceLimit => 25000.0
Verifying ingredients for bartender-in-the-box (1)...
Verifying ingredients for nothing-in-the-box (1)...
You need 1 more box to continue.
autoBuyPriceLimit => 20000
Unable to get your bartender for under 30000 meat!

I'm Pete and I have Cocktail Magic so I shouldn't need a bartender.
 

Theraze

Active member
But after it's over and you're in aftercore and crafting your own SHC drinks, you will. And hey, you told it that you wanted a bartender and it gave you one. Amazing! :)
 

zekaonar

Member
Sometimes I take Pete into aftercore. He's great in the slimetube or farming item drops. I don't want to waste money on a bartender as soon as I get out of ronin. If I turn bartender off, I'll like forget to turn it on in other classes. Couldn't you just change any references of !have_bartender() to !have_bartender() && !have_skill($skill[Cocktail Magic])
 

Theraze

Active member
Can, yes. Will, probably not. If you really do want to control that, you can do it with a kingLiberated script or even a postAscension script. Either one would do that perfectly for you and make you not mess up post-AoSP.

But hey, SVN magic means you can do it to your own copy and have it persist through actual useful upgrades. Yay SVN! :)
 

torne

New member
Sorry if this has already been discussed somewhere in this very long thread (I couldn't find it by searching), but: I'd love to have a setting to tell EatDrink to only consider food/drink that's not already in my consumption history, in order to increase the number of different items I've consumed, while still doing as good a job as possible of having a decent diet on a budget. Not sure how hard this would be :)
 
Top