My personal Meat farming script

Veracity

Developer
Revision 127 adds initial support for voting booth.

Code:
// *** Voting Booth ******

// If you have a "I Voted!" sticker, you voted today and might want to fight the wandering vote monsters.
//
// never		Never fight a vote monsetr
// free			Fight the first three monsters, which are free
// monsters		Fight the first free monsters and continue for listed monsters
// always		Fight every monster

string fight_voters = define_property( "VMF.FightVoteMonsters", "string", "free" );
monster_set vote_monsters = define_property( "VMF.WorthyVoteMonsters", "monster", "annoyed snake|angry ghost|government bureaucrat|slime blob|terrible mutant", "set" ).to_set_of_monster();
By default, it will fight all the "free" voting booth monsters per day - if you have an "I Voted!" sticker in inventory or equipped.

You can set VMF.FightVoteMonsters to "always" if you want to fight every monster, free or not.
You can set VMF.FightVoteMonsters to "monsters" if you want to fight every (configured) monster, free or not.

The initial set of "configured" monsters is: annoyed snake|angry ghost|government bureaucrat|slime blob|terrible mutant
That is likely correct, until you have built a particular outfit, at which point, the untradable ingredients may not be interesting, and you can remove said monster from the set.
We'll still fight the free fights because, hey - free fight.

A further refinement:

When we fight the vote monster, we go to a Shrine, since it's out of the way and we won't trigger something else inadvertently if we spend a turn.
The script should probably switch to your "item drop" familiar before doing that fight and switch back when it s done.
That is on the To Do list.
 

Veracity

Developer
Revision 131 will swap in the outfit piece that leads to the next outfit piece, when fighting terrible mutants.
 

fronobulax

Developer
Just a FYI. I will dig a little deeper.

Bought and used an absentee ballot. Set VMF.FightVoteMonsters to "monsters". Got caught in an infinite loop. Aborted. Relay browser says I am in a choice "Earthbound and Down". "The 6-ball in your sack begins to emit a bright green glow." Stepped away and restarted. Still looping. Put 6 ball in closet. Still looping. Disabled MercenaryMood. Looping.

Nothing I did actually burned an adventure so the script was correct in trying to get my vote monster.

I manually burned one adventure and script is behaving as expected.

Looking at the logs the first time it expected a monster it equipped the sticker and fought a mutant. The second time is when the loop started.

[23749] Barf Mountain
equip sticker
[23750] An Overgrown Shrine (Northwest)
fight mutant
unequip sticker
[23750] Barf Mountain
...
[23760] Barf Mountain
equip sticker
[23761] An Overgrown Shrine (Northwest)
choice, not monster and looping

I can't figure anything out :-(
 

Veracity

Developer
Huh. It goes to the Shrine to fight your vote monster - but apparently the vote monster did not show up and you got the choice adventure.
It didn't take a turn, but, since no monster, KoLmafia did not update the "last vote monster turn" setting.

Huh. Did you vote? Last night, I noticed something funky about wanting to fight the monster before doing that. Which doesn't make sense, since you won't have the sticker until you do that.

I'll think about this.
 

darkerfalz

New member
This has probably been asked before, but is there a way for your script to buy the milk/food ingredients/booze ingredients instead of stopping?
Or pull from my mall store (since I seem to have a billion Drink Me potions in there).
(Knowing me, I missed a setting somewhere.)
 

fronobulax

Developer
Huh. It goes to the Shrine to fight your vote monster - but apparently the vote monster did not show up and you got the choice adventure.
It didn't take a turn, but, since no monster, KoLmafia did not update the "last vote monster turn" setting.

Huh. Did you vote? Last night, I noticed something funky about wanting to fight the monster before doing that. Which doesn't make sense, since you won't have the sticker until you do that.

I'll think about this.

I voted before. Many of my hypotheses are disproved because the first monster was fought. I ran with a different character who also voted absentee and things executed normally.
 

Veracity

Developer
This has probably been asked before, but is there a way for your script to buy the milk/food ingredients/booze ingredients instead of stopping?
The script itself has no settings to control how it "acquires" items. It depends on KoLmafia settings to determine what is allowed.

I don't have access to KoLmafia right this second, so cannot give exact instructions, but something like this:

Open Preferences
(Go the tab which has "Item Acquisition" settings in it.)
Check the "use mall when necessary " checkbox.
Also check the "use NPC stores when necessary" checkbox - and anythings else that is appropriate for you.

You also need to make sure that "autoBuyPriceLimit" is set to something reasonable. That is how much Meat you are willing to let item creation use to make an item.
(Is this also on the Item Acquisition page? It should be.)

I should probably put all this into the "Requirements" section of the script, along with outfits, moods, recovery, etc.

Or pull from my mall store (since I seem to have a billion Drink Me potions in there).
(Knowing me, I missed a setting somewhere.)
We don't have an "Item Acquisition" setting to pull from your own mall store.
That might be worth a Feature Request for KoLmafia itself, since it's not specific to this script.
 

Veracity

Developer
I voted before. Many of my hypotheses are disproved because the first monster was fought. I ran with a different character who also voted absentee and things executed normally.
Actually, your example showed you had a previous success. Sorry.

I'm not understanding why the vote monster prediction failed that one time.
I suppose I could check whether it did show up - and if it did not, manually set the property that KoL would have set, in order not not infinitely loop, at least.
I'd like to understand the root cause, though.
 

Veracity

Developer
Revision 152 puts in a defensive check that will avoid this infinite loop.
Still don't understand why you didn't get the vote monster.
 

zarqon

Active member
A couple things I've come across using this splendid script that you may want to address:

1) If you run the script with any remaining goals set, the script will abort after adventuring once and failing to achieve the goal. You may want a conditions clear at some point during the verification stage.
b) I tend to run this script multiple times per day per character due to various issues causing the script to abort, and each time, it scans all the mall pages, possibly to the point where it's using more server hits than a mall_price() implementation would have. Is there some way this information can be cached so it doesn't re-search the mall each time the script is run?

Lastly, I'd like to request implementing a "help" parameter which lists the various settings you can configure for this script, along with their default values and, if you have set them to something else, their currently configured values. It's hard to remember the names for all the settings without opening the script up and searching through it, and that would be a big help for speeding up play time. I believe somewhere you were suggesting a change to ASH that would allow this parameter to be optional.

Thanks!
 

fronobulax

Developer
Different character. No loop because the choice adventure was set in a way that was not automatically taken. If I counted right the failure occurred when the sixth angry ghost was expected. Character used absentee ballot. I did one turn manually and things are back on track.

I am hoping that this demonstrates that your defensive check worked.
 

fronobulax

Developer
Happened again. At least 20 terrible mutants were fought. Next to last attempt (which was a success) also equipped mutant arm for the first time.
 

Magus_Prime

Active member
I know I'm missing something obvious but where are the various non-default VMF settings stored when KoLmafia isn't running? There must be a file somewhere but I can't seem to find it. Thanks in advance for a pointer.
 
Top