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

deadpan

New member
That makes sense, where do I go to change it so that it will consider stores and npcs?


Opening my vars file shows this:

automcd true
defaultoutfit current
eatdrink_accurateMake true
eatdrink_ate_fancy Frankruary 7:1
eatdrink_ate_vitac Frankruary 7:0
eatdrink_avoid_wet_stew true
eatdrink_boozeMood booze
eatdrink_budget 100000
eatdrink_considerCostWhenOwned true
eatdrink_consumeLast false
eatdrink_costOfPull 3000
eatdrink_daily_agua_de_vida true
eatdrink_daily_bat-shaped_Crimboween_cookie true
eatdrink_daily_bat_wing_chow_mein true
eatdrink_daily_blob-shaped_Crimbo_cookie true
eatdrink_daily_can_of_Swiller true
eatdrink_daily_chocolate-covered_scarab_beetle true
eatdrink_daily_chocolate_disco_ball true
eatdrink_daily_cup_of_primitive_beer true
eatdrink_daily_distilled_fortified_wine true
eatdrink_daily_fishy_fish_lasagna true
eatdrink_daily_glimmering_roc_feather true
eatdrink_daily_gnat_lasagna true
eatdrink_daily_handful_of_nuts_and_berries true
eatdrink_daily_herringcello true
eatdrink_daily_Knob_pasty true
eatdrink_daily_Knob_sausage_chow_mein true
eatdrink_daily_long_pork_lasagna true
eatdrink_daily_not-a-pipe true
eatdrink_daily_nutty_organic_salad true
eatdrink_daily_pr0n_chow_mein true
eatdrink_daily_prismatic_wad true
eatdrink_daily_pumpkin_beer true
eatdrink_daily_rat_appendix_chow_mein true
eatdrink_daily_spooky_hi_mein true
eatdrink_daily_spooky_lo_mein true
eatdrink_daily_super_salad true
eatdrink_daily_tasty_tart true
eatdrink_daily_twinkly_wad true
eatdrink_fav_pr0n_chow_mein true
eatdrink_fav_rockin'_wagon true
eatdrink_fav_twinkly_wad true
eatdrink_favUse true
eatdrink_getBartender true
eatdrink_getChef true
eatdrink_GetPriceServer true
eatdrink_make true
eatdrink_maxAge 2.0
eatdrink_ode true
eatdrink_pause 3
eatdrink_piePriority false
eatdrink_priceFlexibility 1.25
eatdrink_priceOfNontradeables 999999999
eatdrink_priceOfUnknowns 999999999
eatdrink_shop true
eatdrink_simConsume true
eatdrink_simLevel 0
eatdrink_simRonin false
eatdrink_suppressNoMilk false
eatdrink_suppressOverdrink true
eatdrink_useCloset false
eatdrink_useInv true
eatdrink_useStorage true
eatdrink_valueOfNonPrimeStat 0
eatdrink_valueOfPrimeStat 0
flyereverything true
is_100_run none
puttybountiesupto 19
threshold 4
unknown_ml 150
verbosity 3


closet says false and store says true.
 

roippi

Developer
It's a mafia setting. You can find it in your name_prefs.txt file.

Or just open up preferences, look on the general tab.
 

roippi

Developer
Random question: does mafia have the right data for herringcellos? Eatdrink rather likes to recommend those for my 3-drunk filler, but I don't think 3.5 adv/drunk seems correct.
 

Veracity

Developer
Staff member
inebriety says 3-4 adventures - 3.5 - not 1-5.

I guarantee that the Wiki USED to say 3-4 - and we blithely copied in its data and did not change when it changed.

That's why I really dislike putting in consumption data before it's fully spaded.
 

Theraze

Active member
Does this mean I should resubmit the inebriety/fullness changes from when I went through every item a few months after the consumption data changes and updated my data, or do we wait until someone else spades it again? My copy does have the 1-5 herringcello already...
 
Last edited:

fronobulax

Developer
Staff member
I've been running #950 for a while now and I'm not seeing anything that concerns me. I'd mainline it once two things happen: a) Theraze says it's ready for prime time; and b) I make some sim runs against the mainline version and actually analyze the results. If anyone feels differently please let us know.

Two things on my list:

Add a 5 parameter version of the function EatDrink that just takes the same parameters as running from the command line. You can get the same effect by setting a EatDrink global variable and calling the existing four parameter version from a script but that offends my sense of encapsulation.

I have a wrapper function that closets (and restores) meat so that EatDrink will stay within a daily budget. There is interest in this so I need to move it into EatDrink and then make it slightly more robust.

Comments?
 

roippi

Developer
Comparing #950 to mainline:

#950 is considerably slower at simulating food and booze steps. Like, 3 seconds for the mainline and 5 minutes for #950. Per step. I actually thought it had frozen the first couple of times I'd tried it. Is this intended?

Other than that, works great.
 

Theraze

Active member
Most likely, roippi, it's based on EAT_ACCURATE actually checking each item whether or not it's currently available or not. To go back to speedy inaccurate, like current release, either run it with EAT_ACCURATE=false, or set the eatdrink_accurateMake zlib variable to false.

And it's never run 5 minutes for me. 15 seconds, maybe. Over a minute? Nope.
 

roippi

Developer
Ah, gotcha. I saw that new zlib variable the first time I ran this, didn't think about it further.

I could time it, but it's definitely in the 3-5 minute range per step on my 1.6 GHz core2 duo laptop. I'm sure my 4.2 GHz i7 desktop would get numbers closer to yours, but my laptop is where mafia resides. I'll leave it on speedy inaccurate.
 

Banana Lord

Member
EatDrink keeps getting stuck in a loop. I haven't changed anything since yesterday when everything was working fine. Don't know if it's relevant, but it's not even printing this loop to the gCLI (I had to force quit mafia because I can't get it to abort), I had to dig into my session logs to find out what was going on.
Code:
> <b>chocolate pasta spoon</b> lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:3000 own:0 value:300
> chocolate pasta spoon price updated from 3000 to 3000.
> FAIL: <b>chocolate pasta spoon</b> lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:3000 own:0 value:300
> chocolate pasta spoon cannot currently be consumed. Skipping.
Funnily enough it ran fine just after login, filling my organs as expected. It's only failing now that I wan't it to overdrink.

EDIT: Actually, scrap that, I'm blind. It's not trying to overdrink, it's already filled up my organs (I have 250 adventures) but for some reason is trying to continue anyway.
 
Last edited:

Theraze

Active member
Interestingly, the part that's failing is about the only part still using the old code. I may eventually look into homogenizing Bale's choco code, but not until after the rest of it is actually resolved. At that point, maybe we'll make chocolates step 4, after spleen, and move overdrinking to step 5 instead. Maybe.
 

Theraze

Active member
First, is it the new ED or old ED? No clue what you're seeing and why, since it isn't happening for me... If it's new ED, I'll tweak. If it's old, well...
 
First, is it the new ED or old ED? No clue what you're seeing and why, since it isn't happening for me... If it's new ED, I'll tweak. If it's old, well...

The new ED has been doing that to me for a while but I didn't bother posting because it doesn't really effect anything. It eats, drinks, spleens then loops on the chocolate and I abort the script.
 

Theraze

Active member
Hmm... okay, I'll look into it. It's about time I posted a new version anyways with the tweaks of the past week or so. I'll look into changing at least the consumption bit for chocolates... 3 chocolates max, right?

This should work better. Also, it should be able to use chocolate cigars as well as vitochoc pills. :D
 

Attachments

  • EatDrink.ash
    86.6 KB · Views: 28
Last edited:

roippi

Developer
How feasible would be the inclusion of a "minimum goodness" parameter? i.e. with a minimumFoodGoodness of 3, eatdrink would not consider or update mall prices for food that had lower average returns than 3 adv/full.
 

Theraze

Active member
What do you want it to do regarding items worse than that... do you want it to go into the freaky-spendy (up to whatever your limit is, 20k per item by default) when it can't fill up on cheaper stuff, or do you want it to still consider the bad stuff but devalued, so if it can find anything better it does but it won't spend 15000 for a mein or similar?

Edit: Bottom line is yes, it's easy to remove items from the list.
 
Top