- 5
- Posts
- 8
- Years
- Seen Aug 25, 2024
Hi, I've been looking to change the shiny odds in Pokeemerald. I found this line in \include\contstants\pokemon.h :
However, there are a bunch of other files (mainly in \src) that contain strings/references to a Pokemon being shiny, like this block in \src\pokemon.c :
I'd like to change it to something like 1/512, so I figured I could change the value in pokemon.h to 64. Can anyone tell me if this actually affects the odds of a pokemon being shiny? If it matters: I applied the RNG fix. Thanks in advance.
Code:
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
However, there are a bunch of other files (mainly in \src) that contain strings/references to a Pokemon being shiny, like this block in \src\pokemon.c :
Code:
bool8 IsMonShiny(struct Pokemon *mon)
{
u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0);
u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, 0);
return IsShinyOtIdPersonality(otId, personality);
}
bool8 IsShinyOtIdPersonality(u32 otId, u32 personality)
{
bool8 retVal = FALSE;
u32 shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
if (shinyValue < SHINY_ODDS)
retVal = TRUE;
return retVal;
}
I'd like to change it to something like 1/512, so I figured I could change the value in pokemon.h to 64. Can anyone tell me if this actually affects the odds of a pokemon being shiny? If it matters: I applied the RNG fix. Thanks in advance.