Personality value: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(Tables)
 
(127 intermediate revisions by 46 users not shown)
Line 1: Line 1:
A Pokémon's '''personality value''' is an {{wp|Signedness|unsigned}} {{wp|32-bit}} {{wp|Integer (computer science)|integer}} that is created when the Pokémon is first encountered; it is set as soon as the Pokémon appears in the wild, the Pokémon's Egg is received from the {{pkmn|Day Care}} man or another [[Non-player character|NPC]], or the Pokémon itself is received from an NPC. As an unsigned 32-bit integer, its value can be anywhere between 0, which is represented as 00000000 00000000 00000000 00000000 (32 zeroes) in binary, and 4,294,967,295, represented as 11111111 11111111 11111111 11111111 (32 ones) in binary, inclusive. This value was introduced with the [[Pokémon data structure in the GBA|Pokémon data structure]] overhaul that occurred at the start of [[Generation III]], and is generated using the games' [[Pseudorandom number generation in Pokémon|pseudorandom number generator]].
{{Unknown name}}
A Pokémon's '''personality value''' (Japanese: '''{{tt|性格値|せいかくち}}''' ''personality value'') is an {{wp|Signedness|unsigned}} {{wp|32-bit}} {{wp|Integer (computer science)|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 {{OBP|Pokémon data structure|Generation III}} overhaul that occurred at the start of Generation III, and is generated using the games' [[Pseudorandom number generation|pseudorandom number generator]].


For each operation, the portion of the 32-bit value used will be indicated at the beginning of the section by highlighting, unless the full value is used. The integer's full value will be known as ''p'', other values will be declared as ''p<sub>x</sub>'', ''p<sub>y</sub>'', and so on. Much of this article will be discussing values in binary.
From [[Generation VI]] onward, Pokémon have an additional random unsigned 32-bit integer value known as the '''encryption constant''', generated at the same time as the personality value and effectively acting as an extension of it, although it is stored in a separate place in the Pokémon data structure. The encryption constant takes over many of the former roles of the personality value. Pokémon [[transfer]]red from [[Generation V]] have their personality value copied to the encryption constant.


==Gender==
==Generation==
<code>00000000 00000000 00000000 <span style="background:#FF9999">00000000</span></code>
For Pokémon encountered in the wild, it is set upon encountering them. For [[gift Pokémon]] and {{pkmn|Egg}}s, it is set upon receiving them. For Eggs from the [[Pokémon Day Care]], when it is set varies between games.
* In [[Pokémon Ruby and Sapphire Versions|Pokémon Ruby, Sapphire]], {{v2|FireRed and LeafGreen|s}}, 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 {{game|Emerald}} 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.


A Pokémon's [[gender]] is determined by the lowest eight digits (a byte) of ''p'' in binary form; essentially, <code>''p'' [[wp:modulo operation|%]] 256</code>. This value will, from here on out, be known as ''p<sub>gender</sub>''.
==Usage==
Precisely which properties are determined by the personality value varies between generations.
{|class=wikitable
!
!Gen III
!Gen IV
!Gen V
!Gen VI
|-
!Gender
| {{Yes}} || {{Yes}} || {{Yes}} ||
|-
!Ability
| {{Yes}} || {{Yes}} || {{Yes}} ||
|-
!Nature
| {{Yes}} || {{Yes}} || ||
|-
!Shininess
| {{Yes}} || {{Yes}} || {{Yes}} || {{Yes}}
|-
!Characteristic
| || {{Yes}} || {{Yes}} ||
|-
!Spinda's spots
| {{Yes}} || {{Yes}} || {{Yes}} ||
|-
!Unown's letter
| {{Yes}} || || ||
|-
!Wurmple's evolution
| {{Yes}} || {{Yes}} || {{Yes}} ||
|-
!Gender-counterpart species
| {{Yes}} || {{Yes}} || ||
|-
!Size
| {{Yes}} || {{Yes}} || ||
|-
!Performance changes
| || {{Yes}} || ||
|}


In a Pokémon species's [[Pokémon base stats data structure in the GBA|base stat structure]], there is a byte called the ''gender threshold'', with a value between <code>00000000</code> and <code>11111111</code>. For genderless Pokémon such as {{p|Magnemite}}, the value of this byte is <code>11111111</code>. For female only Pokémon such as {{p|Nidoran♀}}, the value of this byte is <code>11111110</code>. For male only Pokémon such as {{p|Nidoran♂}}, the value of this byte is <code>00000000</code>. Pokémon with ''both'' genders occupy the rest of the spectrum. For these Pokémon, if the value of ''p<sub>gender</sub>'' is <b>equal to or greater than</b> that of the base stat value (the gender threshold), the Pokémon is male, otherwise it is female.
===Gender===
<code>00000000 00000000 00000000 <span style="background:#FF9999">00000000</span></code><br>


{| class="roundy" style="width:auto; text-align:center; background: #C0C0FF; border: 3px solid blue;"
From [[Generation III]] to [[Generation V]], a Pokémon's [[gender]] is determined by the lowest eight digits (the lowest byte, highlighted in <span style="background:#FF9999">red</span> above) of ''p'' in binary form. Mathematically, this can be derived by calculating <math>p \bmod 256</math>. Below, this value will be referred to as ''p<sub>gender</sub>''.
|-  
 
! colspan="2" | Base stat value
In a Pokémon species' {{OBP|Pokémon species data structure|Generation III|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, ''p<sub>gender</sub>'' is compared to the gender threshold to determine if the Pokémon is male or female.
! colspan="2" | Gender ratio
 
|-  
If the gender threshold is not a special value (0, 254, or 255), ''p<sub>gender</sub>'' is compared to the gender threshold. If ''p<sub>gender</sub>'' 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|gender-unknown]] species (such as {{p|Magnemite}}). If a species has a gender threshold of 254, it is a female-only species (such as {{p|Nidoran♀}}). If a species has a gender threshold of 0, it is a male-only species (such as {{p|Nidoran♂}}).
 
In [[Generation VI]] and {{gen|VII}}, the gender threshold is compared to a separate random number between 1 and 252 (inclusive) instead of ''p<sub>gender</sub>'' (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 separate random number between 1 and 253 (inclusive) instead of ''p<sub>gender</sub>'' (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.
 
{| class="roundy" style="text-align:center; background: #C0C0FF; border: 3px solid blue; margin-bottom: 10px"
! colspan="2" | Gender threshold
! rowspan="2" | Nominal ratio<br>(♂:♀)
! colspan="2" | Frequency (Gen 3-5)
! colspan="2" | Frequency (Gen 6-7)
! colspan="2" | Frequency (Gen 8)
|-
! Binary
! Binary
! Decimal
! Decimal
! Male
! Female
! Male
! Female
! Male
! Male
! Female
! Female
|- style="background:#fff"
|- style="background:#fff"
| <code>11111111</code>
| <code>00000000</code>
| 255
| 0
| colspan="2" | Genderless
| Male
| 100.00%
| 0.00%
| 100.00%
| 0.00%
| 100.00%
| 0.00%
|- style="background:#fff"
|- style="background:#fff"
| <code>11111110</code>
| <code>00011111</code>
| 254
| 31
| 0.0%
| 7:1
| 100.0%
| 87.89%
| 12.11%
| 88.10%
| 11.90%
| 88.14%
| 11.86%
|- style="background:#fff"
|- style="background:#fff"
| <code>11011111</code>
| <code>00111111</code>
| 223
| 63
| 12.5%
| 3:1
| 87.5%
| 75.39%
|- style="background:#fff"
| 24.61%
| <code>10111111</code>
| 75.40%
| 191
| 24.60%
| 25.0%
| 75.49%
| 75.0%
| 24.51%
|- style="background:#fff"
|- style="background:#fff"
| <code>01111111</code>
| <code>01111111</code>
| 127
| 127
| 50.0%
| 1:1
| 50.0%
| 50.39%
| 49.61%
| 50.00%
| 50.00%
| 50.20%
| 49.80%
|- style="background:#fff"
|- style="background:#fff"
| <code>00111111</code>
| <code>10111111</code>
| 63
| 191
| 75.0%
| 1:3
| 25.0%
| 25.39%
| 74.61%
| 24.60%
| 75.40%
| 24.90%
| 75.10%
|- style="background:#fff"
|- style="background:#fff"
| <code>00011111</code>
| <code>‭‭11100001‬</code>
| 31
| 225
| 87.5%
| 1:7
| 12.5%
| ''12.11%''
| ''87.89%''
| 11.11%
| 88.89%
| 11.46%
| 88.54%
|- style="background:#fff"
|- style="background:#fff"
| <code>00000000</code>
| <code>11111110</code>
| 0
| 254
| 100.0%
| Female
| 0.00%
| 100.00%
| 0.0%
| 100.00%
| 0.0%
| 0.0%
| 100.00%
|- style="background:#fff"
| <code>11111111</code>
| 255
| colspan="7" | [[Gender unknown]]
|}
|}
<br clear="all">


Because gender is determined by a greater than or equal check, Pokémon are not actually evenly distributed between male and female. For example, for a Pokémon with a 1:1 male to female gender ratio, there is actually a 129/256 (50.390625%) chance for the Pokémon to be male and 127/256 (49.609375%) chance for the Pokémon to be female.
====Cute Charm====
In [[Generation IV]] only, when {{a|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, {{p|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==
===Ability===
If ''p'' is even, that Pokémon has the first [[Ability]] for its species. If it's odd, it has the second. If a species has only one Ability while ''p'' is odd, it gets the only Ability it can. Pokémon transferred from [[Generation III]] to [[Generation IV]] or [[Generation V]] that can get one of the new Abilities will retain the Ability they had in the previous generation; however, if they are evolved and their personality value is odd, they will get the new Ability upon evolution. For example, a {{p|Porygon}} that has the Ability Trace is brought to a Generation IV game. If it then evolves into {{p|Porygon2}}, it may keep Trace (if ''p'' is even), or it may switch to the Ability {{a|Download}} (if ''p'' is odd). The reason this happens is because although the Ability is initially determined by the personality value, the Ability is stored as a separate value in the [[Pokémon data structure in Generation IV|Pokémon data]], and alongside the IVs in Generation III. When the Pokémon evolves in Generation IV, the personality value is rechecked, and a new Ability assigned.
Generation III-IV origin: <code>00000000 00000000 00000000 0000000<span style="background:#FF9999">0</span></code><br>
[[Generation V]] origin: <code>00000000 0000000<span style="background:#FF9999">0</span> 00000000 00000000</code>


Note that a separate bit governs whether a Pokémon has their normal Abilities or Hidden Abilities in [[Generation V]]; the personality value of a Pokémon is always set to have its first Ability in this case, so as to allow the inclusion of a second Hidden Ability in a future generation.
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 <span style="background:#FF9999">red</span> 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 one. If the Pokémon does not have a second ability, ''p'' can be whatever value.
Pokémon from [[Pokémon Colosseum]] and [[Pokémon XD]] do not have this connection between their ability and the value of ''p''.


==Nature==
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 <math>\left\lfloor p / 65536 \right\rfloor \bmod 2</math>.
In Generations {{Gen|III}} and {{Gen|IV}} a Pokémon's [[Nature]] is determined by <code>''p'' % 25</code>.


The number acquired as the remainder corresponds to the personality as follows:
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 the Ability slot corresponding to its current Ability upon transfer through [[Poké Transporter]].


{| class="roundy" style="width:auto; text-align:center; background: #C0C0FF; border: 3px solid blue;"
As an example, in Generation III, {{p|Porygon}} and {{p|Porygon2}} only had the Ability {{a|Trace}}, but in Generation IV, they gained {{a|Download}} as a second Ability. If a {{p|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 {{p|Porygon2}}, it will only keep Trace if ''p'' is even.
|-
 
! ''p'' % 25
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 {{Gen|III}} and {{Gen|IV}} a Pokémon's [[Nature]] is determined by <math>p \bmod 25</math>. 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:
{| class="roundy" style="text-align:center; background: #C0C0FF; border: 3px solid blue"
! ''p'' mod 25
! Nature
! Nature
|- style="background:#fff"
|- style="background:#fff"
Line 154: Line 265:
|}
|}


<br clear="all">
===Shininess===
 
In [[Generation V]] the nature is untied from the personality value, and stored separately.
 
==Shininess==
<code><span style="background:#FF9999">00000000 00000000</span> <span style="background:#9999FF">00000000 00000000</span></code>
<code><span style="background:#FF9999">00000000 00000000</span> <span style="background:#9999FF">00000000 00000000</span></code>
:The <span style="background:#FF9999">red value</span> will be represented as ''p<sub>1</sub>'', while the <span style="background:#9999FF">blue value</span> will be represented as ''p<sub>2</sub>''.
Whether a Pokémon is {{Shiny}} or not depends on the values of the [[Trainer ID number]], [[secret ID number]], and personality value. There is an [[Shiny Pokémon#Generations III and IV|8 in 65536 chance]] (0.012207% or 2<sup>-13</sup>) of a Pokémon being Shiny (which simplifies to 1/8192).
Variables ''E'' and ''F'' are declared to hold the values that result.
A bitwise {{wp|exclusive or}} (''xor'') operation (such as ''a'' xor ''b'' = ''c'') is equivalent to saying "If each bit of ''a'' ≠ ''b'', ''c'' is true." In other words, 11010111 xor 01101010 = 10111101. Each xor in the operation is a bitwise xor.
''E'' = ''ID<sub>Trainer</sub>'' xor ''ID<sub>Secret</sub>''
''F'' = ''p<sub>1</sub>'' xor ''p<sub>2</sub>''
''E'' xor ''F'' < 8 , then ''Shiny''
===Example===
As an example, let's take a Trainer whose Trainer ID is 24294 and whose Secret ID is 38834.
''ID<sub>Trainer</sub>'' = 24294 = 0101111011100110 in binary.


''ID<sub>Secret</sub>'' = 38834 = 1001011110110010 in binary.
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 <span style="background:#FF9999">red</span> above) is referred to as ''p''<sub>1</sub> below, while the low half (highlighted in <span style="background:#9999FF">blue</span>) is referred to as ''p''<sub>2</sub>. Mathematically, ''p''<sub>1</sub> can be derived by calculating <math>p / 65536</math> and rounding down the result, while ''p''<sub>2</sub> can be derived by calculating <math>p \bmod 65536</math>.


This Trainer encounters a Pokémon whose personality value is 2814471828.
:<math>S = ID_{Trainer} \oplus ID_{Secret} \oplus p_1 \oplus p_2</math>


''p'' = 2814471828 = 1010011111000001 0110111010010100 in binary.
A bitwise {{wp|exclusive or}} operation (or "⊕") on inputs ''a'' and ''b'', written as ''a'' ⊕ ''b'' = ''c'', outputs ''c'' such that, if ''a''<sub>i</sub> (bit ''i'' of ''a'') and ''b''<sub>i</sub> are different, then ''c''<sub>i</sub> is 1; otherwise it is 0. For example, 1100<sub>2</sub> ⊕ 1010<sub>2</sub> = 0110<sub>2</sub>. 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 {{wp|Commutative property|commutative}}.


''p1'' = 1010011111000001
From [[Generation III]] to {{gen|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.


''p2'' = 0110111010010100
In {{g|Sword and Shield}}, 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 was met in a [[fateful encounter]] or transferred from [[Pokémon GO]], the value of ''S'' is ignored when determining sparkle type, and the Pokémon will always have square sparkles.)


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


The ''E'' value is 0101111011100110 xor 1001011110110010
:''ID<sub>Trainer</sub>'' = 24294<sub>10</sub> = 0101111011100110<sub>2</sub>
:''ID<sub>Secret</sub>'' = 38834<sub>10</sub> = 1001011110110010<sub>2</sub>


''E'' = 1100100101010100
If the Trainer encounters a Pokémon whose personality value is 2814471828...


The ''F'' value is 1010011111000001 xor 0110111010010100
:''p'' = 2814471828<sub>10</sub> = 1010011111000001<span style="margin-left:0.2em">0110111010010100</span><sub>2</sub>
:''p''<sub>1</sub> = 1010011111000001<sub>2</sub>
:''p''<sub>2</sub> = 0110111010010100<sub>2</sub>


''F'' = 1100100101010101
Then ''S'' is equal to...


:''S'' = 0101111011100110<sub>2</sub> ⊕ 1001011110110010<sub>2</sub> ⊕ 1010011111000001<sub>2</sub> ⊕ 0110111010010100<sub>2</sub>
:''S'' = 0000000000000001<sub>2</sub> = 1<sub>10</sub>


''E'' xor ''F'' = 0000000000000001, which is less than eight. Therefore, this Pokémon is Shiny.
Since ''S'' is less than 8, this Pokémon is Shiny.


==Characteristic==
===Characteristic===
From [[Generation IV]] onward, Pokémon have a [[Characteristic]] which indicates their highest {{IV}}. In the case of a tie, the personality value is used to determine which stat is used.
From [[Generation IV]] onward, Pokémon have a [[Characteristic]] which indicates their highest {{IV}}. In Generation IV and {{gen|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 stat checked first is the stat with the index of <code>''p'' % 6</code>, then proceeding through the index list of stats (after reaching 5 the game loops back to 0). The first checked stat to be a part of the tie determines the Characteristic that is used.
The tie-breaker starts at the stat with the index <math>p \bmod 6</math> 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.


===Stats by index number===
{| class="roundy" style="text-align:center; background: #C0C0FF; border: 3px solid blue;"
{| class="roundy" style="width:auto; text-align:center; background: #C0C0FF; border: 3px solid blue;"
! ''p'' mod 6
|-
! ''p'' % 6
! Stat
! Stat
|- style="background:#fff"
|- style="background:#fff"
Line 231: Line 325:
|}
|}


==Spinda's spots==
===Spinda's spots===
<code><span style="background:#FF9999">00000000</span> <span style="background:#9999FF">00000000</span> <span style="background:#99FF99">00000000</span> <span style="background:#FFFF99">00000000</span></code>
<code><span style="background:#FF9999">00000000</span> <span style="background:#9999FF">00000000</span> <span style="background:#99FF99">00000000</span> <span style="background:#FFFF99">00000000</span></code>


{{p|Spinda}} has four spots: two on its face, and one on each of its ears. Each of the four bytes represents the coordinates of the spot on Spinda's face or ears. The first four digits of each byte represents the x-coordinate of the top left of the spot when translated into decimal notation, while the last four represent the y-coordinate of the top left of the spot when translated into decimal. There are [[Spinda (Pokémon)#Trivia|4,294,967,296 different]] spot variations.
{{p|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.


==Unown's letter (Generation III only)==
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.
 
In {{g|Brilliant Diamond and Shining Pearl}}, due to a [[List of glitches in Generation VIII#Spinda spot pattern glitches|bug]] involving {{wp|endianness}}, the four bytes are read in reverse order, causing the spot pattern to be rendered incorrectly. For example, a value of <code><span style="background:#FF9999">12</span><span style="background:#9999FF">34</span><span style="background:#99FF99">56</span><span style="background:#FFFF99">78</span></code> (hexadecimal) would be interpreted as <code><span style="background:#FF9999">78</span><span style="background:#9999FF">56</span><span style="background:#99FF99">34</span><span style="background:#FFFF99">12</span></code> instead. As a result, Spinda is not allowed to be transferred between Pokémon Brilliant Diamond/Shining Pearl and [[Pokémon HOME]].
 
Additionally, due to a separate bug, Brilliant Diamond and Shining Pearl's [[Super Contest]]s generate a random encryption constant instead of using the value from the Pokémon the player chooses, which results in Spinda appearing with completely random spot patterns if selected.<ref>https://twitter.com/Sibuna_Switch/status/1828258413442142257</ref>
 
===Unown's letter===
<code>000000<span style="background:#FF9999">00</span> 000000<span style="background:#9999FF">00</span> 000000<span style="background:#99FF99">00</span> 000000<span style="background:#FFFF99">00</span></code>
<code>000000<span style="background:#FF9999">00</span> 000000<span style="background:#9999FF">00</span> 000000<span style="background:#99FF99">00</span> 000000<span style="background:#FFFF99">00</span></code>


''p<sub>letter</sub>'' = <code><span style="background:#FF9999">00</span><span style="background:#9999FF">00</span><span style="background:#99FF99">00</span><span style="background:#FFFF99">00</span></code>
''p<sub>letter</sub>'' = <code><span style="background:#FF9999">00</span><span style="background:#9999FF">00</span><span style="background:#99FF99">00</span><span style="background:#FFFF99">00</span></code>


In Generation III, {{p|Unown}}'s letter is taken from the modulus of the combination of the least significant 2 bits of each byte in ''p''. With A representing 0, and each letter thereafter representing the following number value (? as 26 and ! as 27), the letter can be determined by:
In Generation III, {{p|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:
 
<math>\alpha = p_{letter} \bmod 28</math>
 
In [[Generation II]], this is determined using [[individual values]]. Since Generation IV, Unown's form is determined by a separate byte, unrelated to the personality value.
 
===Wurmple's evolution===
<code><span style="background:#FF9999">00000000 00000000</span> 00000000 00000000</code>
 
{{p|Wurmple}}'s evolution is determined by the upper half of its personality value (highlighted in <span style="background:#FF9999">red</span> above), referred to here as ''p<sub>w</sub>''. (Mathematically, this is equivalent to <math>p / 65536</math>, rounded down.) From [[Generation VI]] onward, Wurmple's evolution is now determined by the encryption constant, with the same formula.
 
If <math>p_w \bmod 10</math> is less than or equal to 4, Wurmple will evolve into {{p|Silcoon}}; if it is greater than 4, Wurmple will evolve into {{p|Cascoon}}.
 
===Gender-counterpart species===
<code>00000000 00000000 <span style="background:#FF9999">0</span>0000000 00000000</code>
 
In Generations III and IV, the species of Pokémon in an Egg produced by {{p|Nidoran♀}} or {{p|Illumise}} is determined by the highest bit of the lower half of ''p'' when the player obtains the Egg from the Day-Care Man. If this bit is 1, the Egg will hatch into their male-only counterpart ({{p|Nidoran♂}} or {{p|Volbeat}}). If this bit is 0, the Egg will hatch into the female-only species (Nidoran♀ or Illumise).<ref>[https://github.com/pret/pokeemerald/blob/04197b49126604a310fae1d314709334f6d2460d/src/daycare.c#L784 pokeemerald/src/daycare.c · pret/pokeemerald]</ref><ref>[https://github.com/pret/pokeheartgold/blob/1ffb090e94dcf63b593ee47f284751a7323bc33a/src/get_egg.c#L602 pokeheartgold/src/get_egg.c · pret/pokeheartgold]</ref> Note that this has no bearing on Eggs produced by Nidoran♂, {{p|Nidorino}}, {{p|Nidoking}}, or Volbeat when paired with Ditto, as these will always hatch into Nidoran♂ or Volbeat, respectively.
 
In Generation II and from Generation V onward, this is instead determined by a separate random value generated using the games' [[Pseudorandom number generation|pseudorandom number generator]].<ref>[https://github.com/pret/pokecrystal/blob/7b5986006f6b325e471fee25903c769ce67f5da9/engine/events/daycare.asm#L594 pokecrystal/engine/events/daycare.asm · pret/pokecrystal]</ref><ref>[https://github.com/Admiral-Fish/PokeFinder/blob/da5b781074f3e6ebdf8d9b36b0421e16bcc973f6/Source/Core/Gen5/Generators/EggGenerator5.cpp#L85 PokeFinder/Source/Core/Gen5/Generators/EggGenerator5.cpp · Admiral-Fish/PokeFinder]</ref><ref>[https://github.com/Admiral-Fish/RNGWriteups/blob/master/Gen%208/Egg%20Generation.md RNGWriteups/Gen 8/Egg Generation.md · Admiral-Fish/RNGWriteups]</ref>


<code>''u<sub>p</sub>'' = ''p<sub>letter</sub>'' % 28</code>
===Size===
{{main|Size and weight variation}}
<code>00000000 00000000 <span style="background:#FF9999">00000000</span> <span style="background:#9999FF">00000000</span></code>


In Generation II this is determined using [[individual values]]. In Generations IV and V Unown's letter is determined by a separate byte, unrelated to the personality value.
In Generations III and IV there are occasionally characters who want to see large Pokémon.


==Wurmple's evolution==
In Generations III and IV, 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 (⊕).
<code>00000000 00000000 <span style="background:#FF9999">00000000 00000000</span></code>


The value in red will be known as ''p<sub>w</sub>''; it is essentially <code>''p'' % 65536</code>.
The lowest two bytes of ''p'' are used in the calculation: ''p''<sub>1</sub> (highlighted in <span style="background:#9999FF">blue</span> above) is mathematically equivalent to <math>p \bmod 256</math>, while ''p''<sub>2</sub>  (highlighted in <span style="background:#FF9999">red</span>) is equivalent to <math>\lfloor p / 256 \rfloor \bmod 256</math>. The IV values are also not used in whole; only the four {{wp|least significant bit}}s of each are used: mathematically, <math>(stat)' = IV_{(stat)} \bmod 16</math>.


{{p|Wurmple}}'s evolution does not depend on time of day, despite what many game guides say. In fact, the evolution is determined by taking <code>''p<sub>w</sub>'' % 10</code>. If the remainder is less than 5, Wurmple will become a {{p|Silcoon}}, and if it is greater than or equal to 5, it will become a {{p|Cascoon}}.
The first step in the calculation is as follows:


==Performance changes==
<math>s = 256 \cdot (p_1 \oplus (HP' \cdot (Atk' \oplus Def'))) + (p_2 \oplus (Spd' \cdot (SpAtk' \oplus SpDef')))</math>
The day-to-day [[performance]] of a Pokémon, for the purposes of the [[Pokéathlon]], depends on the personality value as well as the day of the month. It also depends on Nature, which is also calculated based on personality value. The five least significant digits govern, from least significant to most significant, Power, Stamina, Skill, Jump, and Speed.


The change in performance in a particular attribute is calculated as the sum of the following factors:
For the next step, ''h'' is the [[Pokémon (species)|species']] [[List of Pokémon by height|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 day of month modifier''': This modifier depends on the day of the month and one particular digit of the personality value (determined based on the attribute in question). It is calculated as (((''Day'' + ''Attribute'' + 3) × (''Day'' - ''Attribute'' + 7) + ''Personality'') mod 10) × 2 - 9, where:
{| class="roundy" style="text-align:center; background: #C0C0FF; border: 3px solid blue;"
** ''Attribute'' is 0 for Power, 1 for Stamina, 2 for Skill, 3 for Jump, and 4 for Speed
|-
** ''Personality'' is the relevant value of the particular digit
! s (max): || 9 || 109 || 309 || 709 || 2709 || 7709 || 17709 || 32709 || 47709 || 57709 || 62709 || 64709 || 65209 || 65409 || 65509 || 65535
*'''The Nature modifier''': This modifier depends on the Nature of the Pokémon. Each of the neutral Natures raise one attribute by 10 points while lowering another by 10 points, while the other 20 Natures each raise one attribute by 35 points while lowering another by 35 points, based on which [[stats]] they normally raise and lower.
|- style="background:#fff"
*'''The Aprijuice modifier''': This modifier depends on the [[Aprijuice]] applied to the Pokémon. The Pokémon receives 1.the flavor values in the attributes corresponding to the strongest and second-strongest flavors of the Aprijuice, an additional 10-point bonus in the strongest flavor of the Aprijuice, and a penalty to the attribute corresponding to the weakest flavor of the Aprijuice based on its mildness and the sum of the Aprijuice's two strongest flavors (see [[Apriblender]] for further details).
! style="background:#C0C0FF" | x
| 290 || 300 || 400 || 500 || 600 || 700 || 800 || 900 || 1000 || 1100 || 1200 || 1300 || 1400 || 1500 || 1600 || 1700
|- style="background:#fff"
! style="background:#C0C0FF" | y
| 1 || 1 || 2 || 4 || 20 || 50 || 100 || 150 || 150 || 100 || 50 || 20 || 5 || 2 || 1 || 1
|- style="background:#fff"
! style="background:#C0C0FF" | z
| 0 || 10 || 110 || 310 || 710 || 2710 || 7710 || 17710 || 32710 || 47710 || 57710 || 62710 || 64710 || 65210 || 65410 || 65510
|}
 
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 in meters given for the species in the Pokédex, and rounded down.


Note that the day of month modifier is at most -9 and at most +9 (and only takes on odd values therein). Also as a result, the day of month modifier cycles every 10 days ('''exception''': for Power and Speed, the modifiers in effect for the first day of each month are different from those of Day 11, Day 21, and Day 31, though the latter three have the same modifiers).
<math>Size = \left\lfloor\frac{h \cdot \left\lfloor \frac{s - z}{y} + x \right\rfloor}{10}\right\rfloor</math>


Also, since Nature is also determined by the last two digits of the personality value, the Nature of a Pokémon will constrain the day of month modifier in Power (and to a lesser extent, Stamina) for a Pokémon. For example, a Hardy {{p|Wurmple}} (last digit 0 or 5) will never get a +9 or a +7 from a day of month modifier in Power; if it evolves into a {{p|Cascoon}} (the last digit is 5) it furthermore entails that its best performance will be on the first day of each month, barring Aprijuice factors (as it has its sole +5 boost on the first day on each month)—in contrast, a Hardy {{p|Silcoon}} will have a +5 boost six times a month (on days ending with 4 or 6).
If the game converts this number to inches, the final result will be rounded down to the nearest tenth of an inch.


{| class="roundy" style="width:auto; text-align:center; background: #C0C0FF; border: 3px solid blue;"
The characters searching for large Pokémon can be found at the following locations:
{|class=wikitable
!Games
!Location
!Pokémon
|-
| {{gameabbrev3|RS}}
| [[Sootopolis City]]
| {{p|Barboach}} and {{p|Shroomish}}
|-
| {{gameabbrev3|E}}
| [[Sootopolis City]]
| {{p|Seedot}} and {{p|Lotad}}
|-
| {{gameabbrev3|FRLG}}
| {{rt|12|Kanto}}
| {{p|Magikarp}}
|-
|-
| {{gameabbrev3|FRLG}}
| [[Water Path]]
| {{p|Heracross}}
|-
| {{gameabbrev4|DPP}}
| {{rt|222|Sinnoh}}
| {{p|Remoraid}}
|-
| {{gameabbrev4|HGSS}}
| [[Lake of Rage]]
| {{p|Magikarp}}
|}
===Maushold's form===
{{p|Maushold}} has [[List of Pokémon with form differences#Maushold|two different forms]]: Family of Four and Family of Three. The form {{p|Tandemaus}} evolves into is determined based on its encryption constant (an extension of the personality value), with a 1/100 chance of evolving into the Family of Three form. This is not the case for [[Wild Pokémon|wild]] Maushold in [[Tera Raid Battle]]s, which have a form determined by the raid's difficulty rating (Family of Three for 4★ or Family of Four for 6★) regardless of their encryption constant value.
If the <math>EncryptionConstant \bmod 100</math> is 0, the result is the Family of Three form. Any other result yields the Family of Four form.
===Dudunsparce's form===
{{p|Dudunsparce}} has [[List of Pokémon with form differences#Dudunsparce|two different forms]]: the Two-Segment Form and the Three-Segment Form. The form {{p|Dunsparce}} evolves into is determined based on its encryption constant (an extension of the personality value), with a 1/100 chance of becoming Three-Segment Form. This is not the case for [[Wild Pokémon|wild]] Dudunsparce, which are always in Two-Segment Form regardless of their encryption constant value.
If the <math>EncryptionConstant \bmod 100</math> is 0, the resulting is Three-Segment Form. Any other result yields Two-Segment Form.
===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''<sub>0</sub> to ''p''<sub>4</sub>, in order from the least significant digit 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''': <math>( ( (Day + Attribute + 3) \cdot (Day - Attribute + 7) + p_{attribute} ) \bmod 10 ) \cdot 2 - 9</math>, 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.
** ''p<sub>attribute</sub>'' 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.
{| class="roundy" style="text-align: center; background: #C0C0FF; border: 3px solid blue; margin-left: 20px"
! Attribute
! Neutral +10
! Neutral -10
! Non-neutral stat (+/- 35)
|- style="background:#fff"
| Power || Hardy || Bashful || Attack
|- style="background:#fff"
| Stamina || Docile || Quirky || Defense
|- style="background:#fff"
| Skill || Quirky || Serious || Sp. Def
|- style="background:#fff"
| Jump || Bashful || Docile || Sp. Atk
|- style="background:#fff"
| Speed || Serious || Hardy || Speed
|}
*'''Aprijuice modifier''': the last [[Apriblender|Aprijuice]] the Pokémon drank affects the Pokémon's performance, depending on the strengths of the flavors in the Aprijuice.
** Strongest flavor: add <math>\left\lfloor flavor \cdot 1.5 \right\rfloor + 10</math> to the corresponding attribute.
** Second strongest flavor: add <math>\left\lfloor flavor \cdot 1.5 \right\rfloor</math> 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: <math>X = 1 - 0.1 \cdot \left\lfloor mildness / 25 \right\rfloor</math>
*** 200-254: ''X'' = 0.2
*** 255: ''X'' = 0.1
:The Aprijuice flavors correspond to the performance attributes as follows:
{| class="roundy" style="text-align: center; background: #C0C0FF; border: 3px solid blue; margin-left: 20px"
! Flavor
! Attribute
! Attribute
! Attribute modifier
! Personality digit
! Neutral Nature +10
! Neutral Nature -10
! Other Nature stat
|- style="background:#fff"
|- style="background:#fff"
| Spicy
| Power
| Power
| 0
| Ones
| Hardy
| Bashful
| Attack
|- style="background:#fff"
|- style="background:#fff"
| Sour
| Stamina
| Stamina
| 1
| Tens
| Docile
| Quirky
| Defense
|- style="background:#fff"
|- style="background:#fff"
| Dry
| Skill
| Skill
| 2
| Hundreds
| Quirky
| Serious
| Sp. Def
|- style="background:#fff"
|- style="background:#fff"
| Bitter
| Jump
| Jump
| 3
| Thousands
| Bashful
| Docile
| Sp. Atk
|- style="background:#fff"
|- style="background:#fff"
| Speed
| Sweet
| 4
| Ten-thousands
| Serious
| Hardy
| Speed
| Speed
|}
|}
{{-}}


Note that the association of Skill and Jump to Natures is reversed relative to a Pokémon's preferred flavors. That is, a Pokémon which prefers dry food will have a +35 boost in Jump (otherwise associated with bitter foods) rather than Skill. However, giving this Pokémon a dry Aprijuice will boost its Skill, rather than its Jump.
The sum of these modifiers is then translated into a difference in stars as follows:
 
{| class="roundy" style="text-align:center; background: #C0C0FF; border: 3px solid blue;"
The calculated value is then translated into a difference in stars as follows:
{| class="roundy" style="width:auto; text-align:center; background: #C0C0FF; border: 3px solid blue;"
|-
! Stars
! Stars
| style="background:#fff" | -4
| style="background:#fff" | -4
Line 327: Line 506:
| style="background:#fff" | 2
| style="background:#fff" | 2
| style="background:#fff" | 3
| style="background:#fff" | 3
| style="background:#fff" | 4
| style="background:#fff; {{roundytr|5px}}" | 4
|-
|-
! Score
! Score
| style="background:#fff" | < -120
| style="background:#fff" | ...-120
| style="background:#fff" | -119 - -80
| style="background:#fff" | -119...-80
| style="background:#fff" | -79 - -40
| style="background:#fff" | -79...-40
| style="background:#fff" | -39 - -15
| style="background:#fff" | -39...-15
| style="background:#fff" | -14 - 14
| style="background:#fff" | -14...14
| style="background:#fff" | 15 - 39
| style="background:#fff" | 15...39
| style="background:#fff" | 40 - 79
| style="background:#fff" | 40...79
| style="background:#fff" | 80 - 119
| style="background:#fff" | 80...119
| style="background:#fff" | > 120
| style="background:#fff; {{roundybr|5px}}" | 120...
|}
|}


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 {{p|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).
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 {{p|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).


<!--Any more personality value things?-->
===Other uses===
A Pokémon's personality value may also used for things unrelated to the Pokémon itself.
 
<code>00000000 00000000 <span style="background:#FF9999">00000000 00000000</span></code><br>
 
In {{game2|Ruby|Sapphire|Emerald}}, {{gdis|Mirage Island|III}} will appear on {{rt|130|Hoenn}} 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.
 
==References==
{{reflist}}
{{-}}
{{-}}
{{Project Games notice|game mechanic}}
{{Project Games notice|game mechanic}}
Line 350: Line 537:


[[de:Personality Value]]
[[de:Personality Value]]
[[fr:Personality Value]]
[[es:Valor de personalidad]]
[[ja:性格値]]
[[fr:Valeur Interne Personnelle]]
[[it:Personalità]]
[[ja:暗号化定数]]
[[zh:性格值]]
[[zh:性格值]]

Latest revision as of 03:04, 19 September 2024

Get it? Because the name is unknown. The subject of this article has no official name.
The name currently in use is a fan designator; see below for more information.

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.

From Generation VI onward, Pokémon have an additional random unsigned 32-bit integer value known as the encryption constant, generated at the same time as the personality value and effectively acting as an extension of it, although it is stored in a separate place in the Pokémon data structure. The encryption constant takes over many of the former roles of the personality value. Pokémon transferred from Generation V have their personality value copied to the encryption constant.

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 the Pokémon Day Care, when it is set varies between games.

Usage

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

Gen III Gen IV Gen V Gen VI
Gender
Ability
Nature
Shininess
Characteristic
Spinda's spots
Unown's letter
Wurmple's evolution
Gender-counterpart species
Size
Performance changes

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

Gender threshold Nominal ratio
(♂:♀)
Frequency (Gen 3-5) Frequency (Gen 6-7) Frequency (Gen 8)
Binary Decimal Male Female Male Female Male Female
00000000 0 Male 100.00% 0.00% 100.00% 0.00% 100.00% 0.00%
00011111 31 7:1 87.89% 12.11% 88.10% 11.90% 88.14% 11.86%
00111111 63 3:1 75.39% 24.61% 75.40% 24.60% 75.49% 24.51%
01111111 127 1:1 50.39% 49.61% 50.00% 50.00% 50.20% 49.80%
10111111 191 1:3 25.39% 74.61% 24.60% 75.40% 24.90% 75.10%
‭‭11100001‬ 225 1:7 12.11% 87.89% 11.11% 88.89% 11.46% 88.54%
11111110 254 Female 0.00% 100.00% 0.0% 100.00% 0.0% 100.00%
11111111 255 Gender unknown

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 one. If the Pokémon does not have a second ability, p can be whatever value. Pokémon from Pokémon Colosseum and Pokémon XD do not have this connection between their ability and the value of p.

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 .

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 the Ability slot corresponding to its current Ability 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 . 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:

p mod 25 Nature
0 Hardy
1 Lonely
2 Brave
3 Adamant
4 Naughty
5 Bold
6 Docile
7 Relaxed
8 Impish
9 Lax
10 Timid
11 Hasty
12 Serious
13 Jolly
14 Naive
15 Modest
16 Mild
17 Quiet
18 Bashful
19 Rash
20 Calm
21 Gentle
22 Sassy
23 Careful
24 Quirky

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 p1 below, while the low half (highlighted in blue) is referred to as p2. Mathematically, p1 can be derived by calculating and rounding down the result, while p2 can be derived by calculating .

A bitwise exclusive or operation (or "⊕") on inputs a and b, written as ab = c, outputs c such that, if ai (bit i of a) and bi are different, then ci 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 Pokémon Sword and Shield, 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 was met in a fateful encounter or transferred from Pokémon GO, the value of S is ignored when determining sparkle type, and the Pokémon will always have square sparkles.)

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
p1 = 10100111110000012
p2 = 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.

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

p mod 6 Stat
0 HP
1 Attack
2 Defense
3 Speed
4 Special Attack
5 Special Defense

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.

In Pokémon Brilliant Diamond and Shining Pearl, due to a bug involving endianness, the four bytes are read in reverse order, causing the spot pattern to be rendered incorrectly. For example, a value of 12345678 (hexadecimal) would be interpreted as 78563412 instead. As a result, Spinda is not allowed to be transferred between Pokémon Brilliant Diamond/Shining Pearl and Pokémon HOME.

Additionally, due to a separate bug, Brilliant Diamond and Shining Pearl's Super Contests generate a random encryption constant instead of using the value from the Pokémon the player chooses, which results in Spinda appearing with completely random spot patterns if selected.[1]

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:

In Generation II, this is determined using individual values. Since Generation IV, Unown's form 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 , rounded down.) From Generation VI onward, Wurmple's evolution is now determined by the encryption constant, with the same formula.

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

Gender-counterpart species

00000000 00000000 00000000 00000000

In Generations III and IV, the species of Pokémon in an Egg produced by Nidoran♀ or Illumise is determined by the highest bit of the lower half of p when the player obtains the Egg from the Day-Care Man. If this bit is 1, the Egg will hatch into their male-only counterpart (Nidoran♂ or Volbeat). If this bit is 0, the Egg will hatch into the female-only species (Nidoran♀ or Illumise).[2][3] Note that this has no bearing on Eggs produced by Nidoran♂, Nidorino, Nidoking, or Volbeat when paired with Ditto, as these will always hatch into Nidoran♂ or Volbeat, respectively.

In Generation II and from Generation V onward, this is instead determined by a separate random value generated using the games' pseudorandom number generator.[4][5][6]

Size

Main article: Size and weight variation

00000000 00000000 00000000 00000000

In Generations III and IV there are occasionally characters who want to see large Pokémon.

In Generations III and IV, 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: p1 (highlighted in blue above) is mathematically equivalent to , while p2 (highlighted in red) is equivalent to . The IV values are also not used in whole; only the four least significant bits of each are used: mathematically, .

The first step in the calculation is as follows:

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.

s (max): 9 109 309 709 2709 7709 17709 32709 47709 57709 62709 64709 65209 65409 65509 65535
x 290 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700
y 1 1 2 4 20 50 100 150 150 100 50 20 5 2 1 1
z 0 10 110 310 710 2710 7710 17710 32710 47710 57710 62710 64710 65210 65410 65510

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 in meters given for the species in the Pokédex, and rounded down.

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:

Games Location Pokémon
RS Sootopolis City Barboach and Shroomish
E Sootopolis City Seedot and Lotad
FRLG Route 12 Magikarp
FRLG Water Path Heracross
DPPt Route 222 Remoraid
HGSS Lake of Rage Magikarp

Maushold's form

Maushold has two different forms: Family of Four and Family of Three. The form Tandemaus evolves into is determined based on its encryption constant (an extension of the personality value), with a 1/100 chance of evolving into the Family of Three form. This is not the case for wild Maushold in Tera Raid Battles, which have a form determined by the raid's difficulty rating (Family of Three for 4★ or Family of Four for 6★) regardless of their encryption constant value.

If the is 0, the result is the Family of Three form. Any other result yields the Family of Four form.

Dudunsparce's form

Dudunsparce has two different forms: the Two-Segment Form and the Three-Segment Form. The form Dunsparce evolves into is determined based on its encryption constant (an extension of the personality value), with a 1/100 chance of becoming Three-Segment Form. This is not the case for wild Dudunsparce, which are always in Two-Segment Form regardless of their encryption constant value.

If the is 0, the resulting is Three-Segment Form. Any other result yields Two-Segment Form.

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 p0 to p4, in order from the least significant digit 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: , 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.
Attribute Neutral +10 Neutral -10 Non-neutral stat (+/- 35)
Power Hardy Bashful Attack
Stamina Docile Quirky Defense
Skill Quirky Serious Sp. Def
Jump Bashful Docile Sp. Atk
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 to the corresponding attribute.
    • Second strongest flavor: add 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:
      • 200-254: X = 0.2
      • 255: X = 0.1
The Aprijuice flavors correspond to the performance attributes as follows:
Flavor Attribute
Spicy Power
Sour Stamina
Dry Skill
Bitter Jump
Sweet Speed


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

Stars -4 -3 -2 -1 0 1 2 3 4
Score ...-120 -119...-80 -79...-40 -39...-15 -14...14 15...39 40...79 80...119 120...

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 Pokémon Ruby, Sapphire, and Emerald, 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.

References


Project Games logo.png This game mechanic article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.