Thread: [Essentials tutorial] How to add more features to the PokeGear
View Single Post
  #5    
Old August 18th, 2013 (08:07 AM). Edited August 9th, 2014 by FL.
FL's Avatar
FL FL is offline
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Posts: 1,409
Quote originally posted by bartyboy6:
small question: I want the pokedex to be on the pokegear instead of in the menu screen along with a pokemon storage check (you can't move your pokemon from there but merely check their summary)
Simply do the tutorial and for the last part (of each one) do something like:

Code:
      if @cmdPokedex>=0 && @sprites["command_window"].index==@cmdPokedex # I copied for menu script
        pbPlayDecisionSE()
        if DEXDEPENDSONLOCATION
          pbFadeOutIn(99999) {
             scene=PokemonPokedexScene.new
             screen=PokemonPokedex.new(scene)
             screen.pbStartScreen
          }
        else
          if $PokemonGlobal.pokedexViable.length==1
            $PokemonGlobal.pokedexDex=$PokemonGlobal.pokedexViable[0]
            $PokemonGlobal.pokedexDex=-1 if $PokemonGlobal.pokedexDex==$PokemonGlobal.pokedexUnlocked.length-1
            pbFadeOutIn(99999) {
               scene=PokemonPokedexScene.new
               screen=PokemonPokedex.new(scene)
               screen.pbStartScreen
            }
          else
            $scene = Scene_PokedexMenu.new # Changed
          end
        end
      end
      if @cmdStorage>=0 && @sprites["command_window"].index==@cmdStorage
        pbFadeOutIn(99999){
          scene=PokemonStorageScene.new
          screen=PokemonStorageScreen.new(scene,$PokemonStorage,false) # 3 parameters
          screen.pbStartScreen(2)
        }
      end
In PokemonStorage, change the line 'def initialize(scene,storage)' to:

Code:
  def initialize(scene,storage,actionsEnabled=true)
    @actionsEnabled = actionsEnabled

Change the second 'command=pbShowCommands(helptext,commands)' to:

Code:
          actionsDisabled=[
             _INTL("Move"),
             _INTL("Store"),
             _INTL("Withdraw"),
             _INTL("Item"),
             _INTL("Release")
          ]
          actionsDisabledPositions=[]
          if !@actionsEnabled
            count = commands.size
            while(count>0) # Goes backward to memorize the positions
              count-=1
              if actionsDisabled.include?(commands[count])
                actionsDisabledPositions.push(count)
                commands.delete_at(count)
              end  
            end
            actionsDisabledPositions.sort!
          end
          command=pbShowCommands(helptext,commands)
          for position in actionsDisabledPositions
            command+=1 if command>=position
          end
To make the back button in pokédex returns to PokéGear: In PokemonPokedex change every 'Scene_Map.new' to 'Scene_Pokegear.new'
__________________
Reply With Quote