The PokéCommunity Forums Fan Games Game Development Scripts & Tutorials
Essentials Script Advanced Pokédex

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.


Reply
 
Thread Tools
  #1    
Old December 21st, 2013 (1:37 PM). Edited April 15th, 2018 by FL.
FL's Avatar
FL FL is offline
Pokémon Island Creator
     
    Join Date: Sep 2010
    Gender: Male
    Posts: 1,756
    Code:
    #===============================================================================
    # * Advanced Pokédex - by FL (Credits will be apreciated)
    #===============================================================================
    #
    # This script is for Pokémon Essentials. When a switch is ON, it displays at 
    # pokédex the pokémon PBS data for a caught pokémon like: base exp, egg steps
    # to hatch, abilities, wild hold item, evolution, the moves that pokémon can 
    # learn by level/breeding/machines/tutors, among others.
    #
    #===============================================================================
    #
    # To this script works, put it above main, put a 512x384 background named 
    # "bg_advanced" for this screen in "Graphics/Pictures/Pokedex/". At same folder,
    # put three 512x32 images for the top pokédex selection named
    # "advancedInfoBar", "advancedAreaBar" and "advancedFormsBar".
    #
    # -In PScreen_PokedexEntry script section, change both lines (use Ctrl+F to find
    # it) '@page = 3 if @page>3' into '@[email protected] if @page>@maxPage'.
    #
    # -After first line 'if Input.trigger?(Input::A)' add:
    #
    # if @page == 4
    #   @subPage-=1
    #   @[email protected] if @subPage<1
    #   displaySubPage
    # end
    #
    # -After second line 'elsif Input.trigger?(Input::C)' add:
    #
    # if @page == 4
    #   @subPage+=1
    #   @subPage=1 if @subPage>@totalSubPages
    #   displaySubPage
    # end
    #
    #===============================================================================
    
    class PokemonPokedexInfo_Scene
      # Switch number that toggle this script ON/OFF
      SWITCH=70
      
      # When true always shows the egg moves of the first evolution stage
      EGGMOVESFISTSTAGE = true
      
      # When false shows different messages for each of custom evolutions,
      # change the messages to ones that fills to your method
      HIDECUSTOMEVOLUTION = true
      
      # When true displays TMs/HMs/Tutors moves
      SHOWMACHINETUTORMOVES = true
      
      # When true picks the number for TMs and the first digit after a H for 
      # HMs (like H8) when showing machine moves.
      FORMATMACHINEMOVES = true
      
      # When false doesn't displays moves in tm.txt PBS that aren't in
      # any TM/HM item
      SHOWTUTORMOVES = true
      
      # The division between tutor and machine (TM/HMs) moves is made by 
      # the TM data in items.txt PBS
      
      alias :pbStartSceneOldFL :pbStartScene
      def pbStartScene(dexlist,index,region)
        @maxPage = $game_switches[SWITCH] ? 4 : 3
        pbStartSceneOldFL(dexlist,index,region)
        @sprites["advanceicon"]=PokemonSpeciesIconSprite.new(@species,@viewport)
        @sprites["advanceicon"].x=52
        @sprites["advanceicon"].y=290
        @sprites["advanceicon"].visible = false
      end
      
      alias :drawPageOldFL :drawPage
      def drawPage(page)
        drawPageOldFL(page)
        return if @brief
        dexbarVisible = $game_switches[SWITCH] && @page<=3
        @sprites["dexbar"] = IconSprite.new(0,0,@viewport) if [email protected]["dexbar"]
        @sprites["dexbar"].visible = dexbarVisible
        if dexbarVisible
          barBitmapPath = [
            nil,
            _INTL("Graphics/Pictures/Pokedex/advancedInfoBar"),
            _INTL("Graphics/Pictures/Pokedex/advancedAreaBar"),
            _INTL("Graphics/Pictures/Pokedex/advancedFormsBar")
          ]
          @sprites["dexbar"].setBitmap(barBitmapPath[@page])
        end
        @sprites["advanceicon"].visible = page==4 if @sprites["advanceicon"]
        drawPageAdvanced if page==4
      end
      
      alias :pbUpdateDummyPokemonOldFL :pbUpdateDummyPokemon
      def pbUpdateDummyPokemon
        pbUpdateDummyPokemonOldFL
        if @sprites["advanceicon"]
          @sprites["advanceicon"].pbSetParams(@species,@gender,@form)
        end
      end
      
      BASECOLOR = Color.new(88,88,80)
      SHADOWCOLOR = Color.new(168,184,184)
      BASE_X = 32
      EXTRA_X = 224
      BASE_Y = 64
      EXTRA_Y = 32
      
      def drawPageAdvanced
        @sprites["background"].setBitmap(
          _INTL("Graphics/Pictures/Pokedex/bg_advanced"))
        @type1=nil
        @type2=nil
        @subPage=1
        @totalSubPages=0
        if $Trainer.owned[@species]
          @infoPages=3
          @infoArray=getInfo
          @levelMovesArray=getLevelMoves
          @eggMovesArray=getEggMoves
          @machineMovesArray=getMachineMoves if SHOWMACHINETUTORMOVES
          @levelMovesPages = (@levelMovesArray.size+9)/10
          @eggMovesPages = (@eggMovesArray.size+9)/10
          @machineMovesPages=(@machineMovesArray.size+9)/10 if SHOWMACHINETUTORMOVES
          @totalSubPages = @[email protected][email protected]
          @[email protected] if SHOWMACHINETUTORMOVES
        end
        displaySubPage
      end
      
      def displaySubPage
        overlay = @sprites["overlay"].bitmap
        overlay.clear
        height = Graphics.height-54
        
        # Bottom text  
        textpos = [[PBSpecies.getName(@species),(Graphics.width+72)/2,height-32,
          2,BASECOLOR,SHADOWCOLOR]]
        if $Trainer.owned[@species]
          textpos.push([_INTL("{1}/{2}",@subPage,@totalSubPages),
            Graphics.width-52,height,1,BASECOLOR,SHADOWCOLOR])
        end
        pbDrawTextPositions(@sprites["overlay"].bitmap, textpos)
        
        # Type icon
        if [email protected] # Only checks for not owned pokémon
          dexdata=pbOpenDexData
          pbDexDataOffset(dexdata,@species,8)
          @type1=dexdata.fgetb
          @type2=dexdata.fgetb
          dexdata.close
        end
        type1rect = Rect.new(0,@type1*32,96,32)
        type2rect = Rect.new(0,@type2*32,96,32)
        if(@[email protected])
          overlay.blt((Graphics.width+16-36)/2,height,@typebitmap.bitmap,type1rect)
        else  
          overlay.blt((Graphics.width+16-144)/2,height,@typebitmap.bitmap,type1rect)
          overlay.blt((Graphics.width+16+72)/2,height,
            @typebitmap.bitmap,type2rect) if @[email protected]
        end
        
        return if !$Trainer.owned[@species]
        
        # Page content
        if(@subPage<[email protected])
          subPageInfo(@subPage)
        elsif(@subPage<[email protected][email protected])
          subPageMoves(@levelMovesArray,_INTL("LEVEL UP MOVES:"),@[email protected])
        elsif(@subPage<[email protected][email protected][email protected])
          subPageMoves(@eggMovesArray,_INTL("EGG MOVES:"),
              @[email protected]@levelMovesPages)
        elsif(SHOWMACHINETUTORMOVES && @subPage <= 
            @[email protected][email protected][email protected])
          subPageMoves(@machineMovesArray,_INTL("MACHINE MOVES:"),
              @[email protected]@[email protected])
        end
      end
      
      def subPageInfo(subPage)
        textpos = []
        for i in (12*(subPage-1))...(12*subPage)
          line = i%6
          column = i/6
          next if [email protected][column][line]
          x = BASE_X+EXTRA_X*(column%2)
          y = BASE_Y+EXTRA_Y*line
          textpos.push([@infoArray[column][line],x,y,false,BASECOLOR,SHADOWCOLOR])
        end
        pbDrawTextPositions(@sprites["overlay"].bitmap, textpos)
      end  
        
      def subPageMoves(movesArray,label,subPage)
        textpos = [[label,BASE_X,BASE_Y,false,BASECOLOR,SHADOWCOLOR]]
          for i in (10*(subPage-1))...(10*subPage)
          break if i>=movesArray.size
          line = i%5
          column = i/5
          x = BASE_X+EXTRA_X*(column%2)
          y = BASE_Y+EXTRA_Y*(line+1)
          textpos.push([movesArray[i],x,y,false,BASECOLOR,SHADOWCOLOR])
        end
        pbDrawTextPositions(@sprites["overlay"].bitmap,textpos)
      end  
      
      def getInfo
        ret = []
        for i in 0...2*4
          ret[i]=[]
          for j in 0...6
            ret[i][j]=nil
          end
        end  
        dexdata=pbOpenDexData
        # Type
        pbDexDataOffset(dexdata,@species,8)
        @type1=dexdata.fgetb
        @type2=dexdata.fgetb
        # Base Exp
        pbDexDataOffset(dexdata,@species,38)
        ret[0][0]=_INTL("BASE EXP: {1}",dexdata.fgetw)
        # Catch Rate
        pbDexDataOffset(dexdata,@species,16)
        ret[1][0]=_INTL("CATCH RARENESS: {1}",dexdata.fgetb)
        # Happiness base
        pbDexDataOffset(dexdata,@species,19)
        ret[0][1]=_INTL("HAPPINESS BASE: {1}",dexdata.fgetb)
        # Color
        pbDexDataOffset(dexdata,@species,6)
        colorName=[
            _INTL("Red"),_INTL("Blue"),_INTL("Yellow"),
            _INTL("Green"),_INTL("Black"),_INTL("Brown"),
            _INTL("Purple"),_INTL("Gray"),_INTL("White"),_INTL("Pink")
        ][dexdata.fgetb]
        ret[1][1]=_INTL("COLOR: {1}",colorName)
        # Egg Steps to Hatch
        pbDexDataOffset(dexdata,@species,21)
        stepsToHatch = dexdata.fgetw
        ret[0][2]=_INTL("EGG STEPS TO HATCH: {1} ({2} cycles)",
            stepsToHatch,stepsToHatch/255)
        # Growth Rate
        pbDexDataOffset(dexdata,@species,20) 
        growthRate=dexdata.fgetb
        growthRateString = [_INTL("Medium"),_INTL("Erratic"),_INTL("Fluctuating"),
            _INTL("Parabolic"),_INTL("Fast"),_INTL("Slow")][growthRate]
        ret[0][3]=_INTL("GROWTH RATE: {1} ({2})",
            growthRateString,PBExperience.pbGetMaxExperience(growthRate))
        # Gender Rate
        pbDexDataOffset(dexdata,@species,18)
        genderbyte=dexdata.fgetb
        genderPercent= 100-((genderbyte+1)*100/256.0)
        genderString = case genderbyte
          when 0;   _INTL("Always male")
          when 254; _INTL("Always female")
          when 255; _INTL("Genderless")
          else;     _INTL("Male {1}%",genderPercent)
        end
        ret[0][4]=_INTL("GENDER RATE: {1}",genderString)
        # Breed Group
        pbDexDataOffset(dexdata,@species,31)
        compat10=dexdata.fgetb
        compat11=dexdata.fgetb
        eggGroupArray=[
            nil,_INTL("Monster"),_INTL("Water1"),_INTL("Bug"),_INTL("Flying"),
            _INTL("Ground"),_INTL("Fairy"),_INTL("Plant"),_INTL("Humanshape"),
            _INTL("Water3"),_INTL("Mineral"),_INTL("Indeterminate"),
            _INTL("Water2"),_INTL("Ditto"),_INTL("Dragon"),_INTL("No Eggs")
        ]
        eggGroups = compat10==compat11 ? eggGroupArray[compat10] : 
            _INTL("{1}, {2}",eggGroupArray[compat10],eggGroupArray[compat11])
        ret[0][5]=_INTL("BREED GROUP: {1}",eggGroups)
        # Base Stats
        pbDexDataOffset(dexdata,@species,10)
        baseStats=[
            dexdata.fgetb, # HP
            dexdata.fgetb, # Attack
            dexdata.fgetb, # Defense
            dexdata.fgetb, # Speed
            dexdata.fgetb, # Special Attack
            dexdata.fgetb  # Special Defense
        ]
        baseStatsTot=0
        for i in 0...baseStats.size
          baseStatsTot+=baseStats[i]
        end
        baseStats.push(baseStatsTot)
        ret[2][0]=_ISPRINTF(
            "                             HP ATK DEF SPD SATK SDEF")
        ret[2][1]=_ISPRINTF(
            "BASE STATS:       {1:03d} {2:03d} {3:03d} {4:03d} {5:03d} {6:03d} {7:03d}",
            baseStats[0],baseStats[1],baseStats[2],
            baseStats[3],baseStats[4],baseStats[5],baseStats[6])
        # Effort Points
        pbDexDataOffset(dexdata,@species,23)
        effortPoints=[
            dexdata.fgetb, # HP
            dexdata.fgetb, # Attack
            dexdata.fgetb, # Defense
            dexdata.fgetb, # Speed
            dexdata.fgetb, # Special Attack
            dexdata.fgetb  # Special Defense
        ]
        effortPointsTot=0
        for i in 0...effortPoints.size
          effortPoints[i]=0 if  !effortPoints[i]
          effortPointsTot+=effortPoints[i]
        end
        effortPoints.push(effortPointsTot)
        ret[2][2]=_ISPRINTF(
            "EFFORT POINTS: {1:03d} {2:03d} {3:03d} {4:03d} {5:03d} {6:03d} {7:03d}",
            effortPoints[0],effortPoints[1],effortPoints[2],
            effortPoints[3],effortPoints[4],effortPoints[5],effortPoints[6])
        # Abilities
        pbDexDataOffset(dexdata,@species,2)
        ability1=dexdata.fgetw
        ability2=dexdata.fgetw
        abilityString=(ability1==ability2 || ability2==0) ? 
            PBAbilities.getName(ability1) : _INTL("{1}, {2}",
            PBAbilities.getName(ability1), PBAbilities.getName(ability2))
        ret[2][3]=_INTL("ABILITIES: {1}",abilityString)
        # Hidden Abilities
        pbDexDataOffset(dexdata,@species,40)
        hiddenAbility1=dexdata.fgetb
        hiddenAbility2=dexdata.fgetb
        hiddenAbility3=dexdata.fgetb
        hiddenAbility4=dexdata.fgetb
        if hiddenAbility1!=0
          abilityString=""
          if(hiddenAbility3!=0) 
            abilityString = _INTL("{1}, {2},",PBAbilities.getName(hiddenAbility1), 
                PBAbilities.getName(hiddenAbility2))
          elsif(hiddenAbility2!=0)
            abilityString = _INTL("{1}, {2}",PBAbilities.getName(hiddenAbility1),
                PBAbilities.getName(hiddenAbility2))
          else
            abilityString = PBAbilities.getName(hiddenAbility1)
          end  
          ret[2][4]=_INTL("HIDDEN ABILITIES: {1}",abilityString)
          if(hiddenAbility3!=0) 
            ret[2][5] = (hiddenAbility4==0) ? PBAbilities.getName(hiddenAbility3) : 
                _INTL("{1}, {2}",PBAbilities.getName(hiddenAbility3),
                PBAbilities.getName(hiddenAbility4))
          end  
        end
        # Wild hold item 
        pbDexDataOffset(dexdata,@species,48)
        holdItems=[dexdata.fgetw,dexdata.fgetw,dexdata.fgetw]
        holdItemsStrings=[]
        if(holdItems[0]!=0 && holdItems[0]==holdItems[1] && 
            holdItems[0]==holdItems[2])
          holdItemsStrings.push(_INTL("{1} (always)",
              PBItems.getName(holdItems[0])))
        else
          holdItemsStrings.push(_INTL("{1} (common)", 
              PBItems.getName(holdItems[0]))) if holdItems[0]>0
          holdItemsStrings.push(_INTL("{1} (uncommon)",
              PBItems.getName(holdItems[1]))) if holdItems[1]>0
          holdItemsStrings.push(_INTL("{1} (rare)", 
              PBItems.getName(holdItems[2]))) if holdItems[2]>0
        end
        ret[4][0] = _INTL("HOLD ITEMS: {1}",holdItemsStrings.empty? ? 
            "" : holdItemsStrings[0])
        ret[4][1] = holdItemsStrings[1] if holdItemsStrings.size>1
        ret[4][2] = holdItemsStrings[2] if holdItemsStrings.size>2
        # Evolutions
        evolutionsStrings = []
        lastEvolutionSpecies = -1
        for evolution in pbGetEvolvedFormData(@species)
          # The below "if" it's to won't list the same evolution species more than
          # one time. Only the last is displayed.
          evolutionsStrings.pop if lastEvolutionSpecies==evolution[2]
          evolutionsStrings.push(getEvolutionMessage(evolution))
          lastEvolutionSpecies=evolution[2]
        end
        line=3
        column=4
        ret[column][line] = _INTL("EVO: {1}",evolutionsStrings.empty? ? 
            "" : evolutionsStrings[0])
        evolutionsStrings.shift
        line+=1
          for string in evolutionsStrings
          if(line>5) # For when the pokémon has more than 3 evolutions (AKA Eevee) 
            line=0
              column+=2
            @infoPages+=1 # Creates a new page
          end
            ret[column][line] = string
          line+=1
          end
          # End
          dexdata.close
        return ret
        end  
        
      # Gets the evolution array and return evolution message
      def getEvolutionMessage(evolution)
        evoPokemon = PBSpecies.getName(evolution[2])
        evoMethod = evolution[0]
        evoItem = evolution[1] # Sometimes it's level
        ret = case evoMethod
          when 1; _INTL("{1} when happy",evoPokemon)
          when 2; _INTL("{1} when happy at day",evoPokemon)
          when 3; _INTL("{1} when happy at night",evoPokemon)
          when 4, 13;_INTL("{1} at level {2}",
              evoPokemon,evoItem) # Pokémon that evolve by level AND Ninjask
          when 5; _INTL("{1} trading",evoPokemon)
          when 6; _INTL("{1} trading holding {2}",
              evoPokemon,PBItems.getName(evoItem))
          when 7; _INTL("{1} using {2}",evoPokemon,PBItems.getName(evoItem))
          when 8; _INTL("{1} at level {2} and ATK > DEF",
              evoPokemon,evoItem) # Hitmonlee
          when 9; _INTL("{1} at level {2} and ATK = DEF",
              evoPokemon,evoItem) # Hitmontop
          when 10;_INTL("{1} at level {2} and DEF < ATK",
              evoPokemon,evoItem) # Hitmonchan 
          when 11,12; _INTL("{1} at level {2} with personalID",
              evoPokemon,evoItem) # Silcoon/Cascoon
          when 14;_INTL("{1} at level {2} with empty space",
              evoPokemon,evoItem) # Shedinja
          when 15;_INTL("{1} when beauty is greater than {2}",
              evoPokemon,evoItem) # Milotic 
          when 16;_INTL("{1} using {2} and it's male",
              evoPokemon,PBItems.getName(evoItem))
          when 17;_INTL("{1} using {2} and it's female",
              evoPokemon,PBItems.getName(evoItem))
          when 18;_INTL("{1} holding {2} at day",
              evoPokemon,PBItems.getName(evoItem))
          when 19;_INTL("{1} holding {2} at night",
              evoPokemon,PBItems.getName(evoItem))
          when 20;_INTL("{1} when has move {2}",
              evoPokemon,PBMoves.getName(evoItem))
          when 21;_INTL("{1} when has {2} at party",
              evoPokemon,PBSpecies.getName(evoItem))
          when 22;_INTL("{1} at level {2} and it's male",
              evoPokemon,evoItem)
          when 23;_INTL("{1} at level {2} and it's female",
              evoPokemon,evoItem)
          when 24;_INTL("{1} at {2}",
              evoPokemon, pbGetMapNameFromId(evoItem)) # Evolves on a certain map
          when 25;_INTL("{1} trading by {2}",
              evoPokemon,PBSpecies.getName(evoItem)) # Escavalier/Accelgor
          # When HIDECUSTOMEVOLUTION = false the below 7 messages will be displayed
          when 26;_INTL("{1} custom1 with {2}", evoPokemon,evoItem) 
          when 27;_INTL("{1} custom2 with {2}", evoPokemon,evoItem) 
          when 28;_INTL("{1} custom3 with {2}", evoPokemon,evoItem) 
          when 29;_INTL("{1} custom4 with {2}", evoPokemon,evoItem) 
          when 30;_INTL("{1} custom5 with {2}", evoPokemon,evoItem) 
          when 31;_INTL("{1} custom6 with {2}", evoPokemon,evoItem)
          when 32;_INTL("{1} custom7 with {2}", evoPokemon,evoItem)
          else; ""  
        end  
          ret = _INTL("{1} by an unknown way", evoPokemon) if(ret.empty? ||
            (evoMethod>=26 && HIDECUSTOMEVOLUTION))
        return ret    
      end
        
      def getLevelMoves
        ret=[]
          atkdata=pbRgssOpen("Data/attacksRS.dat","rb")
        offset=atkdata.getOffset(@species-1)
        length=atkdata.getLength(@species-1)>>1
        atkdata.pos=offset
        for k in 0..length-1
          level=atkdata.fgetw
          move=PBMoves.getName(atkdata.fgetw)
          ret.push(_ISPRINTF("{1:02d} {2:s}",level,move))
        end
          atkdata.close
        return ret
        end  
        
      def getEggMoves
        ret=[]  
          eggMoveSpecies = @species
        eggMoveSpecies = pbGetBabySpecies(eggMoveSpecies) if EGGMOVESFISTSTAGE
        pbRgssOpen("Data/eggEmerald.dat","rb"){|f|
          f.pos=(eggMoveSpecies-1)*8
          offset=f.fgetdw
          length=f.fgetdw
          if length>0
            f.pos=offset
            i=0; loop do break unless i<length
              move=PBMoves.getName(f.fgetw)
              ret.push(_ISPRINTF("     {1:s}",move))
              i+=1
              end
            end
          }
        ret.sort!
        return ret
      end  
        
      def getMachineMoves
        ret=[]
        movesArray=[]
        machineMoves=[]
        tmData=load_data("Data/tm.dat")
        for move in 1...tmData.size
          next if !tmData[move]
          movesArray.push(move) if tmData[move].any?{ |item| [email protected] }
        end
          for item in 1..PBItems.maxValue
          if pbIsMachine?(item)
            move = $ItemData[item][ITEMMACHINE]
            if movesArray.include?(move)
              if FORMATMACHINEMOVES
                machineLabel = PBItems.getName(item)
                machineLabel = machineLabel[2,machineLabel.size-2] 
                machineLabel = "H"+machineLabel[1,1] if pbIsHiddenMachine?(item)
                ret.push(_ISPRINTF("{1:s} {2:s}",
                    machineLabel,PBMoves.getName(move)))
                movesArray.delete(move)
              else
                  machineMoves.push(move)
              end  
            end
          end  
        end
        # The above line removes the tutors moves. The movesArray will be 
        # empty if the machines are already in the ret array.
        movesArray = machineMoves if !SHOWTUTORMOVES
        unnumeredMoves=[]
        for move in movesArray # Show the moves unnumered
          unnumeredMoves.push(_ISPRINTF("     {1:s}",PBMoves.getName(move)))
        end  
        ret = ret.sort + unnumeredMoves.sort
        return ret
      end  
    end
    Thanks Richard PT for the graphics!
    Attached Thumbnails
    advanceddexscreen.png‎   advanceddexscreen2.png‎   advanceddexscreen3.png‎   advanceddexscreen5.png‎  
    Attached Files
    File Type: zip sampleresources.zip‎ (5.8 KB, 47 views) (Save to Dropbox)
    __________________
    Reply With Quote

    Relevant Advertising!

      #2    
    Old December 22nd, 2013 (9:43 AM).
    Rayd12smitty's Avatar
    Rayd12smitty Rayd12smitty is offline
    Shadow Maker
       
      Join Date: Dec 2011
      Gender: Male
      Posts: 647
      This is awesome! Nice work. I'm definitely going to use this
      __________________
      Reply With Quote
        #3    
      Old December 26th, 2013 (6:37 AM).
      FL's Avatar
      FL FL is offline
      Pokémon Island Creator
         
        Join Date: Sep 2010
        Gender: Male
        Posts: 1,756
        As requested:

        How to make separate switches for this script activation at each regional dexes:

        This won't works if DEXDEPENDSONLOCATION is true.

        Change every piece of code that have '$game_switches[AdvancedPokedexScene::SWITCH]' to 'advancedDexAvailable?'. Before line 'class AdvancedPokedex' add:

        Code:
        def advancedDexAvailable?
          dexForSwitch={
            -1 => 70,
             1 => 75,
             3 => 90
          }
          switch=dexForSwitch[$PokemonGlobal.pokedexDex]
          return (!switch || game_switches[switch])
        end
        In this example, the switch 70 is necessary for activation of Advanced Pokédex at dex -1 (National Dex), the switch 75 is necessary for dex 1 and the switch 90 is necessary for dex 3. You can change the values of dexForSwitch for matching with your dex and switches.
        __________________
        Reply With Quote
          #4    
        Old January 2nd, 2014 (8:54 PM).
        Cilerba Cilerba is offline
        the hearts of lonely people
         
        Join Date: Feb 2010
        Location: Massachusetts
        Age: 21
        Gender: Male
        Nature: Quiet
        Posts: 1,169
        Damn FL this is awesome. Thanks for all the work you do for the community.
        __________________
        Reply With Quote
          #5    
        Old January 3rd, 2014 (10:49 AM).
        the__end's Avatar
        the__end the__end is offline
        Pixel Artist
           
          Join Date: Apr 2010
          Gender: Male
          Posts: 141
          Wait, what do you mean with effort points? Do you mean the Effort Values each Pokemon gains by fighting other Pokemon? If so, why show it in the Pokedex? The Pokedex should display the species data and not individual Pokemon data. Besides that, what happens if you own two of the same Pokemon? Which EVs will be shown? I would suggest that you make the EVs and IVs visible on the screen of each individual Pokemon. The place where you can see their moves and so on.
          __________________
          Reply With Quote
            #6    
          Old January 3rd, 2014 (11:09 AM).
          Rayd12smitty's Avatar
          Rayd12smitty Rayd12smitty is offline
          Shadow Maker
             
            Join Date: Dec 2011
            Gender: Male
            Posts: 647
            Quote:
            Originally Posted by the__end View Post
            Wait, what do you mean with effort points? Do you mean the Effort Values each Pokemon gains by fighting other Pokemon? If so, why show it in the Pokedex? The Pokedex should display the species data and not individual Pokemon data. Besides that, what happens if you own two of the same Pokemon? Which EVs will be shown? I would suggest that you make the EVs and IVs visible on the screen of each individual Pokemon. The place where you can see their moves and so on.
            I believe the effort points he has are the EVs the Pokemon gives upon defeating it, not how many EVs a pokemon has. Krookodile gives 3 Atk EVs, and then the 7th digit is just the total EV yield, which is 3. Some Pokemon give EVs in multiple stats, so if it gave 1 Atk and 1 Def, the 7th digit would read 2, for 2 total EVs.
            __________________
            Reply With Quote
              #7    
            Old January 12th, 2014 (9:23 AM).
            Lear Lear is offline
               
              Join Date: Dec 2012
              Gender: Male
              Posts: 8
              I seem to be encountering a bug and have no idea what the cause is. The first new pokemon I catch, after I turn the switch for advanced pokedex on, causes the battle screen pokedex data to be empty (no words or pictures of the pokemon) and also the pokemon I just caught is not in my party.

              Any idea how I can remedy this? I'm fairly sure I followed the installation instructions perfectly, but it may be something of my own ignorance causing this issue.


              Any assistance is greatly appreciated, and thanks for this awesome script! =)
              Reply With Quote
                #8    
              Old January 15th, 2014 (2:37 AM).
              FL's Avatar
              FL FL is offline
              Pokémon Island Creator
                 
                Join Date: Sep 2010
                Gender: Male
                Posts: 1,756
                Quote:
                Originally Posted by Lear View Post
                I seem to be encountering a bug and have no idea what the cause is. The first new pokemon I catch, after I turn the switch for advanced pokedex on, causes the battle screen pokedex data to be empty (no words or pictures of the pokemon) and also the pokemon I just caught is not in my party.

                Any idea how I can remedy this? I'm fairly sure I followed the installation instructions perfectly, but it may be something of my own ignorance causing this issue.


                Any assistance is greatly appreciated, and thanks for this awesome script! =)
                It's a bug! Thank you for the report. Change the line '@sprites["dexbar"].visible=true if $game_switches[AdvancedPokedexScene::SWITCH]' to:

                Code:
                 if @sprites["dexbar"] && $game_switches[AdvancedPokedexScene::SWITCH]
                   @sprites["dexbar"].visible=true 
                 end
                Everyone who uses this script shold do this change. I updated the thread.
                __________________
                Reply With Quote
                  #9    
                Old January 15th, 2014 (7:34 AM).
                Lear Lear is offline
                   
                  Join Date: Dec 2012
                  Gender: Male
                  Posts: 8
                  Thanks a ton! =) Was going crazy with trying to figure out why it was happening, haha.
                  Reply With Quote
                    #10    
                  Old January 16th, 2014 (5:29 AM).
                  Astraea's Avatar
                  Astraea Astraea is offline
                  The Storm of Friendship
                     
                    Join Date: Sep 2013
                    Location: Otago, New Zealand
                    Age: 21
                    Gender: Male
                    Nature: Brave
                    Posts: 2,110
                    Will this work in Hacks? I mean i am making a hack of fire red! Will this work in it?
                    __________________
                    Reply With Quote
                      #11    
                    Old January 16th, 2014 (6:53 AM).
                    Varion Bluefire's Avatar
                    Varion Bluefire Varion Bluefire is offline
                    A.K.A The Glitch
                       
                      Join Date: Apr 2013
                      Age: 23
                      Gender: Male
                      Nature: Naughty
                      Posts: 661
                      Quote:
                      Originally Posted by IndianCharizard# View Post
                      Will this work in Hacks? I mean i am making a hack of fire red! Will this work in it?
                      This is Pokémon Essentials, buddy.

                      Nothing here will work in Fire Red.
                      __________________

                      Just strollin' to my next destination...
                      Reply With Quote
                        #12    
                      Old July 3rd, 2014 (10:59 PM).
                      phuocpeter19 phuocpeter19 is offline
                         
                        Join Date: Jul 2014
                        Gender: Male
                        Posts: 3
                        Your script is awesome so I want to try out. But at page Form of Pokedex when I pressed Right, it does not direct me to advance page! Please help me!
                        Thanks for your awesome scripts!
                        Reply With Quote
                          #13    
                        Old July 8th, 2014 (1:39 PM).
                        FL's Avatar
                        FL FL is offline
                        Pokémon Island Creator
                           
                          Join Date: Sep 2010
                          Gender: Male
                          Posts: 1,756
                          Quote:
                          Originally Posted by phuocpeter19 View Post
                          Your script is awesome so I want to try out. But at page Form of Pokedex when I pressed Right, it does not direct me to advance page! Please help me!
                          Thanks for your awesome scripts!
                          Did you follow all the instructions (specially the last one)? Did the switch is on?
                          __________________
                          Reply With Quote
                            #14    
                          Old July 11th, 2014 (2:10 AM).
                          phuocpeter19 phuocpeter19 is offline
                             
                            Join Date: Jul 2014
                            Gender: Male
                            Posts: 3
                            Quote:
                            Originally Posted by FL View Post
                            Did you follow all the instructions (specially the last one)? Did the switch is on?
                            Yes I did, the switch was on. I could see the ADV tab on Pokedex but just can't access it.:(
                            Reply With Quote
                              #15    
                            Old July 13th, 2014 (3:48 AM).
                            FL's Avatar
                            FL FL is offline
                            Pokémon Island Creator
                               
                              Join Date: Sep 2010
                              Gender: Male
                              Posts: 1,756
                              So, you put the below part, without the comments, correct?
                              Quote:
                              Originally Posted by FL View Post
                              Code:
                              # -After line 'pbChooseForm' add:
                              
                               elsif Input.trigger?(Input::RIGHT)
                                 if $game_switches[AdvancedPokedexScene::SWITCH]
                                   ret=6
                                   break
                                 end
                              Strange, this is working here and with some users like Lear. When V14 is released I try again the whole process.
                              __________________
                              Reply With Quote
                                #16    
                              Old July 14th, 2014 (10:12 PM).
                              phuocpeter19 phuocpeter19 is offline
                                 
                                Join Date: Jul 2014
                                Gender: Male
                                Posts: 3
                                Thanks for your nice support! I hope you'll get it working!
                                Reply With Quote
                                  #17    
                                Old December 20th, 2015 (10:08 AM).
                                Kaito Bacon Kaito Bacon is offline
                                   
                                  Join Date: Nov 2015
                                  Gender: Male
                                  Posts: 5
                                  After adding the script I add an image or something?
                                  Reply With Quote
                                    #18    
                                  Old December 20th, 2015 (12:29 PM).
                                  FL's Avatar
                                  FL FL is offline
                                  Pokémon Island Creator
                                     
                                    Join Date: Sep 2010
                                    Gender: Male
                                    Posts: 1,756
                                    Quote:
                                    Originally Posted by Kaito Bacon View Post
                                    After adding the script I add an image or something?
                                    Quote:
                                    Originally Posted by FL View Post
                                    Code:
                                    # To this script works, put it above main, put a 512x384 background for this
                                    # screen in "Graphics/Pictures/advancedPokedex" location and three 512x384 for
                                    # the top pokédex selection bar at "Graphics/Pictures/advancedPokedexEntryBar",
                                    # "Graphics/Pictures/advancedPokedexNestBar" and
                                    # "Graphics/Pictures/advancedPokedexFormBar".
                                    __________________
                                    Reply With Quote
                                      #19    
                                    Old December 20th, 2015 (4:41 PM).
                                    Kaito Bacon Kaito Bacon is offline
                                       
                                      Join Date: Nov 2015
                                      Gender: Male
                                      Posts: 5
                                      would the images that I want or need to download any that you uploaded or something?
                                      Reply With Quote
                                        #20    
                                      Old December 20th, 2015 (6:14 PM).
                                      Rot8er_ConeX's Avatar
                                      Rot8er_ConeX Rot8er_ConeX is offline
                                         
                                        Join Date: May 2015
                                        Location: The Dissa Region
                                        Gender: Male
                                        Posts: 823
                                        Quote:
                                        Originally Posted by Kaito Bacon View Post
                                        would the images that I want or need to download any that you uploaded or something?
                                        Actually, FL was saying that you need to make your own. However, here's one for you - it's literally his fifth screenshot with the text removed.
                                        Attached Thumbnails
                                        advanceddexscreen5.png‎  
                                        __________________
                                        Features of Pokemon Entropy

                                        The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
                                        Reply With Quote
                                          #21    
                                        Old December 23rd, 2015 (12:20 PM).
                                        FL's Avatar
                                        FL FL is offline
                                        Pokémon Island Creator
                                           
                                          Join Date: Sep 2010
                                          Gender: Male
                                          Posts: 1,756
                                          Quote:
                                          Originally Posted by Kaito Bacon View Post
                                          would the images that I want or need to download any that you uploaded or something?
                                          You can use mine attached in this thread. in sampleresouces.zip, or make yourself.
                                          __________________
                                          Reply With Quote
                                            #22    
                                          Old February 4th, 2018 (5:52 PM).
                                          11000matias's Avatar
                                          11000matias 11000matias is offline
                                          BlueMagic
                                             
                                            Join Date: Nov 2016
                                            Gender: Male
                                            Nature: Calm
                                            Posts: 2
                                            Hi!
                                            I have a question, this script works in Pokemon Essentials v17.2?
                                            (Sorry for the bad english :))
                                            Reply With Quote
                                              #23    
                                            Old March 6th, 2018 (3:12 PM).
                                            FL's Avatar
                                            FL FL is offline
                                            Pokémon Island Creator
                                               
                                              Join Date: Sep 2010
                                              Gender: Male
                                              Posts: 1,756
                                              Quote:
                                              Originally Posted by 11000matias View Post
                                              Hi!
                                              I have a question, this script works in Pokemon Essentials v17.2?
                                              (Sorry for the bad english :))
                                              Updated to work.
                                              __________________
                                              Reply With Quote
                                                #24    
                                              Old March 6th, 2018 (7:30 PM). Edited March 6th, 2018 by Jenkkrystal.
                                              Jenkkrystal Jenkkrystal is offline
                                                 
                                                Join Date: Sep 2016
                                                Posts: 3
                                                This script is awesome, and you're awesome for share it. Thank you.
                                                There is only one thing i would change:
                                                In my opinion, all that information makes the game less surprising. I mean, would it be possible to activate the "ADV" page only if a condition is met?
                                                For example: You only would have access to the advanced information of a specie, if you would defeat certain number of PKMN of that specie. (Or any other condition that makes you feel rewarded).
                                                I'm noob at scripting, i don't even know if this is possible, but it would be great that yes.
                                                Reply With Quote
                                                  #25    
                                                Old March 7th, 2018 (3:34 PM).
                                                FL's Avatar
                                                FL FL is offline
                                                Pokémon Island Creator
                                                   
                                                  Join Date: Sep 2010
                                                  Gender: Male
                                                  Posts: 1,756
                                                  Quote:
                                                  Originally Posted by Jenkkrystal View Post
                                                  This script is awesome, and you're awesome for share it. Thank you.
                                                  There is only one thing i would change:
                                                  In my opinion, all that information makes the game less surprising. I mean, would it be possible to activate the "ADV" page only if a condition is met?
                                                  For example: You only would have access to the advanced information of a specie, if you would defeat certain number of PKMN of that specie. (Or any other condition that makes you feel rewarded).
                                                  I'm noob at scripting, i don't even know if this is possible, but it would be great that yes.
                                                  There is a constat named 'SWITCH' on my script. If you put the value '70' on this constant (the default value), the script only works when switch 70 was ON.
                                                  __________________
                                                  Reply With Quote
                                                  Reply

                                                  Quick Reply

                                                  Join the conversation!

                                                  Create an account to post a reply in this thread, participate in other discussions, and more!

                                                  Create a PokéCommunity Account

                                                  Sponsored Links
                                                  Thread Tools

                                                  Posting Rules
                                                  You may not post new threads
                                                  You may not post replies
                                                  You may not post attachments
                                                  You may not edit your posts

                                                  BB code is On
                                                  Smilies are On
                                                  [IMG] code is On
                                                  HTML code is Off

                                                  Forum Jump


                                                  All times are GMT -8. The time now is 8:17 PM.