• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

How do we add Quicksave/New Controls

  • 7
    Posts
    10
    Years
    • Seen Jul 14, 2014
    I've been wondering on how to do Quicksave because it's a hassle to save when you developing a game and fixing some stuff in-game. I also want to merge the quicksave into a button for example "V." However, that's not the only thing I want to do. I want to add more buttons for my game. How do I do that?
     
    For the control thing, see this: (broken link removed)

    For the quicksave, go to the Scene_Map script and add this:

    Code:
    if Input.trigger?(Input::V) 
    if pbSave
    Kernel.pbMessage("Saved the game!")
    else
    Kernel.pbMessage("Save failed.")
    end
    end

    That should go right under this:

    Code:
    def miniupdate
        $PokemonTemp.miniupdate=true if $PokemonTemp
        loop do
          updateMaps
          $game_player.update
          $game_system.update
          $game_screen.update
          unless $game_temp.player_transferring
            break
          end
          transfer_player
          if $game_temp.transition_processing
            break
          end
        end
        updateSpritesets
        $PokemonTemp.miniupdate=false if $PokemonTemp
      end
     
    I knew it was something like that, haha! Thanks for the reply that was very quick.

    Edit: When I add it under
    Code:
    def miniupdate
        $PokemonTemp.miniupdate=true if $PokemonTemp
        loop do
          updateMaps
          $game_player.update
          $game_system.update
          $game_screen.update
          unless $game_temp.player_transferring
            break
          end
          transfer_player
          if $game_temp.transition_processing
            break
          end
        end
        updateSpritesets
        $PokemonTemp.miniupdate=false if $PokemonTemp
      end

    It gives me this error "Script 'Scenemap' line 99: NameError occurred. uninitialized constant Input::V"
    Is this something I'm doing wrong?
     
    Last edited:
    I knew it was something like that, haha! Thanks for the reply that was very quick.

    Edit: When I add it under
    Code:
    def miniupdate
        $PokemonTemp.miniupdate=true if $PokemonTemp
        loop do
          updateMaps
          $game_player.update
          $game_system.update
          $game_screen.update
          unless $game_temp.player_transferring
            break
          end
          transfer_player
          if $game_temp.transition_processing
            break
          end
        end
        updateSpritesets
        $PokemonTemp.miniupdate=false if $PokemonTemp
      end

    It gives me this error "Script 'Scenemap' line 99: NameError occurred. uninitialized constant Input::V"
    Is this something I'm doing wrong?

    i am getting the same error. can you post an example of how it should look please.


    This is because "V" is not an input yet, you have to make it one. I gave a quick tutorial on how to add one here


    The ASCII codes for buttons can be found here
     
    This is what I put in the PokemonControls "V = 30"
    For the other code I added

    when Input::V
    return [0x56] # V


    For some reason I still get the error...?
     
    This is what I put in the PokemonControls "V = 30"
    For the other code I added

    when Input::V
    return [0x56] # V


    For some reason I still get the error...?

    It should be under def update , not def miniupdate. And make sure to put it inside the loop
     
    Hello... I'm still not getting this, can someone show the code that works? It show me that V isnt initiallized!
     
    Hello... I'm still not getting this, can someone show the code that works? It show me that V isnt initiallized!
    This is a two-month-late response, but... you might've had the same problem as me. If so, find this section in PokemonControls, and add the code highlighted in red:

    Code:
    module Input
      DOWN  = 2
      LEFT  = 4
      RIGHT = 6
      UP    = 8
      A     = 11
      B     = 12
      C     = 13
    [color=red]  V     = 33[/color]
      X     = 14
      Y     = 15
      Z     = 16
      L     = 17
      R     = 18
      SHIFT = 21
      CTRL  = 22
      ALT   = 23
      F5    = 25
      F6    = 26
      F7    = 27
      F8    = 28
      F9    = 29
      LeftMouseKey  = 1
      RightMouseKey = 2
      # GetAsyncKeyState or GetKeyState will work here
      @GetKeyState=Win32API.new("user32", "GetAsyncKeyState", "i", "i")
      @GetForegroundWindow=Win32API.new("user32", "GetForegroundWindow", "", "i")
      # Returns whether a key is being pressed

    That fixed the problem for me. I'm guessing figured it out by now(?), but, hopefully this tip will help someone.
     
    Back
    Top