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

[Scripting Question] How to add the pokedex to the Pokegear?

56
Posts
5
Years
  • In my game, the Pokedex is not important. For the sake of conciseness, I'd like to add the Dex as a clickable option in the Pokegear. How can I do that?
     
    68
    Posts
    3
    Years
    • Seen yesterday
    In my game, the Pokedex is not important. For the sake of conciseness, I'd like to add the Dex as a clickable option in the Pokegear. How can I do that?

    This is similar to what I did to make a portable storage box accessible through the Pokégear. My game is in V19.1, so the code could be a bit different if you have another version. You could also check on the code to call the Pokédex screen from the UI_PauseMenu script, but there are some key changes. Still, I'll give you a step by step instruction so you can duplicate what I did to include this.

    First up is to find the line inside the UI_Pokegear script:
    Code:
    cmdJukebox = -1
    You'll need to place this below it:
    Code:
    cmdPokedex = -1
    Next up you'll need to find this line a bit lower:
    Code:
    commands[cmdJukebox = commands.length] = ["jukebox",_INTL("Jukebox")]
    This is the code you'll want to place underneath:
    Code:
        if $Trainer.has_pokedex && $Trainer.pokedex.accessible_dexes.length > 0
          commands[cmdPokedex = commands.length] = ["pokédex",_INTL("Pokédex")]
        end
    Then, you'll have to find this chunk:
    Code:
    elsif cmdJukebox>=0 && cmd==cmdJukebox
            pbFadeOutIn {
              scene = PokemonJukebox_Scene.new
              screen = PokemonJukeboxScreen.new(scene)
              screen.pbStartScreen
            }
    Later place this next chunk below it:
    Code:
    elsif cmdPokedex>=0 && cmd==cmdPokedex
            pbPlayDecisionSE
            if Settings::USE_CURRENT_REGION_DEX
              pbFadeOutIn {
                scene = PokemonPokedex_Scene.new
                screen = PokemonPokedexScreen.new(scene)
                screen.pbStartScreen
              }
            else
              if $Trainer.pokedex.accessible_dexes.length == 1
                $PokemonGlobal.pokedexDex = $Trainer.pokedex.accessible_dexes[0]
                pbFadeOutIn {
                  scene = PokemonPokedex_Scene.new
                  screen = PokemonPokedexScreen.new(scene)
                  screen.pbStartScreen
                }
              else
                pbFadeOutIn {
                  scene = PokemonPokedexMenu_Scene.new
                  screen = PokemonPokedexMenuScreen.new(scene)
                  screen.pbStartScreen
                }
              end
            end
          end
    For the final step you'll need to go inside the Graphics/Pictures/Pokegear folder and add the icon you'll want to use for the Pokédex. The dimensions should be 40x32 and the name has to be "icon_pokédex" for it to be displayed.

    There should now appear a new button named Pokédex below Jukebox in the Pokégear if I have copied every "end" correctly. I got this to work quickly in my game as a test, so I hope this will be useful to you.
     
    Last edited:
    56
    Posts
    5
    Years
  • I'm really sorry-I havent got the slightest idea why i only JUST saw this. Thank you for your advice, but it didn't work, it said syntax error on line 181, which was the very last End. I wont be surprised if its incompatible since i have 18.1
     
    Back
    Top