• 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!
Stat Screen Upgrade (EVs and IVs in Summary)

Tutorial Stat Screen Upgrade (EVs and IVs in Summary) Pokémon Essentials Version v18.1

SirWeibrot

Novice
Member
Joined
Jan 30, 2021
Posts
21
SirWeibrot submitted a new resource:

Stat Screen Upgrade (EVs and IVs in Summary) - Adds EVs and IVs to the Skills tab of your Summary.

I created a script that adds EVs and IVs to the Skills tab of your Summary.

View attachment 1826

As you can see there are 2 versions, one with the HP bar above the HP Column and one with the HP bar below the HP Column. You can also modify the script to remove the HP bar entirely.

Here is the code:

Ruby:
    def drawPageThree
    overlay = @sprites["overlay"].bitmap
    base   = Color.new(248,248,248)
    shadow = Color.new(104,104,104)
    #...

Read more about this resource...
 

Allan5829

Rookie
Member
Joined
Jan 28, 2018
Posts
5
I already implemented ev/iv with the help of a different resource (by replacing ribbon page with ev/iv page, which I prefer vs all 3 on one page) but I really like the addition of the +/- based on the nature. I saw towards the bottom of the resource that Kobi2604 came up with that so should I only credit them for the lines of code involving boost? Just want to make sure I credit accurately.
 

ThatWelshOne_

Champion
Member
There were a few people in the Game Dev Café Discord server asking about this being updated for v19, so I went ahead and did it for a bit of fun. I simplified the original script a little by rolling everything into one script rather than four different ones. I added two options to the top of the script: hpbar_on_top and show_plus_minus. These should be self-explanatory from the main resource page. Change these to true/false as you like. You'll still need the correct background graphic from the main resource page, though. No need to credit me (in fact, I'm already credited under my Reddit username). Enjoy!

This replaces the drawPageThree method in the script called UI_Summary.

Ruby:
def drawPageThree
  hpbar_on_top = false
  show_plus_minus = true
  overlay = @sprites["overlay"].bitmap
  base   = Color.new(248,248,248)
  shadow = Color.new(104,104,104)
  # Determine which stats are boosted and lowered by the Pokémon's nature
  statshadows = {}
  boost = {}
  GameData::Stat.each_main do |s|
    statshadows[s.id] = shadow
    boost[s.id] = ""
  end
  if !@pokemon.shadowPokemon? || @pokemon.heartStage > 3
    @pokemon.nature_for_stats.stat_changes.each do |change|
      statshadows[change[0]] = Color.new(136,96,72) if change[1] > 0
      boost[change[0]] = _INTL("+") if change[1] > 0 && show_plus_minus
      statshadows[change[0]] = Color.new(64,120,152) if change[1] < 0
      boost[change[0]] = _INTL("-") if change[1] < 0 && show_plus_minus
    end
  end
  ypos1 = hpbar_on_top ? 82 : 70
  ypos2 = hpbar_on_top ? 78 : 110
  # Write various bits of text
  textpos = [
     [_INTL("HP"),248,ypos1,0,base,statshadows[:HP]],
     [sprintf("%d",@pokemon.totalhp),481,ypos1,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.iv[:HP]),433,ypos1,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.ev[:HP]),397,ypos1,1,Color.new(64,64,64),Color.new(176,176,176)],
     [_INTL("Attack"+boost[:ATTACK]),248,114,0,base,statshadows[:ATTACK]],
     [sprintf("%d",@pokemon.attack),481,114,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.iv[:ATTACK]),433,114,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.ev[:ATTACK]),397,114,1,Color.new(64,64,64),Color.new(176,176,176)],
     [_INTL("Defense"+boost[:DEFENSE]),248,146,0,base,statshadows[:DEFENSE]],
     [sprintf("%d",@pokemon.defense),481,146,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.iv[:DEFENSE]),433,146,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.ev[:DEFENSE]),397,146,1,Color.new(64,64,64),Color.new(176,176,176)],
     [_INTL("Sp. Atk"+boost[:SPECIAL_ATTACK]),248,178,0,base,statshadows[:SPECIAL_ATTACK]],
     [sprintf("%d",@pokemon.spatk),481,178,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.iv[:SPECIAL_ATTACK]),433,178,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.ev[:SPECIAL_ATTACK]),397,178,1,Color.new(64,64,64),Color.new(176,176,176)],
     [_INTL("Sp. Def"+boost[:SPECIAL_DEFENSE]),248,210,0,base,statshadows[:SPECIAL_DEFENSE]],
     [sprintf("%d",@pokemon.spdef),481,210,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.iv[:SPECIAL_DEFENSE]),433,210,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.ev[:SPECIAL_DEFENSE]),397,210,1,Color.new(64,64,64),Color.new(176,176,176)],
     [_INTL("Speed"+boost[:SPEED]),248,242,0,base,statshadows[:SPEED]],
     [sprintf("%d",@pokemon.speed),481,242,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.iv[:SPEED]),433,242,1,Color.new(64,64,64),Color.new(176,176,176)],
     [sprintf("%d",@pokemon.ev[:SPEED]),397,242,1,Color.new(64,64,64),Color.new(176,176,176)],
     [_INTL("Ability"),224,278,0,base,shadow]
  ]
  # Draw ability name and description
  ability = @pokemon.ability
  if ability
    textpos.push([ability.name,362,278,0,Color.new(64,64,64),Color.new(176,176,176)])
    drawTextEx(overlay,224,320,282,2,ability.description,Color.new(64,64,64),Color.new(176,176,176))
  end
  # Draw all text
  pbDrawTextPositions(overlay,textpos)
  # Draw HP bar
  if @pokemon.hp>0
    w = @pokemon.hp*94*1.0/@pokemon.totalhp
    w = 1 if w<1
    w = ((w/2).round)*2
    hpzone = 0
    hpzone = 1 if @pokemon.hp<=(@pokemon.totalhp/2).floor
    hpzone = 2 if @pokemon.hp<=(@pokemon.totalhp/4).floor
    imagepos = [
       ["Graphics/Pictures/Summary/overlay_hp",250,ypos2,0,hpzone*6,w,6]
    ]
    pbDrawImagePositions(overlay,imagepos)
  end
end
 

AwesomeToadUltimate

Novice
Member
Joined
Feb 2, 2021
Posts
30
summary UI off.PNG

For some reason the UI is out of place for me. I don't know why.
 
Back
Top