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

There are many way that you can improve control over your adventuring that you don't even know now. Upgrading to ash for a simple script is a good way to get your foot wet so that you can eventually make more interesting choices.

Well, as you could guess with my conundrum, I don't have much time to play the game lately, that also means that I don't really have the time to get into learning advanced scripting, unfortunately.


Bale is correct, however you can use ash in a txt script. For example like this:
Code:
ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);

Ok this looks exactly like what I needed, many thanks, mate.
 
Yeah, I've posted them a lot before, but here are the two ED aliases that best meet your current stated goals:
alias eatdrink => ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
alias eatdrinkod => ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true);

Then you just use eatdrink for eating and drinking to full, and eatdrinkod to overdrink at the end of your day. I have another... 10 actual consumption aliases besides those two and 12 more simulation aliases, but those two are the most relevant for your described automation.
 
Do you know why sometimes this script decides it has to search every item in the game (when trying to decide what to eat for spleen), it's kinda annoying.
 
Do you know why sometimes this script decides it has to search every item in the game (when trying to decide what to eat for spleen), it's kinda annoying.

The prices are too outdated. If you turn on the mafia preference to share prices you will have to search for a lot less items.
 
Also, the maxAge variable sets how often to check for updates to the prices. It defaults to checking prices older than 2 days, but you can set that to only check prices older than a week or... whatever you like. Just know that it will be less accurate with its choices the farther out you slide the counter.
 
Getting the following error:
Script execution aborted (java.lang.NullPointerException): (EatDrink.ash, line 678)
Where line 678 is
Code:
  if (!is_tradeable(it) && npc_price(it) == 0 && is_displayable(it) && it.seller == $coinmaster[none] && daily_special() != it)
Adding
Code:
  print(it.to_string() + " : " + it.to_int());
right before line 678 results in
none : -1
Unexpected error, debug log printed.
Script execution aborted (java.lang.NullPointerException): (EatDrink.ash, line 679)
So it seems to me that ED is including "none" as an item to check the effective price on. Any ideas what could be causing this?
Adding
Code:
  if (it == $item[none]) return 999999999;
before line 678 allows me to workaround it but I'm curious about why it's happening.
 
Works fine for me. You sure that you're not using an out of date version of mafia, like maybe one of the buggy ones that didn't work properly in terms of checking speakeasy drinks?
 
Any time you get something like that, it's a mafia issue. Fixed in 15327 (or at least the NPE from npc_price( $item[none] ) is fixed, I don't know what this script does).
 
It's r15324. I download whatever the newest version is approximately 15 minutes before rollover. I see that there is a newer version already so I'll download that and see what happens.

Apparently it's specifically the npc_price() command that is throwing the error. "ash npc_price($item[none]);" in the gCLI will throw that same error. So the part of this issue that is specific to ED is that ED is considering "none" as an item it cares about for some reason. I'm going to try a couple of things to see if I can maybe figure out why. I should add that this only happens on 1 of four characters and only the one that has VIP access so weirdness with the speakeasy is not necessarily ruled out.

Edit: ninja'd by lost. Damn he's fast. I'll download 15327 then.
 
Last edited:
0. Go negative if you want to drop stats. Which is kinda nifty, I've done that to drop a level to get my extra karma.
 
Then you changed something else. Because setting the stat value to 0 just means that it's discounted, not that VoA changes or anything else silly.

You sure you didn't change nontradable value to 0 or have it set to consider inventory as free or anything else like that which totally breaks all of its logic?
 
Only thing I changed elsewise was try to limit it to eating awesome or better food, as it keeps wanting to eat "meat" sticks. It shouldn't have been able to eat blankets anyways, as those were way outside the 100k budget I gave it. And I had the price of an adventure set at 1000, so blankets again should have been way outside that budget.
 
Last edited:
Here's the settings I used.

Code:
eatdrink_accordionGet	false
eatdrink_accurateMake	true
eatdrink_ate_choco	Carlvember 2:0
eatdrink_ate_fancy	Carlvember 2:1
eatdrink_ate_vitac	Carlvember 2:0
eatdrink_autosellWhileRonin	false
eatdrink_avoid_astral_energy_drink	true
eatdrink_avoid_astral_hot_dog	true
eatdrink_avoid_astral_pilsner	true
eatdrink_avoid_booze-soaked_cherry	true
eatdrink_avoid_giant_marshmallow	true
eatdrink_avoid_gin-soaked_blotter_paper	true
eatdrink_avoid_sponge_cake	true
eatdrink_avoid_wet_stew	true
eatdrink_budget	5000
eatdrink_considerCostWhenOwned	true
eatdrink_costOfPull	3000
eatdrink_fav_pr0n_chow_mein	true
eatdrink_fav_rockin'_wagon	true
eatdrink_fav_twinkly_wad	true
eatdrink_favUse	false
eatdrink_getBartender	30000
eatdrink_getChef	5000
eatdrink_gloriousLunch	true
eatdrink_hardcoreServants	2
eatdrink_loopCount	5
eatdrink_make	true
eatdrink_maxAge	2.0
eatdrink_minimumAverage	3.0
eatdrink_minimumQuality	3
eatdrink_noNoodles	false
eatdrink_ode	true
eatdrink_pause	3
eatdrink_piePriority	true
eatdrink_priceFlexibility	1.25
eatdrink_priceOfNontradeables	200000
eatdrink_priceOfQuestItems	200000
eatdrink_priceOfUnknowns	200000
eatdrink_shrug	false
eatdrink_simConsume	true
eatdrink_simLevel	0
eatdrink_simRonin	false
eatdrink_stepMeat	-1
eatdrink_suppressNoMilk	false
eatdrink_suppressOverdrink	true
eatdrink_valueOfNonPrimeStat	0
eatdrink_valueOfPrimeStat	0
 
Nothing there would make sense for burning blankets. Though of course with a high enough VoA, it might be considered a good choice. Since it's currently mallpriced around 40k. Your budget and stepmeat only limit how much it will spend if you don't already have them. If you set VoA to 3k+, blankets might get used. Or if you accidentally had the stat or primestat bumped up.

But yeah, tradeable items are all about the VoA and value checks.
 
Hmm, when it tried eating blankets, they were mall-priced at 20kish each, so maybe it was that spike of low prices that caused it?
 
Could have been. Depends on your VoA at that point. At 20k, an item with an average of 15 adventures would break zero and start being profitable at 1334 VoA. To be considered the best, you'd probably need to have set your VoA around 3000. That would present a profit of 25k for that inebriety, with a profit of 12.5k per inebriety. Anything higher than that and it simply gets more tempting and a better choice.

As a comparison, SHC drink Mae West is 2950 for 16 adventures at 4 inebriety. That means with the same 3000 VoA, you'd have a profit per inebriety of about 11.26k.

Now, at lower VoA levels, you'll end up with the SHC drinks, since it's not worth spending 20k to get less adventures... take a 2k VoA instead of 3k. Total blanket profit 10k, 5k per inebriety. SHC total profit 29.05k, 7.26k per inebriety. And since individual item budget is at 5k, you can easily buy 3k value items.

Just another reason why accurate VoA is important. :)

Edit: I do see a misconception in what you said above. Budget is not your total budget... it's the maximum that you're willing to spend on any single item, owned or not. A 100k budget means that you'd be willing to spend 100k for one item, not 100k total. If you have 15 food items, 19 drink items, and 15 spleen items, 3 types of chocolate, and overdrinking another item, a budget of 100k means potentially spending up to 5.3 million meat per day. Since you've dropped your budget to 5k, blankets will be eliminated because they cost more than that. But so might lasagna and other good food, depending on market swing.
 
Last edited:
You know what, I've been saying this wrong the whole time, I should have said it was eating Mulligan Stew, not drinking Blankets. :/

I got the two mixed up.
 
Back
Top