RELEASED [SMAPI 0.37+] Sprint! A faster, stamina draining run.

Discussion in 'Gameplay Mechanics' started by Yoshify, Mar 6, 2016.

  1. Angelesse

    Angelesse Void-Bound Voyager

    Yoshify knows, it's being look at. Trust me I'm checking in every couple of hours :3 Until then, we'll have to deal with paying for coffee at the bar.
     
    • Yoshify

      Yoshify Intergalactic Tourist

      It is being looked at and I'm confident I know what's causing the issue - Sorry for the wait guys! I've been busy with university.
       
        Dratro and Schaeffer like this.
      • Xotukel

        Xotukel Void-Bound Voyager

        Take your time! :) I am really excited to see this working again.
         
        • sweetangel20

          sweetangel20 Starship Captain

          Take care of your studies and life first! :)
           
          • Schaeffer

            Schaeffer Space Spelunker

            In the meantime, has anyone figured out how to get the Storm Movement Mod working? I've been trying to set it up but it's still not working, maybe someone else in this thread has tried it and can confirm that the latest version of the mod works with the latest versions of Storm and Stardew?

            EDIT: The creator of that movement mod just released a patch that made it work. I guess it had been broken for the past 4-6 hours during which I've been trying everything to get it to work. Whatever. If anyone else is waiting for Yoshify to fix the SMAPI movement mod, you can now install Storm and use the Storm Movement Mod and that works.
             
              Last edited: Mar 11, 2016
            • _CG_

              _CG_ Scruffy Nerf-Herder

              Any news? Havent played because of this error :C dont want to install the storm one.

              EDIT: Just read that SMAPI is going to die, so i guess ill have to switch to storm
               
              • Schaeffer

                Schaeffer Space Spelunker

                I switched to Storm a few days ago and I have Storm versions of everything I need except CJB's Show Sell Price mod. It's really not that bad, but the installation process was very confusing. The original post didn't clarify that you actually DON'T need to download Microsoft Visual Studio (a 9 GB program) to PLAY mods, that's only if you want to MAKE mods. So I had a lot of crap to uninstall and it took a few hours. But if you install it correctly, Storm is a very small program and easy to use! Just ask me or anyone in the Storm mod threads any questions you like about Storm and everyone will do their best to help!
                 
                  _CG_ likes this.
                • OrSpeeder

                  OrSpeeder Phantasmal Quasar

                  SMAPI ins't going to die, the original SMAPI author (Zoryn) switched to Storm, and correctly predicted that SMAPI 0.36 wasn't good.

                  Someone else (ClsX) immediately picked up SMAPI project, updated it to 0.37 by changing lots of things (thus why 0.36 and 0.37 mods are incompatible) and is now working in making SMAPI 0.38, that will go even further away from the problems that SMAPI 0.36 had.

                  If 0.38 work as intended, SMAPI won't die for a while yet.
                   
                    _CG_ likes this.
                  • Jigain

                    Jigain Phantasmal Quasar

                    Continued development of SMAPI is kind of a double edged sword though...

                    On one hand, it's good that the mods that have already been developed and designed with SMAPI in mind aren't immediately rendered unusable. On the other hand, since SMAPI and Storm are completely incompatible with each other, and since mods for one API isn't compatible with the other, by having two actively developed APIs you're going to split the modding community in two, one side which favors one API, one side that favors the other, with the mod users getting the shaft, metaphorically speaking. I'm in that situation myself right now, with exactly 50% of the mods I want existing strictly for Storm, and the other 50% existing only for SMAPI. If SMAPI had been truly discontinued, eventually the SMAPI mods would be converted to Storm or replaced by Storm equivalents. Right now, you have to make a choice between one or the other.

                    Really, it's the console wars all over again, only nobody profits from it.
                     
                    • OrSpeeder

                      OrSpeeder Phantasmal Quasar

                      The problem is that ignoring the political issues between SMAPI and Storm that I won't bring here, right now some mods are only possible in one of them.

                      For example CJB cheat mod for now can't be done in Storm, neither the show-grid mod, and many other UI mods (well, just look at the UI section, it is mostly SMAPI based).
                      I started doing a mod for Storm, that I couldn't finish... but when I started again in SMAPI, I could go on even less, although the mod ultimately wasn't possible in any of them, I did found an area where Storm has more power too.

                      So for now... it is the way it is.
                       
                        Jigain likes this.
                      • _CG_

                        _CG_ Scruffy Nerf-Herder

                        Yeah, that sucks. Well, changing to Storm because i wanted that mod with health bars on mobs too. Thanks you all.
                         
                          Schaeffer likes this.
                        • OrSpeeder

                          OrSpeeder Phantasmal Quasar

                          Schaeffer and Zevrix like this.
                        • Schaeffer

                          Schaeffer Space Spelunker

                          Oh you're a coder? Any chance you know how to fix the latest version of Yoshify's SMAPI Sprint mod to work with 1.05? Ever since the 1.05 update broke it, I stopped using it and had to switch to Storm since Storm has a functional MovementMod, but I'd prefer to continue using SMAPI so that I can use the CJB Show Sell Price mod. I think the source is in the OP? A lot of people in this thread would really appreciate it if you could figure it out!
                           
                          • OrSpeeder

                            OrSpeeder Phantasmal Quasar

                            Actually I looked into it already :p

                            What is happening is that his sprint mod works by adding the sprint speed when you press the button, and removing when you release the button, as expected...

                            But CA made a change to 1.05 where every time the 10 minute clock changes, it resets the speed if you don't have a visible buff on the buff list... He probably made this to fix a mistake of his own somewhere.

                            There are 2 ways to fix this spring mod, one is in a hacky and kinda dangerous way, undo CA reset... The other, is add a proper buff.

                            As soon as I have time, I will look into how to create a proper buff :)
                             
                              Zevrix and Schaeffer like this.
                            • Schaeffer

                              Schaeffer Space Spelunker

                              Yeah the safer option sounds better. That would be really nice! Thanks! (If you've seen the Storm MovementMod, all it does is it allows you to adjust the numbers representing the game's default walk speed and the run speed, so what I did is change my walk speed to the default game "run" speed (which is more of a casual trot), and changed my run speed to a sprinting speed, about triple the normal running speed. If that's easier to do than adding a buff, that would probably be just as good of an option for most of the people who used this mod!)
                               
                              • OrSpeeder

                                OrSpeeder Phantasmal Quasar

                                The problem with the approach there is that it is kinda risky, the game movement handling is actually very messy (there are multiple variables for it!) and cutscenes notoriously break because of it very easily.

                                The buff approach I am sure the game will always handle correctly, and if it breaks, is CA fault, not ours...

                                Here are some movement variables sprinkled in the game code:

                                FarmerAddedSpeed
                                addedSpeed (the one this mod uses, and that is reset every time the 10 minute clock changes)
                                speed
                                temporarySpeedBuff
                                movementMultiplier

                                I am also looking into seeing what temporarySpeedBuff does...
                                the "speed" variable is the one Storm edits, I consider it dangerous to edit it, since the code changes that variable in arbitrary ways in a lot of places.
                                "movementMultiplier" is a curious one, it just arbitrarily multiplies the character speed by a fixed value (right now 0.66f), I concluded that this was the thing mentioned in the early changelogs, when CA wrote that he "tweaked the speed a bit and fixed diagonals", what he probably did was add that variable, and also make the game multiply your speed by 0.7 when you are walking in a diagonal.
                                 
                                • OrSpeeder

                                  OrSpeeder Phantasmal Quasar

                                  I managed to make a sprint buff mod. I won't release it today, because I need to sleep, and I want to see if the author of this mod updates it instead.

                                  But what I did (in case he wanna copy):

                                  Code:
                                  static void UpdateTickEvent(object sender, EventArgs e)
                                          {
                                              KeyboardState currentKeyboardState = Keyboard.GetState();           
                                              if(currentKeyboardState.IsKeyDown(Keys.LeftControl) && Game1.player.stamina > 30f)
                                              {
                                                  foreach(Buff buff in Game1.buffsDisplay.otherBuffs)
                                                  {
                                                      if(buff.which == 58012395)
                                                      {
                                                          if(buff.millisecondsDuration <= 35)
                                                          {
                                                              buff.millisecondsDuration = 1000;
                                                              Game1.player.Stamina -= 1f;
                                                          }                       
                                                          return;
                                                      }                   
                                                  }
                                  
                                                  Buff nbuff = new Buff(0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, "Sprinting");
                                                  nbuff.millisecondsDuration = 1000;
                                                  nbuff.which = 58012395;
                                                  Game1.buffsDisplay.addOtherBuff(nbuff);
                                                  Game1.player.Stamina -= 1f;
                                              }
                                          }
                                   
                                    Zevrix and Schaeffer like this.
                                  • Schaeffer

                                    Schaeffer Space Spelunker

                                    Yoshify hasn't logged into the forum in six days, I'm not optimistic he'll be working on this any time soon, but I am glad someone else stepped up!
                                     
                                    • Randonx

                                      Randonx Scruffy Nerf-Herder

                                      I'll ask Yoshi, I'm friends on Steam.
                                       
                                      • rchpweblo

                                        rchpweblo Void-Bound Voyager

                                        Any luck?
                                         

                                        Share This Page