• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

Showing Hidden Power's actual type in the fight menu?

  • 825
    Posts
    9
    Years
    I'm trying to get Hidden Power (and a new pair that together I'm calling "Hidden Power X") to display their actual type - rather than Normal - when you hover over them in battle.

    Right now I've replaced the line (in PokeBattle_Scene) :
    Code:
    self.bitmap.blt(416,13+UPPERGAP,@typebitmap.bitmap,Rect.new(0,moves[i].type*28,64,28))
    with
    Code:
    if moves[i].name=="Hidden Power"
      hptype=pbHiddenPower([COLOR="red"][31,31,31,31,31,31][/COLOR])
      self.bitmap.blt(416,13+UPPERGAP,@typebitmap.bitmap,Rect.new(0,hptype[0]*28,64,28))
    elsif moves[i].name=="Hidden Power PX" || moves[i].name=="Hidden Power SX"
      hptype=pbHiddenPower2([COLOR="Red"][31,31,31,31,31,31][/COLOR])
      self.bitmap.blt(416,13+UPPERGAP,@typebitmap.bitmap,Rect.new(0,hptype[0]*28,64,28))
    else
      self.bitmap.blt(416,13+UPPERGAP,@typebitmap.bitmap,Rect.new(0,moves[i].type*28,64,28))
    end

    And it works perfectly so far - the move Hidden Power will display as Dark, and Hidden Power PX and Hidden Power SX will display as Fairy.

    The next step is to call forth the Pokemon's actual IVs so that it will display the correct type. I've tried calling for pokemon.iv, @pokemon.iv, battlers[index].iv, battler.iv, and many different ways I've seen people call for Pokemon. They all throw up an error. I assume that this is because the function doesn't know about the Pokemon in question. So I was going to add an argument to refresh function. But where is it called so I can add the new arguments to the function?
     
    The iv is an array and, if you would to call it, you've to introduce array's index.
    E.g.:

    if(iv[0]==31)then
    Kernel.pbMessage("Your pokemon has very good HP Stat!")
    end
     
    The iv is an array and, if you would to call it, you've to introduce array's index.
    E.g.:

    if(iv[0]==31)
    Kernel.pbMessage("Your pokemon has very good HP Stat!")
    end

    There's a function that takes the entire array as an argument and spits out the type and base power of the Hidden Power. I know how that function works, I'm trying to get the function that displays the type of the move highlighted when making a choice in battle to display this, but that function doesn't know what Pokemon is being selected so can't call the IVs. I'm trying to fix that.
     
    Back
    Top