• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!

Hidden Power move, new types, and max IVs: what's the formula?

ISNorden

Fan Game Creator
Member
Joined
Jul 16, 2018
Posts
12
I know that Essentials (like the commercial Pokémon games) uses creature IVs to determine the damage type and amount for Hidden Power. I also know that Essentials games (unlike the commercial ones) allow Hidden Power to use any new type included on the list. (If a fan-game allows 20 damage types instead of 18, Hidden Power will also select from 20 types.) What I still can't figure out, though, is how a particular combination of IVs corresponds to a type: six perfect IV scores always equals 70 points of Fairy-type damage (or Dark before Gen 6).

Is there a formula for determining the maximum IV combination linked to a particular Hidden Power? Let's assume I've added Light and Sound to the list of elemental types in my game, and want to give players a near-perfect Noibat as a Mystery Gift. That Noibat is going to know Hidden Power as a "special-event move", I've decided to guarantee that the Noibat always causes Sound-type damage (at least 60 hp) with Hidden Power, What is the highest set of IVs this Noibat can have without changing its power, and how does the game engine calculate that?
 
I don't know about calculating the highest values, but the type calculation is almost identical to the the canon, with just the final step being updated for the number of types.

Ruby:
Expand Collapse Copy
  idxType |= (iv[PBStats::HP]&1)
  idxType |= (iv[PBStats::ATTACK]&1)<<1
  idxType |= (iv[PBStats::DEFENSE]&1)<<2
  idxType |= (iv[PBStats::SPEED]&1)<<3
  idxType |= (iv[PBStats::SPATK]&1)<<4
  idxType |= (iv[PBStats::SPDEF]&1)<<5
  idxType = (types.length-1)*idxType/63
  type = types[idxType]

Instead of multiplying by 15, it's multiplied by whatever the maximum number of types is. (minus 1 because it starts at 0) And then it's divided by 63 and rounded down.

So, that's at least a starting point for this- since these are rounded down, that means that the highest number of IVs ends up giving the last type numerically. (That's why it was always Dark-type before Gen 6 introduced Fairy) So, in this scenario, if Sound is your last type, you'd just make it a 6IV, if I'm not mistaken.
 

ISNorden

Fan Game Creator
Member
Joined
Jul 16, 2018
Posts
12
I don't know about calculating the highest values, but the type calculation is almost identical to the the canon, with just the final step being updated for the number of types.

Ruby:
Expand Collapse Copy
  idxType |= (iv[PBStats::HP]&1)
  idxType |= (iv[PBStats::ATTACK]&1)<<1
  idxType |= (iv[PBStats::DEFENSE]&1)<<2
  idxType |= (iv[PBStats::SPEED]&1)<<3
  idxType |= (iv[PBStats::SPATK]&1)<<4
  idxType |= (iv[PBStats::SPDEF]&1)<<5
  idxType = (types.length-1)*idxType/63
  type = types[idxType]

Instead of multiplying by 15, it's multiplied by whatever the maximum number of types is. (minus 1 because it starts at 0) And then it's divided by 63 and rounded down.

So, that's at least a starting point for this- since these are rounded down, that means that the highest number of IVs ends up giving the last type numerically. (That's why it was always Dark-type before Gen 6 introduced Fairy) So, in this scenario, if Sound is your last type, you'd just make it a 6IV, if I'm not mistaken.

So I'd multiply by 19 in my fangame? (The 18 canonical types, plus 2 for Sound and Light, equals 20; minus 1 equals 19.)
 
Back
Top