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

Okay, so here we go... Current fully stacking version:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from inventory Hagnk's the mall. Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
0: milk of magnesium price: 870 value: 2130
1: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:1 value:3498
2: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:1 value:4498
3: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:1 value:4498
4: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:1 value:4498
5: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:1 value:4498
drink: At 0, consuming to 19.
1: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
2: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
3: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
4: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
5: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
6: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
7: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
8: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
9: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
10: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
11: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
12: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
13: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
14: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
15: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
16: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
17: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
18: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
19: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:7 value:2980
spleen: At 0, consuming to 15.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: chocolate turtle totem lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2420 own:0 value:580
Best find was chocolate turtle totem with a value of -420. 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 6880 meat. Gained Fullness: 15. Inebriety: 19. Spleen: 0. Adventures: 127. Muscle: 316. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
And the old, non-stacking version:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from inventory Hagnk's the mall. Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
0: milk of magnesium price: 870 value: 2130
1: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:5 value:3498
2: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:5 value:4498
3: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:5 value:4498
4: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:5 value:4498
5: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:5 value:4498
drink: At 0, consuming to 19.
1: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
2: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
3: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
4: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
5: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
6: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
7: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
8: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
9: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
10: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
11: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
12: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
13: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
14: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
15: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
16: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
17: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
18: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
19: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:25 value:2980
spleen: At 0, consuming to 15.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: chocolate turtle totem lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2420 own:0 value:580
Best find was chocolate turtle totem with a value of -420. 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 6880 meat. Gained Fullness: 15. Inebriety: 19. Spleen: 0. Adventures: 127. Muscle: 316. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

Try it if you like. This version shouldn't ever overdrink. Where it's dumber than the current one is that if a purchase fails, it will skip that item and not add a new one to the stack, since that happens on a different step. There are some other things I'll need to add to it as well, but since it simulates the same as release for me, at least, I suppose other people can find bugs as well. :)

One difference between this and release... the 'own' value displayed at the end is how many you own/have creatable/purchasable AFTER everything is done. So if it displays 0, don't worry about how it got there. :)

One other thing... this actually seemed to be a bit MORE accurate than the release version, since it can actually decrement your inventory as it goes... so instead of thinking I'm going to eat 5 of the insanely spicy bean burritos on my character with a total ability for 4, I only get to eat 4, and the fifth bit of consumption is a ghuol egg quiche. Also, instead of drinking 19 of the 5 Ram's Face Lagers I have, it's going to drink 5, then follow that up with 3 tomato schnaps, 7 grapefruit schnaps, a whiskey and soda, and an imp ale.

Anyways, if you try it, let me know how it goes for you. In general, it should work better, especially in running accurate sims. Regarding the different value on the burrito in the first quote... my guess is that one is created, the others are from inventory, and it's thinking it's cheaper overall to make it. Maybe. :)

Edit: Fixed a few bugs regarding double-decrementing items... there's also the ability to see the stack as it's being created by removing the # in stackone.

Edit2: Removed the attachment, since it has issues with the creatable amount and needing to be run multiple times when ingredients are used between them. Hopefully better script below.
 
Last edited:
The one spot where the script definitely has issues is when two 'best' choices both involve using the same ingredients, but I'm not sure if there's a way to solve that. It mostly comes up in-run when you have one mixer, and it wants to make multiple drinks with it. Same goes with having multiple mixers, just that it's overcommitting.

As I said, not sure if there's a way to solve. I could try to generate an ingredient listing, but that might cause problems in/out of run depending on how it's done. It'll be complicated, but... something like that will probably eventually need to be there. Basically, don't trust the creatable amount when stacking it (after the first), parse through the whole stack, add ingredients, and compare those to your inventory/purchasable (if buying is enabled). That's going to be moderately messy though, and will take me not being sick to work through the proper logic to handle mixed purchase/owned items. Probably need to have it track meat as well, which is good... I'd attempted a meat-tracking in the above script, but it doesn't track the meat until it actually goes to get the item, so...
 
If you want some ideas on how to do that, you can check the build_exec() function in FamiliarFeeder (link in my sig).

Basically, the script works off a map where your inventory is stored, and each time a concoction is added to the list the ingredients are substracted from that map.

Of course, the script completely ignores the mall, but if EatDrink.ash is working with a budget, meat could be substracted instead, and items in your inventory should be considered the same way as ingredients bought in the mall.
 
This should hopefully work. I need to validate it tonight, but it should only add an item to the stack if it actually has the ingredients, and it should now consider that it may have to get/buy/create more than one depending on how many are actually in the stack. My hope tonight is that I don't have to run ED twice on any of the characters. :)

Edit: The problem with doing that, slyz, is that it would make all crafted pies and burritos and the like (namely, anything that takes buying from a store) get removed, which is worse than the current behaviour. What I did instead is ran a retrieve_item against the ingredients map. If it fails, it removes the item from the list of possibilities. If it succeeds, it adds the item to the stack. This should properly remove items when the ingredients run out, I believe...

Edit2: Okay, good/bad on the new version. Bad is that it currently will run retrieve_item on whatever, so it will buy items when simulating. Good is that it's actually accurate for ingredients. I can make it not run retrieve_item on sim, but then it will either estimate high or low, since it won't know about when ingredients run out. Anyways, here's an example. Original version:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's the mall. Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
0: milk of magnesium price: 870 value: 2130
1: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:3498
2: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
3: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
4: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
5: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
drink: At 0, consuming to 19.
1: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:3018
2: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:3018
3: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:3018
4: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:3018
5: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
6: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
7: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
spleen: At 0, consuming to 15.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
At drunkenness of 19. Overdrinking.
1: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:12074
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: chocolate seal-clubbing club lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2495 own:0 value:505
Best find was chocolate seal-clubbing club with a value of -495. 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 10175 meat. Gained Fullness: 15. Inebriety: 23. Spleen: 0. Adventures: 144. Muscle: 172. Moxie: 0. Mysticality: 175.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
You can see that it's using 4 sets of "roll in the hay" though there's only 2 possible... Here's the new script:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's the mall. Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
0: milk of magnesium price: 870 value: 2130
1: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:3498
2: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
3: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
4: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
5: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
drink: At 0, consuming to 19.
1: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:3018
2: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:3018
3: a little sump'm sump'm lev:4 gain:4.0 adv:12.0 musc:0.0 myst:26.0 mox:9.0 meat:1010 own:2 value:3015
4: a little sump'm sump'm lev:4 gain:4.0 adv:12.0 musc:0.0 myst:26.0 mox:9.0 meat:1010 own:2 value:3015
5: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
6: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
7: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
spleen: At 0, consuming to 15.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
At drunkenness of 19. Overdrinking.
1: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:12074
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: chocolate seal-clubbing club lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2495 own:0 value:505
Best find was chocolate seal-clubbing club with a value of -495. 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 10203 meat. Gained Fullness: 15. Inebriety: 23. Spleen: 0. Adventures: 144. Muscle: 172. Moxie: 18. Mysticality: 157.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
You can see that it made 2 "sump'm sump'm" instead of thinking it could just keep making rolls...

Though there's one bug remaining there... it thinks it can make a RitH for overdrinking, though it's actually run out. This is because of the simulation, because it would have created the stack after actually running down the inventory. I think I can fix that by making it not clear the ingredients list when you're running a simulation...
 
Last edited:
New version of the script that should properly continue to add to its ingredients listing when simulating. Better version of the script has been attached, example follows without using a third RitH.
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's the mall. Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
0: milk of magnesium price: 870 value: 2130
1: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:3498
2: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
3: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
4: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
5: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:300 own:23 value:4498
drink: At 0, consuming to 19.
1: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:3018
2: roll in the hay lev:4 gain:4.0 adv:12.0 musc:0.0 myst:35.0 mox:0.0 meat:996 own:2 value:3018
3: a little sump'm sump'm lev:4 gain:4.0 adv:12.0 musc:0.0 myst:26.0 mox:9.0 meat:1010 own:2 value:3015
4: a little sump'm sump'm lev:4 gain:4.0 adv:12.0 musc:0.0 myst:26.0 mox:9.0 meat:1010 own:2 value:3015
5: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
6: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
7: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:85 value:2980
spleen: At 0, consuming to 15.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
At drunkenness of 19. Overdrinking.
1: calle de miel lev:4 gain:4.0 adv:12.0 musc:9.0 myst:0.0 mox:26.0 meat:1180 own:13 value:11962
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: chocolate seal-clubbing club lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2495 own:0 value:505
Best find was chocolate seal-clubbing club with a value of -495. 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 10387 meat. Gained Fullness: 15. Inebriety: 23. Spleen: 0. Adventures: 144. Muscle: 181. Moxie: 44. Mysticality: 122.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

Edit: Okay... the larger patch attached should properly do a speculative VoA based on desired get_meat() / (consumption - current level) which, in the case of someone with 5000 meat on hand, fully drinking to 19 would be 5000 / 19 = 263 for VOA instead of the 500 default. As you're devaluing your VOA, your total adventure count will probably go down... but it will do its comparison and decide if it's worthwhile, then tell you which one it's using and why. It will only pick the speculative stack if it's actually more adventure total than your requested VOA.

What we could do instead is have it run at -100 or something like that until after it's reached /2 levels... so with the person with 500 VOA, it would run 2 speculative stacks at 400 and 300 to decide. If they're at 1000, it would run 5 stacks (900 through 500) instead. This would increase the time for execution, but would give a chance of actually getting positive results. I'm not sure if we care about the speculation though... do people want me to continue pursuing this, or do I scrap that part and just work on the rest of it?

Edit2: One more little note about this. In the course of repeatedly running simulate, noticed that it will go below 0 for simulated meat. Fixed it to actually respect simmeat for milk and mojo filters, but unfortunately there isn't really a great way to make it work in regards for other stuff, because all it knows at the point where it's 'consuming' is that the item is 'worth' some amount of meat, and to subtract that amount from simmeat. Regardless of whether the item is in your inventory, if you purchased it from the mall, or whatever... *sighs*

Edit3: Fixed the item collection bug. EatDrinkN is the version without the speculative, EatDrink is the one with. If you had grabbed the earlier version, dump it and try one of these.

Edit4: Found another bug... the inventory usage overwrote the amount of items already used. -_- Lovely. Anyways, the new scripts should actually work... at least, they successfully ran for me when I didn't have enough to use over and over again.
 

Attachments

Last edited:
Which one would you like to be tested? TL;DR almost applies. A prior version just failed to consume for my HC character but I'll presume that information is too stale to bother posting. I'll try again tomorrow.
 
Yeah, I know that all prior updates yesterday didn't work for actual consume... I was testing them with simconsume, that worked great by the time I posted, but then there were still 2 bugs relating to getting items and knowing that items were in use. Good news though, the ingredient checker worked perfectly. It just didn't know that items that were already in inventory had limits as well.

Attaching a newer version of EatDrink here that shouldn't limit using partially crafted, partially pulled-from-storage or purchased-from-mall items. As well, it shouldn't limit using partially pulled-from-storage with purchased-from-mall, if you've used up your pulls for the day already. While the chance that you'll be able to make the very best item or that you've got the very best item in storage (with limited pulls, but mall access) is relatively low, this version should only set the mustMake and mustPull if they'll actually get your total available above 0. I'll leave the above 2, because they should both work if you'd prefer what I used as opposed to what I'm planning on using tonight.

tl;dr: The version of the script attached to here should be best.
 
You can skip reading this if you don't want to read about the current development. :) Just note that if it works tonight, I'll be attaching a new copy of the script to this post and removing the one from 827.

<verbosity>
Okay, so I've made the system automatically calculate VoA based on going down by 100 every time, as long as the starting VoA is at over 200. Don't want to waste time with 0 value VoAs, since that won't return anything, ever. This seems to work in my testing, though it's failed to ever return a better item.

Unfortunately, I don't have a character that's currently in aftercore, so I can't test mall pricings. This is especially sad because I think I've figured out how to make it actually respect simmeat and track actual meat on hand... at least partially. While I can't tell how much of the ingredients you're needing will actually cost when you get to that step (during the stacking step, as we're planning), I can at least speculate that if it's in your inventory, it won't be costing you anything (except for lost profits selling, but no further cost). This means that if you're running meat-poor, you can simulate and it should actually be able to figure out what you'll be able to afford, instead of suggesting stuff wildly out of your price range.

I've also changed a lot of the messages from verbose to verbose2, especially during the speculation runs. This means that it doesn't take 8 pages of text to go through speculating at a 5k VoA or something similar.

As well, I slightly refactored the ending text. It now gives the display on two lines, with the first containing additionally how much meat it thinks it's spent for how much value. Only value was displayed before, but it called that spent... if it's only simulated meat that's wrong here (saying that items in inventory will cost you meat, directly), I'll likely modify it to only show the spent amount again, and use my slightly more accurate meat bit for display on sim_consumes. Another change to the ending text is that if it did actually use a speculative VoA, it will tell you here which VoA was more efficient for you.

At some point in this, I'm going to have to find an alternative to using retrieve_item so that it doesn't burn down your meat while testing possible ingredients. For now, it works and means you'll definitely be able to craft what you're seeing. Problem is that it will do things like get jalapeno peppers from the hermit (if you have worthless items) and decide they aren't better than your current food, though they're better for some other VoA. This goes for both simulated and actual running of the script. I may try to see if there's a good way to make an ingredients map and run it through the available function, which checks for how many are possible and being used. Then I wouldn't need to run active commands that will cost you meat... Anyways, that's likely to be my next planned step. I believe most of the earlier goals are done now.

And now, an example:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's the mall. Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Moxie subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
0: milk of magnesium price: 870 value: 2130
1: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:395 own:2 value:3388
2: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:395 own:2 value:4388
3: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:395 own:2 value:4388
4: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:395 own:2 value:4388
5: insanely spicy bean burrito lev:4 gain:3.0 adv:10.5 musc:29.5 myst:0.0 mox:0.0 meat:395 own:2 value:4388
drink: At 0, consuming to 19.
1: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
2: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
3: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
4: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
5: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
6: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
7: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
8: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
9: flute of flat champagne lev:2 gain:2.0 adv:4.0 musc:0.0 myst:15.0 mox:0.0 meat:172 own:8 value:2929
10: Ram's Face Lager lev:2 gain:1.0 adv:2.0 musc:9.0 myst:0.0 mox:0.0 meat:110 own:56 value:2908
spleen: At 0, consuming to 15.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
At drunkenness of 19. Overdrinking.
1: rum and cola lev:1 gain:3.0 adv:5.5 musc:0.0 myst:0.0 mox:11.0 meat:175 own:1 value:7435
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate seal-clubbing club with a value of -495. 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 0 meat for a value of 4678 meat. Gained Fullness: 15. Inebriety: 22. Spleen: 0.
Adventures: 132. Muscle: 154. Moxie: 11. Mysticality: 135.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
This was called using the following:
ashq import <EatDrink.ash>; simmeat = 15000; VALUE_OF_ADVENTURE = 1000; SIM_CONSUME=true; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true);
</verbosity>
 
Actually, one of my more recent tests today involved splitting EAT_SHOP and EAT_MALL, so it can figure out which items can be purchased from NPCs as opposed to the mall... but I don't think there's anything that will tell you whether or not you're actually able to buy an item. It's suggesting I buy plums at the moment, though the hippy store is closed...
 
AFAIK I ran the version from 827 and it picked a food, purchased it and then looped. Without digging up the session log, it looked like it decided I should eat a spooky hi-mein. It bought one (but did not consume which is good). It then decided I should eat another one and got caught in a loop because it was trying to acquire 1 and I already had 1. It didn't realize that it really needed two ;-)
 
Hmm... okay, the version I posted there might not have had the change to getone that makes it try to get needed in stack instead of just, 1. I should probably avoid posting up yesterday's copy to this post until I validate that there's nothing else weird and half-formed that's going to screw people over. Namely, I started to try to allow it to use NPC ingredients and food... but unfortunately it doesn't appear mafia has a good way to track whether or not a specific item under the "is_npc_item" function is actually available. :( Not sure yet whether that will be a change that gets reverted or if there's some command (or function someone's written) that will go through the bugbear store, the hippy store, the knob goblin store, and all of the other NPC stores and check them for level, quest requirements, and whatever else they have for availability. :(
 
So, with the new npc_price function I've submitted, EatDrink will actually consider NPC items while in-run, such as in this little bit of a run today:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from inventory Hagnk's NPCs . Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
drink: At 12, consuming to 19.
1: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:0 value:1900
2: fine wine lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:4.0 meat:135 own:0 value:1873
3: shot of tomato schnapps lev:1 gain:1.0 adv:2.0 musc:1.5 myst:1.5 mox:1.5 meat:240 own:0 value:1781
4: shot of grapefruit schnapps lev:1 gain:1.0 adv:2.0 musc:0.0 myst:4.0 mox:0.0 meat:240 own:6 value:1768
5: shot of grapefruit schnapps lev:1 gain:1.0 adv:2.0 musc:0.0 myst:4.0 mox:0.0 meat:240 own:6 value:2768
6: shot of grapefruit schnapps lev:1 gain:1.0 adv:2.0 musc:0.0 myst:4.0 mox:0.0 meat:240 own:6 value:1768
7: shot of grapefruit schnapps lev:1 gain:1.0 adv:2.0 musc:0.0 myst:4.0 mox:0.0 meat:240 own:6 value:2768
spleen: At 5, consuming to 15.
Best find was none with a value of 0. 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 984 meat. Gained Fullness: 0. Inebriety: 7. Spleen: 0.
Adventures: 21. Muscle: 1. Moxie: 8. Mysticality: 16.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
Anyways, with this, I can have it consider ingredients by whether they're in inventory or in the mall... I should no longer need to actually retrieve them to test. I'll work on integrating that new ingredient checker tomorrow, most likely. I'll avoid uploading a new copy until that FReq is either accepted or rejected. If it ends up rejected, I'm stuck using retrieve_item for now...
 
Okay, I've written up two new functions for EatDrink that are closely related... boolean ingredients_have(item, int, int[item]) and int[item] ingredients_add(item, int, int[item]) to replace the retrieve_item call. The way they work is that it calls ingredients_have against an amount of the new item being requested, with the current stack kept under consideration. If the total amount of used items (consumed as is), plus ingredients for prior crafted items, plus the request for an amount of the new item exist using the EatDrink preferences USE_INV, USE_CLOSET, EAT_SHOP, and EAT_MALL then it will return that calculation and add them onto the ingredients stack. This is needed because unlike before with retrieve_item, we haven't actually secured the item we're considering yet.

On my test, it ran exactly the same speculation as my prior stack using retrieve_item except skipping the failed retrieve_item bits where it was trying to decide if it could get something impossible... New:
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 11175 meat for a value of 6937 meat. Gained Fullness: 15. Inebriety: 22. Spleen: 0.
Adventures: 120. Muscle: 137. Moxie: 16. Mysticality: 121.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
Old stack:
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 6937 meat. Gained Fullness: 15. Inebriety: 22. Spleen: 0. Adventures: 120. Muscle: 137. Moxie: 16. Mysticality: 121.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

Edit: I may still tweak the new functions a bit... might allow for constructing ingredients. Currently, if I put that into the existing functions, it goes into an infinite loop. I know why, but I'm trying to decide if it's worth allowing for. :)

Edit2: Okay, scrapped the ingredients_add function, renamed ingredients_have to have_ingredients because it amused me more. Added another variable to have_ingredients for whether we're looping (using the prior stack) or not.
Using get_ingredients to add the ingredients to the actual creation stack, since have_ingredients will parse through the creation or purchase if need be now. Seems to be working properly, but... hey, I get time to test while I use private functions. :)
 
Last edited:
Bit more tweaking to split whether or not it MUST purchase an item from NPCs or if it CAN. This allows for tracking meat on simulated runs, but still allows for a purchased item to be best if you only have a few but not enough to fill your inventory. Here's an example of a recent execution on a meat-poor character. You can see that the estimated meat expendature is lower now... At some point I'm going to have to fix the chocolate handling code to actually be aware of meat limits and the like. Ah well. :) Anyways, standard simmeat = MAXMEAT execution:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's NPCs the mall. Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
0: milk of magnesium price: 878 value: 17122
1: enchanted bean burrito lev:2 gain:3.0 adv:6.0 musc:0.0 myst:15.0 mox:0.0 meat:377 own:0 value:1884
2: enchanted bean burrito lev:2 gain:3.0 adv:6.0 musc:0.0 myst:15.0 mox:0.0 meat:377 own:0 value:2884
3: bean burrito lev:1 gain:3.0 adv:5.5 musc:12.0 myst:0.0 mox:0.0 meat:220 own:39 value:1800
4: bean burrito lev:1 gain:3.0 adv:5.5 musc:12.0 myst:0.0 mox:0.0 meat:220 own:39 value:2800
5: bean burrito lev:1 gain:3.0 adv:5.5 musc:12.0 myst:0.0 mox:0.0 meat:220 own:39 value:2800
drink: At 0, consuming to 19.
1: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
2: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
3: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
4: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
5: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
6: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
7: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
8: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
9: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
10: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
11: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
12: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
13: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
14: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
15: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
16: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
17: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
18: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
19: overpriced "imported" beer lev:1 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:-18 value:2900
spleen: At 0, consuming to 15.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
At drunkenness of 19. Overdrinking.
1: Mad Train wine lev:1 gain:3.0 adv:3.5 musc:0.0 myst:0.0 mox:0.0 meat:100 own:1 value:5400
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: chocolate seal-clubbing club lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2500 own:0 value:500
Best find was chocolate seal-clubbing club with a value of -500. 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 2778 meat for a value of 6792 meat. Gained Fullness: 15. Inebriety: 22. Spleen: 0.
Adventures: 109. Muscle: 36. Moxie: 0. Mysticality: 30.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
And using simmeat = my_meat() (currently 2064... poor, poor character. heh.):
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.3).
Consuming up to 15 food, 19 booze, and 15 spleen and then finishing off with the stiffest drink we can find.
Considering food from inventory Hagnk's NPCs the mall. Per-item budget cap is 12500.0.
Price will be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 1000 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0. Hagnk pulls are limited and their 'cost' is incorporated.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
0: milk of magnesium price: 878 value: 17122
1: enchanted bean burrito lev:2 gain:3.0 adv:6.0 musc:0.0 myst:15.0 mox:0.0 meat:377 own:0 value:1884
2: enchanted bean burrito lev:2 gain:3.0 adv:6.0 musc:0.0 myst:15.0 mox:0.0 meat:377 own:0 value:2884
3: bean burrito lev:1 gain:3.0 adv:5.5 musc:12.0 myst:0.0 mox:0.0 meat:220 own:39 value:1800
4: bean burrito lev:1 gain:3.0 adv:5.5 musc:12.0 myst:0.0 mox:0.0 meat:220 own:39 value:2800
5: bean burrito lev:1 gain:3.0 adv:5.5 musc:12.0 myst:0.0 mox:0.0 meat:220 own:39 value:2800
drink: At 0, consuming to 19.
1: shot of grapefruit schnapps lev:1 gain:1.0 adv:2.0 musc:0.0 myst:4.0 mox:0.0 meat:240 own:3 value:2768
2: shot of grapefruit schnapps lev:1 gain:1.0 adv:2.0 musc:0.0 myst:4.0 mox:0.0 meat:240 own:3 value:2768
3: shot of grapefruit schnapps lev:1 gain:1.0 adv:2.0 musc:0.0 myst:4.0 mox:0.0 meat:240 own:3 value:2768
4: bottle of cooking sherry lev:1 gain:2.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:0 value:2450
5: Imp Ale lev:1 gain:1.0 adv:1.0 musc:7.5 myst:0.0 mox:-5.0 meat:100 own:5 value:1965
6: Imp Ale lev:1 gain:1.0 adv:1.0 musc:7.5 myst:0.0 mox:-5.0 meat:100 own:5 value:1965
7: Imp Ale lev:1 gain:1.0 adv:1.0 musc:7.5 myst:0.0 mox:-5.0 meat:100 own:5 value:1965
8: Imp Ale lev:1 gain:1.0 adv:1.0 musc:7.5 myst:0.0 mox:-5.0 meat:100 own:5 value:1965
9: Imp Ale lev:1 gain:1.0 adv:1.0 musc:7.5 myst:0.0 mox:-5.0 meat:100 own:5 value:1965
10: ice-cold Willer lev:1 gain:1.0 adv:1.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:1 value:1900
11: Mad Train wine lev:1 gain:3.0 adv:3.5 musc:0.0 myst:0.0 mox:0.0 meat:100 own:0 value:1800
12: bottle of rum lev:1 gain:3.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:100 own:9 value:1633
spleen: At 0, consuming to 15.
Best find was none with a value of 0. That's no good, so not consuming and moving on.
At drunkenness of 17. Overdrinking.
1: Mad Train wine lev:1 gain:3.0 adv:3.5 musc:0.0 myst:0.0 mox:0.0 meat:100 own:1 value:5400
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: chocolate seal-clubbing club lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:2500 own:0 value:500
Best find was chocolate seal-clubbing club with a value of -500. 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 878 meat for a value of 6512 meat. Gained Fullness: 15. Inebriety: 20. Spleen: 0.
Adventures: 88. Muscle: 71. Moxie: -25. Mysticality: 42.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
This tells me that tonight, I'm definitely going to be getting to at least 3k meat so I can earn an extra 21 adventures for my consumption. :) Though since I'm in run, I can't actually buy the milk that it thinks I can above... so I'll be fine for getting my 94 adventures (109-15, since no milk).
 
Wow. There's a lot of tl;dr; there, but I take it that reviewing and committing your NPCPrice patch would be much appreciated. Pushing that up higher on my ToDo list. Thanks.
 
Thanks. :) All the tl;dr is basically just to say that I'm still working on it and hopefully around the time the change gets approved and I can put a new version up, I'll have most of the kinks worked out. Latest changes are (definitely) simulating milk availability better, and (hopefully) tracking meat spent on buying crafting components better.

First only applies when simulating (obviously) but should help people to have more parity between sim and actuality, especially since if you're dealing with low-meat, the ~900 meat does make a difference in what is picked.

Second should mean that when you need to buy ingredients like fermenting powder and the wad of dough, the cost of the ingredients are still considered. Hopefully that should skip circumstances like when I neeed to run EatDrink twice yesterday because it ran out of money halfway through the drinking phase.

Anyways, one more interesting bit... did have it calculate 900 VoA as more optimal than 1000 VoA once, but that's the only time I've seen it note cheaper as better yet. Expecting to see it more on my broke character if Valhalla continues, since I've run out of Ram's lager for them to use.

Edit: Tonight's execution showed that ode adventures weren't being calculated. Re-added those using the basic check (have ode and enough max-mp to cast it, means you'll get it).
Another tweak added tonight... new function, unknown_bottle(item) that checks
Code:
  if (get_property("lastDustyBottleReset").to_int() == my_ascensions())
and then checks to see if the item is not one of the 6 dusty bottles. If either happens to be true, it returns false. If it's true, the item doesn't get added to EatDrink's item list. What does this mean for you, the end user? No more dusty-bottle spam when you run EatDrink early in an ascension, before you go wearing the spectacles.
Also set the default simmeat to my_meat instead of MAXMEAT since that's much more likely to be of interest to you... what you'd buy if you had infinite funds might be amusing, but doesn't really help you decide on reality. Much.
If KoL speeds up enough for me to actually play tonight, I'll test some more, else it'll wait for the morning. So far though, in my one check, the drinks selected matched perfectly, and the adventures matched exactly (minus the ode-lack, since fixed). If all stacks remain the same and it's accurate, I'll upload this version. It may not run for more than 3 people besides me yet, but at least we 4 can simulate our eating somewhat accurately. :)
 
Last edited:
Okay... here's the script. Should work, though I did end up having it get stuck on star key lime pie for some reason.

This does also require using the updated zlib with the be_good function, or adding it in manually, but because of it does also work properly with bee-core. For those who might care, here are the aliases I use with this, for testing and actual execution:
eatdrink ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
eatdrinknd ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), 0, spleen_limit(), false);
eatdrinkne ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(0, inebriety_limit(), spleen_limit(), false);
eatdrinkod ashq import <EatDrink.ash>; SIM_CONSUME=false; eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true);
seatdrink ashq import <EatDrink.ash>; SIM_CONSUME=true; simfullness = my_fullness(); siminebriety = my_inebriety(); simspleen = my_spleen_use(); eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
seatdrinknd ashq import <EatDrink.ash>; SIM_CONSUME=true; simfullness = my_fullness(); siminebriety = my_inebriety(); simspleen = my_spleen_use(); eatdrink(fullness_limit(), 0, spleen_limit(), false);
seatdrinkne ashq import <EatDrink.ash>; SIM_CONSUME=true; simfullness = my_fullness(); siminebriety = my_inebriety(); simspleen = my_spleen_use(); eatdrink(0, inebriety_limit(), spleen_limit(), false);
seatdrinkod ashq import <EatDrink.ash>; SIM_CONSUME=true; simfullness = my_fullness(); siminebriety = my_inebriety(); simspleen = my_spleen_use(); eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), true);
eatdrink = full
eatdrinkn(o)e(ating) = full drink/spleen
eatdrinkn(o)d(rinking) = full appetite/spleen
eatdrinko(ver)d(rink) = full, with overdrink.
Put a 's' on front to simulate, so seatdrink should simulate a full execution using your current doneness and other such states...
 
Running your version. No problems with two characters and was pleased to see it choosing some Crimbo food that the other version seemed to ignore while in inventory.

Third character has problems. First, it keeps prompting me about eating without milk. The old version silently buys and uses milk. Have not looked to figure out why. Second, it has a problem with TPS drinks. It made one, thought a second one would be a good choice and tried to buy it from the mall. I suspect the problem is in the create than consume logic. You cannot do that for TPS drinks unless you have more than one TPS. Not sure how you want to handle that but the current technique needs some more thought. Finally it acquired and consumed the spleen items one at a time. Eventually I would expect it to acquire them all and then consume them and I don't know whether this is a "bug" or a to be implemented capability.
 
Odd on spleen, since that uses the same stacking logic that the others do. Chocolates are old-code, so that would be one at a time, but spleen? That should be handled already. :|

Yes, I need to eventually make a list of items that need to be immediately consumed if created. Far as I know, this basically consists of key lime pies and TPS drinks. Anything else that has items that come back to you when you finish it? I've noted that KLP will only make one and then skip on to the next... hasn't tried to cause problems for me, but then I haven't used it in aftercore for a while, so it's working based on what I can actually make, not what I can buy.
 
Back
Top