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

Eats brains for me and hasn't tried to eat or drink anything that doesn't work personally. At least, not that mafia isn't telling it is possible... think that the Gnomish Microbrewery is now known as impossible, but that's the only possible problem with it, and that's a mafia issue, not ED. At least, problem that I've experienced... Anyone else? Problems?
 
One small problem: EatDrink will try to eat Brain meltingly hot chicken wings. Which is pretty amusing.

Personally, I think you should be able to eat them in Zombiecore. :)
 
Was wondering if that would happen. :) So, those aren't edible?

Edit: Appears that all actually edible brains have "brains" in the plural, while the brain-melt wings don't. Attached version checks for plural brains instead of single brain.
 

Attachments

Last edited:
Sadly, they are not. The consumption text could have been so amusing, considering the combination of how precious brains are to zombies and having them melt. Ah well.

The fix works; thanks for the update. :)
 
ED has started preferring scoutmaster water over TPS drinks. Something has reset autoBuyPriceLimit to 1250 which explains it, but I don't know what is resetting it. Any chance a recent ED change zombied it? Character does not ascend and runs no other scripts that have any reason to look at or change the value. If no one else wants to blame ED then I'll look harder but this is the classic "I didn't change anything" so i can hope I'm right.
 
Since ED sets and restores aBPL in a try/finally block, the only way ED could/should be to blame is if you mashed on escape repeatedly, killing the finally section, while it was trying to acquire something (apparently worth 1000 or less, since 1.25 is default flexibility and 1k is minimum value). But that would take mashing the escape key, not just a simple clicking of cancel...

So yes, it can cause that... but only with relatively massive player effort beyond "Oh no, I didn't want it to get that, quick, hit cancel!" levels. :)

Edit: Unrelated to aBPL - This version adds simulating brain consumption when you have Neurogourmet.
 

Attachments

Last edited:
Sure, it has a bunch of fixes like using floats instead of ints for best-adventure comparison and includes ZM support, so that's good.
 
Since 3.1.8 has been released, it must be time to throw out new weird bits. And here we are!

New variable, eatdrink_noNoodles. If set to true, this changes this:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.8).
Consuming up to 20 food, 0 booze, and 0 spleen
Considering food from inventory Hagnk's Coinmasters NPCs the mall. 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. Mysticality subpoint is 10.0. Nonprime stat subpoint is 2.0.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 20 with 20000 meat.
0: milk of magnesium price: 920 value: 24080
0: potion of the field gar price: 8850 value: 9900
1: long pork lasagna lev:10 gain:3.0 adv:19.0 musc:0.0 myst:50.5 mox:0.0 meat:6123 own:0 value:6044
2: long pork lasagna lev:10 gain:3.0 adv:19.0 musc:0.0 myst:50.5 mox:0.0 meat:6123 own:0 value:6044
3: long pork lasagna lev:10 gain:3.0 adv:19.0 musc:0.0 myst:50.5 mox:0.0 meat:6123 own:0 value:6044
4: stinky hi mein lev:7 gain:5.0 adv:25.0 musc:32.5 myst:73.0 mox:17.5 meat:4890 own:5 value:5438
5: herbal stuffing lev:7 gain:4.0 adv:18.0 musc:0.0 myst:0.0 mox:72.5 meat:1990 own:1 value:5163
6: handful of nuts and berries lev:12 gain:1.0 adv:3.5 musc:0.0 myst:55.0 mox:0.0 meat:410 own:3 value:4515
7: handful of nuts and berries lev:12 gain:1.0 adv:3.5 musc:0.0 myst:55.0 mox:0.0 meat:410 own:3 value:4515
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate pasta spoon with a value of -150. That's no good, so not consuming and moving on.
Finished. You had Milk of Magnesium-Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 19369 meat with additional expenditures of 9770 meat. Gained Fullness: 20. Inebriety: 0. Spleen: 0.
Adventures: 127. Muscle: 32. Moxie: 89. Mysticality: 333.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
to this:
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.1.8).
Consuming up to 20 food, 0 booze, and 0 spleen
Considering food from inventory Hagnk's Coinmasters NPCs the mall. 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. Mysticality subpoint is 10.0. Nonprime stat subpoint is 2.0.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 20 with 20000 meat.
0: milk of magnesium price: 920 value: 24080
1: spectral pickle lev:8 gain:4.0 adv:23.0 musc:29.5 myst:29.5 mox:29.5 meat:7750 own:0 value:5353
2: spectral pickle lev:8 gain:4.0 adv:23.0 musc:29.5 myst:29.5 mox:29.5 meat:7750 own:0 value:5353
3: ultrafondue lev:5 gain:3.0 adv:14.5 musc:17.5 myst:17.5 mox:17.5 meat:2799 own:0 value:5190
4: herbal stuffing lev:7 gain:4.0 adv:18.0 musc:0.0 myst:0.0 mox:72.5 meat:1990 own:0 value:5163
5: herbal stuffing lev:7 gain:4.0 adv:18.0 musc:0.0 myst:0.0 mox:72.5 meat:1990 own:0 value:5163
6: bag of QWOP lev:6 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:1700 own:0 value:4550
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate pasta spoon with a value of -150. That's no good, so not consuming and moving on.
Finished. You had Milk of Magnesium-Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 19999 meat with additional expenditures of 920 meat. Gained Fullness: 20. Inebriety: 0. Spleen: 0.
Adventures: 121. Muscle: 75. Moxie: 219. Mysticality: 75.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
Basically, if you're carboloading and want to save up but still use EatDrink, this lets you do it. :)
 

Attachments

An amusing story which is not a veiled request for code changes.

I was running ED. My bartender escaped. ED tried to make a new one but stopped trying because the cost was too high. But it continued drinking, and drinking what I considered lesser drinks, so I aborted. acquire did not get a bartender because of price limits but create made one just fine. I then used it and re-ran. Still going for the lesser drinks but I failed to abort before the drunkenness limit was reached. There was a skewered cherry in inventory but ED apparently did not notice. (It could have been that at this point there wasn't room to drink a cherry bomb or sangria diablo but that was not what I was thinking at the time). I start my runs and then realize the Bugbear Outfit was on (and not the normal adventuring outfit), presumably because of some ingredients purchasing.

So to unwind, the outfit is almost certainly because ED was interrupted. Many scripts have this issue and forcing me to manually check everything after I abort a script is an acceptable solution. Not using the cherry could have been the correct behavior for the drunkenness levels at the time. The bartender situation can probably be addressed by tweaking various settings. What I want is to always use boxen, purchase or create if one explodes and abort if the boxen cannot be repaired/replaced. I suspect the settings are all there and I just have gotten one or more out of whack.
 
Yes... getChef and getBartender will get/install the helpers, but it does require it being within the price range. Should it? We could force it to use buy if the acquire fails and you've enabled the mall.

Regarding the skewered cherry... you've named your problem there. Only the TPS is considered reusable. Once it becomes part of a mixer, it's no longer a TPS, so its cost goes up to 30 million or whatever it is. Believe that was done so that the boolean for item_amount(TPS)>0 could just happen easily rather than having all the potential stages considered. 1 or even 4 isn't too bad, but throw all the booze in there and...

Regarding the bugbear or hippy outfits... not really a good way to do that based on how much code gets run between the two parts. Additionally making it worse, we don't want to run most of the other 'ending' stuff if you've manually aborted. And most people mash on Escape or abort several times, which would abort the finally block anyways, so... I think outfit loss is just one of those things that happens sometimes. However, since we do use mafia's checkpoints, you can restore it with outfit checkpoint, I believe... should do nothing if it aborted gracefully, re-equip your original gear if you jammed out early.

So the only part that I'd heavily consider changing from 1550 would be adding the 'buy' (possibly with a sanity-check of some sort, or even running it through the modified EatDrink acquire code to control max cost but still allow using mafia's own cheapest component code) to the current acquire helper section. Should we do that? If so, what limit (if any) should we impose? 1k? 5k? 10k? 20k?
 
Well no action was requested. But....

I think if I have allowed ED to create boxen for me and the creation attempt fails for whatever reason then I'd like ED to stop, tell me about it and let me decide whether to adjust max price limits, allow creation w/o boxen or whatever.
 
Okay, so this version should have getitem check for if the item it's retrieving actually uses a chef or bartender through the magic of .fullness and .inebriety, where chefs use fullness and bartenders use inebriety. This allows me to employ getitem for chefs and bartenders as well. Currently it's hardlimited to 5k for chefs (about 3.8k in the mall currently) and 30k for bartenders (at 28.5k currently) but that can be changed to whatever we decide. For that matter, if we want to contribute to variable-bloat, we could have 2 more variables possible, but... meh, leaving it hardcoded is probably better for everyone else who doesn't want to deal with more junk in their files.

Eh, there's something else we could do. Could change getChef and getBartender to be ints instead of booleans... if it's true/false then just use aBPL, but if it's a number, use that as the cap for it instead. By doing that, it wouldn't bloat variables any more and we still leave the power easily in the hands of the user.

If we wanted that instead, I'd make false = 0, true = the 5/30k limits mentioned above, positive integers equal the limit for how much to spend, and - integers equal historical_price*PRICE_FLEXIBILITY as their cap (so that if somehow it jumps from 28k to 90k for the bartender, it aborts and gives you some warning). Wouldn't take too much work, but it does mean repurposing those booleans. Let me know. :)

Edit: Fixed the file. Stupid parenthesis.
 

Attachments

Last edited:
I will run with this but it might be a few days before a box explodes...

What is out there that understands the type of a zLib variable? I kind of like re-purposing the booleans to be ints because the script can do so transparently, but is there anything else out there that might know about the type?
 
Well, only other scripts and aliases. How many other scripts would be using the zlib variable eatdrink_getChef? Guessing the answer is none, but... that depends on people's homebrew script collection.
 
Well, only other scripts and aliases. How many other scripts would be using the zlib variable eatdrink_getChef? Guessing the answer is none, but... that depends on people's homebrew script collection.

There are a couple of relay scripts that let you edit zLib variables. One, which I can't recall ATM, is aware of data types, but under the circumstances, retyping and re-purposing makes sense to me.
 
Well, it's aware of data types, but only tangentially... whatever is in there is whatever's supposed to be in there. :) That means if you have T/F, it's a boolean, even if it's actually a text box with 30 different options of while one is either true or false. WOSSMAN, zlib_manager, and ZLibEditor all do as described (detecting type from the field) while relay_zlib just hopes really hard that the documentation map has been updated with the right type.
 
So, two things I need before next upload here.
One, the new Mr. Mediocrebars... Fancy Chocolate counter or do they get their own?
Two, any box explosion yet, especially bartender? Did it work right and rebuild?
 
Back
Top