WIP [SMAPI] Sprinting Mod

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

Tags:
  1. mistersnuggler

    mistersnuggler Tentacle Wrangler

    Hey guys, Yoshify hasn't gotten around to updating his Sprinting! mod, so I've updated mine.

    This sprinting mod uses buffs and comes with the option to toggle sprinting on/off. It should be compatible with xbox controllers, but I haven't tested it. If someone can confirm before I start testing and post results here I would appreciate it! But I'll be testing it out sometime this week (I hope!)

    I will consider this mod released once I test and confirm the button codes on a xbox controller are working.

    Download source and release here.
    Requires SMAPI 0.39.2 or higher, to install download release zip file and unzip contents to mods folder.

    Instructions, accepted key codes, or accepted controller button codes can be found in the README provided in the SprintingMod folder.

    Update: This mod should now work with Zoryn's "Movement Mod" - at least in the tests I've run it works. But I haven't tested every case! So please let me know if anyone has any problems.

    Old note

    Note:
    This mod has been discontinued, please use Yoshify's "Sprint!" mod located here.
    I will keep this mod here as an example of how a mod can be written. The source code can be found here.


    Original Post

    Overview
    I really like the idea of being able to increase the player's run speed since the vanilla speed feels so slow, but I wanted something that was easy to run by holding a button. This mod increases the player's speed (auto-run or not) while holding the mapped button.

    As far as I know this mod has no controller support, but I haven't really tested for it. To be fair I haven't actually tested using other keys besides either control key.

    Installation
    • Install SMAPI v0.37 or higher (here)
    • Download SprintingMod.zip (here)
      • Extract files to ~\Stardew Valley\Mods folder
    Configuration
    To change a key mapping or to increase the speed you run at, edit the corresponding values in the SprintingMod.ini. The value of "SprintSpeed" changes the speed that you run at when pressing the mapped button. The value of "KeyToPress" represents the mapped value of the Mouse/Keyboard key that must be pressed; these values relate to the values on this table.

    Default values are:
    SprintSpeed=3
    KeyToPress=17

    Where 17 corresponds to a control key.

    Plans
    I will probably call this done once I've completed the following:
    • Better way to remap "sprint" key
    • Controller support
      • Maybe it already has it and I just need to test it?
    • Make it so that sprinting uses stamina
      • With the option to toggle this on/off
    I'm open to suggestions for future stuff too! But I would like to keep this mod as lightweight as possible.

    EDIT: changed description to hopefully be more clear. Hopefully.
    EDIT: EDIT: I recommend using Yoshify's "Sprinting!" mod.
    EDIT: EDIT: EDIT: Until Yoshify returns and updates his mod, feel free to use this one!
     
      Last edited: Mar 30, 2016
      unmog likes this.
    • Drogean

      Drogean Scruffy Nerf-Herder

      am i the only person who instantly turned on auto-run and has never walked in this game?


      Walking?
      [​IMG]
       
      • GosuGian

        GosuGian Twenty-three is number one

        LMFAO
         
          RoastedCoconutz likes this.
        • mistersnuggler

          mistersnuggler Tentacle Wrangler

          Hah! Wow, that's perfect. I guess I should change my description a bit! The mod actually changes the player's speed, regardless of using auto-run or not :D
           
          • cantorsdust

            cantorsdust Subatomic Cosmonaut

            Added to mod list!
             
            • unmog

              unmog Void-Bound Voyager

              thankyou~ btw shift is apparently 16. I prefer shift for running. I changed the in game walking to left control
               
              • mistersnuggler

                mistersnuggler Tentacle Wrangler

                Awesome, thanks for pointing that out. I made changes in my README file so that hopefully it's apparent you can use 16 for either left or right shift keys or 17 for either left or right control keys. If you find any other issues, please let me know! I'll try to fix them as I become aware of them.
                 
                • unmog

                  unmog Void-Bound Voyager

                  Hmm, figured I should share a problem Im having with the mod. I uploaded a video of it too in case it helps. Anyway the mod didnt seem to be working for me, maybe its because Im using Zoryns movement mod at the same time. I have a hard time believing it isnt some kind of mod conflict. Anyway first off I tried using shift like I said instead of control, and the sprint symbol would pop up but didnt apparently do anything. So I think "Maybe Ill set hold to sprint to false". Nope. Then I think "Eh maybe its just shift" so I try a few other buttons including space. Then I notice something, it seemed for a fraction of a second Id get a speed boost. To make sure it wasnt just my mind playing tricks on me I upped the speed to crazy +99 levels. Sure enough, Id shoot forward pretty far and return to normal speed afterward.

                  Like I said, I uploaded a 30 second video of it for ya. In the video I try just holding down the sprint key and you can see the effect. http://plays.tv/video/56f8c9658d6bfab291

                  Ill copy paste the config settings I have in that video too.
                  {
                  "HoldToSprint": false,
                  "SprintSpeed": 99,
                  "SprintKey": "Space",
                  "StaminaDrain": 1,
                  "StaminaDrainRate": 5,
                  "SprintKeyForControllers": "LeftStick"
                  }

                  Edit= Took out Zoryns movement mod, and it works fine. Maybe could give a warning of mod compatibility issues. Its too bad... anyway to get it to work together? Or maybe you could incorporate some of the stuffs from it into yours?

                  I liked the diagnal fix, but mostly I was just wanting to make the default jog speed slightly faster. I only had it increased by 1 to give a default speed of 6, that way a sprint of +4 would get me to 10 and not seem that big a jump. But for now I'll just get rid of it and change the sprint speed to 5 which essentially doubles the normal speed.
                   
                    Last edited: Mar 28, 2016
                  • mistersnuggler

                    mistersnuggler Tentacle Wrangler

                    Thanks for bringing that up! I'll put the mod conflict somewhere people can read it and I'll see if I can go about finding the problem and hopefully fix it. :D
                     
                    • mistersnuggler

                      mistersnuggler Tentacle Wrangler

                      @unmog When you have the chance, can you test the latest SprintingMod release with Zoryn's MovementMod again? I'm hoping that I fixed the problem, but let me know if you run into any errors!
                       
                      • unmog

                        unmog Void-Bound Voyager

                        Oh crap sorry didnt notice you messaged me. I came back to see if there was any updates, was wanting to know if it worked with the latest version of the game and Smapi. >.>
                         

                        Share This Page