auto_mushroom: the perfect mushroom-growing script

Ah, I see what the problem is. You can't click "script layout" under the one-click planting. That saves over the script. You need to download a fresh copy and click "load layout" in the script generator.

Doesn't the layout tab only support part of the schedule? I think for a 'good' auto-script (basically anything that will do the full 16 day schedule) you just set it as your script using the automation preferences tab (or gCLI), and leave it...

The generator tab actually only displays some pictures. You can actually put any layout you want into the .txt file and it will show up there, that has nothing to do with the script operation. I just made it spell out "AUTO" in mushrooms, but it doesn't work well.
 
Last edited:
I've been running this script during most of my aftercore stints for quite a while. Today, my first day of this particular aftercore, I noticed that I am getting this message in the CLI when I log in:
AUTO_MUSHROOM already run today!

Yet, when I check my mushroom plot there is nothing planted. As far as I can tell, I haven't changed any settings.
I'm running auto_mushroom version: 2.0 (current) and KoLmafia-12227.
Thanks in advance for any help/guidance.

ETA- Lost suggested I do this:

set plantingDate = -1

and after doing so, I logged out, then back in, and the script planted my mushrooms successfully. Woo!
 
Last edited:
I've been running this script during most of my aftercore stints for quite a while. Today, my first day of this particular aftercore, I noticed that I am getting this message in the CLI when I log in:
AUTO_MUSHROOM already run today!

Yet, when I check my mushroom plot there is nothing planted. As far as I can tell, I haven't changed any settings.
I'm running auto_mushroom version: 2.0 (current) and KoLmafia-12227.
Thanks in advance for any help/guidance.

ETA- Lost suggested I do this:

set plantingDate = -1

and after doing so, I logged out, then back in, and the script planted my mushrooms successfully. Woo!

I have tried to replicate this but can't. Either way, I'm glad that it got solved!
 
I've been running this script during most of my aftercore stints for quite a while. Today, my first day of this particular aftercore, I noticed that I am getting this message in the CLI when I log in:
AUTO_MUSHROOM already run today!

Yet, when I check my mushroom plot there is nothing planted. As far as I can tell, I haven't changed any settings.
I'm running auto_mushroom version: 2.0 (current) and KoLmafia-12227.
Thanks in advance for any help/guidance.

ETA- Lost suggested I do this:

set plantingDate = -1

and after doing so, I logged out, then back in, and the script planted my mushrooms successfully. Woo!

This happens to me every once in a while. Here's what I think is going on: if you ascend and then don't buy a mushroom plot for 16 days (or 32, etc.), then the "plantingDate" is, by accident, the same as the last one on which the script was run. This makes the script's logic think it was already run that day, when really, it hasn't run for a couple of weeks. The easy way around this is manually resetting the plantingDate variable (which is what I've always done).

The only way I can think of to handle it automatically is check if the field is empty before aborting, and run anyway if there's nothing planted; that won't catch every instance (if someone was manually planting before running the script, it won't work), but it should catch 99.9% of them.
 
This happens to me every once in a while. Here's what I think is going on: if you ascend and then don't buy a mushroom plot for 16 days (or 32, etc.), then the "plantingDate" is, by accident, the same as the last one on which the script was run. This makes the script's logic think it was already run that day, when really, it hasn't run for a couple of weeks. The easy way around this is manually resetting the plantingDate variable (which is what I've always done).

The only way I can think of to handle it automatically is check if the field is empty before aborting, and run anyway if there's nothing planted; that won't catch every instance (if someone was manually planting before running the script, it won't work), but it should catch 99.9% of them.

That is odd though, plantingDate and plantingDay are reset after ascension I thought. I'd appreciate any help figuring that out. I should be ascending soon and will make sure to double-check.

The only think I can think is maybe if you ascend and then buy a plot that same day?
 
Found the bug. It was because string_to_int("") == 0, so it always thought the last day was day 0 on a new ascension. This would mess up if it was day 1.
 
Found the bug. It was because string_to_int("") == 0, so it always thought the last day was day 0 on a new ascension. This would mess up if it was day 1.

You are, as always, awesome, RLBond. My guess was based on having only looked at the code once, months ago, to find which variable was being checked so I could reset it manually. 0 points for laziness for me, apparently, but glad it's fixed. :)
 
I have used this for quite a while already (great script! :D), since I'm in extended aftercore.

However, last weekend I was away on a trip and missed a few days in planting. Upon returing I thought maybe I had to re-init the script, but when I checked into that, I noticed that it hadn't harvested any mushrooms ever since the 4th or 5th of january.

Running planting/auto_mushroom.ash again got it back running, but I'm not sure why it would stop working in the first place. I'm certain I didn't touch the script, and almost certain I didn't tinker with any mafia preferences either. Any ideas?
 
Was that around the time where mafia actually got mushroom plot detection and so it wouldn't have been detected for you until the next time you actually visited the plot?
 
Ah, you might be correct. r13490 was committed the 5th, may have been a side effect. Never noticed that until now. Goes to show automation makes you lazy :cool:.
 
I guess it does. Theraze's explanation sounds pretty plausible to me. Anyway, I'm glad you noticed and got it working again. Sorry you missed a few cycles there.
 
Thank you for this script. its really cool.

why is it in /kol_mafia/planting/ instead of /kol_mafia/scripts/
this makes it not show up in the UI when you click on scripts menu button on the top ribbon (between "Quests" and "Window" at the top).

To actually start using auto_mushroom, type
Code:
planting/auto_mushroom.ash
in the CLI. You will need to do this again after you ascend.
I found that just typing
Code:
auto_mushroom.ash
works as well. At least it does after the first time (to clarify, I haven't tested it the first time, I just conceivably can see how the script would add its directory to the PATH when first invoked such as to ensure it works even without the path; so, if it doesn't do that then it should work the first time too)

Also, the HTML file found in planting has all the images show as broken images.

PS. I am using build 18238 of kol mafia rather than stable (since "stable" is ancient and most scripts don't work on it)
 
Last edited:
Great script, thank you. something I noticed is that when running auto mushroom without enough meat it gives me a warning of not having enough meat and skips a day... fine, reasonable (although the warning is easy to miss because it gives it at the beginning instead of the end, and the screen moves fast to scroll past multiple pages.)

once I had acquired enough meat I tried running it again and it says "auto mushroom already run today" and refused to run and do any planting.

suggestions
1. If out of meat, popup a question on whether to abort or not. if aborted you can then run it again after you get the meat.
2. If you didn't abort, have it so running it again with enough meat will switch to the better available option
 
Last edited:
Back
Top