Personality value: Difference between revisions

no edit summary
No edit summary
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 when a Pokémon appears in the wild, when an Egg is first received from the [[Pokémon Day Care]] by the player (in [[Generation III]]{{tt|*|In these games, the lower half of the personality value is actually set when the Day Care man finds the Egg}} except in {{game|Emerald}} and in [[Generation V]]) or by the Day-Care man (in Emerald and [[Generation IV]]), or when a Pokémon or its Egg is received from an [[Non-player character|NPC]]. 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 base stats data structure in Generation III|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]].
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 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 base stats data structure in Generation III|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]].


==Gender==
==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 {{game|Emerald}},<!--does this include Colo/XD?--> 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.
 
==Usage==
Precisely which properties are determined by the personality value varies between generations.
{|class=wikitable
!
!Gen III
!Gen IV
!Gen V
!Gen VI
|-
!Gender
|✓ ||✓ ||✓ ||✓
|-
!Ability
|✓ ||✓ ||✓ ||
|-
!Nature
|✓ ||✓ || ||
|-
!Shininess
|✓ ||✓ ||✓ ||✓
|-
!Characteristic
| ||✓ ||✓ ||
|-
!Spinda's spots
|✓ ||✓ ||✓ ||
|-
!Unown's letter
|✓ || || ||
|-
!Wurmple's evolution
|✓ ||✓ ||✓ ||
|-
!Size
|✓ || || ||
|-
!Performance changes
| ||✓ || ||
|}
 
===Gender===
<code>00000000 00000000 00000000 <span style="background:#FF9999">00000000</span></code><br>
<code>00000000 00000000 00000000 <span style="background:#FF9999">00000000</span></code><br>


Line 54: Line 100:
Because the comparison to determine gender is greater than or equal, Pokémon are not actually perfectly distributed between male and female according to the ideal ratios shown above. For example, for a Pokémon with a 50/50 male/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.
Because the comparison to determine gender is greater than or equal, Pokémon are not actually perfectly distributed between male and female according to the ideal ratios shown above. For example, for a Pokémon with a 50/50 male/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.


==Ability==
===Ability===
Generation III-IV origin: <code>00000000 00000000 00000000 0000000<span style="background:#FF9999">0</span></code><br>
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>
[[Generation V]] origin: <code>00000000 0000000<span style="background:#FF9999">0</span> 00000000 00000000</code>
Line 68: Line 114:
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).
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 (Generation III and IV only)==
===Nature===
In Generations {{Gen|III}} and {{Gen|IV}} a Pokémon's [[Nature]] is determined by <code>''p'' % 25</code>. From [[Generation V]] onward, Nature is determined by a separate byte, unrelated to the personality value.
In Generations {{Gen|III}} and {{Gen|IV}} a Pokémon's [[Nature]] is determined by <code>''p'' % 25</code>. From [[Generation V]] onward, Nature is determined by a separate byte, unrelated to the personality value.


Line 152: Line 198:
|}
|}


==Shininess==
===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>


In Generation III or later, 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 <code>''p'' / 65536</code> and rounding down the result, while ''p''<sub>2</sub> can be derived by calculating <code>''p'' % 65536</code>.
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 <code>''p'' / 65536</code> and rounding down the result, while ''p''<sub>2</sub> can be derived by calculating <code>''p'' % 65536</code>.


:<code>''S'' = ''ID<sub>Trainer</sub>'' [[wp:Exclusive or|⊕]] ''ID<sub>Secret</sub>'' ⊕ ''p''<sub>1</sub> ⊕ ''p''<sub>2</sub></code>
:<code>''S'' = ''ID<sub>Trainer</sub>'' [[wp:Exclusive or|⊕]] ''ID<sub>Secret</sub>'' ⊕ ''p''<sub>1</sub> ⊕ ''p''<sub>2</sub></code>
Line 163: Line 209:
From [[Generation III|Generations III]] to [[Generation V|V]], if ''S'' < 8, the Pokémon is Shiny. In [[Generation VI]], the Pokémon is Shiny if ''S'' < 16. This is an 8 or 16 in 65536 chance of a Pokémon being Shiny.
From [[Generation III|Generations III]] to [[Generation V|V]], if ''S'' < 8, the Pokémon is Shiny. In [[Generation VI]], the Pokémon is Shiny if ''S'' < 16. This is an 8 or 16 in 65536 chance of a Pokémon being Shiny.


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


Line 182: Line 228:
Since ''S'' is less than {{tt|8|16 in Generation VI}}, this Pokémon is Shiny.
Since ''S'' is less than {{tt|8|16 in Generation VI}}, 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 wins the tie.
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; in Generation VI, the [[encryption constant]] is used in the case of a tie.


The tie-breaker starts at the stat with the index <code>''p'' % 6</code> 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.
The tie-breaker starts at the stat with the index <code>''p'' % 6</code> 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.
Line 210: Line 256:
|}
|}


==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 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.
{{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; in Generation VI, 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.
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 (Generation III only)==
===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>


Line 228: Line 276:
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 [[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.


==Wurmple's evolution (Generation III–V only)==
===Wurmple's evolution===
Generations III and IV: <code>00000000 00000000 <span style="background:#FF9999">00000000 00000000</span></code><br>
Generations III and IV: <code>00000000 00000000 <span style="background:#FF9999">00000000 00000000</span></code><br>
Generation V: <code><span style="background:#FF9999">00000000 00000000</span> 00000000 00000000</code>
Generation V: <code><span style="background:#FF9999">00000000 00000000</span> 00000000 00000000</code>


{{p|Wurmple}}'s evolution is determined by the lower half of its personality value in Generations III and IV or the upper half in Generation V (highlighted in <span style="background:#FF9999">red</span> above), referred to here as ''p<sub>w</sub>''. Mathematically, ''p<sub>w</sub>'' can be derived by calculating <code>''p'' % 65536</code> for Generations III and IV or <code>''p'' / 65536</code> (rounded down) for Generation V.
{{p|Wurmple}}'s evolution is determined by the lower half of its personality value in Generations III and IV or the upper half in Generation V (highlighted in <span style="background:#FF9999">red</span> above), referred to here as ''p<sub>w</sub>''. Mathematically, ''p<sub>w</sub>'' can be derived by calculating <code>''p'' % 65536</code> for Generations III and IV or <code>''p'' / 65536</code> (rounded down) for Generation V. In Generation VI, Wurmple's evolution is now determined by the [[encryption constant]], albeit with the same formula.


If the result of <code>''p<sub>w</sub>'' % 10</code> is less than 5, Wurmple will evolve into {{p|Silcoon}}. If it is greater than or equal to 5, Wurmple will evolve into {{p|Cascoon}}.
If the result of <code>''p<sub>w</sub>'' % 10</code> is less than 5, Wurmple will evolve into {{p|Silcoon}}. If it is greater than or equal to 5, Wurmple will evolve into {{p|Cascoon}}.


In Generation VI, Wurmple's evolution is now determined by a separate set of bytes, albeit with the same formula.
===Size===
 
==Size==
<code>00000000 00000000 <span style="background:#FF9999">00000000</span> <span style="background:#9999FF">00000000</span></code>
<code>00000000 00000000 <span style="background:#FF9999">00000000</span> <span style="background:#9999FF">00000000</span></code>


Line 271: Line 317:


The characters searching for large Pokémon can be found at the following locations:
The characters searching for large Pokémon can be found at the following locations:
* {{rt|12|Kanto}} ({{p|Magikarp}})
{|class=wikitable
* [[Six Island]] ({{p|Heracross}})
!Games
* [[Lake of Rage]] ({{p|Magikarp}})
!Location
* [[Sootopolis City]] ({{p|Barboach}} and {{p|Shroomish}} in {{game|Ruby and Sapphire|s}} or {{p|Seedot}} and {{p|Lotad}} in {{game|Emerald}})
!Pokémon
|-
| {{GameIcon|Ru}}{{GameIcon|Sa}}
| [[Sootopolis City]]
| {{p|Barboach}} and {{p|Shroomish}}
|-
| {{GameIcon|E}}
| [[Sootopolis City]]
| {{p|Seedot}} and {{p|Lotad}}
|-
| {{GameIcon|FR}}{{GameIcon|LG}}
| {{rt|12|Kanto}}
| {{p|Magikarp}}
|-
| {{GameIcon|FR}}{{GameIcon|LG}}
| [[Six Island]]
| {{p|Heracross}}
|-
| {{GameIcon|HG}}{{GameIcon|SS}}
| [[Lake of Rage]]
| {{p|Magikarp}}
|}


==Performance changes==
===Performance changes===
<code>00000000 00000000 00000000 000<span style="background:#FF9999">0</span><span style="background:#9999FF">0</span><span style="background:#99FF99">0</span><span style="background:#FFFF99">0</span><span style="background:#FF99FF">0</span></code>
<code>00000000 00000000 00000000 000<span style="background:#FF9999">0</span><span style="background:#9999FF">0</span><span style="background:#99FF99">0</span><span style="background:#FFFF99">0</span><span style="background:#FF99FF">0</span></code>


Line 361: Line 428:
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).


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