Personality value: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 8: Line 8:
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>''.
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>''.


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 Pokémon is male, otherwise it is female.
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 Pokémon is male, otherwise it is female.




Line 158: Line 158:
: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>''.
: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).
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.
Variables ''E'' and ''F'' are declared to hold the values that result.
Line 195: Line 195:




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


==Spinda's spots==
==Spinda's spots==
Line 222: Line 222:


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:
*'''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:
*'''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:
** ''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
** ''Personality'' is the relevant value of the particular digit
** ''Personality'' is the relevant value of the particular digit
*'''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 [[stat]]s they normally raise and lower.
*'''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 [[stat]]s they normally raise and lower.
*'''The Aprijuice Modifier''': This modifier depends on the [[Aprijuice]] applied to the Pokémon. The Pokémon receives 1.5× 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).
*'''The Aprijuice modifier''': This modifier depends on the [[Aprijuice]] applied to the Pokémon. The Pokémon receives 1.5× 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).


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


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


{| {{bluetable2}}
{| {{bluetable2}}
! Attribute !! Attribute Modifier !! Personality Digit !! Neutral Nature +10 !! Neutral Nature -10 !! Other Nature Stat
! Attribute !! Attribute modifier !! Personality digit !! Neutral nature +10 !! Neutral nature -10 !! Other nature stat
|-
|-
| Power || 0 || Ones || Hardy || Bashful || Attack
| Power || 0 || Ones || Hardy || Bashful || Attack
Line 246: Line 246:
|}
|}


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.
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 calculated value is then translated into a difference in stars as follows:
The calculated value is then translated into a difference in stars as follows: