• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

EVs/IVs in Summary 2019-06-12

Pokémon Essentials Version
v17.2 ➖
I created a script to add a screen for EVs and IVs to the Summary.

Unbenannt.png


As you might notice, I slightly edited the background for the "skills" page and used the same page's script as base for my own script.

Here is the code:
Ruby:
def drawPageFive
   overlay = @sprites["overlay"].bitmap
    base   = Color.new(248,248,248)
    shadow = Color.new(104,104,104)
    statshadows = []
    for i in 0...5; statshadows[i] = shadow; end
    if !(@pokemon.isShadow? && @pokemon.heartStage<=3 rescue false)
      natup = (@pokemon.nature/5).floor
      natdn = (@pokemon.nature%5).floor
      statshadows[natup] = Color.new(136,96,72) if natup!=natdn
      statshadows[natdn] = Color.new(64,120,152) if natup!=natdn
    end
    textpos = [
       [_INTL("HP"),248,88,0,base,shadow],
       [sprintf("%d/%d",@pokemon.ev[0],@pokemon.iv[0]),456,88,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Attack"),248,120,0,base,statshadows[0]],
       [sprintf("%d/%d",@pokemon.ev[1],@pokemon.iv[1]),456,120,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Defense"),248,152,0,base,statshadows[1]],
       [sprintf("%d/%d",@pokemon.ev[2],@pokemon.iv[2]),456,152,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Sp. Atk"),248,184,0,base,statshadows[3]],
       [sprintf("%d/%d",@pokemon.ev[3],@pokemon.iv[3]),456,184,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Sp. Def"),248,216,0,base,statshadows[4]],
       [sprintf("%d/%d",@pokemon.ev[4],@pokemon.iv[4]),456,216,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Speed"),248,248,0,base,statshadows[2]],
       [sprintf("%d/%d",@pokemon.ev[5],@pokemon.iv[5]),456,248,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Ability"),224,284,0,base,shadow],
       [PBAbilities.getName(@pokemon.ability),362,284,0,Color.new(64,64,64),Color.new(176,176,176)],
    ]
    pbDrawTextPositions(overlay,textpos)
    abilitydesc = pbGetMessage(MessageTypes::AbilityDescs,@pokemon.ability)
    drawTextEx(overlay,224,316,282,2,abilitydesc,Color.new(64,64,64),Color.new(176,176,176))
    end

I replaced the ribbons page in this case. If you want to keep it, you would have to replace
Ruby:
def drawPageFive
with
Ruby:
def drawPageSix
You have to insert the code within PSreen_Summary. Search for "def drawPageFive and delete or disable the existing script with # and paste in the code. Again, if you want to keep the Ribbons Page, Paste it below and type "def drawPageSix" instead. In that case you'll have to do a few more things.
If you simply replace it, you will have to search for "pagename" and replace "RIBBONS" with EVs/IVs.
When you keep the Ribbons, you'll have to add a new line and a few lines below, you'll find
Ruby:
case page
    when 1; drawPageOne
    when 2; drawPageTwo
    when 3; drawPageThree
    when 4; drawPageFour
    when 5; drawPageFive
    end
There, you'll have to add "when 6; drawPageSix". (Well, I think that is the case, I did not test it, tbh)

And one final thing: you'll have to change/add the background within Graphics/Pictures/Summary! I copied and edited bg_3. Replace bg_5 if you don't need the Ribbons or add bg_6.

I hope I got everything right and didn't forget something. If that's the case, point it out and I will edit it.

I hope everything is understandable, sadly, I am not a Native-English-Speaker
Credits
No Credits needed
Author
Zardae
Views
4,655
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from Zardae

Latest reviews

Works great in v18, although you need to edit a few more methods to make it completely work. Either way, great resource!
Back
Top