Dash Stamina

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Dr.Yami, Nov 16, 2012.

  1. Dr.Yami

    Dr.Yami 。◕‿◕。 Developer

    Messages:
    994
    Likes Received:
    736
    Location:
    Finland
    First Language:
    Vietnamese
    Primarily Uses:
    Other
    Dash Stamina


    Introduction

    This script provides stamina feature for dashing on map. Dashing will comsume stamina and be disable if run our of stamina.

    Features

    - Provides Stamina.

    - A small window shows stamina.

    Screenshots

    [​IMG]
    Download & Manual

    Get them here

    Credit

    Yami
     
    Last edited by a moderator: Dec 9, 2012
    #1
    DoctorArtist, Acetonide and Archeia like this.
  2. Nicke

    Nicke Fortune seeker Veteran

    Messages:
    529
    Likes Received:
    500
    Location:
    Sweden
    First Language:
    Swedish
    Primarily Uses:
    RMMV
    Seems like a nice addition. You should implement potions (items) that will increase/decrease stamina and maybe the stamina will affect the party in battle? Just a suggestion. :)
     
    #2
    DoctorArtist likes this.
  3. Galv

    Galv Veteran Veteran

    Messages:
    1,173
    Likes Received:
    1,108
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    I see you added a disable switch in there - very good idea, Yami :)

    I recommend anyone who uses this to let players run as much as they want in towns/safe areas to not cause unnecessary frustration!
     
    #3
  4. Chaos Avian

    Chaos Avian Abyssal Wing Restaff

    Messages:
    3,231
    Likes Received:
    780
    Location:
    Currently fighting demon hoards for fun.
    First Language:
    English
    This could work well for on-screen enemy encounters that are faster than the actor's normal speed as well. Want to run from a big scary dragon? Well now you can wi- Oh you just ran out of stamina... Well err, good luck fighting that dragon :p
     
    #4
  5. Solistra

    Solistra Veteran Veteran

    Messages:
    593
    Likes Received:
    241
    Stamina doesn't update if the player is holding down the dash key but not moving -- that seems counter-intuitive to me, since the player should theoretically be resting if they aren't moving regardless of the state of the dash button. Other than that, this seems very nice, though.
     
    #5
  6. StarkinGyra

    StarkinGyra Adventurer Member

    Messages:
    219
    Likes Received:
    9
    Location:
    Portland, OR
    First Language:
    English
    Thats awesome. I like limiting the amount the player can dash.
     
    #6
  7. Liak

    Liak Veteran Veteran

    Messages:
    1,789
    Likes Received:
    269
    Location:
    Germany
    First Language:
    German
    I don't know very much about scripting, but it is generally possible to bind numbers like the stamina in this script to variables? That way, the player could do all kinds of things to change stamina. For example, I was immediately reminded of Skyward Sword, where you also have a stamina bar. It's used not only for running, but also for climbing faster and various other things that are exhausting, and you could restore your stamina by collecting certain items on your way. All these things were easily doable with stamina being controlled by a variable. :)
     
    #7
  8. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    Awesome script.

    2 questions though.

    How would I disable or permanently the window that says how much stamina you have and is there a way to have the stamina increase when the character levels up?
     
    #8
  9. Dr.Yami

    Dr.Yami 。◕‿◕。 Developer

    Messages:
    994
    Likes Received:
    736
    Location:
    Finland
    First Language:
    Vietnamese
    Primarily Uses:
    Other
    Yeah updated.

    Added recovery frames. Added stamina variable. Fixed recover problem when holding dash key.
     
    #9
  10. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    Still wondering how I can work the variable to increase with each level for this script.

    Also thanks

    Edit:

    I noticed something, the enable window part of the script does not work.
     
    Last edited by a moderator: Nov 18, 2012
    #10
  11. Dr.Yami

    Dr.Yami 。◕‿◕。 Developer

    Messages:
    994
    Likes Received:
    736
    Location:
    Finland
    First Language:
    Vietnamese
    Primarily Uses:
    Other
    Okay fixed :D .
     
    #11
  12. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    Just wondering if this idea I have for this script is possible or not.

    At the beginning of my game (After the tutorial levels), the player is asked several questions.

    Depending on the answers (Which are multiple choice) the player will be able to have specific things happen within the game. (EG loose job experience or keep Job Experience)

    I have started doing the same type of thing with the stamina, although I have not fully written out the options the player has to choose from within the game but I have jotted them down on a text file for my game.

    Here are the options:

    Option 1 is to have the stamina stay as it is.

    Option 2 is to have the stamina increase at a random number (say between 5 and 55) each time the character levels up

    Option 3 is to have the stamina link with the characters agility stat

    Option 4 is to have the stamina both link with the character's agility stat as well as increase a random number (say between 5 and 55) each time the character levels up
     
    Last edited by a moderator: Dec 4, 2012
    #12
  13. Liak

    Liak Veteran Veteran

    Messages:
    1,789
    Likes Received:
    269
    Location:
    Germany
    First Language:
    German
    You could do that with variables and stats, maybe. Is there any chance to run a common event when leveling-up where you can modify variables and update the dash variable accordingly?
     
    #13
  14. Non Ya

    Non Ya Villager Member

    Messages:
    18
    Likes Received:
    1
    How do i recall it for conditional branch? for example:

    if I was pushing button X the stamina goes down until i stop pressing the button... i know its set to when it dash then stamina drops but i was wondering the script call code to where I can control the stamina to go down if conditional branch is true.
     
    Last edited by a moderator: Dec 8, 2012
    #14
  15. Titanhex

    Titanhex Do-It-All Veteran

    Messages:
    577
    Likes Received:
    215
    Location:
    In my office.
    First Language:
    English
    Primarily Uses:
    N/A
    I'm having an issue with this. I've fixed it, but consider adding this to your system.

    When I hide/disable the dash bar using the Switch, then re-enable it, it doesn't show the window until I enter and exit another scene, such as scene menu or scene save.

    This can be a big problem when trying to enable and disable the bar to keep it from becoming intrusive.

    To fix this, I change Window_Stamina's method

    def update

    and find the line

       self.hide if !$game_switches[YES::DASH::DISABLE_SWITCH]

    and replace it with:


        !$game_switches[YES::DASH::DISABLE_SWITCH] ? self.hide : self.show

    Also how about implementing something like this:

      #--------------------------------------------------------------------------  # new method: adjust stamina  #--------------------------------------------------------------------------  def adj_stamina(value)    @stamina += value  end
    Though, if it was my UI I'd make adjusting that variable a lot easier and accessible for non-scripters.
     
    Last edited by a moderator: Feb 11, 2013
    #15
    Dr.Yami likes this.
  16. Dr.Yami

    Dr.Yami 。◕‿◕。 Developer

    Messages:
    994
    Likes Received:
    736
    Location:
    Finland
    First Language:
    Vietnamese
    Primarily Uses:
    Other
    Updated new version. Added recovery method and rest area feature.
     
    #16
    Chaos17 likes this.
  17. heavenlysynner

    heavenlysynner Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Is there a way to use this as a skill cost? For instance, I am using an ABS right now, specifically Falcao Pearl, and I would like to only have one skill cost, energy, which is consumed by every action, including running. This stamina system would obviously be perfect for it.
     
    #17
  18. Allmyfault

    Allmyfault Villager Member

    Messages:
    29
    Likes Received:
    2
    First Language:
    English
    Now if only someone could make it so that after running x amount of steps with stamina you get a permanent increase. This of course would be in small amounts that over time increase in size.
     
    #18
    ShinGamix likes this.
  19. ShinGamix

    ShinGamix DS Style 4Ever! Veteran

    Messages:
    3,906
    Likes Received:
    447
    Location:
    Alien Ship
    First Language:
    April Fools
    Primarily Uses:
    N/A
    so stamina levels? sounds awesome to me.
     
    #19
  20. ShadowFox

    ShadowFox Adventurer Member

    Messages:
    255
    Likes Received:
    10
    First Language:
    English
    Need some help.

    I have set the script to disable the stamina bar, BUT when I load up the main menu and quit it, the stamina window appears for a split second before vanishing.

    How do I make it so that the stamina window is either IN the main menu OR not showing at all?

    (With a number switch (or a true/false option) to control which option it is)
     
    #20

Share This Page