Personality value: Difference between revisions

Removing Wurmple from Aprijuice section, since it was based on the incorrect method of determining its evolution
(→‎Wurmple's evolution: Didn't mean to remove this line)
(Removing Wurmple from Aprijuice section, since it was based on the incorrect method of determining its evolution)
Line 58: Line 58:
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 not actually perfectly distributed between male and female according to the ideal ratios.
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 not actually perfectly distributed between male and female according to the ideal ratios.


From Generation VI onward, the gender threshold is compared to a 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.
From [[Generation VI]] onward, the gender threshold is compared to a 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.


If a species has a gender threshold of 255, it is genderless species (such as {{p|Magnemite}}), so is always genderless. If a species has a gender threshold of 254, it is a female-only species (such as {{p|Nidoran♀}}), so is always female. If a species has a gender threshold of 0, it is a male-only species (such as {{p|Nidoran♂}}), so is always male.
If a species has a gender threshold of 255, it is genderless species (such as {{p|Magnemite}}), so is always genderless. If a species has a gender threshold of 254, it is a female-only species (such as {{p|Nidoran♀}}), so is always female. If a species has a gender threshold of 0, it is a male-only species (such as {{p|Nidoran♂}}), so is always male.
Line 142: Line 142:
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.
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.


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 <code>''p'' / 65536 % 2</code> (rounded down).
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 <code>''p'' / 65536 [[wp:modulo operation|%]] 2</code> (rounded down).


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 [[Generation VI]], it will be locked into its current Ability slot upon transfer through [[Poké Transporter]].
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, {{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; however, if it evolves into {{p|Porygon2}}, it will only keep Trace if ''p'' is even.
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; however, if it evolves into {{p|Porygon2}}, it will only keep Trace if ''p'' is even.
Line 151: Line 151:


===Nature===
===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'' [[wp:modulo operation|%]] 25</code>. From [[Generation V]] onward, Nature is determined by a separate byte, unrelated to the personality value.


The result of <code>''p'' % 25</code> corresponds to the following Natures:
The result of <code>''p'' % 25</code> corresponds to the following Natures:
Line 237: Line 237:
<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>


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>.
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'' [[wp:modulo operation|%]] 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 265: Line 265:


===Characteristic===
===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; in Generation VI, the [[encryption constant]] is used in the case of a tie.
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 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'' [[wp:modulo operation|%]] 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.


{| class="roundy" style="text-align:center; background: #C0C0FF; border: 3px solid blue;"
{| class="roundy" style="text-align:center; background: #C0C0FF; border: 3px solid blue;"
Line 295: Line 295:
<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. From Generation III to V, this is determined by its personality value; in Generation VI, this is determined by its [[encryption constant]].
{{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.
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.
Line 308: Line 308:
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:
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:


<code>''α'' = ''p<sub>letter</sub>'' % 28</code>
<code>''α'' = ''p<sub>letter</sub>'' [[wp:modulo operation|%]] 28</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 [[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.
Line 315: Line 315:
<code><span style="background:#FF9999">00000000 00000000</span> 00000000 00000000</code>
<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 <code>''p'' / 65536</code>, rounded down.) In Generation VI, Wurmple's evolution is now determined by the [[encryption constant]], albeit with the same formula.
{{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 <code>''p'' / 65536</code>, rounded down.) From [[Generation VI]] onward, Wurmple's evolution is now determined by the [[encryption constant]], with the same formula.


If ''p<sub>w</sub>'' {{wp|Modulo operation|modulo}} 10 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}}.
If <code>''p<sub>w</sub>'' [[wp:modulo operation|%]] 10</code> 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}}.


===Size===
===Size===
Line 324: Line 324:
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 (⊕).
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''<sub>1</sub> (highlighted in <span style="background:#9999FF">blue</span> above) is mathematically equivalent to <code>''p'' % 256</code>, while ''p''<sub>2</sub>  (highlighted in <span style="background:#FF9999">red</span>) is equivalent to <code>(''p'' / 256) % 256</code> (rounded down). The IV values are also not used in whole; only the four {{wp|least significant bit}}s of each are used: mathematically, <code>''<stat>' = ''IV''<sub><stat></sub> % 16''</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 <code>''p'' [[wp:modulo operation|%]] 256</code>, while ''p''<sub>2</sub>  (highlighted in <span style="background:#FF9999">red</span>) is equivalent to <code>(''p'' / 256) % 256</code> (rounded down). The IV values are also not used in whole; only the four {{wp|least significant bit}}s of each are used: mathematically, <code>''<stat>' = ''IV''<sub><stat></sub> % 16''</code>.


The first step in the calculation is as follows:
The first step in the calculation is as follows:
Line 383: Line 383:


===Performance changes===
===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 bit to the most significant, and they govern (in order) the attributes Power, Stamina, Skill, Jump, and Speed.
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 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:
The change in performance in a particular attribute is calculated as the sum of the following factors:
*'''Day of the month modifier''': <code>( ( (''day'' + ''attribute'' + 3) × (''day'' - ''attribute'' + 7) + ''p<sub>attribute</sub>'' ) % 10 ) × 2 - 9</code>, where:
*'''Day of the month modifier''': <code>( ( (''day'' + ''attribute'' + 3) × (''day'' - ''attribute'' + 7) + ''p<sub>attribute</sub>'' ) [[wp:modulo operation|%]] 10 ) × 2 - 9</code>, where:
** ''Day'' is the day of the month.
** ''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.
** ''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.
** ''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.
: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 constrains on possible values of this modifier for Power (and, to a lesser extent, Stamina). For example, a Hardy {{p|Wurmple}} (last digit of ''p'': 0 or 5) will never get a +9 or a +7 from this modifier in Power. If it evolves into a {{p|Cascoon}} (last digit of ''p'': 5), this further reveals that its best day-of-the-month modifier (+5) will be on the first day of a month only. On the other hand, a Hardy {{p|Silcoon}} will have a +5 boost six times a month (on days ending with 4 or 6).
:Since Nature is determined by the last two digits of the personality value, the Nature of a Pokémon will reveal constrains 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.
*'''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"
{| class="roundy" style="text-align: center; background: #C0C0FF; border: 3px solid blue; margin-left: 20px"
Line 468: Line 467:
===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.
<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.
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.
{{-}}
{{-}}
{{Project Games notice|game mechanic}}
{{Project Games notice|game mechanic}}