Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 38

Thread: auto_mushroom: the perfect mushroom-growing script

  1. #1
    Senior Member
    Join Date
    Mar 2012
    Posts
    247

    Default auto_mushroom: the perfect mushroom-growing script

    auto_mushroom 2.2. (requires zlib)

    I haven't seen much on these boards about mushroom management, so I am uploading my personal mushroom script.

    Every 16 days, this script will produce the following:
    • 8 fourth-generation mushrooms (gloomy black)
    • 18 third-generation mushrooms (6 each of flaming, frozen, stinky)
    • 12 second-generation mushrooms (4 each of warm, cold, pointy)
    • (optional) 40 first-generation mushrooms (13 spooky, 13 knob, 14 knoll)


    The total cost per 16-day cycle is 1060 meat, plus another 1610 for the optional first-generation mushrooms.

    You can begin the script any day. Since the 16-day cycle is sensitive to the moon phase, a "delay cycle" will run the first time the script is invoked until the main cycle can begin. This can take any number of days, so the script will grow the best mushrooms possible while it waits until a good time to jump to the steady-state cycle. Due to the mushroom-growing mechanics of KoL, you must begin growing on or before day 8 of the 16-day cycle (first Muscle day) to get 8 gloomy black mushrooms that cycle. If you start in the next 2 days, you will still get 6 gloomy black mushrooms that cycle (and 8 each cycle after that).

    This script was a labor of love for me. I devised a few tricks which I have not seen mentioned online yet to maximize 2nd- and 3rd-gen mushroom yield while producing gloomy mushrooms. The script is very efficient and does not waste any growing space, so I would be very surprised to see a higher possible yield.


    How to install: run the following CLI code to download:
    Code:
    svn checkout http://svn.code.sf.net/p/rlbond86-mafia-scripts/code/auto_mushroom/trunk
    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.

    Alternatively, you can use the mushroom plot tool. Select the script generator tab and click "Load Layout", select the script, and click "Run Layout". Or, you can type "auto_mushroom" (without quotes) in the automation preferences. Either way, if you have mushroom planting enabled in your breakfast settings, it will automatically run after that until you ascend.



    Version History
    • 2.2: Fixed a bug when starting planting on day 1.
    • 2.1: Migrated to SVN.
    • 2.0: "Delay cycle" front-loads higher-level mushrooms so you get them before you ascend.
    • 1.0: Complete rewrite. Code is more modular and should be more easily modified if someone else wants to use it. Script will grow 6 gloomy black mushrooms on initial run if there's not enough time to grow 8. "Next event" message in CLI window tells you when to expect mushroom harvests.
    • 0.1: Initial release.


  2. #2
    Junior Member
    Join Date
    Feb 2009
    Posts
    14

    Default

    Error with the first time running
    line 224,
    cli_execute("zlib

    Should possibly be
    cli_execute("zlib.ash

    Got an error about being unable to invoke zlib otherwise

  3. #3

    Default

    It's probably also a good idea to mention that it requires zlib in the first post, if that's so.
    Before you ask, please check the FAQ.
    Veracity: My "humble opinion" trumps your "humble opinion". IMHO.

  4. #4
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,510

    Default

    PHP Code:
    cli_execute("zlib autoMushroom_plantExtraFirstGenerationMushrooms = " growExtra);
    vars["autoMushroom_plantExtraFirstGenerationMushrooms"] = to_string(growExtra); 
    A simpler way is to do:
    PHP Code:
    vars["autoMushroom_plantExtraFirstGenerationMushrooms"] = to_string(growExtra);
    updatevars(); 
    Got an error about being unable to invoke zlib otherwise
    Originally Posted by BlanketThief View Post
    And what is the error message you get in the gCLI exactly? Do you have zlib.ash in Mafia's /scripts folder?
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  5. #5
    Senior Member
    Join Date
    Mar 2012
    Posts
    247

    Default

    PHP Code:
    cli_execute("zlib autoMushroom_plantExtraFirstGenerationMushrooms = " growExtra);
    vars["autoMushroom_plantExtraFirstGenerationMushrooms"] = to_string(growExtra); 
    A simpler way is to do:
    PHP Code:
    vars["autoMushroom_plantExtraFirstGenerationMushrooms"] = to_string(growExtra);
    updatevars(); 
    Originally Posted by slyz View Post
    I didn't know about updatevars(), it's not in the zlib documentation. Thanks slyz.
    Last edited by rlbond86; 04-01-2012 at 12:51 AM.

  6. #6
    Senior Member
    Join Date
    Mar 2012
    Posts
    247

    Default

    Error with the first time running
    line 224,
    cli_execute("zlib

    Should possibly be
    cli_execute("zlib.ash

    Got an error about being unable to invoke zlib otherwise
    Originally Posted by BlanketThief View Post
    Do you have zlib installed? That method should work, but I will look at what slyz mentioned.

  7. #7
    Junior Member
    Join Date
    Feb 2009
    Posts
    14

    Default

    Do you have zlib installed? That method should work, but I will look at what slyz mentioned.
    Originally Posted by rlbond86 View Post
    Yeah, I have zlib installed. The issue is that I have it under 2 sub-folders I'm figuring, exact error is
    "Unable to invoke zlib"
    Changing it to zlib.ash allows mafia to find it again

    Edit: I'm... going to see what's actually going on with it now, might be a directory length error and the such I suppose;

    Edit2: The issue is with the name zlib for whatever reason. Changing directories did nothing, but changing the name from zlib.ash allowed mafia to find it as a script
    Last edited by BlanketThief; 04-01-2012 at 05:05 AM.

  8. #8
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,510

    Default

    I don't get any error when I run this simple script:
    PHP Code:
    import "zlib.ash"

    cli_execute"zlib vars" ); 
    What OS do you use? I know the filename's capitalization has to be right on Unix systems, but the ".ash" shouldn't be needed when calling a script from a CLI command, unless a command with the same name already exists.

    That makes me wonder if you have a "zlib" alias.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

  9. #9
    Junior Member
    Join Date
    Feb 2009
    Posts
    14

    Default

    Windows 7 premium home edition, 64 bit OS on the computer in question
    A quick check shows there isn't a zlib alias.

    Edit: Found out the issue, there being a folder titled 'zlib' as well was what was throwing mafia off.

  10. #10
    Developer
    Join Date
    Nov 2008
    Location
    Paris, France
    Posts
    4,510

    Default

    Oh ok, good to know.
    Try the Nemesis Quest Script or the FamiliarFeeder interface.
    *shakes KoLMafia tech support magic 8-ball* Update mafia to the latest daily .JAR!
    NEW Dad ASCENSION STARTED 20120730
    ------------------------------
    Welcome to Parenthood, Noob

Similar Threads

  1. Script Request: Astral Mushroom optimizer
    By Czar of the 3rd Reich in forum Turn-Burning Scripts
    Replies: 1
    Last Post: 12-05-2014, 11:54 AM
  2. Bug - Fixed r13470 - Login script not running because of mushroom plot
    By Fluxxdog in forum Bug Reports
    Replies: 20
    Last Post: 01-09-2014, 04:05 AM
  3. Modified mushroom script to produce 3rd +4th gen crop
    By tebee in forum Item Handling Scripts
    Replies: 37
    Last Post: 09-07-2013, 07:50 PM
  4. My window is growing.
    By Pinky in forum Community Support
    Replies: 0
    Last Post: 12-19-2007, 03:21 PM
  5. Knoll Mushroom Script
    By L33t Masta in forum Scripting Discussion
    Replies: 1
    Last Post: 06-09-2006, 03:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •