Talk:Individual values: Difference between revisions

(→‎Changing IVs: new section)
(→‎Gender calculation: new section)
Line 145: Line 145:


Is it true that a Pokemon's IVs can never be changed after the Pokemon is generated, and a Pokemon's effective IVs can only be changed by hyper training? If so, can I add this information to the article? [[User:Sumwun|sumwun]] ([[User talk:Sumwun|talk]]) 19:20, 14 May 2017 (UTC)
Is it true that a Pokemon's IVs can never be changed after the Pokemon is generated, and a Pokemon's effective IVs can only be changed by hyper training? If so, can I add this information to the article? [[User:Sumwun|sumwun]] ([[User talk:Sumwun|talk]]) 19:20, 14 May 2017 (UTC)
== Gender calculation ==
I'm pretty confident it's bug-free this time. What I read [https://github.com/pret/pokecrystal/blob/288902139f00a9113ea9b360eb00d3109727dcfe/main.asm#L3897 here] (Crystal):
#Generate a value b from Atk and Spd IVs/DVs (AtkIV*16+SpdIV)
#Read the threshold ({{tt|0|ex. Tauros}}, {{tt|31|Bulbasaur}}, {{tt|63|Arcanine}}, {{tt|127|Arbok}}, {{tt|191|Cleffa}}, {{tt|254|Jynx}}, or {{tt|255|Celebi}})
#Handle special thresholds: 255->genderless; 0->male; 254->female
#(Else) if (threshold < b) then male else female
For Bulbsaur, b values of [0,31] (out of [0,255]) should make if female, the rest male, i.e. 32/256. (And conveniently, as all relevant thresholds are 15 mod 16, the Spd IVs shouldn't matter.) [[User:Nescientist|Nescientist]] ([[User talk:Nescientist|talk]]) 10:45, 10 June 2017 (UTC)