RELEASED [SMAPI] Sprint and Dash Button 1.1

Adds a button for sprinting, and a combat temporary dash

  1. OrSpeeder

    OrSpeeder Phantasmal Quasar

    OrSpeeder submitted a new mod:

    [SMAPI] Sprint and Dash Button - Adds a button for sprinting, and a combat temporary dash

    Read more about this mod...
     
    • SasuraUchiha

      SasuraUchiha Zero Gravity Genie

      Thanks a lot!

      Edit: Now I only have one problem... How do I know which keys are which numbers, so that I can configure the controls from this mod?
       
      • Z3r0ViP

        Z3r0ViP Void-Bound Voyager

        Works great, thank you! You should also probably comment in the config file that the "Ctrl" key is for sprinting and "N" key for dashing. And maybe add a toggle option for sprinting later?


        Ctrl for sprint, N for dash. My bad, sorry. I'm tired. Haha
         
          Last edited: Mar 27, 2016
        • Linnaeus12

          Linnaeus12 Void-Bound Voyager

          Would it be possible to add a way to configure the amount of stamina drained like the Sprint! mod?
          She's talking about the config.json file where the keys for sprinting and dashing are assigned to numbers. (162 for spring and 78 for dash)
           
          • OrSpeeder

            OrSpeeder Phantasmal Quasar

            I don't want to make the mod too flexible, I care about game balance, I don't like making "cheaty" mods... I might later add the option to make it harder though.


            As for the keys:

            Code:
            public enum Keys
                {
                    None = 0,
                    Back = 8,
                    Tab = 9,
                    Enter = 13,
                    Pause = 19,
                    CapsLock = 20,
                    Kana = 21,
                    Kanji = 25,
                    Escape = 27,
                    ImeConvert = 28,
                    ImeNoConvert = 29,
                    Space = 32,
                    PageUp = 33,
                    PageDown = 34,
                    End = 35,
                    Home = 36,
                    Left = 37,
                    Up = 38,
                    Right = 39,
                    Down = 40,
                    Select = 41,
                    Print = 42,
                    Execute = 43,
                    PrintScreen = 44,
                    Insert = 45,
                    Delete = 46,
                    Help = 47,
                    D0 = 48,
                    D1 = 49,
                    D2 = 50,
                    D3 = 51,
                    D4 = 52,
                    D5 = 53,
                    D6 = 54,
                    D7 = 55,
                    D8 = 56,
                    D9 = 57,
                    A = 65,
                    B = 66,
                    C = 67,
                    D = 68,
                    E = 69,
                    F = 70,
                    G = 71,
                    H = 72,
                    I = 73,
                    J = 74,
                    K = 75,
                    L = 76,
                    M = 77,
                    N = 78,
                    O = 79,
                    P = 80,
                    Q = 81,
                    R = 82,
                    S = 83,
                    T = 84,
                    U = 85,
                    V = 86,
                    W = 87,
                    X = 88,
                    Y = 89,
                    Z = 90,
                    LeftWindows = 91,
                    RightWindows = 92,
                    Apps = 93,
                    Sleep = 95,
                    NumPad0 = 96,
                    NumPad1 = 97,
                    NumPad2 = 98,
                    NumPad3 = 99,
                    NumPad4 = 100,
                    NumPad5 = 101,
                    NumPad6 = 102,
                    NumPad7 = 103,
                    NumPad8 = 104,
                    NumPad9 = 105,
                    Multiply = 106,
                    Add = 107,
                    Separator = 108,
                    Subtract = 109,
                    Decimal = 110,
                    Divide = 111,
                    F1 = 112,
                    F2 = 113,
                    F3 = 114,
                    F4 = 115,
                    F5 = 116,
                    F6 = 117,
                    F7 = 118,
                    F8 = 119,
                    F9 = 120,
                    F10 = 121,
                    F11 = 122,
                    F12 = 123,
                    F13 = 124,
                    F14 = 125,
                    F15 = 126,
                    F16 = 127,
                    F17 = 128,
                    F18 = 129,
                    F19 = 130,
                    F20 = 131,
                    F21 = 132,
                    F22 = 133,
                    F23 = 134,
                    F24 = 135,
                    NumLock = 144,
                    Scroll = 145,
                    LeftShift = 160,
                    RightShift = 161,
                    LeftControl = 162,
                    RightControl = 163,
                    LeftAlt = 164,
                    RightAlt = 165,
                    BrowserBack = 166,
                    BrowserForward = 167,
                    BrowserRefresh = 168,
                    BrowserStop = 169,
                    BrowserSearch = 170,
                    BrowserFavorites = 171,
                    BrowserHome = 172,
                    VolumeMute = 173,
                    VolumeDown = 174,
                    VolumeUp = 175,
                    MediaNextTrack = 176,
                    MediaPreviousTrack = 177,
                    MediaStop = 178,
                    MediaPlayPause = 179,
                    LaunchMail = 180,
                    SelectMedia = 181,
                    LaunchApplication1 = 182,
                    LaunchApplication2 = 183,
                    OemSemicolon = 186,
                    OemPlus = 187,
                    OemComma = 188,
                    OemMinus = 189,
                    OemPeriod = 190,
                    OemQuestion = 191,
                    OemTilde = 192,
                    ChatPadGreen = 202,
                    ChatPadOrange = 203,
                    OemOpenBrackets = 219,
                    OemPipe = 220,
                    OemCloseBrackets = 221,
                    OemQuotes = 222,
                    Oem8 = 223,
                    OemBackslash = 226,
                    ProcessKey = 229,
                    OemCopy = 242,
                    OemAuto = 243,
                    OemEnlW = 244,
                    Attn = 246,
                    Crsel = 247,
                    Exsel = 248,
                    EraseEof = 249,
                    Play = 250,
                    Zoom = 251,
                    Pa1 = 253,
                    OemClear = 254
                }
             
              Davrial and Vith like this.
            • SasuraUchiha

              SasuraUchiha Zero Gravity Genie

            • Linnaeus12

              Linnaeus12 Void-Bound Voyager

              Yes, this is a problem. But still i wanna explain my point of view, I just want a much smaller sprint like a true run, cause right now the main character's "run" is only ~1.5 times faster than the villagers walking speed.
               
              • OrSpeeder

                OrSpeeder Phantasmal Quasar

                I added to the mod sprinting, that makes you ALMOST fast as the horse, with a minor energy cost, and a dash thing, although I designed it for combat, you can spam it if you want to get around faster too (in fact, if you can combine both and go VERY fast if you want to... you just need to NOT press both buttons at once, my crap code only reads one button or the other, not both in the same frame)
                 
                • sweetangel20

                  sweetangel20 Starship Captain

                  Is it possible to make the sprint a toggle?
                   
                  • OrSpeeder

                    OrSpeeder Phantasmal Quasar

                    I will make it later... right now I am workign on fixing the Sprinkler mod, that has been a while since I updated it... and is a kind of major update.
                     
                    • sweetangel20

                      sweetangel20 Starship Captain

                      That's fine! Take your time! :)
                       
                      • OrSpeeder

                        OrSpeeder Phantasmal Quasar

                        Yep, sorry... it will take a little longer, SMAPI 0.39.3 was released on GitHub, and I went in a wild goose chase trying to update my mods to it, only to find it has a bug, and I don't have any more time to mod SDV today :(
                         
                        • Linnaeus12

                          Linnaeus12 Void-Bound Voyager

                          Thanks for your source code (and guide). I somehow managed to change the values to make it somehow like my config for the sprint mod by yoshify.
                           
                          • littleraskol

                            littleraskol Subatomic Cosmonaut

                            This mod is indispensable for me. Although, on the subject of configuration, I think I'd like to be able to modify the speed boost or the stamina cost to make it less effective: costs more and/or gives less speed.
                             
                            • OrSpeeder

                              OrSpeeder Phantasmal Quasar

                              I will see about that.

                              Note that I can't make it LESS speed, due to a seemly bug, I tried increasing speed by "1" (it only accept integer numbers), and it didn't work, only speed "2" or more make a difference, and I couldn't find out why.

                              using speed "1" or "0" makes no effect, thus I am using speed "2".
                               
                              • littleraskol

                                littleraskol Subatomic Cosmonaut

                                That's pretty weird! Guess all I'd lobby for in that case is a double energy drain option or version, it sometimes seems like I can run for way too long.

                                Edit to add: If not wanting the mod to be too cheaty is a concern, is it possible to add a check to whatever value the code gets from a config file like "If EnergyCost < MinEnergyCost, Set EnergyCost = MinEnergyCost" or something? In this way, the value can only go up.
                                 
                                  Last edited: Apr 12, 2016
                                • OrSpeeder

                                  OrSpeeder Phantasmal Quasar

                                  Yes, I am planning in doing that.
                                   
                                    sweetangel20 and littleraskol like this.
                                  • Vith

                                    Vith Cosmic Narwhal

                                    Thank you, OrSpeeder! When my character runs out of speed boost items, this is perfect.
                                     
                                    • unoprata

                                      unoprata Void-Bound Voyager

                                      Hey OrSpeeder, is there any way to make the keybindings to Xbox360 Bumper buttons? They are unused and I'd love to use this mod with the controller.
                                       
                                      • senlim

                                        senlim Subatomic Cosmonaut

                                        Great mod, I'm using it.
                                        However, can you disable it when player is on horse?
                                        Not sure if that hasn't been reported yet.

                                        Thanks.
                                         

                                        Share This Page