Giter VIP home page Giter VIP logo

consume.ash's Introduction

CONSUME.ash

CONSUME.ash is a script that will handle your diet in Kingdom of Loathing for you.

Installation

Run this command in the graphical CLI:

git checkout soolar/CONSUME.ash

Will require a recent build of KoLMafia.

Usage

First, work out how much meat an adventure is worth to you, and then enter

set valueOfAdventure=that number

After that, type CONSUME HELP in the gCLI to get a list of what you can do. The output from CONSUME SIM can simply be copy/pasted in to the gCLI, if you so desire, but repeat runs within the same session barely take any additional time, so running CONSUME ALL after CONSUME SIM should be fine.

You can also set CONSUME.BASEMEAT to the base meat of whatever zone you meatfarm (if you meatfarm) in order to have CONSUME consider the value of meat buffs in your diet. So far it only supports sweet synthesis, but more is coming soon! As an example:

set CONSUME.BASEMEAT=275

is what you would want to do if you are farming barf mountain and have the songboom boombox.

Supported

  • General diet
  • Nightcapping
  • Saucemaven
  • Pizza Lover
  • Potion of the field gar
  • Mojo filters
  • Spice melange
  • Ultra Mega Sour Ball
  • Sweet Synthesis (optional)
  • Mayoflex
  • Frosty's Frosty Mug
  • Ol' Scratch's Salad Fork
  • Fudge Spork
  • Special Seasoning
  • Milk of Magnesium
  • The Ode to Booze
  • Mime army shotglass
  • All chocolates other than LOV Extraterrestrial Chocolate (for now).
  • Organ cleaning consumables (hobopolis/batfellow consumables)
  • Considers cost of ingredients to make an item
  • Essential tofu
  • Ancestral Recall
  • Alien plant pod
  • Alien animal milk
  • Hunger™ Sauce
  • cuppa Voraci tea
  • cuppa Sobrie tea
  • sweet tooth
  • lupine appetite hormones
  • Universal Seasoning
  • Meteorite Ade
  • Jerks' Health™ Magazine
  • synthetic dog hair pill (from Map to Safety Shelter Grimace Prime)
  • distention pill (from Map to Safety Shelter Grimace Prime)
  • Drip consumables (nugget/wine/caviar/plum(?)/pilsner)
  • whet stone
  • Sweat Out Some Booze (from designer sweatpants)
  • Aug. 16th: Roller Coaster Day! (from august scepter)
  • extra time
  • Stooper (when nightcapping)
  • Maximizing for hp, hot res, and cold res if using any forks or mugs
  • Restoring equipment to how it was before running the script if anything changed

Calculating valueOfAdventure

valueOfAdventure can be a little tricky to get right. Contrary to popular belief, it is NOT your gross profit divided by your # of adventures spent. It should actually represent your worst case MPA, the MPA you achieve after any buffs that don't last all day have worn off, because that's what you'r going to get from any extra adventures that you add on to your diet.

First, look at your +meat% at the end of a day of farming. This is on top of the base 100% meat you get from a monster without any +meat%, so add 100%. Multiply this (the % number divided by 100) by the base meat of the area you farm. Then, add any additional meat sources you have, such as screege's spectacles. This should get you what you need to set valueOfAdventure to for optimal results.

For example:

Let's say I have 1000% +meat drops, and am farming barf mountain with songboom. Barf mountain's base meat is 250, and songboom adds 25 to this, so you would first multiply 275 by 11 to get 3025.

Now for the tricky part. We need to add every additional source of meat from our shiny toys. First of all, the widely popular mafia pointer finger ring. This does NOT count the songboom addition to +meat, but is otherwise 200% meat dropped on a crit on average, so add 500 for 3525.

Next, Mr. Screege's spectacles. Between the meat items it drops and the pure meat it drops, from what I hear it drops an average of roughly 180 MPA, besides the +meat if provides (already factored in), so add 180 for 4325.

Next, lets consider the songboom's gathered meatclip drops. These give an average of 520 meat according to the wiki, and drop every 11th combat. That gives us roughly 47 MPA, so now we're up to 4372.

Moving along, the meat provided by the dark horse from the horsery. This grants 10-15 meat per combat, for an average of 13ish (I rounded down on the meat clip, so I'm rounding up here). Now we're at 4385 MPA.

Next, let's look at the drops from the Robortender, from giving it a Feliz Navidad. Frankly, I have absolutely no idea how much MPA this adds. Candy is worth a decent bit though since the advent of Sweet Synthesis. Going by a brief grepping of my log files, it looks like the robort drops candy roughly... a quarter of the time? Let's go with that. Candy can be worth anywhere from 400 to 3000 meat, give or take. Let's err on the side of caution and say that on average it will probably be around 1000 meat or so, which means this is another 250 MPA. Up to 4635 MPA.

The robort also drops stuff from I Refuse! if you feed it a hobo drink. Most of this stuff is truly worthless though, so I'm not even going to bother accounting for it. Still worth it though, since you can get urinal cakes to throw at people.

Next up is the buddy bjorn. The best bjorn familiar (to my understanding) is the warbear drone. This drops a warbear whosit every 4th or 5th combat, and those sell for about 885 at the time of this writing, so that averages to 197 MPA. Now we're at 4832.

Now, normal barrels from the shrine of the barrel god. Grepping my logs shows something along the lines of a 1/10 drop rate. Most of the drops from a normal barrel sell for 115 meat, so let's just call it 11.5 meat, and round that to 12. Now we're at 4844.

Finally, hilarious drops from pantogram pants. There's roughly a 1/20 chance for a drop, and a 1/23 chance for that to be a fake hand. Fake hands go for 60k meat on the low end, so that's about 130 MPA. We're at 4974.

Now, we have to account for the fact that 1/30 adventures are replaced with a non-combat. Multiply the results by 29/30, and add 1/30 times 1750, the average yield of the noncombat. That puts us squarely at 4867 meat or so.

Lastly, we can multiply this by 1.05 if you use the mafia thumb ring, since that gives an extra adventure 5% of the time. Final result is 5110 MPA.

After accounting for everything other than just the base meat, we've gone up by a whopping 2085 MPA.

Obviously not everyone has every shiny listed here, so you'll have to work out your MPA on your own based on this example. I also don't have every shiny that exists, so I may have missed some things too. But hopefully this example makes it completely clear how to find out your valueOfAdventure on your own!

Special Thanks

I'm writing this script for my own sake, but my clannies at Reddit United have been very supportive!

Especially Rag Nymph (#2662313), JorGen Van Doe (#3069483), aurumbos (#2343846), Lyft (#3045223), and LordHaplo (#3165152), all of whom have made my time all the more worthwhile with their kind donations!

consume.ash's People

Contributors

malibu-stacey avatar mattgiltaji avatar soolar avatar taltamir avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

consume.ash's Issues

Handle some untradeable items

They're not tradeable, so using them will have to just be a preference, rather than based on mall value.

Main targets:

  • distention pill
  • synthetic dog hair pill
  • LOV Extraterrestrial Chocolate

Getting a scripit error

The script won't run the error i'm getting is
Calling undefined user function: get_fites (CONSUME.ash, line 262)   at evaluate_consumables (CONSUME.ash:262)   at main (CONSUME.ash:1262
idk why its doing i'm trying this on latest build of kol witich is r20585.

Handle PVP fight generating items

Set up a variable for valueOfPvpFight or something along those lines, and consider such items. Special mention goes to shot of kardashian gin.

Spice melange as nightcap

Possibly consider having the "nightcap" flag, disallow CONSUME choosing spice melange as part of nightcap diet. Or if now that, then add a new flag that we can call that does not allow CONSUME to choose a spice melange.

Does not respect if Doc Clock's Tyme Cocktail was consumed already

> get _docClocksThymeCocktailDrunk

true

> CONSUME VALUE 15000 ALL SIM

Your ideal diet: acquire 1 Doc Clock's thyme cocktail; acquire 1 Special Seasoning; closet put 1 Special Seasoning; acquire 1 plain calzone; acquire 1 whet stone; drink Doc Clock's thyme cocktail; closet take Special Seasoning; use whet stone; eat plain calzone;
This should cost roughly 278,553 meat
Adventure yield should be roughly 49-54
That's an average profit of 816,333
Including adventures you already have, you should profit 12,561,333 today
In total, you're filling up 2 fullness, 4 liver, and 0 spleen

Consider deep dish / calzone / pizza of legend

These have some of the best per-fullness adventure gain, but it seems they're not being considered atm, presumably because they're once-per-ascension.

If nothing else, there should be an ASCEND flag akin to garbo that includes items like this.

Optimize spleen cleaning a little better

Currently, if the best spleen consumable is, for example, a size 10 blood-drive sticker, the diet will have one of those followed by the remaining 5 or however much spleen space filled up. Then it will clean out organs with sliders and pickle juice (if your valueOfAdventure is appropriate for that) and do the same.

It would be better to chew a blood-drive sticker, then eat two sliders, then chew another, then eat a slider and drink a pickle juice, then chew another, then drink two more pickle juice, chew another, and so on, only using non-blood-drive sticker spleenies once there's absolutely no other option.

Feature Request: Switch familiar back after doing a NIGHTCAP

When performing a command like CONSUME SIM VALUE 5400 NIGHTCAP it successfully generates a set of instructions which will perform the correct overdrinking and nightcapping based on the presumed value per adventure. It takes advantage of having the Stooper familiar by switching to it and drinking a 1-drunkenness drink before drinking the nightcap. At the end though, it does not switch back to whatever familiar was being used. This is not necessarily a problem, but it introduces the need to manually switch back to my previous familiar (In this case a lefty holding a +adv off-hand item).

CONSUME is trying to chew Breathetastic™ Premium Canned Air

Starting today, CONSUME has been trying to chew Premium Canned Air for absolutely ridiculous negative profits. Not sure what happened and how to fix.

> set valueOfAdventure=2000

> set CONSUME.BASEMEAT=0

> CONSUME SIM

Your ideal diet: acquire 3 Breathetastic™ Premium Canned Air; chew 3 Breathetastic™ Premium Canned Air;
This should cost roughly 2.249.997 meat
Adventure yield should be roughly 60-75
That's an average profit of -2.114.997
Including adventures you already have, you should profit -2.114.997 today
In total, you're filling up 0 fullness, 0 liver, and 15 spleen

Aside from that, thanks for the great script! Love it.

CONSUME assumes adv gain from milk of magnesium even if it is not being used

CONSUME script accounts for the 5 extra adventures even if the diet actions don't end up including milk of magnesium (eg. when you're eating on an extreme budget).

This leads to incorrect estimates of adventure gain. You can test it out by hand crafting a diet like so:

record Diet
actions => aggregate DietAction [int]
  0 => record DietAction
    it => sausage without a cause
    sk => none
    organ => 1
    space => 10
    tools => aggregate item [int]
    mayo => none
    cleanings => aggregate OrganCleaning [int]
    shrug => none
  1 => record DietAction
    it => fusilli marrownarrow
    sk => none
    organ => 1
    space => 5
    tools => aggregate item [int]
    mayo => none
    cleanings => aggregate OrganCleaning [int]
    shrug => none
counts => aggregate int [item]
  fusilli marrownarrow => 1
  sausage without a cause => 1
lastmayo => none
nightcap => false

When you print this diet out, it will say "Adventure yield should be roughly 71-74" whereas it should say "Adventure yield should be roughly 66-69".

The 5 extra adventures should only be included if the diet contains a 'milk of magnesium' action, not simply because the Diet contains DietActions of the stomach.

Probably also affects 'potion of the field gar' handling as well.

Organ limits don't appear to work

> get valueOfAdventure

3400

> CONSUME ORGANS 15 21 14

Your ideal diet: acquire 1 milk of magnesium; acquire 3 Ol' Scratch's salad fork; acquire 7 Frosty's frosty mug; acquire 3 extra-greasy slider; acquire 2 chocolate pasta spoon; acquire 6 beastly paste; acquire 5 octolus oculus; acquire 7 perfect cosmopolitan; acquire 1 Gnollish sangria; acquire 3 Special Seasoning; checkpoint; cast 2 The Ode to Booze; use milk of magnesium; maximize hp,10cold res,10hot res; drink Gnollish sangria; chew 3 beastly paste; chew 2 octolus oculus; eat 3 Ol' Scratch's salad fork; eat 3 extra-greasy slider; drink 7 Frosty's frosty mug; drink 7 perfect cosmopolitan; chew 3 beastly paste; chew 3 octolus oculus; use 2 chocolate pasta spoon; familiar Hobo Monkey; outfit checkpoint;
This should cost roughly 352,994 meat
Adventure yield should be roughly 394-442
That's an average profit of 1,111,356
Including adventures you already have, you should profit 1,651,956 today
In total, you're filling up 15 fullness, 22 liver, and 29 spleen

Note that 'chew 3 beastly paste; chew 3 octolus oculus' will give 15 spleen; the diet ends with that line so it's guaranteed to result in 15 spleen used total at the end. Perhaps I'm misinterpreting how the limit is meant to work? It appears to be a limit applied prior to spleen cleaning.

CONSUME casts Aug. 16th: Roller Coaster Day! even when fullness is over 15

When breaking the prism in shrunken path, 2 fullness becomes 20. This is commonly done to maximize turngen by consuming EPIC food such as * of Legend prior to prism break.

CONSUME casts Aug. 16th: Roller Coaster Day! to reduce fullness to 19, but it does nothing but waste an august spell

Expected experience:

Aug. 16th: Roller Coaster Day! is not cast if fullness is already greater than max.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.