• 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.

Hidden power checker

16
Posts
11
Years
    • Seen Aug 9, 2012
    On Pokemon black/white, there is a guy in Iccirus city(I think) that tells you what type hidden power would be when you select a pokemon. How could someone do that on essentials?
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    One of the Pokémon Debug options (in the party screen) tells you what a Pokémon's Hidden Power is. That's a good start.
     
    28
    Posts
    15
    Years
  • I copied just the Script from the Debug function in an Event and it works:

    pbChoosePokemon(1,3)

    pkmn=pbGetPokemon(1)

    type=0
    type|=(pkmn.iv[0]&1)
    type|=(pkmn.iv[1]&1)<<1
    type|=(pkmn.iv[2]&1)<<2
    type|=(pkmn.iv[3]&1)<<3
    type|=(pkmn.iv[4]&1)<<4
    type|=(pkmn.iv[5]&1)<<5
    type=(type*15/63).floor
    if hasConst?(PBTypes,:QMARKS)
    type+=1 if type>=PBTypes::QMARKS
    end
    typename=PBTypes.getName(type+1)

    power=0
    power|=(pkmn.iv[0]&2)>>1
    power|=(pkmn.iv[1]&2)
    power|=(pkmn.iv[2]&2)<<1
    power|=(pkmn.iv[3]&2)<<2
    power|=(pkmn.iv[4]&2)<<3
    power|=(pkmn.iv[5]&2)<<4
    power=(power*40/63).floor+30

    Kernel.pbMessage(_INTL("The type is {1}.",typename))
    Kernel.pbMessage(_INTL("The power ist {1}.",power))
     
    Back
    Top