SheerSt / pokewilds

PokeWilds - A Gen 2 Game/Engine using libGDX
2.71k stars 207 forks source link

Shiny's odds and Gender's Variable #359

Closed Usori closed 1 year ago

Usori commented 1 year ago

I think that exist a some problem to compute the shiny odds and gender odds.

I bred 15 Shinies Shuckles, but only 2 are female.

All others Shuckles bred is aproximadaly 50/50 to be male or female, this change in the frequency only occurs with shinies.

I think that this problem occurs too with others species, not only with Shuckle.

Please, can you verify this issue? Or can you disponibilize the formulas used to calculate the probabilities?

Thank you very much!

fourlastor commented 1 year ago

@Usori shiny probability is currently 1/256, due to the nature of random, this might be less often than one expects (humans tend to interpret random probabilities as much more probable than they are - e.g. 70% in someone's mind is more similar to 95% actual probability)

Gender and shiny isn't related, and gender is set by the ratio in the base stat file. For shuckle this is:

db GENDER_F50 ; gender ratio

So there is always a 50% probability of it being male or female

These are the various ratios

// GENDER_F0: 100% male
// GENDER_F12_5: 7/8 male, 1/8 female
// GENDER_F25: 3/4 male, 1/4 female
// GENDER_F50: 1/2 male, 1/2 female
// GENDER_F75: 1/4 male, 3/4 female
// GENDER_F100: 100% female
// GENDER_UNKNOWN: genderless