Personality value: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
No edit summary
(gender)
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]].
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]].


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.
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.
Line 61: Line 61:
<br clear="all">
<br clear="all">


Because gender is determined by a value between 0 and 254 (due to 255 corresponding to genderless Pokémon), 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 50.3937008% chance for the Pokémon to be male and 49.6062992% chance for the Pokémon to be female.
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.


==Ability==
==Ability==