Tool SMAPI: Stardew Modding API

Discussion in 'Mods' started by ClxS, Mar 6, 2016.

Thread Status:
Not open for further replies.
  1. Dannydee83

    Dannydee83 Void-Bound Voyager

    Yes

    edit: would it be possible to find a copy of the System.IO.Compression file and add it in?
     
    • Entoarox

      Entoarox Oxygen Tank

      The problem with that is that different versions would then be able to cause interaction issues... But you should be able to manually unpack the gpk file and retrieve the dll from there.... Just expect issues to crop up if more mods use zip files... >_<
       
      • simdebster

        simdebster Scruffy Nerf-Herder

        Just installed SMAPI 1.4 and when I pressed ESC and opened the Community Center Bundles window, an error was thrown. I am using the Jiggly Junimo Bundles mod and at this point, I do not think that I can give it up.
         

          Attached Files:

          Last edited: Dec 17, 2016
        • Pathoschild

          Pathoschild Tiy's Beard

          The error is caused by a bug in the Gift Tastes Helper mod; I notified the author so they can look into it.
           
          • TheCatMan

            TheCatMan Void-Bound Voyager

            Hey, this is now fixed in version 2.3 of GiftTasteHelper.
             
            • Dannydee83

              Dannydee83 Void-Bound Voyager

              Is there any way to solve it otherwise? I'd rather not put a bandaid on the crack in the dam, so to speak. Thank you for all the help so far...is there anyway that I can fully uninstall Mono? maybe the new download didn't overwrite the 'incomplete' one?
               
              • Entoarox

                Entoarox Oxygen Tank

                If you run the game using `mono StardewModdingAPI.exe` then it should automatically use the version of mono installed, rather then the faulty one bundled into SDV.
                 
                • Dannydee83

                  Dannydee83 Void-Bound Voyager

                  Tried opening a terminal at the folder with the StardewModdingAPI.exe file, and got a new error! which might be good for troubleshooting it..? It is attached as a screenshot
                   

                    Attached Files:

                  • Rujiyn

                    Rujiyn Intergalactic Tourist

                    So I'm having an issue I can't quite figure out regarding Smapi.

                    http://imgur.com/a/RQaW7

                    Here's a link to the error log, this pops up every time i try to open it.

                    Any help would be appreciated.
                     
                    • nirasa1957

                      nirasa1957 Subatomic Cosmonaut

                      @Pathoschild I installed SMAPI 1.4 on LinuxMint 18, via Stream. My Stardew Valey (beta) can't run = It is the same mistake as last time = #845 on page 43. SMAPI 1.3 is OK, it work's.

                      Sorry for my english :-(
                       
                      • Entoarox

                        Entoarox Oxygen Tank

                        That looks like another case of me accidentally using platform-dependent directory structure, that is something I am able to fix at least!

                        Edit: Nope, that isnt the problem... Mind sending me a screenshot of the Content directory where all the xnb files and subdirs are? Cause I havent a clue why it is acting up :S
                         
                        • Dannydee83

                          Dannydee83 Void-Bound Voyager

                          Sure thing! This is path file: /Users/myusername/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/Resources
                           

                            Attached Files:

                          • Entoarox

                            Entoarox Oxygen Tank

                            Peculiar, it looks like the content manager isnt giving me the correct path for some insane reason.... :S
                             
                            • Dannydee83

                              Dannydee83 Void-Bound Voyager

                              i'm not exactly well versed in this...but I've had my hand at a few coding languages so it could be syntax? after the 'common' path file part there is 'Stardew Valley' which then contains 'Contents' and then in that folder is 'Resources' which then contains 'Content' so the difference is just an "s"
                               
                              • Pathoschild

                                Pathoschild Tiy's Beard

                              • simdebster

                                simdebster Scruffy Nerf-Herder

                                Updated to GiftTasteHelper 2.3 put out yesterday. Started game, opened the Community Center Menu and hit the arrow button to go to next page and an error was thrown in the command window.

                                Looking at the error file, it is still indicating that GiftTasteHelper is the problem. I guess that I should have posted this there instead. Going to do that now.
                                 

                                  Attached Files:

                                  Last edited: Dec 18, 2016
                                • Pathoschild

                                  Pathoschild Tiy's Beard

                                  It looks like your startup preferences are corrupt. (This is a problem with the game itself, not SMAPI.) Try this:
                                  1. Open your saves directory.
                                  2. Go up one folder. You should see something like this:
                                    upload_2016-12-18_12-7-54.png
                                  3. Delete the startup_preferences file.
                                  The game will then regenerate the file automatically on launch, and your error should go away. (While you're here, it's a good idea to back up that Saves folder just in case — the game can corrupt saves too, although it's rare.)

                                  Can you reply with your error log file?
                                   
                                  • Dannydee83

                                    Dannydee83 Void-Bound Voyager

                                    Having an issue with a missing file from Mono, System.IO.Compression.dll
                                    any ideas on how to fix this?
                                     
                                    • Kiddles

                                      Kiddles Void-Bound Voyager

                                      So I could not find anything regarding Stardrops in this thread. I know that it uses its own segment of code to add stamina...

                                      Code:
                                      if (itemToEat.ParentSheetIndex == 434)
                                        {
                                        if (Utility.foundAllStardrops())
                                        Game1.getSteamAchievement("Achievement_Stardrop");
                                        Game1.player.yOffset = 0.0f;
                                        Game1.player.yJumpOffset = 0;
                                        Game1.changeMusicTrack("none");
                                        Game1.playSound("stardrop");
                                        string str = Game1.random.NextDouble() < 0.5 ? "Your mind is filled with thoughts of " : "It's strange, but the taste reminds you of ";
                                        if (Game1.player.favoriteThing.Contains("Stardew"))
                                        str = "You feel an unwavering connection to the valley itself.";
                                        if (Game1.player.favoriteThing.Equals("ConcernedApe"))
                                        str = "Your mind is filled with thoughts of... ConcernedApe? (Well, thanks!)";
                                        DelayedAction.showDialogueAfterDelay("You found a =stardrop! " + str + Game1.player.favoriteThing + ". ^^Your maximum energy level has increased.", 6000);
                                        Game1.player.MaxStamina += 34;
                                        Game1.player.Stamina = (float) Game1.player.MaxStamina;
                                        Game1.player.FarmerSprite.animateOnce(new FarmerSprite.AnimationFrame[1]
                                        {
                                        new FarmerSprite.AnimationFrame(57, 6000)
                                        });
                                        Game1.player.startGlowing(new Color(200, 0, (int) byte.MaxValue), false, 0.1f);
                                        Game1.player.jitterStrength = 1f;
                                        Game1.staminaShakeTimer = 12000;
                                        Game1.screenGlowOnce(new Color(200, 0, (int) byte.MaxValue), true, 0.005f, 0.3f);
                                        Game1.player.CanMove = false;
                                        Game1.player.freezePause = 8000;
                                        List<TemporaryAnimatedSprite> temporarySprites = Game1.currentLocation.temporarySprites;
                                        TemporaryAnimatedSprite temporaryAnimatedSprite1 = new TemporaryAnimatedSprite(Game1.mouseCursors, new Microsoft.Xna.Framework.Rectangle(368, 16, 16, 16), 60f, 8, 40, Game1.player.position + new Vector2((float) (-Game1.pixelZoom * 2), (float) (-Game1.tileSize * 2)), false, false, 1f, 0.0f, Color.White, (float) Game1.pixelZoom, 0.0075f, 0.0f, 0.0f, false);
                                        temporaryAnimatedSprite1.alpha = 0.75f;
                                        temporaryAnimatedSprite1.alphaFade = 1f / 400f;
                                        Vector2 vector2 = new Vector2(0.0f, -0.25f);
                                        temporaryAnimatedSprite1.motion = vector2;
                                        temporarySprites.Add(temporaryAnimatedSprite1);
                                        for (int index = 0; index < 40; ++index)
                                        {
                                        List<TemporaryAnimatedSprite> overlayTempSprites = Game1.screenOverlayTempSprites;
                                        int rowInAnimationTexture = Game1.random.Next(10, 12);
                                        Viewport viewport = Game1.graphics.GraphicsDevice.Viewport;
                                        Microsoft.Xna.Framework.Rectangle titleSafeArea = viewport.TitleSafeArea;
                                        double num1 = (double) (titleSafeArea.Right - 48 - Game1.tileSize / 8 - Game1.random.Next(Game1.tileSize));
                                        int num2 = Game1.random.Next(-Game1.tileSize, Game1.tileSize);
                                        viewport = Game1.graphics.GraphicsDevice.Viewport;
                                        titleSafeArea = viewport.TitleSafeArea;
                                        int bottom = titleSafeArea.Bottom;
                                        double num3 = (double) (num2 + bottom - 224 - Game1.tileSize / 4 - (int) ((double) (Game1.player.MaxStamina - 270) * 0.715));
                                        Vector2 position = new Vector2((float) num1, (float) num3);
                                        Color color = Game1.random.NextDouble() < 0.5 ? Color.White : Color.Lime;
                                        int animationLength = 8;
                                        int num4 = 0;
                                        double num5 = 50.0;
                                        int numberOfLoops = 0;
                                        int sourceRectWidth = -1;
                                        double num6 = -1.0;
                                        int sourceRectHeight = -1;
                                        int delay = 0;
                                        TemporaryAnimatedSprite temporaryAnimatedSprite2 = new TemporaryAnimatedSprite(rowInAnimationTexture, position, color, animationLength, num4 != 0, (float) num5, numberOfLoops, sourceRectWidth, (float) num6, sourceRectHeight, delay);
                                        temporaryAnimatedSprite2.layerDepth = 1f;
                                        int num7 = 200 * index;
                                        temporaryAnimatedSprite2.delayBeforeAnimationStart = num7;
                                        double num8 = 100.0;
                                        temporaryAnimatedSprite2.interval = (float) num8;
                                        int num9 = 1;
                                        temporaryAnimatedSprite2.local = num9 != 0;
                                        overlayTempSprites.Add(temporaryAnimatedSprite2);
                                        }
                                        Utility.addSprinklesToLocation(Game1.currentLocation, Game1.player.getTileX(), Game1.player.getTileY(), 9, 9, 6000, 100, new Color(200, 0, (int) byte.MaxValue), (string) null, true);
                                        DelayedAction.stopFarmerGlowing(6000);
                                        Utility.addSprinklesToLocation(Game1.currentLocation, Game1.player.getTileX(), Game1.player.getTileY(), 9, 9, 6000, 300, Color.Cyan, (string) null, true);
                                        Game1.player.mostRecentlyGrabbedItem = (Item) null;
                                        }
                                      
                                      Is there a way for me to simply override that " Game1.player.MaxStamina += 34;" snippet of code to alter the stamina added? I kinda want to make a customizable value for it in a mod I'm trying to do.
                                       
                                      • Entoarox

                                        Entoarox Oxygen Tank

                                        Use a observer to see if `Game1.player.MaxStamina` changes, then apply your own logic when it does.
                                         
                                        Thread Status:
                                        Not open for further replies.

                                        Share This Page