Personality value

Template:Unknown name

A Pokémon's **personality value** (Japanese: **性格値** *personality value*) is an unsigned 32-bit integer that is created when the Pokémon is first generated by the game. As an unsigned 32-bit integer, its value can be anywhere from 0 (32 zeroes in binary) to 4,294,967,295 (32 ones in binary), inclusive. This value was introduced with the Pokémon data structure overhaul that occurred at the start of Generation III, and is generated using the games' pseudorandom number generator.

## Generation

For Pokémon encountered in the wild, it is set upon encountering them. For gift Pokémon and Eggs, it is set upon receiving them. For Eggs from Pokémon Day Care, when it is set varies between games.

* In Generation III except in

## Personality value

, the lower half of the personality value is set when the Day-Care Man finds the Egg, while the second half is set when the player obtains the Egg from the Day-Care Man.
* In

## Personality value

 and Generation IV, it is set when the Day-Care Man finds the Egg.
* In Generation V, it is set when the player obtains the Egg from the Day-Care Man.

## Usage

Precisely which properties are determined by the personality value varies between generations.

### Gender

`00000000 00000000 00000000 00000000`

From Generation III to Generation V, a Pokémon's gender is determined by the lowest eight digits (the lowest byte, highlighted in red above) of *p* in binary form. Mathematically, this can be derived by calculating `*p* mod 256`. Below, this value will be referred to as *pgender*.

In a Pokémon species' data structure, there is a value called the *gender threshold*, a byte with a value ranging from 0 to 255. With the exception of a few special cases, *pgender* is compared to the gender threshold to determine if the Pokémon is male or female.

If the gender threshold is not a special value (0, 254, or 255), *pgender* is compared to the gender threshold. If *pgender* is greater than or equal to the gender threshold, the Pokémon is male, otherwise it is female. Because the comparison to determine gender is greater than or equal, Pokémon are slightly more likely to be male than they would be according to the ideal ratios.

If a species has a gender threshold of 255, it is a gender-unknown species (such as Magnemite). If a species has a gender threshold of 254, it is a female-only species (such as Nidoran♀). If a species has a gender threshold of 0, it is a male-only species (such as Nidoran♂).

In Generation VI and VII, the gender threshold is compared to a random number between 1 and 252 (inclusive) instead of *pgender* (which is between 0 and 255); this causes Pokémon with a "1:1" gender ratio to actually be distributed according to the ideal ratio. All other Pokémon are more likely to be the more common gender than they would be according to their nominal ratio.

In Generation VIII, the gender threshold is compared to a random number between 1 and 253 (inclusive) instead of *pgender* (which is between 0 and 255); this causes Pokémon with a "1:1" gender ratio to be slightly more likely to be male than they would be according to the ideal ratios. All other Pokémon are more likely to be the more common gender than they would be according to their nominal ratio.

#### Cute Charm

In Generation IV only, when Cute Charm forces a Pokémon to be a specific gender, it does so by setting its personality value to one out of 25 possible values that correspond to the forced gender (one value per nature). The set of possible values depends on the gender of the Pokémon with Cute Charm, and, if the Pokémon with Cute Charm is female, the wild Pokémon's gender ratio. This has significant consequences for properties determined by personality value.

As a result, when the encountered species can be affected by Cute Charm (i.e., when it is not a male-only, female-only, or gender-unknown species), the chances of encountering a Shiny Pokémon differ from the usual 1/8192, depending on how many of the 25 possible values forced by Cute Charm result in a Shiny Pokémon (in conjunction with the Trainer ID number and Secret ID): they may be as low as 1/24546 (if none of the 25 values forced by Cute Charm result in Shiny Pokémon, so the Pokémon can only be Shiny if Cute Charm fails), or as high as 21.34% (if 8 out of the 25 values forced by Cute Charm result in Shiny Pokémon).

Additionally, Spinda whose gender has been forced by Cute Charm in Generation IV only have one of 50 patterns (25 for male, 25 for female).

### Ability

Generation III-IV origin: `00000000 00000000 00000000 00000000`

Generation V origin: `00000000 00000000 00000000 00000000`

In Generations III and IV, if a Pokémon's species has more than one Ability, its Ability is determined by the lowest bit (highlighted in red above) of its personality value; i.e., whether *p* is even or odd. If *p* is even (the lowest bit is 0), the Pokémon has its first Ability. If *p* is odd (the lowest bit is 1), it has the second.

In Generation V, a Pokémon's Ability is determined differently depending on whether it originated in Generation V or an earlier generation. Pokémon from earlier generations will still have their Ability determined by the lowest bit in *p*. Pokémon originating in Generation V, however, use the lowest bit of the upper half of *p* to determine their Ability. Just as with Generation III and IV Pokémon, a 0 still indicates a Pokémon's first Ability, while 1 indicates its second. This can be derived by calculating

⌊

p

/

65536

⌋

mod
2

{\displaystyle \left\lfloor p / 65536 \right\rfloor \bmod 2}

.

If a Pokémon is transferred to a later generation where its species' Abilities have changed, it will retain the Ability it had in the earlier generation so long as it does not evolve, since the games store a Pokémon's current Ability in a value separate from its personality value. However, in Generations IV and V, when a Pokémon evolves, its personality value is rechecked and the Pokémon's Ability may change. If a Pokémon that would change Abilities on evolution is transferred to Pokémon Bank, it will be locked into its current Ability slot upon transfer through Poké Transporter.

As an example, in Generation III, Porygon and Porygon2 only had the Ability Trace, but in Generation IV, they gained Download as a second Ability. If a Porygon from Generation III is brought to a Generation IV game, it will have Trace no matter what its personality value is; however, if it evolves into Porygon2, it will only keep Trace if *p* is even.

A separate bit governs whether a Pokémon has their normal Abilities or Hidden Abilities in Generation V. If a Pokémon has its Hidden Ability, its personality value is always set to be even (denoting a first Ability).

### Nature

In Generations III and IV a Pokémon's Nature is determined by p *mod 25. From Generation V onward, Nature is determined by a separate byte, unrelated to the personality value.*

The result of *p* mod 25 corresponds to the following Natures:

### Shininess

`00000000 00000000 00000000 00000000`

From Generation III onward, whether a Pokémon is Shiny depends on its original Trainer's Trainer ID number and secret ID number and on the Pokémon's personality value. The high half of *p* (highlighted in red above) is referred to as *p*1 below, while the low half (highlighted in blue) is referred to as *p*2. Mathematically, *p*1 can be derived by calculating `*p* / 65536` and rounding down the result, while *p*2 can be derived by calculating `*p* mod 65536`.

# S
I

D

T
r
a
i
n
e
r

⊕
I

D

S
e
c
r
e
t

⊕

p
1

⊕

p
2

{\displaystyle S = ID\_{Trainer} \oplus ID\_{Secret} \oplus p\_1 \oplus p\_2}

A bitwise exclusive or operation (or "⊕") on inputs *a* and *b*, written as *a* ⊕ *b* = *c*, outputs *c* such that, if *a*i (bit *i* of *a*) and *b*i are different, then *c*i is 1; otherwise it is 0. For example, 11002 ⊕ 10102 = 01102. When exclusive or is applied to multiple inputs, as in the calculation for Shininess above, it may be more easily understood as, "If an odd number of bits (at position *i*) are 1, output 1". This operation is commutative.

From Generation III to V, if *S* < 8, the Pokémon is Shiny. From Generation VI onward, the Pokémon is Shiny if *S* < 16. This is an 8 or 16 in 65536 chance of a Pokémon being Shiny. In Generation VIII, if *S* = 0, the Pokémon will have square sparkles rather than star sparkles during the particle effect shown for Shiny Pokémon. (If the Pokémon is Shiny, and is either a fateful encounter or transferred from Pokémon GO, the value of *S* is ignored when determining sparkle type, and the Pokémon will have square sparkles regardless.)

#### Example

As an example, given a Trainer whose Trainer ID is 24294 and whose Secret ID is 38834...

*IDTrainer* = 2429410 = 01011110111001102
*IDSecret* = 3883410 = 10010111101100102
If the Trainer encounters a Pokémon whose personality value is 2814471828...

*p* = 281447182810 = 101001111100000101101110100101002
*p*1 = 10100111110000012
*p*2 = 01101110100101002
Then *S* is equal to...

*S* = 01011110111001102 ⊕ 10010111101100102 ⊕ 10100111110000012 ⊕ 01101110100101002
*S* = 00000000000000012 = 110
Since *S* is less than 8, this Pokémon is Shiny.

### Albinism

From Generation AN-I onward, whether a Pokémon is Albino depends on the Pokémon's Original Trainer's ID number and secret ID number, together referred to as the Trainer ID, as well as the Pokémon's **personality value**:

`RarityIndex = (PersonalityValue **and** 0x137FFEC8 **or** TrainerID **and** 0xEC800137) **xor** (TrainerID **and** 0x137FFEC8 **or** PersonalityValue **and** 0xEC800137) **xor** (PersonalityValue **xor** TrainerID)
AlbinismValue = RarityIndex0...18 **xor** RarityIndex14...32`
where 0x137FFEC8 and 0xEC800137 are hexadecimal representations of the constants 3 2715 5400 and 39 6781 1895, while the last two variables are the first and last 18 bits of the number the first equation produces (which do have some overlap).

The above formula can result in a number ranging from 0 to 262144. If it is less than 8**ARS****TA**/7**UVIR**/10**LH****BsQs**, the Pokémon will be Albino.

#### Example

As an example, given a Trainer whose Trainer ID is 11921 and whose Secret ID is 45795...

*IDTrainer* = 1192110 = 00101110100100012 = 2e9116
*IDSecret* = 4579510 = 10110010111000102 = b2e316
If the Trainer encounters a Pokémon whose personality value is 3034265201...

*p* = 303426520110 = 101101001101101100110110011100012 = b4db367116
Then the rarity index *R* is equal to...

*R* = ((b4db3671 & 137ffec8) | (b2e32e91 & ec800137)) ⊕ ((b2e32e91 & 137ffec8) | (b4db3671 & ec800137) ⊕ (b4db3671 ⊕ b2e32e91)
*R* = (105b3640 | a0800011) ⊕ (12632e80 | a4800031) ⊕ (b4db3671 ⊕ b2e32e91)
*R* = b05f374b ⊕ b26b3e9f ⊕ 063818e0
*R* = 040c1134
*R1* = 040c1134 & FFFFC000 >> 14 = 1030
*R2* = 040c1134 & 3FFFF = 1134
*A* = 01011110111001102 ⊕ 10010111101100102 ⊕ 10100111110000012 ⊕ 01101110100101002
*A* = 00000000000000012 = 110
Since *A* is less than 8, this Pokémon is Shiny.

### Characteristic

From Generation IV onward, Pokémon have a Characteristic which indicates their highest IV. In Generation IV and V, in the case of a tie, the personality value is used to determine which stat wins the tie; from Generation VI onward, the encryption constant is used in the case of a tie.

The tie-breaker starts at the stat with the index `*p* mod 6` and increments the index (returning to 0 after reaching 5) if it is not one of the stats that is tied for highest. The first stat checked that is tied for highest wins the tie and will determine the Characteristic.

 1
 2
 3
 4
 5

### Spinda's spots

`00000000 00000000 00000000 00000000`

Spinda has four spots: two on its face, and one on each of its ears. From Generation III to V, this is determined by its personality value; from Generation VI onward, this is determined by its encryption constant.

Each byte in the personality value represents the coordinates of one of these spots. The x-coordinate is the lower four bits of the byte and the y-coordinate is the higher four bits of the byte. These coordinates determine the position of the top-left corner of the corresponding spot.

While this would appear to mean that Spinda's spots have as many possible variations as there are personality values (4,294,967,296), some coordinates will place a spot off of Spinda's body or such that one wholly overlaps another. Therefore, in practice, the number of observed variations is fewer.

### Unown's letter

`00000000 00000000 00000000 00000000`

*pletter* = `00000000`

In Generation III, Unown's letter is determined by the composite value of the least significant 2 bits of each byte in *p*. With A representing 0 and each letter thereafter representing the following number value (with ! as 26 and ? as 27), Unown's letter can be determined by:

# α

p

l
e
t
t
e
r

mod
28

{\displaystyle \alpha = p\_{letter} \bmod 28}

In Generation II, this is determined using individual values. Since Generation IV, Unown's letter is determined by a separate byte, unrelated to the personality value.

### Wurmple's evolution

`00000000 00000000 00000000 00000000`

Wurmple's evolution is determined by the upper half of its personality value (highlighted in red above), referred to here as *pw*. (Mathematically, this is equivalent to `*p* / 65536`, rounded down.) From Generation VI onward, Wurmple's evolution is now determined by the encryption constant, with the same formula.

If `*pw* mod 10` is less than or equal to 4, Wurmple will evolve into Silcoon; if it is greater than 4, Wurmple will evolve into Cascoon.

### Size

`00000000 00000000 00000000 00000000`

In Generations III and IV, there are occasionally characters who want to see large Pokémon. The calculation to determine the size of one of these Pokémon depends on its individual values and its personality value. Like the Shininess calculation, this calculation also uses exclusive or (⊕).

The lowest two bytes of *p* are used in the calculation: *p*1 (highlighted in blue above) is mathematically equivalent to `*p* mod 256`, while *p*2 (highlighted in red) is equivalent to

⌊
p

/

256
⌋
mod
256

{\displaystyle \lfloor p / 256 \rfloor \bmod 256}

. The IV values are also not used in whole; only the four least significant bits of each are used: mathematically, `*<stat>'* = *IV<stat>* mod 16`.

The first step in the calculation is as follows:

# s
256
⋅
(

p
1

⊕
(
H

P
′

⋅
(
A
t

k
′

⊕
D
e

f
′

)
)
)
(

p
2

⊕
(
S
p

d
′

⋅
(
S
p
A
t

k
′

⊕
S
p
D
e

f
′

)
)
)

{\displaystyle s = 256 \cdot (p\_1 \oplus (HP' \cdot (Atk' \oplus Def'))) + (p\_2 \oplus (Spd' \cdot (SpAtk' \oplus SpDef')))}

For the next step, *h* is the species' height in tenths of a meter. and the values of *x*, *y*, and *z* depend on the value of *s* as shown in the following table.

The final part of the calculation scales the *s* value to produce the Pokémon's size in millimeters. The final value of *Size* is bounded between 0.29 and 1.725 times the standard height given for the species in the Pokédex, and rounded down.

S
i
z
# e

⌊

h
⋅

⌊

s
−
z

y

x

⌋

10

⌋

{\displaystyle Size = \left\lfloor\frac{h \cdot \left\lfloor \frac{s - z}{y} + x \right\rfloor}{10}\right\rfloor}

If the game converts this number to inches, the final result will be rounded down to the nearest tenth of an inch.

The characters searching for large Pokémon can be found at the following locations:

### Performance changes

The day-to-day performance of a Pokémon in the Pokéathlon depends on its personality value and the day of the month. It also depends on Nature, which is also calculated based on the personality value. The five least significant decimal digits of *p* will here be referred to as *p*0 to *p*4, in order from the least significant bit to the most significant, and they govern (in order) the attributes Power, Stamina, Skill, Jump, and Speed.

The change in performance in a particular attribute is calculated as the sum of the following factors:

* **Day of the month modifier**:

(
(
(
D
a
y
A
t
t
r
i
b
u
t
e
3
)
⋅
(
D
a
y
−
A
t
t
r
i
b
u
t
e
7
)

p

a
t
t
r
i
b
u
t
e

)
mod
10
)
⋅
2
−
9

{\displaystyle ( ( (Day + Attribute + 3) \cdot (Day - Attribute + 7) + p\_{attribute} ) \bmod 10 ) \cdot 2 - 9}

, where:
	+ *Day* is the day of the month.
	+ *Attribute* is 0 for Power, 1 for Stamina, 2 for Skill, 3 for Jump, and 4 for Speed.
	+ *pattribute* is the digit of *p* governing the current attribute.

Note that this modifier's values range from -9 to +9, and it only takes on odd values. This also means that the day of the month modifier cycles every 10 days, excepting for Power and Speed where the modifiers for Day 1 are different from those for Days 11, 21, and 31.
Since Nature is determined by the last two digits of the personality value, the Nature of a Pokémon will reveal constraints on possible values of this modifier for Power (and, to a lesser extent, Stamina).
* **Nature modifier**: the Pokémon's Nature may raise or lower its performance in an attribute. Non-neutral Natures will add or subtract 35 points from an attribute, if the Nature positively or negatively influences the stat that corresponds to the current attribute. Neutral natures will add or subtract 10 points from an attribute depending on the Nature.

 Speed | Serious | Hardy | Speed

* **Aprijuice modifier**: the last Aprijuice the Pokémon drank affects the Pokémon's performance, depending on the strengths of the flavors in the Aprijuice.
	+ Strongest flavor: add

	⌊

	f
	l
	a
	v
	o
	r
	⋅
	1.5

	⌋

	10

	{\displaystyle \left\lfloor flavor \cdot 1.5 \right\rfloor + 10}

	 to the corresponding attribute.
	+ Second strongest flavor: add

	⌊

	f
	l
	a
	v
	o
	r
	⋅
	1.5

	⌋

	{\displaystyle \left\lfloor flavor \cdot 1.5 \right\rfloor}

	 to the corresponding attribute.
	+ Weakest flavor: subtract *X* times the sum of the two strongest flavors (rounded down) from the corresponding attribute, depending on the Aprijuice's mildness...
		- 0 - 199:

		X
		=
		1
		−
		0.1
		⋅

		⌊

		m
		i
		l
		d
		n
		e
		s
		s

		/

		25

		⌋

		{\displaystyle X = 1 - 0.1 \cdot \left\lfloor mildness / 25 \right\rfloor}
		- 200-254: *X* = 0.2
		- 255: *X* = 0.1

The Aprijuice flavors correspond to the performance attributes as follows:

 Sour
 Dry
 Bitter
 Sweet

The sum of these modifiers is then translated into a difference in stars as follows:

 Score

Note that performance changes may not drop below the Pokémon's minimum performance rating, nor may it exceed the Pokémon's maximum performance rating. Thus, for example, a Cradily may never have its Speed or Jump rating improved or degraded as those attributes are fixed (as such, for example, it is advisable to give it dry Aprijuices for which sweetness or bitterness is its weakest flavor).

### Other uses

A Pokémon's personality value may also used for things unrelated to the Pokémon itself.

`00000000 00000000 00000000 00000000`

In Template:Game2, Mirage Island will appear on Route 130 if the lower half of the personality value of a Pokémon in the player's party matches a random number generated at the start of each day by the game. A man in Pacifidlog Town can also tell the player whether he sees the island "today", i.e., whether one of the Pokémon in the player's party matches Mirage Island's number.

Template:Project Games notice

de:Personality Value
es:Valor de personalidad
fr:Valeur Interne Personnelle
it:Personalità
ja:性格値
zh:性格值