• 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 to add IV/EV screen in essentials 15.1?

56
Posts
10
Years
    • Seen Jul 8, 2023
    I found an outdated tutorial on the Pokemon Essentials wiki but I need one for the most recent version. I have been looking for the past 2 hours but I can't find anything. It would really help me if someone could tell me how to do it or send me a link.
     
    59
    Posts
    8
    Years
    • Seen Aug 9, 2020
    I found an outdated tutorial on the Pokemon Essentials wiki but I need one for the most recent version. I have been looking for the past 2 hours but I can't find anything. It would really help me if someone could tell me how to do it or send me a link.

    You don't really need to add a whole page for that. Just find the line where the stat is displayed. In my game, that's:

    Code:
           [_ISPRINTF("{1:d}",pokemon.attack,),320,168,1,Color.new(0,0,0)],
    [code]
    
    And add the info for the IV (0=HP,1=atk,2def,3speed,4spat,5spdef) like so:
    
    [code]
           [_ISPRINTF("{2:d}/{1:d}",pokemon.attack,pokemon.iv[1]),320,168,1,Color.new(0,0,0)],
    [code]
     
    59
    Posts
    8
    Years
    • Seen Aug 9, 2020
    Can't seem to find that line. Also, would that show EVs too?

    To show EVs, replace pokemon.iv with pokemon.ev.
    You can CTRL+SHIFT+F to search in all sections. Your code might be different, so search something like "attack" inside Summary and you should be able to find the line.
     
    56
    Posts
    10
    Years
    • Seen Jul 8, 2023
    To show EVs, replace pokemon.iv with pokemon.ev.
    You can CTRL+SHIFT+F to search in all sections. Your code might be different, so search something like "attack" inside Summary and you should be able to find the line.

    I think I found it but it just gave me an error when I loaded the game.

    This is what I found:

    [_INTL("SKILLS"),26,16,0,base,shadow],
    [pokename,46,62,0,base,shadow],
    [pokemon.level.to_s,46,92,0,Color.new(64,64,64),Color.new(176,176,176)],
    [_INTL("Item"),16,320,0,base,shadow],
    [itemname,16,352,0,Color.new(64,64,64),Color.new(176,176,176)],
    [_INTL("HP"),292,76,2,base,shadow],
    [sprintf("%3d/%3d",pokemon.hp,pokemon.totalhp),462,76,1,Color.new(64,64,64),Color.new(176,176,176)],
    [_INTL("Attack"),248,120,0,base,statshadows[0]],
    [sprintf("%d",pokemon.attack),456,120,1,Color.new(64,64,64),Color.new(176,176,176)],
    [_INTL("Defense"),248,152,0,base,statshadows[1]],
    [sprintf("%d",pokemon.defense),456,152,1,Color.new(64,64,64),Color.new(176,176,176)],
    [_INTL("Sp. Atk"),248,184,0,base,statshadows[3]],
    [sprintf("%d",pokemon.spatk),456,184,1,Color.new(64,64,64),Color.new(176,176,176)],
    [_INTL("Sp. Def"),248,216,0,base,statshadows[4]],
    [sprintf("%d",pokemon.spdef),456,216,1,Color.new(64,64,64),Color.new(176,176,176)],
    [_INTL("Speed"),248,248,0,base,statshadows[2]],
    [sprintf("%d",pokemon.speed),456,248,1,Color.new(64,64,64),Color.new(176,176,176)],
    [_INTL("Ability"),224,284,0,base,shadow],
    [abilityname,362,284,0,Color.new(64,64,64),Color.new(176,176,176)],
     
    59
    Posts
    8
    Years
    • Seen Aug 9, 2020
    Yeah, those are the lines. What crash are you getting? I got it to look like this:
    958a8e4f71ccfd1c0d4eaa51e5ac7326.png

    Notice how it's Attack / Attack IVs / Attack EVs.

    Final line looks like this:
    [sprintf("%d/%2d/%3d",pokemon.attack,pokemon.iv[1],pokemon.ev[1]),456,120,1,Color.new(64,64,64),Color.new(176,176,176)],

    Do the same for the rest, but make sure you also align it better, as its too much info by default and it looks bad.
     
    56
    Posts
    10
    Years
    • Seen Jul 8, 2023
    w9grZByamsEeQAAAABJRU5ErkJggg==
    1sYbmVd
    imgur.com/1sYbmVd

    This is how it is supposed to look, correct? The HP got messed up a little.
     
    824
    Posts
    8
    Years
  • I wouldn't recommend doing it in a single screen unless you have a way to shrink fonts so the IVs and EVs are smaller. Current HP/Max HP/HP IV/HP EVs would be a little too much.
     
    56
    Posts
    10
    Years
    • Seen Jul 8, 2023
    I wouldn't recommend doing it in a single screen unless you have a way to shrink fonts so the IVs and EVs are smaller. Current HP/Max HP/HP IV/HP EVs would be a little too much.

    Ok, I was going to make another page originally, but I was told to make it on one page, how would I make a separate page?
     
    824
    Posts
    8
    Years
  • Code:
      def drawPageSix(pokemon)
        overlay=@sprites["overlay"].bitmap
        overlay3=@sprites["overlay3"].bitmap
        overlay.clear
        overlay3.clear
        @sprites["background"].setBitmap("Graphics/Pictures/summary6")
        imagepos=[]
        if pbPokerus(pokemon)==1 || pokemon.hp==0 || @pokemon.status>0
          status=6 if pbPokerus(pokemon)==1
          [email protected] if @pokemon.status>0
          status=5 if pokemon.hp==0
          if status==1 && @pokemon.statusCount>0
            status=7
          end
          imagepos.push(["Graphics/Pictures/statuses",124,100,0,16*status,44,16])
        end
        if pokemon.isShiny?
          imagepos.push([sprintf("Graphics/Pictures/shiny"),2,134,0,0,-1,-1])
        end
        if pbPokerus(pokemon)==2
          imagepos.push([sprintf("Graphics/Pictures/summaryPokerus"),176,100,0,0,-1,-1])
        end
        [email protected] ? @pokemon.ballused : 0
        ballimage=sprintf("Graphics/Pictures/summaryball%02d",@pokemon.ballused)
        imagepos.push([ballimage,14,60,0,0,-1,-1])
        pbDrawImagePositions(overlay,imagepos)
        base=Color.new(248,248,248)
        shadow=Color.new(104,104,104)
        statshadows=[]
        for i in 0...5; statshadows[i]=shadow; end
        natup=(pokemon.nature/5).floor
        natdn=(pokemon.nature%5).floor
        statshadows[natup]=Color.new(128,32,64) if natup!=natdn
        statshadows[natdn]=Color.new(32,64,128) if natup!=natdn
        pbSetSystemFont(overlay)
        abilityname=PBAbilities.getName(pokemon.ability)
        abilitydesc=pbGetMessage(MessageTypes::AbilityDescs,pokemon.ability)
        itemname=pokemon.hasItem? ? PBItems.getName(pokemon.item) : _INTL("None")
        [email protected]
        brenda=overlay.font.size
        pbSetLargestFont(overlay,pokename,170-46-2)
        brenda -= overlay.font.size
        textpos=[[pokename,46,62+(brenda/2),0,base,shadow]]
        pbDrawTextPositions(overlay,textpos)
        pbSetSystemFont(overlay)
        textpos=[
           [_INTL("IVs, EVs, Hidden Power"),26,16,0,base,shadow],
           [pokemon.level.to_s,46,92,0,Color.new(64,64,64),Color.new(176,176,176)],
           [_INTL("Item"),16,320,0,base,shadow],
           [itemname,16,352,0,Color.new(64,64,64),Color.new(176,176,176)],
           [_INTL("HP"),248,89,0,base,shadow],
           [sprintf("%d",pokemon.iv[0]),358,89,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[0]),485,89,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Attack"),248,120,0,base,statshadows[0]],
           [sprintf("%d",pokemon.iv[1]),358,120,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[1]),485,120,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Defense"),248,152,0,base,statshadows[1]],
           [sprintf("%d",pokemon.iv[2]),358,152,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[2]),485,152,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Sp. Atk"),248,184,0,base,statshadows[3]],
           [sprintf("%d",pokemon.iv[4]),358,184,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[4]),485,184,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Sp. Def"),248,216,0,base,statshadows[4]],
           [sprintf("%d",pokemon.iv[5]),358,216,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[5]),485,216,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Speed"),248,248,0,base,statshadows[2]],
           [sprintf("%d",pokemon.iv[3]),358,248,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[3]),485,248,1,Color.new(0,96,96),Color.new(176,176,176)],[COLOR="Magenta"]
           [_INTL("Hidden Power"),221,284,0,base,shadow],[/COLOR]
        ]
        if pokemon.isMale?
          textpos.push([_INTL("♂"),178,62,0,Color.new(24,112,216),Color.new(136,168,208)])
        elsif pokemon.isFemale?
          textpos.push([_INTL("♀"),178,62,0,Color.new(248,56,32),Color.new(224,152,144)])
        end
        pbDrawTextPositions(overlay,textpos)[COLOR="rgb(255, 0, 255)"]
        [COLOR="Magenta"]hp=pbHiddenPower(pokemon.iv)
        type1rect=Rect.new(0,hp[0]*28,64,28)
        overlay.blt(410,283,@typebitmap.bitmap,type1rect)[/COLOR][/COLOR]
        drawMarkings(overlay,15,291,72,20,pokemon.markings)
        if pokemon.hp>0
          hpcolors=[
             Color.new(24,192,32),Color.new(0,144,0),     # Green
             Color.new(248,184,0),Color.new(184,112,0),   # Orange
             Color.new(240,80,32),Color.new(168,48,56)    # Red
          ]
          hpzone=0
          totalEV=pokemon.ev[0]+pokemon.ev[1]+pokemon.ev[2]+pokemon.ev[3]+pokemon.ev[4]+pokemon.ev[5]
          overlay.fill_rect(270,79,totalEV*208/510,4,hpcolors[hpzone*2])
          overlay.fill_rect(270,79,totalEV*208/510,1,hpcolors[hpzone*2+1])
        end
      end
    Add that somewhere in the PScreen_Summary scripts. That's the code for a page that displays the EVs, IVs, and even your Hidden Power (unless you remove the pink stuff).

    Now, search in PScreen_Summary for "def pbScene". Near the bottom of that function you should find code that looks similar to this, but not quite. Replace it with this (the red stuff is different) :
    Code:
          if dorefresh
            case @page
              when 0
                drawPageOne(@pokemon)
              when 1
                drawPageTwo(@pokemon)
              when 2
                drawPageThree(@pokemon)[COLOR="Red"]
              when 3
                drawPageSix(@pokemon)
              when 4[/COLOR]
                drawPageFour(@pokemon)
              [COLOR="red"]when 5[/COLOR]
                drawPageFive(@pokemon)
            end
          end
    This will make the IVs and EVs page stick between the stats page and the moves page.

    Earlier in that same function, you should see code for if you press the C button. There's a line that reads "elsif @page==3", change that to 4. I forgot this myself initially. This is so that pressing the enter button on the Moves page, not the IVs/EVs/Hidden Power page, allows you to rearrange moves.
     

    Attachments

    • summary6.png
      summary6.png
      4.4 KB · Views: 82
    56
    Posts
    10
    Years
    • Seen Jul 8, 2023
    Code:
      def drawPageSix(pokemon)
        overlay=@sprites["overlay"].bitmap
        overlay3=@sprites["overlay3"].bitmap
        overlay.clear
        overlay3.clear
        @sprites["background"].setBitmap("Graphics/Pictures/summary6")
        imagepos=[]
        if pbPokerus(pokemon)==1 || pokemon.hp==0 || @pokemon.status>0
          status=6 if pbPokerus(pokemon)==1
          [email protected] if @pokemon.status>0
          status=5 if pokemon.hp==0
          if status==1 && @pokemon.statusCount>0
            status=7
          end
          imagepos.push(["Graphics/Pictures/statuses",124,100,0,16*status,44,16])
        end
        if pokemon.isShiny?
          imagepos.push([sprintf("Graphics/Pictures/shiny"),2,134,0,0,-1,-1])
        end
        if pbPokerus(pokemon)==2
          imagepos.push([sprintf("Graphics/Pictures/summaryPokerus"),176,100,0,0,-1,-1])
        end
        [email protected] ? @pokemon.ballused : 0
        ballimage=sprintf("Graphics/Pictures/summaryball%02d",@pokemon.ballused)
        imagepos.push([ballimage,14,60,0,0,-1,-1])
        pbDrawImagePositions(overlay,imagepos)
        base=Color.new(248,248,248)
        shadow=Color.new(104,104,104)
        statshadows=[]
        for i in 0...5; statshadows[i]=shadow; end
        natup=(pokemon.nature/5).floor
        natdn=(pokemon.nature%5).floor
        statshadows[natup]=Color.new(128,32,64) if natup!=natdn
        statshadows[natdn]=Color.new(32,64,128) if natup!=natdn
        pbSetSystemFont(overlay)
        abilityname=PBAbilities.getName(pokemon.ability)
        abilitydesc=pbGetMessage(MessageTypes::AbilityDescs,pokemon.ability)
        itemname=pokemon.hasItem? ? PBItems.getName(pokemon.item) : _INTL("None")
        [email protected]
        brenda=overlay.font.size
        pbSetLargestFont(overlay,pokename,170-46-2)
        brenda -= overlay.font.size
        textpos=[[pokename,46,62+(brenda/2),0,base,shadow]]
        pbDrawTextPositions(overlay,textpos)
        pbSetSystemFont(overlay)
        textpos=[
           [_INTL("IVs, EVs, Hidden Power"),26,16,0,base,shadow],
           [pokemon.level.to_s,46,92,0,Color.new(64,64,64),Color.new(176,176,176)],
           [_INTL("Item"),16,320,0,base,shadow],
           [itemname,16,352,0,Color.new(64,64,64),Color.new(176,176,176)],
           [_INTL("HP"),248,89,0,base,shadow],
           [sprintf("%d",pokemon.iv[0]),358,89,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[0]),485,89,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Attack"),248,120,0,base,statshadows[0]],
           [sprintf("%d",pokemon.iv[1]),358,120,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[1]),485,120,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Defense"),248,152,0,base,statshadows[1]],
           [sprintf("%d",pokemon.iv[2]),358,152,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[2]),485,152,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Sp. Atk"),248,184,0,base,statshadows[3]],
           [sprintf("%d",pokemon.iv[4]),358,184,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[4]),485,184,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Sp. Def"),248,216,0,base,statshadows[4]],
           [sprintf("%d",pokemon.iv[5]),358,216,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[5]),485,216,1,Color.new(0,96,96),Color.new(176,176,176)],
           [_INTL("Speed"),248,248,0,base,statshadows[2]],
           [sprintf("%d",pokemon.iv[3]),358,248,0,Color.new(96,0,96),Color.new(176,176,176)],
           [_INTL("{1}/252",pokemon.ev[3]),485,248,1,Color.new(0,96,96),Color.new(176,176,176)],[COLOR=Magenta]
           [_INTL("Hidden Power"),221,284,0,base,shadow],[/COLOR]
        ]
        if pokemon.isMale?
          textpos.push([_INTL("♂"),178,62,0,Color.new(24,112,216),Color.new(136,168,208)])
        elsif pokemon.isFemale?
          textpos.push([_INTL("♀"),178,62,0,Color.new(248,56,32),Color.new(224,152,144)])
        end
        pbDrawTextPositions(overlay,textpos)[COLOR="rgb(255, 0, 255)"]
        [COLOR=Magenta]hp=pbHiddenPower(pokemon.iv)
        type1rect=Rect.new(0,hp[0]*28,64,28)
        overlay.blt(410,283,@typebitmap.bitmap,type1rect)[/COLOR][/COLOR]
        drawMarkings(overlay,15,291,72,20,pokemon.markings)
        if pokemon.hp>0
          hpcolors=[
             Color.new(24,192,32),Color.new(0,144,0),     # Green
             Color.new(248,184,0),Color.new(184,112,0),   # Orange
             Color.new(240,80,32),Color.new(168,48,56)    # Red
          ]
          hpzone=0
          totalEV=pokemon.ev[0]+pokemon.ev[1]+pokemon.ev[2]+pokemon.ev[3]+pokemon.ev[4]+pokemon.ev[5]
          overlay.fill_rect(270,79,totalEV*208/510,4,hpcolors[hpzone*2])
          overlay.fill_rect(270,79,totalEV*208/510,1,hpcolors[hpzone*2+1])
        end
      end
    Add that somewhere in the PScreen_Summary scripts. That's the code for a page that displays the EVs, IVs, and even your Hidden Power (unless you remove the pink stuff).

    Now, search in PScreen_Summary for "def pbScene". Near the bottom of that function you should find code that looks similar to this, but not quite. Replace it with this (the red stuff is different) :
    Code:
          if dorefresh
            case @page
              when 0
                drawPageOne(@pokemon)
              when 1
                drawPageTwo(@pokemon)
              when 2
                drawPageThree(@pokemon)[COLOR=Red]
              when 3
                drawPageSix(@pokemon)
              when 4[/COLOR]
                drawPageFour(@pokemon)
              [COLOR=red]when 5[/COLOR]
                drawPageFive(@pokemon)
            end
          end
    This will make the IVs and EVs page stick between the stats page and the moves page.

    Earlier in that same function, you should see code for if you press the C button. There's a line that reads "elsif @page==3", change that to 4. I forgot this myself initially. This is so that pressing the enter button on the Moves page, not the IVs/EVs/Hidden Power page, allows you to rearrange moves.

    I copied that but I keep getting syntax errors. I fixed a few of them by adding a few "end"s, but I cannot fix this one:

    overlay.fill_rect(270,79,totalEV*208/510,4,hpcolors[hpzone*2])
     
    56
    Posts
    10
    Years
    • Seen Jul 8, 2023
    Try this:

    overlay.fill_rect(270,79,(totalEV*208)/510,4,Color.new(24,192,32))
    overlay.fill_rect(270,79,(totalEV*208)/510,1,Color.new(0,144,0))

    Well the game loaded this time, but I get an error message when trying to view the page:

    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: NoMethodError

    Message: undefined method `bitmap' for nil:NilClass

    PScreen_Summary:1020:in `drawPageSix'

    PScreen_Summary:960:in `pbScene'

    PScreen_Summary:889:in `loop'

    PScreen_Summary:967:in `pbScene'

    PScreen_Summary:981:in `pbStartScreen'

    PScreen_Party:881:in `pbSummary'

    PScreen_Party:1984:in `pbPokemonScreen'

    PScreen_Party:1893:in `loop'

    PScreen_Party:2019:in `pbPokemonScreen'

    PScreen_PauseMenu:173:in `pbStartPokemonMenu'
     
    Last edited:
    Back
    Top