My personal Meat farming script

Veracity

Developer
Staff member
Sorry about that. Revision 10 checks the chatLiterate property and won't try to fax if it is false.

Perhaps chat_private() could return an indication of success, rather than void, but no. It checks chatLiterate and just returns.
 

fronobulax

Developer
Staff member
So...

I just realized that requesting a monster via faxbot requires chat but getting a fax (of whatever monster is already there) just needs a VIP key.

My chatless char is perfectly willing to use whatever is in the fax machine and, given that it is usually an embezzler, would love to do that after VMF has maximized meat drops. Every little bit counts, right?

Given that VMF has turned into my "do these things every day in aftercore" script I have a niche feature request :)

Possibility #1 - allow VMF to get whatever is in the fax machine and fight it, if the specified fax target cannot be requested.

Possibility #2 - have VMF check the fax machine and not request a fax if the target monster is already there, just fight it.

I know it is possible to find what is in the fax machine because the relay script clan_viplounge.ash from rlbond86 circa 2014 gets the monster name from the photocopy description.

Thank you.
 

Veracity

Developer
Staff member
I think this is a fine idea. I know that the new code tries to receive a fax in order to check what is there in order to detect if the faxbot has delivered it, rather than actually detecting the incoming fax.

It would be reasonable to check the existing fax and be happy and there not bother to chat_private the faxbot. That will help everybody.

May I suggest that you make an Issue on the GitHub repository to track this? When I get back, I will be doing two chores right away:

1) Removing the "To Do" list from the script and making them all into "issues", with full explanations of what I am thinking.
2) Starting to create an exhaustive README.txt by explaining what, exactly, the intent of this script is, and what you need to do to get going.
 

Veracity

Developer
Staff member
Having recently discovered Discord (which, near as I can tell, is a "chat system with history"), I saw a post describing another farming script as a "strict superset of VMF".

That is provably false. A précis of VMF is "do everything Veracity wants to do every day with the absolute minimum of interaction - once I have configured exactly what tasks I want it to do - and spend any additional turns simply farming in Barf Mountain" - again, allowing configuration of how to do that. (Which is why I never use Daily Deeds; they are all coded into VMF for me.)

And if it is helpful to other people, great! I am happy to make improvements to make it even better for them.

Also, as originally announced, "Provide code to do all sorts of KoL actions that demonstrate how _I_ would approach the problem, which might be useful for other scripts to steal and/or learn from." Caveat: I have learned a lot since I started this and early code has not necessarily been modified to use that learning.

By "absolute minimum of interaction", I mean:

1) Log in
2) Click side button #3, which runs VMF
3) When it finishes, log out.

Why is the other script not a "strict superset"?

1) It does things that I do NOT want it to do - which are reasonable defaults if the ONLY thing you want to do is maximize Meat.
For example, my main wants to fax in a black crayon penguin or constellation and farm Robortender drops using free turns for the things I want to lubricate my Robortender with. As opposed to embezzlers, which is the default because it is probably what everyone else wants.
2) It doesn't do things I DO want it to do. For example, call my Spacegate script to explore a random planet. I have 5 characters with that IOTM and I have been working for many years to build my Spacegate planet database. It takes turns, which do not generate Meat .
3) The other script seems to consider the mall price of an item as income. Since I have zero interest in pricing items in my mall store and monitoring sales and maybe repricing if I over priced them, and so on, that's not useful - to me.

I expect the other script does things I have on my "To Do" list. Like, say, reminiscing (in addition to or instead of Faxing), and then Digitizing and/or backing up, say. I bet a lot of people would do that on embezzlers - just like VMF's default for fax/putty/rain-doh - and that's fine. I might use Witchess Knights - free fights with a guaranteed drop which happens to be a very nice meat drop food. It's on my To Do list to figure out how to configure it and then actually do it reasonably.

Advantages of the other script:

1) It has more than one person working on it. Hence, it gets features added to it sooner.

Disadvantages of the other script:

1) It is written in a language that I find incomprehensible, which means that I cannot modify it. But, that's a "me" problem, not actually a "disadvantage". :)

Net result is that I am firm in my belief that "the other script is not for me." Which says nothing whatsoever about its suitability for others.

Regarding Discord: I HATE interacting with other people on chat. Having history is nice - but with N different conversations going on at the same time, unless you are actively chatting with somebody, it is a lot of work figuring out which messages are part of a "thread". I vastly prefer a forum with each post as a part of a thread, rather than a chat "channel" - like a sub-forum - where all threads are intermingled.
 
I am a big fan of VMF, even if it does not suit my needs entirely. I really appreciate the modular nature of the script.

A few of the biggest features of the other script that VMF lacks, as far as I see it, are:
* Wanderer management (you mentioned this), which the other script will use to get Guzzlr bucks (and other things, such as lovebug currency)
* Additional copying of Embezzlers through Extrovermectin (each extrovermectin used results in up to 4 additional embezzlers copied). I think it may also use other copies that VMF doesn't, because I haven't read through it in a while.
* Yachtzee!, which is a noncombat that gives you meat based on your +meat% and has a base drop value of 2000, so you can pump it up to absurd values. This can be repeatedly forced through Clara's bell, Spikolodon spikes, Cincho de Mayo, and Stench Jellies.
* Knapsack based diet solving that takes advantage of how many Embezzlers you plan to fight/Yachtzees you plan to force to plan for an optimal diet (for example, sometimes it will pick Tempura Cauliflower, which is only cost effective if you are planning to fight at least a certain number of embezzlers)

These are things that would be in pursuit of the goal of "generating as much liquid meat as possible", but I do realize that some of them are against some of the points you made. After all, VMF is your personal farming script, and it can and should work exactly the way you want it to.

garbo is really complicated, but it has been built heavily on the great groundwork that you laid, and I think everyone who uses it should be grateful for all the hard work you continue to put into VMF
 
Last edited:

Veracity

Developer
Staff member
Extrovermectin, eh? Yeah, when I ascend under current Standard restrictions, I use the CMC and model train set, and make heavy use of Breathitin and Extrovermectin.

It uses a spleen, so would be a trade-off when you are also using Sweet Synthesis.

It's also not cheap, but I could see how it could be useful. And if the CMC is an available worksheet item, I could see how you could even include it in a worksheet regime (VMF currently supports Mayo Clinic, spinning wheel, and model train set) and farm 5 a day at Barf (which is indoors), perhaps.

Complicated. I'm not going to add it immediately to my "To Do" list. :)
 

xKiv

Active member
Regarding Discord: I HATE interacting with other people on chat. Having history is nice - but with N different conversations going on at the same time, unless you are actively chatting with somebody, it is a lot of work figuring out which messages are part of a "thread". I vastly prefer a forum with each post as a part of a thread, rather than a chat "channel" - like a sub-forum - where all threads are intermingled.

I think discord *does* in fact have threads now (like, they implemented a decent way to present threads in the past year or so), but the UX is not really that great, and people are not used to using them.
 

MCroft

Developer
Staff member
While it's mostly cosmetic, I think having a relay script for configuration is more accessible to non-scripters. It does require keeping your configuration as user preferences.
 

Veracity

Developer
Staff member
All my scripts keep their configuration as user preferences. That's what vprops does.
That could be an interesting project.
 

fronobulax

Developer
Staff member
All my scripts keep their configuration as user preferences. That's what vprops does.
That could be an interesting project.
@zarqon 's PrefRefPlus might be of interest. Your naming convention makes it trivial for PrefRefPlus to find preferences (for your scripts) which are not at the default but what I would love would be something that displayed all of your preferences and values, tagging which ones were (or were not) at the default.
 

Veracity

Developer
Staff member
Of my various scripts:

VSG (Spacegate) and VSR (ShadowRift) have configuration properties and also a command line, which can set (some of) the properties.
(Related: I have an open feature request suggesting that I'd like ASH scripts to be able to have an optional argument that accepts the whole command line, rather than the presence of parameters to main() ALWAYS prompting if you don't give an on the command line. How do JS scripts work? Do they have a main() program which gets the command line?)

VGC (Gingerbread City) has a standalone configuration script. That should be replaced by a relay configuration script.

VGH (Garden Harvester) should have a relay script with a dropdown for each garden type where you can select which crop you want, which is then assembled into the single property that is a list (set?) of crops.

VMH has an immense number of properties, grouped, more-or-less, by IOTM

vprops supports basic data types, sets thereof, and lists thereof. A relay script might want to use radio buttons, checkboxes, dropdowns, free form text fields, and so on. Might be nice to have a "card" style GUI (a la Item Manager or Coinmasters) where you can select groups of related properties for configuration. Also, an introductory paragraph (but more terse?) like the comments I put in front of (groups of) configuration properties in the script itself.

I'll look at PrefRefPlus, but I suspect I'll want more control over showing documentation for property groups, for example.

Interesting interaction between:
- comments in the source code - necessary for script readers/coders
- README.md on GitHub - necessary for script users
- configuration relay script - icing on the cake for script users

I'll be home a week from today. Until then, I guess I can think about a specification for this kind of facility, but, the design and coding won't start until then, at least.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
How do JS scripts work? Do they have a main() program which gets the command line?)
Precisely that, main just gets the command run as a string, with no prompting.
 

Veracity

Developer
Staff member
I'm working on adding parameters to this script to control its operation for individual runs, rather than having to depend on configuration. Remember how I added a configuration variable to make it stop after the initial tasks, before entering the farming loop, so we could farm the Crimbo Train? That kind of thing: simply invoking via "VeracityMeatFarm nofarm" will do that.

Here are my current thoughts:

Code:
// This script will parse (optional) parameters off of the command line.
// If invoked with no parameters, configuration properties control everything.
// Otherwise, whole sections of control flow can be disabled.
//
// VMF can handle a lot of daily tasks for you.
// 
// 1) It does some of them before entering the farming loop.
//
//    consumption - eat, drink, and spleen to maximize adventures
//    item and skill usage to enhance meat and/or item farming
//    special familiar preparation
//    workshed manipulation
//    free fights
//    garden management
//    configured scripts for special adventuring (Spacegate, Gingerbread City)
//
// 2) All remaining turns are consumed farming in the location you have configured.
//
// 3) It does some tasks at the end of the day.
//
//    dispose of loot acquired from farming
//    daily tasks that can don't require turns or can be done while drunk
//    drink a nightcap
//    use up free rests and burn MP
//    workshed manipulation
//    do breakfast
//    dispose of breakfast loot
//    maximize adventures for rollover
//
// *** Most of the post-farming behaviour could be done before farming.
// *** I think it should be, so that if your farming is interrupted,
// *** essentially all of the once-per-day stuff will already be done.
//
// Proposal:
//
// 1) also includes:
//
//    daily tasks that can don't require turns or can be done while drunk
//    do breakfast
//    dispose of breakfast loot
//
// 3) reduced to:
// 
//    dispose of loot acquired from farming
//    use up free rests and burn MP
//    workshed manipulation
//    make and drink nightcap
//    maximize adventures for rollover
//
// Parameters that affect that control flow:
//
// nofarm
//
// The user wants VMF to do all the daily tasks, as configured, and then
// stop before entering the farming loop. Perhaps they want to spend
// their turns farming Crimbo or doing some other special project?
//
// This means doing section 1 only and then exiting before entering
// farming loop. Additional optional parameters can fine0tune some
// aspects of this:
//
// synthesis=default    Use Sweet Synthesis as configured by properties
// synthesis=none       Use spleen only for numberology and adventures
//                      Still obey VMF.SynthesizeItemDropForFreeFights
//                      since we will be doing the free fights
// synthesis=meat       Use Sweet Synthesis for Synthesis: Greed
// synthesis=items      Use Sweet Synthesis for Synthesis: Collection
//
// nofamiliars          Use default meat/item familiars rather than using
//                      resources to lubricate a Robortender or get outfits
//                      for a Trick-or-Treating Tot.
//
// Once you have done section 1 (via nofarm) and have used asy many
// turns as you desire for special projects, running VMF again with no
// parameters will run through sections 1, 2, and 3 as normal.
//
// Section 1 should be a no-op, since the script is coded to handle
// being run repeatedly; anything you've already done (and which is no
// longer available) will be skipped.
//
// Section 2 will be a no-op unless you have turns left, in which case,
// it will farm as usual to consume those turns.
//
// Section 3 will be run as normal.
//
// ascend
//
// If you intend to ascend after running VMF and using up your daily
// resources, specific parts of sections 1, 2, and 3 will be omitted:
//
//     do not make or consume nightcap
//     Use "garden pick" rather than calling Garden Harvester

Note that I propose moving almost all the stuff we do post-farming (section 3) into pre-farming (section 1). That will make it take a lot longer to actually get to work farming; whitelisting to BAFH to consult with Zatara, for example takes time.

I've coded up parameter parsing:

Code:
> VeracityMeatFarm help

VeracityMeatFarm PARAM...
    nofarm - Do all daily tasks but stop before entering farming loop.
    ascend - you want to ascend after this script, so no nightcaps
    synthesize=TYPE
        none - use spleen for numberology and turns
        meat - as above, but also Synthesis: Greed
        items - as above, but also Synthesis: Collection
    nofamiliar - use default meat/item familiars

Ideas, suggestions, and opinions are welcome.
Especially about the task reordering proposal.
 

Magus_Prime

Well-known member
I like many things about the proposed reordering of tasks; the "ascend", and Sweet Synthesis tuning parameters in particular. I see no negatives to the changes. I'll think about this some more over the next few days.
 

Veracity

Developer
Staff member
I can't tell you how many times I have run VMF before ascending and been consterned as I watched VGH fertilize my mushroom garden
 

Veracity

Developer
Staff member
I've done this and did a lot of testing with multiple characters.
Looking good to me, although bug reports are welcome, as always.

I noticed the bugs through my own operation:

- My only multi without Olfaction is using "bountiful" to collect about 2 1/3 lucre a day. Twice, so far, it got the bounty in Mt. Molehill - and finished without using up the required turns there. Arguably, that script should finish up. (I love the script, but I have a few Issues to open for it. Or maybe even PRs.) Definitely, I should have noticed before running VMF. And definitely, VMF should not have done (some of) my pre-adventure actions before discovering it could not farm and then overdrinking and leaving me with 400 or so unused adventures. :(
- During Crimbo farming last/this year, I aborted the script while it had the Stooper equipped - and when I restarted it, it didn't behave as hoped/expected.

Here is the text from the PR for revision 13:

-----

Bugs:
  1. If we are in a Limitmode (for example, Shape of....Mole!), bail before attempting to do anything, since you cannot adventure anywhere until the Limitmode is cleared.
  2. If you happen to have your Stooper equipped when it is time to drink your nightcap, note the fact that your inebriety is already one higher than normal.
Refactoring:
  1. Control flow is now in three distinct phases:
  • Phase 1 does all of your daily tasks prior to farming
  • Phase 2 uses all remaining turns farming at your configured location
  • Phase 3 does the remaining handful of things you need to do to be ready for rollover
Side effects:
  • breakfast is now the last action in Phase 1, rather than one of many things done in Phase 3
  • Your nightcap is only acquired/crafted during Phase 3, just before it is consumed.
    --> This means it had better not require turns to craft.
Features:
  1. Allow optional parameters
  • nofarm - Do only Phase 1 actions; exit before farming, so you can do Crimbo farming, say
  • ascend - You intend to ascend after running this script, so do not drink a nightcap and do not call Garden Harvester. (Before you go through the gash, KoLmafia itself will pick your garden.)
  • synthesize=TYPE
    --> none - spleen for numberology and turns
    --> meat - spleen for numberology and meat, and then turns
    --> items - spleen for numberology and items, and then turns
  • nofamiliars - rather than using specific familiars you have selected for farming, the script will pick meat and item familiars from what you have available.
  1. Add vmf.ash, which is simply a wrapper for VeracityMeatFarm with an easier to type name.
    It accepts optional parameters and then just calls VeracityMeatFarm.
    --> If you have such a wrapper script of your own, stash it before updating. You can merge your script as needed and put a copy into the git repository, so "git update" will keep it merged, if needed.
Use cases:

vmf

Run the script, completely controlled by configuration, as before.

vmf ascend
(ascend)

Run all three phases of the script, but do not drink a nightcap or fertilize your mushroom garden.
Jump the gash. KoLmafia will pick your garden.

vmf nofarm synthesize=items
(custom adventuring)
vmf

Run the script and do all your daily actions.
Sweet Synthesis will focus on Item Drop - which might be useful for special farming
(Do special farming)
Run the script and prepare for rollover

Note that you can add "ascend" to both of those vmf commands if you want to do special farming today and also ascend today.
 
Last edited:

Magus_Prime

Well-known member
Would you entertain, as a feature request. the ability to configure, as a VMF option, the ability to switch to a named mood when running the script. I'd be happy with a single option rather than one for different sections of VMF's adventuring actions.

I've lost track of the number of times when the following happens:
  • Finish a run
  • Pull everything from storage
  • Fire off VMF
  • VMF finishes
  • Notice that I was still running the mood that I had configured for the run
BTW - I tried the "ascend" switch today and it worked flawlessly. Thank you!

P.S. - One minor thing that would be nice to add, if the "ascend" switch was used, would be: if there is an empty muffin earthenware muffin tin in inventory then submit it to the breakfast counter for a random muffin. I forgot to do that.
 
Last edited:

Veracity

Developer
Staff member
Those are good ideas.

My TODO list has some more specialized moods in mind. For example, L.O.V. Tunnel and Spacegate might want spell damage percent. But a configured "generic within this script" mood seems reasonable. Considering that my kingLiberated script resets my mood to my usual "aftercore" mood, I may or may not need a "VMF" mood, but, everyone plays the game differently, and not everyone does things the way _I_ do.

(Same for the muffin tin: my habit is that every single time I eat a muffin, I immediately go back in and order another one. But my habits are not everybody's habits...)

Over the next couple of days, I am going to take each item on my "TODO" list - either within the script, or in other files - and perhaps even within this thread - and make an "Issue" describing it on GitHub. I will then remove those comments from the script.

Then documentation in README.md, a relay-browser configuration script (with support from vprops, perhaps), and on and on...
 

Magus_Prime

Well-known member
I, normally, return the muffin tin after the character consumes the muffin. I also, manually switch the mood after freeing the king. I simply forgot to do so. Adding the mood switch to a kingLiberated script makes a lot of sense. :)
 
Top