• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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?

Ahh, I got it. I left behind code from my own game. Near the beginning there's two lines that refer to overlay3. Remove them.

Got rid of those two lines. Now the page loads but then crashes.

Error Log:

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

Message: undefined method `pbSetLargestFont' for #<PokemonSummaryScene:0x87786b8>

PScreen_Summary:1056: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'
 
Again, you can get rid of the line that's using pbSetLargestFont...

That did the trick! Thanks a lot! I'm still new to essentials so I don't really know the scripts yet.

EDIT: Something odd happens, on the moves page, I cannot select the moves, I have to go to the IV/EV/HP screen to select moves. Also the ribbon screen is not available. I assume this is because of the new page inserted. Is there any way to fix this?
 
Last edited:
That did the trick! Thanks a lot! I'm still new to essentials so I don't really know the scripts yet.

EDIT: Something odd happens, on the moves page, I cannot select the moves, I have to go to the IV/EV/HP screen to select moves. Also the ribbon screen is not available. I assume this is because of the new page inserted. Is there any way to fix this?

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.
This should have fixed the first issue. As for the second issue,
Code:
  def pbScene
    pbPlayCry(@pokemon)
    loop do
      Graphics.update
      Input.update
      pbUpdate
      if Input.trigger?(Input::B)
        break
      end
      dorefresh=false
      if Input.trigger?(Input::C)
        if @page==0
          break
        elsif @page==4
          pbMoveSelection
          dorefresh=true
          drawPageFour(@pokemon)
        end
      end
      if Input.trigger?(Input::UP) && @partyindex>0
        pbGoToPrevious
        @pokemon=@party[@partyindex]
        @sprites["pokemon"].setPokemonBitmap(@pokemon)
        @sprites["pokemon"].color=Color.new(0,0,0,0)
        pbPositionPokemonSprite(@sprites["pokemon"],40,144)
        dorefresh=true
        pbPlayCry(@pokemon)
      end
      if Input.trigger?(Input::DOWN) && @partyindex<@party.length-1
        pbGoToNext
        @pokemon=@party[@partyindex]
        @sprites["pokemon"].setPokemonBitmap(@pokemon)
        @sprites["pokemon"].color=Color.new(0,0,0,0)
        pbPositionPokemonSprite(@sprites["pokemon"],40,144)
        dorefresh=true
        pbPlayCry(@pokemon)
      end
      if Input.trigger?(Input::LEFT) && [email protected]?
        oldpage=@page
        @page-=1
        @page=5 if @page<0
        dorefresh=true
        if @page!=oldpage # Move to next page
          pbPlayCursorSE()
          dorefresh=true
        end
      end
      if Input.trigger?(Input::RIGHT) && [email protected]?
        oldpage=@page
        @page+=1
        @page=0 if @page>5
        if @page!=oldpage # Move to next page
          pbPlayCursorSE()
          dorefresh=true
        end
      end
      if dorefresh
        case @page
          when 0
            drawPageOne(@pokemon)
          when 1
            drawPageTwo(@pokemon)
          when 2
            drawPageThree(@pokemon)
          when 3
            drawPageSix(@pokemon)
          when 4
            drawPageFour(@pokemon)
          when 5
            drawPageFive(@pokemon)
        end
      end
    end
    return @partyindex
  end

Replace your def pbScene with this. It should fix both issues.
 
This should have fixed the first issue. As for the second issue,
Code:
  def pbScene
    pbPlayCry(@pokemon)
    loop do
      Graphics.update
      Input.update
      pbUpdate
      if Input.trigger?(Input::B)
        break
      end
      dorefresh=false
      if Input.trigger?(Input::C)
        if @page==0
          break
        elsif @page==4
          pbMoveSelection
          dorefresh=true
          drawPageFour(@pokemon)
        end
      end
      if Input.trigger?(Input::UP) && @partyindex>0
        pbGoToPrevious
        @pokemon=@party[@partyindex]
        @sprites["pokemon"].setPokemonBitmap(@pokemon)
        @sprites["pokemon"].color=Color.new(0,0,0,0)
        pbPositionPokemonSprite(@sprites["pokemon"],40,144)
        dorefresh=true
        pbPlayCry(@pokemon)
      end
      if Input.trigger?(Input::DOWN) && @partyindex<@party.length-1
        pbGoToNext
        @pokemon=@party[@partyindex]
        @sprites["pokemon"].setPokemonBitmap(@pokemon)
        @sprites["pokemon"].color=Color.new(0,0,0,0)
        pbPositionPokemonSprite(@sprites["pokemon"],40,144)
        dorefresh=true
        pbPlayCry(@pokemon)
      end
      if Input.trigger?(Input::LEFT) && [email protected]?
        oldpage=@page
        @page-=1
        @page=5 if @page<0
        dorefresh=true
        if @page!=oldpage # Move to next page
          pbPlayCursorSE()
          dorefresh=true
        end
      end
      if Input.trigger?(Input::RIGHT) && [email protected]?
        oldpage=@page
        @page+=1
        @page=0 if @page>5
        if @page!=oldpage # Move to next page
          pbPlayCursorSE()
          dorefresh=true
        end
      end
      if dorefresh
        case @page
          when 0
            drawPageOne(@pokemon)
          when 1
            drawPageTwo(@pokemon)
          when 2
            drawPageThree(@pokemon)
          when 3
            drawPageSix(@pokemon)
          when 4
            drawPageFour(@pokemon)
          when 5
            drawPageFive(@pokemon)
        end
      end
    end
    return @partyindex
  end
Replace your def pbScene with this. It should fix both issues.

Perfect, everything works now! Thanks again!
 
EV/IV Weirdness?

I've tried a tutorial found on this site for adding EV/IV screen however whenever having compiled the script and trying to start up the game, I receive this error.

Script PScreen_Summary Line 625 Syntax Error occurred, which is the last few lines with the overlay.fill

Here is the script in question

Code:
def drawPageSix(pokemon)
    overlay=@sprites["overlay"].bitmap
    overlay.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)],
       [_INTL("Hidden Power"),221,284,0,base,shadow],
    ]
    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)
    hp=pbHiddenPower(pokemon.iv)
    type1rect=Rect.new(0,hp[0]*28,64,28)
    overlay.blt(410,283,@typebitmap.bitmap,type1rect)[/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(360,110,pokemon.hp*96/pokemon.totalhp,2,hpcolors[hpzone*2+1])
      overlay.fill_rect(360,112,pokemon.hp*96/pokemon.totalhp,4,hpcolors[hpzone*2])
    end
  end
 
Last edited by a moderator:
overlay.fill_rect(360,110,pokemon.hp*96/pokemon.totalhp,2,Color.new(0,144,0))
overlay.fill_rect(360,112,pokemon.hp*96/pokemon.totalhp,4,Color.new(24,192,32))
 
Make sure you're not blindly using code without knowing what it does or how it works. There appears to be a single line which says:

Code:
 if pokemon.hp>0    hpcolors=[
This should be two separate lines.

I also spotted this line, which has something at the end of it which it shouldn't:

Code:
overlay.blt(410,283,@typebitmap.bitmap,type1rect)[/COLOR]
 
Alright, thank you for mentioning that; I have came to conclude that I should watch what I'm doing and thus prevent me from making simple mistakes, cheers~
 
I get this problem:

The other screen overlap the IV SCREEN and it seems that the calculation of the points isn't working for me to.
 

Attachments

  • [PokeCommunity.com] How to add IV/EV screen in essentials 15.1?
    dds.png
    89.7 KB · Views: 21
I get this problem:

The other screen overlap the IV SCREEN and it seems that the calculation of the points isn't working for me to.

Why would you bother? The latest version of Pok?mon is v16.2, which is highly recommend to use.
 
You realise that makes little difference since versions are by and large backwards compatible?

That is not to say they are. And even if they are, he has an error that doesn't seem to have popped up before, making blaming the version difference very attractive. This thread is almost 2 years old first of all, and, generally, posting errors on versions something isn't meant for isn't the best move.
 
Back
Top