RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Walking speed based on steps Script

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
    Me walk so me walk faster (sure why not)
    Version: 1.4249284847182472894728947

    Introduction? I am kathis what more can I say?

    Ok, my script.  THIS SCRIPT IS MADE BY ME,
    yes I took apart 1 point in the ideal making from the script "The Masked loser" his orignal script is from here
    http://www.gamebaker.com/rmxp/scripts/map-rush.htm#
    I just modified it so that you don't push anything but the speed is calculated by the steps you take.
    if you asked for a screen shot I will seriously question your intelligent mind ...how can you take a still photo of something moving faster ?


    Features

    • you take a step every time you push left, right ,up , down
    • your steps are caluated in a very long if statment
    • if you reach the condition you walk faster...not much to say
    • What I need anohter? fine the range of @speed can be from -9999999999 (defintly not suggested very very very slow...as slow as a tree growing per step) to 999999999999 (again not suggested, hope you can see light move)

    Screenshots

    fine since you demand it again I'll give you a sccreen shot.

    Spoiler for:

    Demo

    now your pushing it -_- FINE!!!.
    Download THE DEMO!!!!.zip 

    Script

    you want it in a code tag? I thought spoiler was better? oh well
    [/list]
    Code: [Select]
    class Game_Character
      alias kathis_makes_moving_faster update_move
      def update_move

     #go to rmrk.net  look up "walking speed beased on steps script" to get the compleate instructions
       
          if $game_party.steps < 10
            @speed = 1
          elsif $game_party.steps.between?(10, 19)
            @speed = 1.1
          elsif $game_party.steps.between?(20, 29)   
            @speed = 1.2
          elsif $game_party.steps.between?(30, 39)
            @speed = 1.3
          elsif $game_party.steps.between?(40, 49)     
            @speed = 1.4
          elsif $game_party.steps.between?(50, 59)
            @speed = 1.5
          elsif $game_party.steps.between?(60, 69)
            @speed = 1.6
          elsif $game_party.steps.between?(70, 79)
            @speed = 1.7
          elsif $game_party.steps.between?(80, 89)
            @speed = 1.8
          elsif $game_party.steps.between?(90, 99)
            @speed = 1.9
          elsif $game_party.steps.between?(100, 199)
            @speed = 2
          elsif $game_party.steps.between?(200, 299)
            @speed = 2.1
          elsif $game_party.steps.between?(300, 399)
            @speed = 2.2
          elsif $game_party.steps.between?(400, 499)
            @speed = 2.3
          elsif $game_party.steps.between?(500, 599)
            @speed = 2.4
          elsif $game_party.steps.between?(600, 699)
            @speed = 2.5
          elsif $game_party.steps.between?(700, 799)
            @speed = 2.6
          elsif $game_party.steps.between?(800, 899)
            @speed = 2.7
          elsif $game_party.steps.between?(900, 999)
            @speed = 2.8
          elsif $game_party.steps.between?(1000, 1099)
            @speed = 2.9
          elsif $game_party.steps.between?(1100, 1599)
            @speed = 3
          elsif $game_party.steps.between?(1600, 2099)
            @speed = 3.1
          elsif $game_party.steps.between?(2100, 2599)
            @speed = 3.2
          elsif $game_party.steps.between?(2600, 3099)   
            @speed = 3.3
          elsif $game_party.steps.between?(3100, 3599)
            @speed = 3.4
          elsif $game_party.steps.between?(3600, 4099)   
            @speed = 3.5
          elsif $game_party.steps.between?(4100, 4599)
            @speed = 3.6
          elsif $game_party.steps.between?(4600, 5099)
            @speed = 3.7
          elsif $game_party.steps.between?(5100, 5599)   
            @speed = 3.8
          elsif $game_party.steps.between?(5600, 6099)
            @speed = 3.9
          elsif $game_party.steps.between?(6100, 6599)
             @speed = 4
          elsif $game_party.steps > 6600
             @speed = 4.1
          end
             
            @move_speed = @speed
            @opacity = 0
            kathis_makes_moving_faster
            @move_speed = @speed
             kathis_makes_moving_faster
            @opacity = 255
     
            end
      end


    Instructions

    uhh ok. copy script input it above the main script in the script data base, if you wish to mod it thats just as easy but please be intelligent when I explain how to because I really don't want to go through this over and over and over again.

      elsif $game_party.steps.between?(4600, 5099)
            @speed = 3.7

    The red number is the starting range   It should be 1 number MORE then the pervious "blue" number the line above it.

    The blue number is the End range, it should be 1 number below the next line red number.

    The green number is the speed. it can be any range...I suggest greater than 0.9....

    I don't suggest more than 4, since 4 is very quick like riding down cyclicals road on Pokemon. 5 is ridiculously quick and anything higher than that you'll be lucky to see your spirit in between the refreshes.

    Compatibility

    uhh ok.

    System : Windows Xp  (windows 98 and visa haven't been tested)
    Memory : 128 mb
    Hard drive space: 2 mb (demo)
    Processor: at least 100 mb I would reckon
    Program: Rpg maker XP


    Credits and Thanks

    • Kathis for making the script
    • sandgolem for making his running script that was to push a button to run and another to hyper run, but heh, all I did was took it apart ^_^;;
    • Kathis, for taking apart sandgolems script finding what made it tick.
    • The Masked Loser, for posting Sandgolems script.
    • Kathis, for helping make the script when it seemed to be at a lost.
    • Me for helping me make the script shorter
    • Kathis, for making the script shorter. and posting it here on rmrk.net for other to use

    Author's Notes

    Why is my template all crasy, because I can and its just as funny. there are notes to worry about.

    most long games have a more steps therefore you might want to increase the numbers.  speed of 4 is very quick and anything higher than 5 is ridiculously fast and shouldn't be part of the game. IF you wish to mess with the distance your character does you can edit a line in game_character2  where the calculation is done.

    Game_character2 > line 81  "    distance = 2 ** @move_speed "

    change 2 to something lower if you wish it to be slower, higher for farther distance. However do not again changing that number 1 is ridiculously slow and changing it to 3 is can be pretty quick.

    That should cover it. :P mwahaa you never stopped my random crasyness.

    Mr.Kathis why in your demo do you have an npc that can make you walk faster, I noticed that it can increase our step count but when I tried to do this in mine it didn't work how come?
    Because I didn't want to give that information out its for my game that I am making ^_^ it makes my game unique...me knows it he helped me developed that...well understand how to...intelligent scripters would know...you intelligent people that know don't reveal it's secret... >.> it must be locked in a chest with the key in that chest.....yes keep it a secret and use it in your own game but the knowledge must be locked until my project is completed. once again mwahahaha.
    « Last Edit: July 12, 2007, 05:32:20 AM by kathis »
    Project
    New project. The other dimention DND
    RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

    ***
    Rep:
    Level 88
    I showed "me" my script and he made me cry.. he started lechering me of how it can be shorter and still have the same effect ;-; see I am crying, anyway here is the abrevated version at least the first one you can see "whats happening" easier...

    Spoiler for:
    class Game_Character
      alias sandgolem_maprush_char_updmove update_move
      def update_move
       
           $game_variables[1] = @speed
           $game_variables[2] = $game_party.steps
         
           if $game_party.steps < 10
            @speed = 1
          elsif $game_party.steps.between?(10, 19)
            @speed = 1.1
          elsif $game_party.steps.between?(20, 29)   
            @speed = 1.2
          elsif $game_party.steps.between?(30, 39)
            @speed = 1.3
          elsif $game_party.steps.between?(40, 49)     
            @speed = 1.4
          elsif $game_party.steps.between?(50, 59)
            @speed = 1.5
          elsif $game_party.steps.between?(60, 69)
            @speed = 1.6
          elsif $game_party.steps.between?(70, 79)
            @speed = 1.7
          elsif $game_party.steps.between?(80, 89)
            @speed = 1.8
          elsif $game_party.steps.between?(90, 99)
            @speed = 1.9
          elsif $game_party.steps.between?(100, 199)
            @speed = 2
          elsif $game_party.steps.between?(200, 299)
            @speed = 2.1
          elsif $game_party.steps.between?(300, 399)
            @speed = 2.2
          elsif $game_party.steps.between?(400, 499)
            @speed = 2.3
          elsif $game_party.steps.between?(500, 599)
            @speed = 2.4
          elsif $game_party.steps.between?(600, 699)
            @speed = 2.5
          elsif $game_party.steps.between?(700, 799)
            @speed = 2.6
          elsif $game_party.steps.between?(800, 899)
            @speed = 2.7
          elsif $game_party.steps.between?(900, 999)
            @speed = 2.8
          elsif $game_party.steps.between?(1000, 1099)
            @speed = 2.9
          elsif $game_party.steps.between?(1100, 1599)
            @speed = 3
          elsif $game_party.steps.between?(1600, 2099)
            @speed = 3.1
          elsif $game_party.steps.between?(2100, 2599)
            @speed = 3.2
          elsif $game_party.steps.between?(2600, 3099)   
            @speed = 3.3
          elsif $game_party.steps.between?(3100, 3599)
            @speed = 3.4
          elsif $game_party.steps.between?(3600, 4099)   
            @speed = 3.5
          elsif $game_party.steps.between?(4100, 4599)
            @speed = 3.6
          elsif $game_party.steps.between?(4600, 5099)
            @speed = 3.7
          elsif $game_party.steps.between?(5100, 5599)   
            @speed = 3.8
          elsif $game_party.steps.between?(5600, 6099)
            @speed = 3.9
          elsif $game_party.steps.between?(6100, 6599)
             @speed = 4
          elsif $game_party.steps > 6600
             @speed = 4.1
          end
             
            @move_speed = @speed
            @opacity = 0
            sandgolem_maprush_char_updmove
            @move_speed = @speed
             sandgolem_maprush_char_updmove
            @opacity = 255
     
            end
      end


    Oh oh oh there are additions I can include but I am not going to include them right now I have other things to do >.>
    Project
    New project. The other dimention DND
    RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    That's kind of cool. I was just about to post and tell you how to make it shorter. Are you sandgolem?

    I can see a way to make it a bit shorter, but no less efficient so I'll hold my tongue. Anyway, nice job.

    *
    A Random Custom Title
    Rep:
    Level 96
    wah
    No, I think he said that he took one part of the script so, yeah. Nice script. I wish I could script good. Maybe I should take scripting lessons from MA, mua ha ha nah.

    ***
    Rep:
    Level 88
    I only took this part...

            @move_speed = @speed
            @opacity = 0
            sandgolem_maprush_char_updmove
            @move_speed =
    @speed
           sandgolem_maprush_char_updmove
            @opacity = 255



    I had issues when I didn't use the alias so I just left it it works,
    "I can see a way to make it a bit shorter, but no less efficient so I'll hold my tongue. Anyway, nice job."

    might as well get the most out of it, what is your view of how to make it shorter if its to remove the
    @move_speed = @speed
    sandgolem_maprush_char_updmove

    part it won't increase the speed it will make you forever slow >.>
    « Last Edit: July 11, 2007, 07:50:02 PM by kathis »
    Project
    New project. The other dimention DND
    RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

    *
    A Random Custom Title
    Rep:
    Level 96
    wah
    Yeah, he thought you were sand golem because of the aliasing. So, I guess I was right, MA. ^_^

    **
    Rep:
    Level 87
    The Leaf
    very nicely done. Bravo
    Beauty exists so that someone can tarnish it... Love exists to be lost...Innocence exists to be stolen... Souls exist to be corrupted...

    ***
    Rep:
    Level 88
    as I said I throw in some "additions" later like ether an animation for when you "level of speed" increases or even a sound effect but for now real life is kicking in again and I have turned 18 just this June, so its time to hunt for an apartment or something with a roof.
    Project
    New project. The other dimention DND
    RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    yeah, you do need the aliasing, you can change the name from sandgolem to something else though.

    And no, my idea to make it shorter was to only use the elsif $game_party.steps.between?(XX, YY) to keep track of when you change the benchmark, and then mod on the benchmark

    so kind of like:

    Code: [Select]
    if $game_party.steps.between? (0,99)
      benchmark = 10
    elsif $game_party.steps.between? (100,1099)
      benchmark = 100
    elsif $game_party.steps.between? (1100,6100)
      benchmark = 500
    end

     if $game_party.steps % benchmark == 0
        @counter += 1
        @speed = 1.0 + 0.1*@counter
      end

    Obviously, that wouldn't work as is because there would be a bunch of other stuff that needs to be done to make it work (including a good way to keep track of @counter and a failsafe, so tha they can't just stop moving at the benchmark and have their speed increase infinitely), but that is just a basic sketch.

    In any case, the script looks good as it is, and so there is no need to continue revising it.

    Though, it is a good idea to use this template when submitting a script:

    http://rmrk.net/index.php/topic,9045.0.html





    ***
    Rep:
    Level 88
    I am aware of the template -_- but it reduces my crasyness very well I'll edit it *grumps on the way*
    Project
    New project. The other dimention DND
    RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

    *
    ? ? ? ? ? ? ? ? ? The nice kind of alien~
    Rep:
    Level 92
    Martian - Occasionally kind
    Tell me, what happens when you have taken exactly 6600 steps ;)

    Just for fun I made two other versions to show you commonly used styles ^_^

    Spoiler for:
    Code: [Select]
    class Game_Character
      alias kathis_makes_moving_faster update_move
      def update_move

      #go to rmrk.net  look up "walking speed beased on steps script" to get the compleate instructions
     
      case $game_party.steps
      when 0..10: @speed = 1
      when 10..19:      @speed = 1.1
      when 20..29:      @speed = 1.2
      when 30..39:      @speed = 1.3
      when 40..49:      @speed = 1.4
      when 50..59:      @speed = 1.5
      when 60..69:      @speed = 1.6
      when 70..79:      @speed = 1.7
      when 80..89:      @speed = 1.8
      when 90..99:      @speed = 1.9
      when 100..199:    @speed = 2
      when 200..299:    @speed = 2.1
      when 300..399:    @speed = 2.2
      when 400..499:    @speed = 2.3
      when 500..599:    @speed = 2.4
      when 600..699:    @speed = 2.5
      when 700..799:    @speed = 2.6
      when 800..899:    @speed = 2.7
      when 900..999:    @speed = 2.8
      when 1000..1099:  @speed = 2.9
      when 1100..1599:  @speed = 3
      when 1600..2099:  @speed = 3.1
      when 2100..2599:  @speed = 3.2
      when 2600..3099:  @speed = 3.3
      when 3100..3599:  @speed = 3.4
      when 3600..4099:  @speed = 3.5
      when 4100..4599:  @speed = 3.6
      when 4600..5099:  @speed = 3.7
      when 5100..5599:  @speed = 3.8
      when 5600..6099:  @speed = 3.9
      when 6100..6599:  @speed = 4
      else              @speed = 4.1
      end
         
      @move_speed = @speed
      @opacity = 0
      kathis_makes_moving_faster
      @move_speed = @speed
      kathis_makes_moving_faster
      @opacity = 255

      end
    end

    Spoiler for:
    Code: [Select]
    class Game_Character
      alias kathis_makes_moving_faster update_move
      def update_move

        #go to rmrk.net  look up "walking speed beased on steps script" to get the compleate instructions

        if $game_party.steps > 6600
          @speed = 4.1
        elsif $game_party.steps > 6100
          @speed = 4
        elsif $game_party.steps > 5600
          @speed = 3.9
        elsif $game_party.steps > 5100
          @speed = 3.8
        elsif $game_party.steps > 4600
          @speed = 3.7
        elsif $game_party.steps > 4100
          @speed = 3.6
        elsif $game_party.steps > 3600
          @speed = 3.5
        elsif $game_party.steps > 3100
          @speed = 3.4
        elsif $game_party.steps > 2600
          @speed = 3.3
        elsif $game_party.steps > 2100
          @speed = 3.2
        elsif $game_party.steps > 1600
          @speed = 3.1
        elsif $game_party.steps > 1100
          @speed = 3
        elsif $game_party.steps > 1000
          @speed = 2.9
        elsif $game_party.steps > 900
          @speed = 2.8
        elsif $game_party.steps > 800
          @speed = 2.7
        elsif $game_party.steps > 700
          @speed = 2.6
        elsif $game_party.steps > 600
          @speed = 2.5
        elsif $game_party.steps > 500
          @speed = 2.4
        elsif $game_party.steps > 400
          @speed = 2.3
        elsif $game_party.steps > 300
          @speed = 2.2
        elsif $game_party.steps > 200
          @speed = 2.1
        elsif $game_party.steps > 100
          @speed = 2
        elsif $game_party.steps > 90
          @speed = 1.9
        elsif $game_party.steps > 80
          @speed = 1.8
        elsif $game_party.steps > 70
          @speed = 1.7
        elsif $game_party.steps > 60
          @speed = 1.6
        elsif $game_party.steps > 50
          @speed = 1.5
        elsif $game_party.steps > 40
          @speed = 1.4
        elsif $game_party.steps > 30
          @speed = 1.3
        elsif $game_party.steps > 20
          @speed = 1.2
        elsif $game_party.steps > 10
          @speed = 1.1
        else
          @speed = 1
        end
       
        @move_speed = @speed
        @opacity = 0
        kathis_makes_moving_faster
        @move_speed = @speed
        kathis_makes_moving_faster
        @opacity = 255

      end
    end

    *
    A Random Custom Title
    Rep:
    Level 96
    wah
    I like the first one better, lol. It seems smaller and easier to type up/keep track of what's going and won't be confusing to me. :P

    *
    Rep:
    Level 97
    2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
    I think I'd get sad if everyone was posting different versions of my scripts all over my topic  :'(

    Anyway, I vote this gets a database move. Nice work kathis.

    ***
    Rep:
    Level 88
    at  Zeriab nothing too odd, you just go faster at 4.1 speed... again this can go up to to any number you wish, HOWEVER 4 is very quick, and 5 has a lot of distance before the refresh.


    at modern algebra, I really don't care if there are different version posted. It helps me learn different ways of doing the same bloody thing,  "But a lot of code causes lag"  ya only because if there is a lot it takes the same amount of time to read it. thats the only reason. for lag in a script...by the way as I can see I had fun with my "template" MWAHAHAHA
    Project
    New project. The other dimention DND
    RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html

    *
    ? ? ? ? ? ? ? ? ? The nice kind of alien~
    Rep:
    Level 92
    Martian - Occasionally kind
    In your script you will not go faster at 4.1 speed. You will most likely go at 4 speed.
    You see, 'elsif $game_party.steps > 6600' checks if more than 6600 steps has been taken.
    I.e. 6600 simply falls out. It is the only value which will not set the speed to anything.
    Considering that you most likely had taken 6599 steps before the speed will be what is in that branch.

    The amount of code written is relatively irrelevant. It's how much code is process which is interesting.
    The speed of the scripts posted is about the same and is in any case too little to be significant.
    If-branches are checked very fast.

    I once tested how much code it will take to feel any difference, where most of the code simply just was loaded in an never used.
    It was first with about 500 000 lines I could feel any difference, and it was really only slower at start-up. Otherwise the speed was about the same.
    Another prize was ram usage. It takes more ram. I am pretty sure how much RAM it takes differs, in my case it was 30 MB extra. (From 20 to 50 MB ram used)

    The point here is that you under most circumstances don't have to care about how much code you write.
    It's way more important how fast it will be process.

    ***
    Rep:
    Level 86
    I hate everyone except the ones I don't hate...
    I don't know about this script... It's cool, it really is, but I don't want to start off like a turtle!! Can I just take away the first few lines of the "speeding progress" part of the script? Heck, I'll try it.
    I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
    Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
    That's right, let's see some more -Rep'ing! BOOYEAH!!

    ***
    Rep:
    Level 88
    The slow speed was to show that yes you have the power to walk that slow >_> I am sure if someone wanted to they could modify it that you have a normal speed, which would be in between them all and your running speed would only be after so many steps and pushing a key, as for moving slower would be another key and the turtle speed.
    Project
    New project. The other dimention DND
    RPG makers challenge http://rmrk.net/index.php/topic,13503.0.html