Tool SMAPI: Stardew Modding API

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

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

    Pathoschild Tiy's Beard

  2. Badtimefrank99

    Badtimefrank99 Intergalactic Tourist

    Deleted it and fixed it, gonna go spend an hour looking for what mod added it. yeah for xnbloader.

    Already tracked down the culprit mod.
     
    • SVFarmRanch

      SVFarmRanch Void-Bound Voyager

      Hello, Im not sure how to post or if im in the right thread. I was told to go to the SMAPI thread, yet i cant seem to create a new post, so I am replying here as if it were a new post.
      My issue is that I cannot get my mods to work. I posted earlier in the Mods forum. It seems that the DOS window is not showing up. I can successfully install the smapi, get the window to press 1 to install and it says done. but when I run the game from steam, no dos window shows up. I do have the steam launcher pointed at the stardew api.exe file. It seems since the big update, the mods fail to launch anymore. Im not sure what I am doing wrong. Can you help me?
       
      • Cassius Skye

        Cassius Skye Aquatic Astronaut

        Hallo! Every time I hover over say.. my strawberries in-game, the game instant crashes and shows me this error:

        [12:30:56 ERROR SMAPI] An error occured in the overridden draw loop: System.Exception: Couldn't invoke the private StardewModdingAPI.Framework.SGame::drawHUD field ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
        at StardewValley.Object.getDescription()
        at StardewValley.Menus.Toolbar.draw(SpriteBatch b)
        at StardewValley.Game1.drawHUD()
        --- End of inner exception stack trace ---
        at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
        at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
        at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
        at StardewModdingAPI.Framework.Reflection.PrivateMethod.Invoke(Object[] arguments) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\Reflection\PrivateMethod.cs:line 91
        --- End of inner exception stack trace ---
        at StardewModdingAPI.Framework.Reflection.PrivateMethod.Invoke(Object[] arguments) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\Reflection\PrivateMethod.cs:line 95
        at StardewModdingAPI.Framework.SGame.<>c.<.ctor>b__61_1() in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:line 168
        at StardewModdingAPI.Framework.SGame.DrawImpl(GameTime gameTime) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:line 1192
        at StardewModdingAPI.Framework.SGame.Draw(GameTime gameTime) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:line 668


        (it seems all the D : text is made into faces cx)

        Any help would be much appreciated! ^>^
         
        • Pathoschild

          Pathoschild Tiy's Beard

          Try this:
          1. right-click Stardew Valley in Steam;
          2. click Properties;
          3. click Set Launch Options;
          4. post a screenshot of that window;
          5. and copy the launch options and paste them here too.
          It looks like you replaced your Content\Data\ObjectInformation.xnb file with a broken or outdated one. Resetting your content files should fix that.
           
          • lxs597

            lxs597 Void-Bound Voyager

            Hello,My smapi have a trouble,someone tell me can get help from here.In the morning,I ask the question in "support" but no one reply. So should I ask in the post?

            My smapi usually crash in September.I test delete all mods ,it work good.But it must be crash when I install any mod.I have play the same day twenty times.It usually crash in 6:00pm~1:00pm. Sometimes I only open but play,it have not crash.I think maybe problem have solved and keep playing.It crash……

            Most of the situation,there noting in log.I only find the bug log tree times.But today I got it.Can somebody help me?

            stardew is 1.2.33 smapi is 1.15.4 system is windows 10 1703
            Mod have fastanimations\getdress\skipintro\calendaranywhere

            Code:
            [10:49:24 ERROR SMAPI] The game failed unexpectedly: System.AccessViolationException: Try to read or write protected memory. This usually indicates that other memory is corrupted.
            在 Microsoft.Xna.Framework.Audio.UnsafeNativeMethods.SoundBank.PlayCue(UInt32 hSoundBank, String string, Int32 length)
            在 Microsoft.Xna.Framework.Audio.SoundBank.PlayCue(String name)
            在 StardewValley.Game1.playSound(String cueName)
            在 StardewValley.FarmerSprite.checkForFootstep()
            在 StardewValley.FarmerSprite.animate(Int32 Milliseconds)
            在 StardewValley.FarmerSprite.animate(Int32 whichAnimation, Int32 milliseconds)
            在 StardewValley.FarmerSprite.animate(Int32 whichAnimation, GameTime time)
            在 StardewValley.Farmer.MovePosition(GameTime time, Rectangle viewport, GameLocation currentLocation)
            在 StardewValley.Farmer.Update(GameTime time, GameLocation location)
            在 StardewValley.Game1.UpdateCharacters(GameTime time)
            在 StardewValley.Game1.Update(GameTime gameTime)
            在 StardewModdingAPI.Framework.SGame.Update(GameTime gameTime) 位置 D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\SGame.cs:行号 614
            在 Microsoft.Xna.Framework.Game.Tick()
            在 Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
            在 Microsoft.Xna.Framework.GameHost.OnIdle()
            在 Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
            在 Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
            在 System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
            在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
            在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
            在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
            在 System.Windows.Forms.Application.Run(Form mainForm)
            在 Microsoft.Xna.Framework.WindowsGameHost.Run()
            在 Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
            在 Microsoft.Xna.Framework.Game.Run()
            在 StardewModdingAPI.Program.RunInteractively() 位置 D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Program.cs:行号 225
            [10:49:24 INFO SMAPI] Game has ended. Press any key to exit.
             
            • Pathoschild

              Pathoschild Tiy's Beard

              Hi @lxs597. That error means there's a problem with your system memory, probably not related to your mods. I suggest performing a memory test to check if your computer's RAM is corrupt.
               
              • zeixx

                zeixx Big Damn Hero

                I recently updated to SMAPI 1.15.4, and now my game keeps crashing whenever I try to grab something from the inventory bar. Also, I can't take anything out of chests now, which may be related to Categorize Chests 1.4.2 which I usually use. I tried taking it out of the mod folder and using an old save, but that didn't fix anything. I'd appreciate any help!
                 

                  Attached Files:

                • Pathoschild

                  Pathoschild Tiy's Beard

                • zeixx

                  zeixx Big Damn Hero

                  Thanks!! That fixed it. :)
                   
                  • lxs597

                    lxs597 Void-Bound Voyager

                    Very thanks.But I check ram ,it' have not damage:nuruconfused:
                     
                    • Badtimefrank99

                      Badtimefrank99 Intergalactic Tourist

                      [09:52:53 ERROR SMAPI] A mod failed handling the LocationEvents.CurrentLocationChanged event:
                      System.NullReferenceException: Object reference not set to an instance of an object.
                      at StardewNotification.ProductionNotification.CheckShedProductions()
                      at StardewNotification.ProductionNotification.CheckProductionAroundFarm()
                      at StardewNotification.ModEntry.ReceiveCurrentLocationChanged(Object sender, EventArgsCurrentLocationChanged e)
                      at StardewModdingAPI.Framework.InternalExtensions.SafelyRaiseGenericEvent[TEventArgs](IMonitor monitor, String name, IEnumerable`1 handlers, Object sender, TEventArgs args) in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 65

                      Keeps printing out in the console but I can't tell what is broken or missing to fix it.

                      Suggestion would be to replace "A mod" with "mod name" so it's easier to identify the problems on our own.
                       
                      • Cassius Skye

                        Cassius Skye Aquatic Astronaut


                        Yeah you were totally right, I actually solved this myself a lil bit ago but only because i was experimenting with new mods lol. Thank you for your reply! You rock.
                         
                        • Pathoschild

                          Pathoschild Tiy's Beard

                        • worldworld

                          worldworld Void-Bound Voyager

                          Doesn't have SMAPI a manifest itself? The SMAPI window told me so, so I moved the folder elsewhere, and the error doesn't appear again. I guess that it's still running the game? I still don't understand much from modding.
                           
                          • Pathoschild

                            Pathoschild Tiy's Beard

                            Hi @worldworld. Nope, only mods need a manifest. It's safe to delete the SMAPI folder after you install it, since that's just the installer.
                             
                            • Zombino

                              Zombino Big Damn Hero

                              Can anyone tell me why m game crashed?
                               

                                Attached Files:

                              • Pathoschild

                                Pathoschild Tiy's Beard

                                Zombino likes this.
                              • Pathoschild

                                Pathoschild Tiy's Beard

                                SMAPI 2.0 beta is now available for Linux/Mac/Windows! (download link)

                                This is a preview release. Most mods are already updated, but you can check if your mods are compatible first (more mods will be updated before SMAPI 2.0 is out of beta). Feel free to try it out; you can downgrade later by just reinstalling SMAPI 1.15.4.

                                This is a big release (see release notes). Highlights:
                                • Mod update checks
                                  SMAPI now checks if your mods have updates available, and will alert you in the console with a convenient link to the mod page. This works with mods from the Chucklefish mod site, GitHub, or Nexus Mods. SMAPI 2.0 will launch with update-check support for 245+ existing mods, and more will be added as modders enable the feature.

                                • Mod stability warnings
                                  SMAPI now detects when a mod contains code which can destabilise your game or corrupt your save, and shows a warning in the console.

                                • Simpler console
                                  The console is now simpler and easier to read, some commands have been streamlined, and the colors now adjust to fit your terminal background color.

                                • New features for modders
                                  SMAPI 2.0 adds several features to enable new kinds of mods (see API documentation).

                                  The content API lets you edit, inject, and reload XNB data loaded by the game at any time. This let SMAPI mods do anything previously only possible with XNB mods, and enables new mod scenarios not possible with XNB mods (e.g. seasonal textures, NPC clothing that depend on the weather or location, etc).

                                  The input events unify controller + keyboard + mouse input into one event and constant for easy handling, and add metadata like the cursor position and grab tile to support click handling. They also let you prevent the game from receiving input, to enable new scenarios like action highjacking and simple UI overlays.

                                  The mod manifest has a few changes too:
                                  - The new UpdateKeys field lets you specify your Chucklefish, GitHub, or Nexus mod IDs. SMAPI will automatically check for newer versions and notify the player.
                                  - The Version field is now a semantic string like "1.0-alpha". (Mods which still use the version structure will still work fine.)
                                  - The Dependencies field now lets you add optional dependencies which should be loaded first if available.

                                  Finally, the SDate utility now has a DayOfWeek field for more convenient date calculations, and ISemanticVersion now implements IEquatable<ISemanticVersion>.

                                • Goodbye deprecated code
                                  SMAPI 2.0 removes all deprecated code to unshackle future development. That includes...
                                  • removed all code marked obsolete;
                                  • removed TrainerMod's save and load commands;
                                  • removed support for mods with no Name, Version, or UniqueID in their manifest;
                                  • removed support for multiple mods having the same UniqueID value;
                                  • removed access to SMAPI internals through the reflection helper.
                                • Command-line install
                                  For power users and mod managers, the SMAPI installer can now be scripted using command-line arguments (see readme).
                                Feedback and bug reports are welcome here! For help with mod compatibility, see how to fix mods broken in SMAPI 2.0.

                                [Edit: download removed. See latest version instead.]
                                 
                                  Last edited: Oct 14, 2017
                                • Zombino

                                  Zombino Big Damn Hero

                                Thread Status:
                                Not open for further replies.

                                Share This Page