My personal Meat farming script

Veracity

Developer
Staff member
It will look in worn equipment, inventory, closet, or storage. It will not "acquire" a hat since for each effect, there are potentially many hats - and which one should it get? But if you have any satisfactory hat, it will pull it into inventory and use it.

Considering that a filthy knitted dread sack will suffice, there is no good reason for you not to have one.
 

Veracity

Developer
Staff member
Well, when we validate the configuration, if you have selected a particular buff, we look at all your hats and if you don't have anything suitable, it will say:

VMF.HatterBuff: 'Dances with Tweedles' requires a hat of length 22, which you lack.
...other possible configuration errors ...
Correct those errors and try again.

and will abort after validation before running the rest of the script.

If it was stolen during this session, it disappears from inventory and there is no way that we can know that without refreshing inventory. In that case, I assume the "hatter" command will fail. Or perhaps "equipping" the missing hat will fail.

(This behavior is what I am considering mirroring for Robortender drinks: "acquire" them during validation and abort if can't, allowing you to either acquire them manually or change your configuration.)
 

Bale

Minion
I was only debating your statement that, "there is no good reason for you not to have one." Glad you catch the potential error (as long as it wasn't too recent).
 
Question: I have this script configured to my needs, but every time it updates, the configurations revert to default. Is there any way to save my personal configuration from one version to the next; or perhaps to make a list of my variables and have them imported into the new version? Granted that we're only talking about 5-6 minutes to do this manually, but I'm old and every minute counts! :)
 
there are variables you can set using the set command. The begin with VMF and you can see them in the configuration section of the script.

One example is

Set VMF.FarmFamiliar = familiar
 

Veracity

Developer
Staff member
put them into a script.

Code:
set VMF.xxx=xxx
set VMF.yyy=yyy
And so on. Run the script. All the settings will be saved to KoLmafia's preferences file.

When you run my script the next time, it will remove any which are set to the default values as specified in the script. That should be OK, since you'll still get the value you expect. The only issue will be if you then edit my script directly to change default settings - or I change a default in my script. I don't expect to do that.
 

Veracity

Developer
Staff member
The point of the using the properties is that you don't need to edit the script and if you have multiple characters, they don't have to all have the same settings. The script can update repeatedly and your settings will remain, safe and sound, in KoLmafia's preferences file.

If you DO want to edit the script to change the default, you can do that - but you should edit the copy in the appropriate "svn" directory, not in your "scripts" directory. If you do the former, when the script updates, it will merge in your changes and push the merged version to the "script" directory. If you do the latter, updates will overwrite your edits.

Apparently, you were doing the latter.

Don't do that. Set properties - using a script, as I suggested - and you shouldn't have to do it again, regardless of updates; the settings will persist across updates.
 
Again, thanks both for the script and for the personal help. What confused me, as a noob to scripting, was the following statement in the Configuration instructions:
// You can edit the default here in the script and it will apply to all
// characters which do not override it.
I took that to mean open the script in an editor and make the changes. I now have a better understanding of how this aspect of mafia works.
 

Bale

Minion
Again, thanks both for the script and for the personal help. What confused me, as a noob to scripting, was the following statement in the Configuration instructions:
// You can edit the default here in the script and it will apply to all
// characters which do not override it.
I took that to mean open the script in an editor and make the changes. I now have a better understanding of how this aspect of mafia works.

Here's some great information for a scripting noob: Revision Merging.
 

Ethelred

Member
Revision 33 does this:

...

And, by the way, the reason so much stuff that doesn't necessarily look like "farming" is in this script is that my personal goal is to minimize the actual time I spend tending characters in aftercore. I want to log in, press script button 3, and, when it is done, logout.

...

You've mentioned "script button 3" a couple of times and I have no idea what that is. Is there a mafia option somewhere to install and configure some script buttons someplace? Or am I just missing something obvious?

Thanks for the scripts. Looking forward to pilfering some of your code for my own daily scripts.
 

Veracity

Developer
Staff member
Go to Preferences.

Look at "Look & Feel" on the left.
The third dropdown is labeled "Scripts" and lets you enable or disable a script bar.
Enable it.

Look at "Script Buttons" on the left.
You start with 2 buttons - "restore hp" and "restore mp".
You can add CLI commands or a (CLI or ASH) script file.
You can order them any way you choose and and delete buttons when you are tired of them.

(I have no idea why the Script Buttons panel is labeled "gCLI Toolbar Buttons"; the buttons appear on the right side of the main GUI, no matter which tab you have selected. Perhaps because scripts print to the gCLI and if you want to watch them execute, you need to be there. But you don't have to be. I think I will give it a different title.)
 

Magus_Prime

Well-known member
Am I doing something wrong? I tried, for the first time, to automate turns in Gingerbread City but no turns were spent there. Here are my settings:

Code:
VGC.Midnight=high-end ginger wine
VGC.Noon=robbery
VMF.GingerbreadCity=true

I have all three of your farming scripts installed (Meat, Garden, and Gingerbread City)

The script ran flawlessly otherwise and, other than the free combats, spent 300+ turns farming Barf Mountain.
 
Last edited:

Veracity

Developer
Staff member
There are nine configurable properties:

Code:
vgc_advance_clock = define_property( "VGC.AdvanceClock", "boolean", "false" ).to_boolean();
vgc_morning = define_property( "VGC.Morning", "location", "none" ).to_location();
vgc_afternoon = define_property( "VGC.Afternoon", "location", "none" ).to_location();
vgc_night = define_property( "VGC.Night", "location", "none" ).to_location();
vgc_noon = define_property( "VGC.Noon", "string", "candy" );
vgc_midnight = define_property( "VGC.Midnight", "string", "mainstat" );
vgc_banish = define_property( "VGC.Banishes", "monster", "" ).to_set_of_monster();
vgc_outfit = define_property( "VGC.Outfit", "string", "Gingerbread City" );
vgc_familiar = define_property( "VGC.Familiar", "familiar", "Chocolate Lab" ).to_familiar();
You said what you wanted to do fat noon and midnight, but you did not say where to adventure the morning, afternoon, or night. Those default to "none", so it did not adventure.

Try running the configureVGC.ash script if you want a preview of what to expect. That also has 4 built-in sets of settings

Code:
    case "alligators":
	log_set_property( "VGC.AdvanceClock", "false" );
	log_set_property( "VGC.Morning", "Gingerbread Upscale Retail District" );
	log_set_property( "VGC.Noon", "lever" );
	log_set_property( "VGC.Afternoon", "Gingerbread Sewers" );
	log_set_property( "VGC.Midnight", "high-end ginger wine" );
	log_set_property( "VGC.Night", "Gingerbread Sewers" );
	log_set_property( "VGC.Banishes", "" );
	break;
    case "gingerbeard":
	log_set_property( "VGC.AdvanceClock", "false" );
	log_set_property( "VGC.Morning", "Gingerbread Upscale Retail District" );
	log_set_property( "VGC.Noon", "column" );
	log_set_property( "VGC.Afternoon", "Gingerbread Upscale Retail District" );
	log_set_property( "VGC.Midnight", "Judge Fudge" );
	log_set_property( "VGC.Night", "Gingerbread Upscale Retail District" );
	log_set_property( "VGC.Banishes", "gingerbread tech bro" );
	break;
    case "gingerservo":
	log_set_property( "VGC.AdvanceClock", "false" );
	log_set_property( "VGC.Morning", "Gingerbread Industrial District" );
	log_set_property( "VGC.Noon", "column" );
	log_set_property( "VGC.Afternoon", "Gingerbread Industrial District" );
	log_set_property( "VGC.Midnight", "Judge Fudge" );
	log_set_property( "VGC.Night", "Gingerbread Industrial District" );
	log_set_property( "VGC.Banishes", "gingerbread mutant" );
	break;
    case "robbery":
	log_set_property( "VGC.AdvanceClock", "false" );
	log_set_property( "VGC.Morning", "Gingerbread Upscale Retail District" );
	log_set_property( "VGC.Noon", "robbery" );
	log_set_property( "VGC.Afternoon", "Gingerbread Upscale Retail District" );
	log_set_property( "VGC.Midnight", "high-end ginger wine" );
	log_set_property( "VGC.Night", "Gingerbread Upscale Retail District" );
	log_set_property( "VGC.Banishes", "" );
	break;
Looks like the "robbery" parameter will do for you, although may want to set Banishes if you want to eliminate one of the dudes in the Retail District - tech bro, if you want more gentrifiers (and hence more gingerbeards) or gentrifier if you want more sprinkles.

Further discussion of the Gingerbread City script should go in the the Gingerbread City.ash thread. ;)
 
Top