RELEASED [SMAPI] Variable Grass Growth

Discussion in 'Gameplay Mechanics' started by dantheman999, Mar 2, 2016.

  1. dantheman999

    dantheman999 Void-Bound Voyager

    WARNING: Been a major update to SMAPI which I don't have time to migrate to now. 0.36 was the last version I have tested on.

    This was mainly written as a way for me just to muck around the SMAPI but in case for some reason someone wants this I've uploaded it anyway.

    https://github.com/dantheman999301/StardewMods/releases/download/1.3/VariableGrass_1.3.zip

    There are four files included any there are self explanatory. Some have more grass growth overall and one has less.

    You can view the source code here

    You can see the inner workings there, but essentially it picks a random number to determine how many times it should grow grass using the underlying method. Normal does it between 0 and 2 times.

    INSTALLTION
    Assuming you have SMAPI installed, just go to %appdata%\Stardew Valley\Mods and extract the DLL and ini file. You can edit the ini file to make it grow less or more grass.

    If the folder is not there just go up one level and create the folder.

    Any problems, let me know. Hope it's useful to someone!

    CHANGE LOG

    1.0 RELEASE
    1.1 Bug fixes
    1.2 Removed multiple DLLs -> Converted to ini file read
    1.3 Changed event used
     
      Last edited: Mar 3, 2016
      Walker Boh and Androxilogin like this.
    • cantorsdust

      cantorsdust Existential Complex

      Nice! Added to modding list.
       
      • dantheman999

        dantheman999 Void-Bound Voyager

        Updated to include INI File for easier changes for each user, so now you only need the one DLL file and you can edit the ini file.

        Warning though, don't make too many iterations, you can crash the game!
         
        • James Bennett

          James Bennett Scruffy Nerf-Herder

          Covered your mod in my latest video! :)
           
          • dantheman999

            dantheman999 Void-Bound Voyager

            Thanks man, appreciate it!
             
            • TheSilentObserver

              TheSilentObserver Big Damn Hero

              Something's gone wrong, here...


              [10:56:31] Loading Mod DLL...
              [10:56:31] Failed to load mod 'C:\Users\USER\AppData\Roaming\StardewValley\Mods\VariableGrass.dll'. Exception details:
              System.TypeLoadException: Could not load type 'IntChanged' from assembly 'StardewModdingAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
              at VariableGrass.VariableGrass.Entry()
              at StardewModdingAPI.Program.LoadMods()


              And here's the error I get after updating to the newest version of the the API:


              [11:07:39] Failed to load mod 'C:\Users\USER\AppData\Roaming\StardewValley\Mods\VariableGrass.dll'. Exception details:
              System.FormatException: Input string was not in a correct format.
              at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
              at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
              at System.Int32.Parse(String s)
              at VariableGrass.VariableGrass.Entry()
              at StardewModdingAPI.Program.LoadMods()
               
                Last edited: Mar 3, 2016
              • dantheman999

                dantheman999 Void-Bound Voyager

                I'll have a look in a moment.

                Did you use the ini file provided?

                EDIT: Just tested my latest release and it worked fine. Can you check the ini file please, sounds like it doesn't like one of the numbers.
                 
                  Last edited: Mar 3, 2016
                • TheSilentObserver

                  TheSilentObserver Big Damn Hero

                  My ini file looks like this straight out of the box:

                  MinIterations=0
                  MaxIterations=2

                  That's all that's in there, of which I changed it to

                  MinIterations=0
                  MaxIterations=5

                  If it makes any difference at all, I used Notepad+ to modify it.
                   
                  • dantheman999

                    dantheman999 Void-Bound Voyager

                    Is the ini file with the DLL?

                    I literally can't think of why it's not working.
                     
                    • TheSilentObserver

                      TheSilentObserver Big Damn Hero

                      They're both together in the mods folder, yes.

                      What could possibly be causing this error about string values and whatnot? That makes it sound like I've entered some kind of invalid data, but it does it even if I haven't changed anything at all.
                       
                      • TheSilentObserver

                        TheSilentObserver Big Damn Hero

                        Here's an interesting tidbit that might mean nothing or everything...

                        It says that it failed to load... and then goes on to tell me that three mods have been loaded. The only three mods I've got in the folder are the default trainer that I don't use, the mod that makes time stop indoors, and this one here.

                        Now, this COULD mean that the mod is actually working despite the error... or it could mean that the API just doesn't 'scratch' it from the count of loaded mods after failing.
                         
                        • sn00ze

                          sn00ze Scruffy Nerf-Herder

                          Btw what does the 0 and 2 mean? A chance that 0, 1 or 2 grass spawn a day?
                           
                          • Taimi

                            Taimi Void-Bound Voyager

                            I have the same error TheSilentObserver gets on newest API. Surprisingly the mod does work, I changed min/max values couple times (it isn't caused by min!=0), slept multiple days, grass grows. I hope it doesn't crash somewhere down the line, but so far it seems ok.
                             
                            • dantheman999

                              dantheman999 Void-Bound Voyager

                              It might be that the it is trying to load the ini file, I'm not sure how it is loaded. Maybe that was the error caused?
                               
                              • dantheman999

                                dantheman999 Void-Bound Voyager

                                It's how many times the grass grow function is called. So yes, 0 - 2 chance per day.
                                 
                                • Seeroh

                                  Seeroh Scruffy Nerf-Herder

                                  What is the the difference in growth speed overall though, using this mod, when compared to the growth speed normally?
                                   
                                    JuggerWeed likes this.
                                  • snaid1

                                    snaid1 Scruffy Nerf-Herder

                                    I'm having the same error. I've tried it with the 2 latest versions of the Api. any chance that changes to the Api are why it doesn't want to work?
                                     
                                    • evilpdor

                                      evilpdor Void-Bound Voyager

                                      I hope I do not mind the author (then I remove it immediately), I edit the source code to fix the error

                                      http://www.mediafire.com/download/xdud27jssflv9xl/VariableGrass_1.3b__source.zip
                                       
                                      • evilpdor

                                        evilpdor Void-Bound Voyager

                                      • clickeddaisy

                                        clickeddaisy Big Damn Hero

                                        are you gonna make a storm version?
                                         
                                          Last edited: Mar 14, 2016

                                        Share This Page