• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Variable Game Speed [Simple Plug and Play]

35
Posts
7
Years
    • Seen Nov 1, 2018
    This is one of my first code which is base on existing essentials code and might be easy for most of you but for some newbie like me I hope you guys find it useful. To copy, go to thread tools and select print to printable version. Goodluck and please give credit when use!

    Code:
    ################################################################################################
    #=================================Variable Game Speed==========================================#
    #                                     by jazerules                                             #
    # In order for it to work, create new script section above main but below PSystem_System.      #
    # To use as plug and play just press ALT and select your desired speed.                        #
    # To use as event, in the event script call, put pbVariableSpeed .                             #
    # It was tested with PE 16.2 without any problem and you can change speed even during battles!!#
    #                                                                                              #
    ################################################################################################
    module Input
      
      unless defined?(update_KGC_ScreenCapture)
        class << Input
          alias update_KGC_ScreenCapture update
        end
      end
    
      def self.update
        update_KGC_ScreenCapture
        if trigger?(Input::F8)
          pbScreenCapture
        end
        if trigger?(Input::F7)
          pbDebugF7
        end
        if trigger?(Input::ALT)
          pbVariableSpeed
        end
      end
      
    end
    
    def pbVariableSpeed
      return false if trigger?(Input::ALT) && @speed == true
      @speed=true
      command=[]
      list=[
             _INTL("SLOW"),
             _INTL("NORMAL"),
             _INTL("FAST"),
             _INTL("TURBO"),
             _INTL("CANCEL")
          ]
      command=Kernel.pbMessage(_INTL("Please set your game speed."),list,0)
      if command==0
        Graphics.frame_rate=40
      elsif command==1
        Graphics.frame_rate=60
      elsif command==2
        Graphics.frame_rate=80
      elsif command==3
        Graphics.frame_rate=120
      elsif command==4
        @speed=false
        return
        break
      end
      @speed=false
    end
    
    def pbDebugF7
      if $DEBUG
        Console::setup_console
        begin
          debugBitmaps
        rescue
        end
        pbSEPlay("expfull") if FileTest.audio_exist?("Audio/SE/expfull")
      end
    end

    Please report any bugs or changes you made. Enjoy!
     
    Last edited:
    8
    Posts
    7
    Years
    • Seen Jun 25, 2018
    It doesnt work to me, i press Alt and choise the velocity but nothing changes.
     
    35
    Posts
    7
    Years
    • Seen Nov 1, 2018
    hmmmnn.. did you get any error?

    you could try to select turbo and go in a battle to see if your fps changes.. the thing is if the game is laggy you won't see any difference..
     
    8
    Posts
    7
    Years
    • Seen Jun 25, 2018
    I tested it, and it only works on battles, nothing changes walking on maps ^^
     
    Back
    Top