Tool SMAPI: Stardew Modding API

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

  1. OrSpeeder

    OrSpeeder Phantasmal Quasar

    Today I tried to mod the Zoom thing (75% is still too big to me).

    Found out that CA way of fixing stuff, is instead of refactoring, or editing old stuff, to just add new stuff...

    In the zoom case, if you request 75%, that should result in a 3x upscaler, what the game curretly do is render in the original upscaled 4x in a render target, and render the result downscaled back to 75% of the size!

    Thus I guess SMAPI will rarely, if ever, break severely, because CA never changes anything, he only ADDS stuff (thus why several classes have 3+ constructors, lots of redundant methods and functions, code paths that never happen but are never removed...)
    • iDarklight

      iDarklight Scruffy Nerf-Herder

      Would it be possible to add something to SMAPI and its console that would let you spawn enemies?
      • hihi427

        hihi427 Tentacle Wrangler

        Every time I use any tool (axe, scythe..all tools) hit the trees
        there is an error "TREE: IsClient:False randomOutput: xxxx"
        tried 1.04 and 1.05+SMAPI_0.37.2A, both of them have this error
        my mod folder only has TrainerMod.dll in it
        • VIspReaderUS

          VIspReaderUS Void-Bound Voyager

          are you sure thats an error? is font colored red?
            hihi427 likes this.
          • hihi427

            hihi427 Tentacle Wrangler

            sorry i am not sure. may be it is my mistake.
            also found processing godes generates "IN SECOND IF".
            Not many actions make messages.:oops:
              Last edited: Mar 11, 2016
            • ClxS

              ClxS Pangalactic Porcupine

              If it's not red I don't think there's anything to worry about.
              It's probably coming from the Trainer. I haven't look at the trainer in a while so it might be some left over junk in that I've not removed. I'll check when I'm home. :)
                hihi427 likes this.
              • montana123

                montana123 Subatomic Cosmonaut


                this is my fault! I'm sorry. This was just some test values for me which I forgot to delete out :D I will delete it later when I'm back from work
                  hihi427 likes this.
                • hihi427

                  hihi427 Tentacle Wrangler

                  An error occured in the base update loop: System.IndexOutOfRangeExcep
                  StardewValley.Menus.Bundle..ctor(Int32 bundleIndex, String rawBundleInfo, B
                  oolean[] completedIngredientsList, Point position, Texture2D texture, JunimoNote
                  Menu menu)
                  StardewValley.Menus.JunimoNoteMenu.setUpMenu(Int32 whichArea, Dictionary`2
                  StardewValley.Menus.JunimoNoteMenu..ctor(Int32 whichArea, Dictionary`2 bund
                  StardewValley.Locations.CommunityCenter.checkAction(Location tileLocation,
                  Rectangle viewport, Farmer who)
                  StardewValley.Game1.tryToCheckAt(Vector2 grabTile, Farmer who)
                  StardewValley.Game1.pressActionButton(KeyboardState currentKBState, MouseSt
                  ate currentMouseState, GamePadState currentPadState)
                  StardewValley.Game1.UpdateControlInput(GameTime time)
                  StardewValley.Game1.Update(GameTime gameTime)
                  StardewModdingAPI.Inheritance.SGame.Update(GameTime gameTime)

                  when I touch the 1st Bundle board, game crash. Only TrainerMod.dll in mod folder.

                  maybe not mod's problem... i crashed even without using api..
                  • ClxS

                    ClxS Pangalactic Porcupine

                    I agree, from the look at that stack trace it's the game itself which caused the crash. I'm guessing the bundle index was wrong but no idea how that'd happen.
                    What version of Stardew are you on btw? I want to see if I can get this too.
                    • hihi427

                      hihi427 Tentacle Wrangler

                      i guess my save file was broken. Tried to start a new game without any mod and this time no problem.
                      • spring_onions

                        spring_onions Master Chief

                        Grinded my way down to the 31st level of the Skull Cave, found me my first prismatic shard, a lot of iridium ores, and an iridium bar then this happened:
                        An error occured in the base update loop: System.NullReferenceException: Object reference not set to an instance of an object.
                        at StardewValley.Locations.BusStop.doorOpenAfterReturn(Int32 extraInfo)
                        at StardewValley.TemporaryAnimatedSprite.update(GameTime time)
                        at StardewValley.Locations.BusStop.UpdateWhenCurrentLocation(GameTime time)
                        at StardewValley.Game1.UpdateLocations(GameTime time)
                        at StardewValley.Game1.Update(GameTime gameTime)
                        at StardewModdingAPI.Inheritance.SGame.Update(GameTime gameTime)

                        Feels really, really, really sad :(
                        • Kit Ballard

                          Kit Ballard Tentacle Wrangler

                          Using SMAPI 0.37.2 alpha on 1.05 and after winter my farm gets slammed with some serious lag, like 1~15 fps. didn't do that on the old SMAPI and 1.04. Any idea what could possibly be up? Tested without SMAPI and the farm has a very slight lag (due to me running som'in else, but not to the level of smapi). If there's been an update, oops! But was pretty puzzling when winter ended and I'm barely able to get outside the farm (the rest of the game plays fine though)

                          I actually brought this up on the old one before you picked it up and the fella said that was normal.
                          • OrSpeeder

                            OrSpeeder Phantasmal Quasar

                            What mods you have installed Kit Ballard?

                            Also did you tested if it lagged without the mods?

                            I lost my save, so no winter for my yet :( (I made a copy of my save to test a mod, then accidentally hit control+z, and windows interpreted it to mean undo the copy, meaning delete my backup, after I had deleted the original too :/)
                            • Kit Ballard

                              Kit Ballard Tentacle Wrangler

                              Tested without the mods. I made sure I covered all my tracks before asking. The only mod that I know of that would of possibly caused lag (that handy cheat menu thing) but that def wasn't it. The only area that lags is near the farm house. the further I get from it (on the same map screen I mean) the better the lag gets, right up to changing screens. I get a solid 60 fps on every single map other wise. I also noticed the lag on my cheated char, but I originally wrote that off as the game trying to figure out what to do with all that empty space that I blew up :rofl: since I was still in winter on my normal char.
                              • OrSpeeder

                                OrSpeeder Phantasmal Quasar

                                Ah, I think I know what is the problem.

                                I think it is a bug that is already fixed on the dev version, need to wait for CLxS to release it :) I am waiting for it too (although I can of course have the dev version here, when I am playing normally and making real mods, I use the release version to make sure I am seeing what other players are seeing, I only use dev versions when I am making experimental stuff)
                                  Kit Ballard likes this.
                                • Kit Ballard

                                  Kit Ballard Tentacle Wrangler

                                  Ah, ok. Sure hope that's exactly my issue :rofl: I know my laptop isn't the best of things, but I'm grateful it can play SDV laggless (unless I have media player on lol but that's only taking like, 4 frames tops)
                                  • Alice

                                    Alice Scruffy Nerf-Herder

                                    I think it was stated that those lines are actually from the game itself rather than SMAPI or the trainer so there's not really any way to prevent them.
                                    • ClxS

                                      ClxS Pangalactic Porcupine

                                      Hey there, so here's 0.37.3 to hopefully help reduce this problem.. Unfortunately the way SMAPI was setup in the first place to check for when objects in a location changed was not that good. It would do a pretty poor performance action on every object in the current location then add the results together. Because of that, locations with a huge amount of objects (like the farm!) would be slowed down a lot.

                                      Let me know if you're still having problems! There'll likely be more changes we can make to optimise it, and I'll need to do a proper performance check of SMAPI at some point anyway. :)

                                      New version released

                                      So here's version 0.37.3:

                                      It introduces a few new features for mod developers:
                                      - Small performance patch. No content or API changes so it's not nessecary to move to this version if you are not experiencing performance issues.

                                      Again, thanks to jtfin who added this fix!
                                        Kit Ballard likes this.
                                      • Kit Ballard

                                        Kit Ballard Tentacle Wrangler

                                        Thanks sug. I'll give it a whirl real quick and give you some input ^_^

                                        edit: 100% fix. I'm capped at 60fps outside the house. Thank you again ^_^
                                        • OrSpeeder

                                          OrSpeeder Phantasmal Quasar

                                          I am testing here, seemly no bugs in the newest version so far =D

                                          Share This Page