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

Theraze

Active member
Well, when I tried it, EatDrink at least continued to take another crack at Iteration 2, then continued to Iteration 3, and finally properly overdrank at Iteration 4.

What caused me to realize this was ascending again and having the 'best' available item be the overpriced imported from the Tavern... problem was, I wasn't level 3 yet, so it couldn't buy them, which is a mafia issue, but I think I've seen a FReq or two go by for that already, so let's just move on there. :) Anyways, instead of changing to the next selection... which happens to be another item from the tavern and so should fail again before it find an actual possible option... EatDrink just quit. It's not supposed to do that, so I started to add logging and eventually...!

Will download 3.1.7 now. :) Thanks for the speedy new attaching. Sorry about that. Unfortunately some of these take either people reporting (since that was in for 4 days and I'd be surprised if none of the ~20 people had a single problem in that time) or me managing to screw up my consumption. :D
 

Theraze

Active member
Next planned change for EatDrink - adventure modifiers.

So, anything besides potion of the field gar that affects adventure ranges? We're going to ignore things like the toasted brie that involve actually using food/drink/spleen instead of potions that just have mall cost. Would be good to be able to consider though that, depending on your specifics, the mall and effects may massively change what's best.
 

Theraze

Active member
Tuxedo shirt is already handled... that's how we found that can_equip didn't check for torso awaregness.

Milk/ode are already handled... they're a straight +fullness/liver, irregardless of item consumed. Only matters on overdrink, since otherwise you should be fully using them anyways.

Munchies pills, salad fork, frosty mug, and fudge spork are not currently handled, I think. I'll add that to the bits I need to try to consider.

There's Feast of Boris and cranberry items, but that's a mafia issue, not an EatDrink one, since there isn't actually holiday checking, so...
 
Last edited:

Theraze

Active member
Okay, here's a quick fix that wasn't as quick as I'd have liked to find. Anyways, if you're in a gnome sign, and it wanted to do the daily special, it would loop forever. This will only fail once now...
 

Attachments

  • EatDrink.ash
    92.2 KB · Views: 45

fronobulax

Developer
Staff member
Code:
shot of blackberry schnapps lev:3 gain:1.0 adv:2.5 musc:6.0 myst:6.0 mox:6.0 meat:216 own:1 

value:1118
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Drinking 1 shot of blackberry schnapps...
Item level too high.
FAIL: shot of blackberry schnapps lev:3 gain:1.0 adv:2.5 musc:6.0 myst:6.0 mox:6.0 meat:216 

own:1 value:1118

Happens at Level 8 and 9 which makes sense, but it is not clear why the schnapps were even considered. Bad data somewhere? SC AT. Just got out of ronin and there is a blueberry shot in inventory. If there is something to check I might be able to try tomorrow since I won't make it to level 11 by then. The failure does seem to trigger an infinite loop or at least I aborted after seeing it try and fail numerous times.
 

Theraze

Active member
Got it in one, bad data in mafia:
> ash $item[blackberry schnapps]

Returned: shot of blackberry schnapps
plural => shots of blackberry schnapps
descid => 369322564
image => shot.gif
levelreq => 3
quality => good
adventures => 1-4
muscle => 5-7
mysticality => 5-7
moxie => 5-7
fullness => 0
inebriety => 1
spleen => 0
notes =>
combat => false
reusable => false
usable => false
multi => false
fancy => false
candy => false
bounty => none
bounty_count => 0
seller => none
buyer => none
That would be a mafia bug report with whatever the right data actually is...
 

Veracity

Developer
Staff member
Got it in one, bad data in mafia:That would be a mafia bug report with whatever the right data actually is...
FWIW, here is the HTML I have saved for the "shot of blackberry schnapps":

Code:
<div id="description" class=small><center><img src="http://images.kingdomofloathing.com/itemimages/shot.gif" height=30 width=30 alt="shot"><br><b>shot of blackberry schnapps</b></center><p><blockquote>This is a shot of blackberry schnapps.  It's so dark that it'd be pretty easy to mistake it for ink.  Then whoever read the manifesto you wrote with it would be all "Why does this manifesto smell like blackberries?" and that'd be the end of your career as a revolutionary.<br><br>Type: <b>booze <font color=green>(good)</font></b><br>Level required: <b>3</b><br>Selling Price: <b>65 Meat.</b></blockquote>
The Wiki says the Level required is now 11.

That was obviously an unannounced trivial update at some point...
 

Theraze

Active member
Sorry, mafia New Content report then. :) Have to love those unannounced trivial updates...

Well, or it would be if Veracity didn't ninja it. Thanks Veracity!
 

Theraze

Active member
Double-posting, but completely unrelated so it's probably okay. Anyways, decided to add Boris-core support, mainly meaning the Song of Glorious Lunch effect through casting the skill Song of the Glorious Lunch. Got frustrated as well and hunted down the bug that made simulated meat sometimes double-subtract, so your simulations should be more accurate now.

Quote is from a Boris-core LC run, Daily Special is the Kumquat.
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.7).
Consuming up to 20 food, 4 booze, and 15 spleen
Considering food from inventory Coinmasters NPCs. Per-item budget cap is 12500.0.
Retrieval cap is 10000. Price will be a factor if you own it already.
An adventure has the value of 1250 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 14, consuming to 20 with 2516 meat.
0: Song of Glorious Lunch price: 0 value: 7500
1: kumquat lev:2 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:210 own:0 value:2290
2: kumquat lev:2 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:210 own:0 value:2290
3: kumquat lev:2 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:210 own:0 value:2290
4: kumquat lev:2 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:210 own:0 value:2290
5: kumquat lev:2 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:210 own:0 value:2290
6: kumquat lev:2 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:210 own:0 value:2290
spleen: At 0, consuming to 15 with 1256 meat.
Finished.
Spent 1260 meat for a value of 0 meat. Gained Fullness: 6. Inebriety: 0. Spleen: 0.
Adventures: 12. Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
 

Attachments

  • EatDrink.ash
    94.1 KB · Views: 43

Theraze

Active member
Updated to turn the booleans that didn't return anything into voids. Also fixed a spot with continue/break to just continue. Should remove all the warnings/errors that were in the script.
 

Attachments

  • EatDrink.ash
    94.2 KB · Views: 59

adeyke

Member
I haven't really been following this thread, so I might be missing something obvious. I call eatdrink from a script by importing it and executing this:
eatdrink(0, inebriety_limit(), spleen_limit(), false);

What happens, however, is that I have just 12/15 spleen. Most recently, that came from 2 glimmering roc feathers and an agua de vida. My valueOfAdventure is 1300, so it's certainly not the case that there's nothing worth using. Indeed, if I run eatdrink again with the same arguments, it does fill up the spleen (with a prismatic wad). So as a workaround, I could just duplicate that line in my script. That can't be how it should work, though, can it?
 

fronobulax

Developer
Staff member
I haven't really been following this thread, so I might be missing something obvious. I call eatdrink from a script by importing it and executing this:
eatdrink(0, inebriety_limit(), spleen_limit(), false);

What happens, however, is that I have just 12/15 spleen. Most recently, that came from 2 glimmering roc feathers and an agua de vida. My valueOfAdventure is 1300, so it's certainly not the case that there's nothing worth using. Indeed, if I run eatdrink again with the same arguments, it does fill up the spleen (with a prismatic wad). So as a workaround, I could just duplicate that line in my script. That can't be how it should work, though, can it?

I've seen this, complained about it and tweaked parameters to make it go away. eatdrink_stepMeat perhaps? I'm sure Theraze will be along momentarily with a better/complete answer.
 

Theraze

Active member
Yep... you spent your 10000 meat and ran out after buying 2 roc feathers and an agua de vida. Either raise stepMeat to 20000, drop it to -1 (unlimited), or decide how much meat you'd like EatDrink to spend, maximum, for spleen, and set your stepMeat to that. :)
 

Donavin69

Member
I've run the new version for the past couple of days, no new problems, all the voided booleans seem to work for me...

I do have one strange thing, I haven't been able to track down what is causing it yet...if you have any insight, it would be appreciated...

On 2 of my characters, ED will consume and fill me up nicely...on the other 3, it will leave part of my spleen empty (I have the same ZLib settings for ED on all 5 characters)
Sometimes, it will be 3, other times 7 unused spleen...
 

fronobulax

Developer
Staff member
I've run the new version for the past couple of days, no new problems, all the voided booleans seem to work for me...

I do have one strange thing, I haven't been able to track down what is causing it yet...if you have any insight, it would be appreciated...

On 2 of my characters, ED will consume and fill me up nicely...on the other 3, it will leave part of my spleen empty (I have the same ZLib settings for ED on all 5 characters)
Sometimes, it will be 3, other times 7 unused spleen...

I wonder if you are having the same issue that was discussed in the posts immediately before yours? If so the answer is to set stepMeat as discussed above ;-)
 

Donavin69

Member
I've got my step_meat set to 5k, and even re-running it won't fill the spleen, i...and like I said, it is the same setting on all 5 characters...

I'll try bumping it up to 10k, and see if it fills it tomorrow...
 
Top