• 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.

How do we add Quicksave/New Controls

7
Posts
9
Years
  • Age 26
  • 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?
 
95
Posts
9
Years
  • Age 34
  • Seen Jun 18, 2016
For the control thing, see this: http://pokemonessentials.wikia.com/wiki/Tutorial:Set_the_Controls_Screen

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
 
7
Posts
9
Years
  • Age 26
  • Seen Jul 14, 2014
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:
35
Posts
9
Years
  • Age 32
  • Seen Sep 17, 2015
i am getting the same error. can you post an example of how it should look please.
 
1,224
Posts
10
Years
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
 
7
Posts
9
Years
  • Age 26
  • Seen Jul 14, 2014
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...?
 
1,224
Posts
10
Years
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
 
7
Posts
9
Years
  • Age 33
  • Seen Jan 2, 2015
Hello... I'm still not getting this, can someone show the code that works? It show me that V isnt initiallized!
 
14
Posts
9
Years
  • Age 33
  • Seen Sep 25, 2023
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