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

mrfatso

New member
Perhaps taking a look at the configuration would help.

Running with a higher verbosity and copying the gCLI output here would be also helpful.

What do u mean by higher verbosity? As in a higher budget or something like that?

Anyway, here's the gCLI output, maybe u guys could help see what did i overlooked?

Code:
******************************************
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.5).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from inventory Hagnk's. 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 500 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15 with 5000 meat.
1: Ent cider lev:1 gain:2.0 adv:3.5 musc:0.0 myst:0.0 mox:37.5 meat:0 own:0 value:627
2: Ent cider lev:1 gain:2.0 adv:3.5 musc:0.0 myst:0.0 mox:37.5 meat:0 own:0 value:912
3: Ent cider lev:1 gain:2.0 adv:3.5 musc:0.0 myst:0.0 mox:37.5 meat:0 own:0 value:912
4: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
5: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
6: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
7: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
8: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
9: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
10: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
11: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
12: large cocoa eggshell fragment lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:428 own:9 value:572
drink: At 0, consuming to 19 with 5000 meat.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
spleen: At 0, consuming to 15 with 5000 meat.
Finished. You had Milk of Magnesium-Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 0 meat for a value of 3852 meat. Gained Fullness: 15. Inebriety: 0. Spleen: 0.
Adventures: 43. Muscle: 0. Moxie: 111. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
 

Winterbay

Active member
HIgher verbosity would mean so that the script gives more output. I'm not sure how to change it for eatdrink since I don't think it uses vprint.

That said: Are you in run? It obviously didn't find any beverages or spleen items it found good enough to use, try either increasing ValueofAdventure or lowering the min-quality of the food.
 

Theraze

Active member
Winterbay (and slyz), as I've repeatedly asked for since post 1128, nobody's told me what vprint levels to use, so it's still doing its own thing. Someday maybe...

But I think I've found mrfatso's problem. Specifically, this part of the line:
Considering food from inventory Hagnk's.
You've disabled automatically purchasing items from NPCs and the mall, so EatDrink will only use items you already own. I'd suggest at least turning on buying things from NPCs when needed in mafia preferences, which will help you immensely and is much less worrying to your meat-flow than turning on buying from the mall.
 

Winterbay

Active member
Winterbay (and slyz), as I've repeatedly asked for since post 1128, nobody's told me what vprint levels to use, so it's still doing its own thing. Someday maybe...

My suggestion would be to put normal print-calls somewhere between 1 and 3, verbose-calls between 5 and 7 and verbose2-calls at 9 or so. But that is by going at roughly what is printed normally and the names of the functions :)
 

fronobulax

Developer
Staff member
Winterbay (and slyz), as I've repeatedly asked for since post 1128, nobody's told me what vprint levels to use, so it's still doing its own thing. Someday maybe...

Whatever happened to initiative? If the script prints it now, normally, then verbosity 3. If it prints out when the debug is un-commented then lets try 7. I certainly could have told you that in 1129 (or done it myself) if I had realized things were paused.
 

Theraze

Active member
Initiative? Eh, I was happy not to see the verbose2 messages, but it was something that people ask for every now and then, so... :D The ones where I leave for other people to answer are things that I could care less about but that other people have requested and seem eventually useful.

Anyways, tested and this appears to work... ED 3.1.5 with verbose replaced with vprint3, verbose2 replaced with vprint9, and the 1205 mojo filter fix. I left always visible things as logprint, print, or print_html, so that people who screw up their verbosity settings don't blame ED for not telling them anything.

Guess it's Changelog time!

Implemented since last mentioned:
1205: Fixed mojo filter infinite loop.
1226: Removed the verbose and verbose2 functions, replacing them with a vprint3 and vprint9. Items that were always printing before are still using logprint, print, or print_html as appropriate.

To be done - Definitely:
1069: Coinmaster (besides hermit) handling - Need decision on token mall price, item mall price, or lowest of the two - will probably use retrieve_item on tokens but will need custom override for hermit due to available_amount not calculating how many we can get with gum
1200: Work around mafia's new retrieve_item code - mafia recalculates the 'cheapest' way to get something as spending more money and getting more, which sometimes makes ED fail because it's spending more initially, but there might not be a good way to avoid this - Best solution would be more parameters for a speculative RI that tells us how much meat it's spending to save us meat, which we'll probably use for updating the effective price as well
 

Attachments

  • EatDrink.ash
    92 KB · Views: 45

Winterbay

Active member
Wouldn't have been just as easy to change the verbose and verbose2 functions to have a vprint(message, 3/9) instead of making new functions? Not that it matters now but... :)
 

Theraze

Active member
Yes/no. Depends on how granular we want it... By eliminating the functions, we're able to make different things have different display levels. I think I might have actually done vprint8 for verbose2 and vprint9 for speculative reporting... but I'm not certain of that currently. I suppose I could look, but... meh. Later, maybe.

The bottom line is I've wanted it to be more granular irregularly, and by splitting it out, it can be. :) My usual fix though has been to add a few extra lines that give me troubleshooting information wherever and just use print_html so that it doesn't save to my logfiles... heh.
 

Theraze

Active member
Welcome. :) Since we're talking about initiative and those sorts of decisions... Heh.

1069: Coinmaster (besides hermit) handling - Need decision on token mall price, item mall price, or lowest of the two - will probably use retrieve_item on tokens but will need custom override for hermit due to available_amount not calculating how many we can get with gum

Basically, do we want coinmasters with tradable items and tokens to go based on the token price, the item price, or the lower of the two? Since we'll be using retrieve_item, it shouldn't cost more than the lower price, but if a token is more valuable and mall-buying is off (with coinmasters on) so it can't save you meat, do we allow the lower value of the end-price even though we'll need to spend more? If either is non-tradable, it will obviously use the non-tradable or the quest item price.

The messy way to do it would be to use the lower if both are allowed or the token price only if mallbuying is disabled. It's more likely to cause people being confused by the results and pricing of items, because a moon pie would have a value of 24500 meat by token mall price, but is untradable and would use that value instead with its current valuation. In the case of coinmasters that neither is tradable (bounty hunter, for example), it would use the untradable value...

And yes, as I said, the hermit is a special case due to the gum. We'll still need to try to retrieve his stuff like normal, but can't use available_amount to see if it's possible and which is cheaper...
 
Last edited:

fronobulax

Developer
Staff member
The version in 1226 breaks Ascend. Since the decision to have a utility function used by Ascend in EatDrink is not one I would make, the issue will be dealt with in a future version of Ascend. Just a FYI for people.

I have not figured out exactly how I want (i.e. I would ask for or suggest) Coinmasters (and Clip Art) handled. I am saving lucre with one character so I was not amused when it was spent for food but I can solve that with the Closet. I could probably live with something that placed a low value of Clip Art and so used the summons if it had not already been done when ED is called, but that is me. If I can buy something from the mall then that places an implicit value of the Coinmaster token but I lean towards buying it from the Mall anyway, regardless of that value.

There is a part of me that thinks Mall prices ought to be irrelevant if the character is Hardcore (only used to break ties between available items that have identical adventure/fullness values) and that same part of me is probably willing to let ED spend anything at Coinmasters that it wants.
 

mrfatso

New member
But I think I've found mrfatso's problem. Specifically, this part of the line:You've disabled automatically purchasing items from NPCs and the mall, so EatDrink will only use items you already own. I'd suggest at least turning on buying things from NPCs when needed in mafia preferences, which will help you immensely and is much less worrying to your meat-flow than turning on buying from the mall.

holy, it works. Thanks Theraze for your help.
 

Theraze

Active member
Welcome, mrfatso. :)

Regarding HC mall prices, fronobulax, you can turn on the autosellWhileRonin to make it use autosell prices instead of mall prices for the effective value of mallable items. Items that are untradable, quest, TPS, or any other specific exceptions retain those, but asWR will make you value gimlets over horizontal tangos, for example.

Regarding the lucre, since both the lucre and the brandy/bounty-os are untradable, once they're set, both sets should use the untradable value. Shouldn't hurt anyone there.

The question is more on the items like the moon pies and so forth where people can buy one but not the other... do we go by the lower value, the higher value, or the value of the tokens, because those are the item that can be replenished if used?
 

bladyeoman

New member
Sorry to bother you all - my answer may be somewhere in the more-than-a-hundred other pages, but I'm trying to use eatdrink() in a script of mine, and it's behaving funny.
So when I call the following:

Code:
eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);

within my code, it runs in interactive mode, simply doing a simulation. Is there an easy way to make it actually feed/drink/spleen me?

Thanks in advance,

Blade
 

Winterbay

Active member
Yep, change that call to the full call of
Code:
eatdrink(int foodMax, int drinkMax, int spleenMax, boolean overdrink, int advmeat, int primemeat, int offmeat, int pullmeat, boolean sim)
.

The call you are using is for the main()-function which can't be used from within another script.
 

Theraze

Active member
You can use the short version... but if you're importing it, you need to define
SIM_CONSUME=false;
else it won't actually do anything. My standard eatdrink alias of
eatdrink => ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
is done exactly like it would be called in an external script using (the short form of) EatDrink. :)
 
Any way it could be written to not use fermented pickle juice/extra greasy sliders until after filling spleen? Normally I'd just run it spleen only first but tonight I made the mistake of buying a fermented pickle juice as an AR ticket while it was running and didn't closet it in time. Wasted the spleen cleaning qualities. I suppose the quickest way to solve the problem (assuming it's agreed to be a problem) would be to have it run spleen BEFORE food and booze.
 

Theraze

Active member
If you want to run spleen first, just do 0,0,spleen_max(),false. Then run your normal fullness,inebriety,spleen_max,false.
 

Winterbay

Active member
redwulf clearly stated being aware of that, but from an optimisation stand point I would definitely say that using that kind of food and drink before spleening is not optimal. I think it would be a good idea to consider at least :)
 
Top