Hello, I recently showed a code in the Sango plugin thread.
I was asked to share the code so that it would be easier to distribute, so I made it in AR version, which is below.
Additionally, I’m including a commented C version of the code to help you understand it, or in case you want to adapt it for earlier versions. This was made on Pokémon Alpha Sapphire 1.4.
Here are a few demos (btw, Wailord is way too big to be displayed at its real size x'D).
I hope this will be useful for ROM hacks as well, like the No Outlines code.
I’ve only tested this on Citra, so if you encounter any bugs, please let me know.
I was asked to share the code so that it would be easier to distribute, so I made it in AR version, which is below.
Additionally, I’m including a commented C version of the code to help you understand it, or in case you want to adapt it for earlier versions. This was made on Pokémon Alpha Sapphire 1.4.
Here are a few demos (btw, Wailord is way too big to be displayed at its real size x'D).
I hope this will be useful for ROM hacks as well, like the No Outlines code.
I’ve only tested this on Citra, so if you encounter any bugs, please let me know.
Code:
[Fix Pokemon Size (AS v1.4) - Press R]
DD000000 00000100
0072560C EA02D03B
E07D9700 000000A0
E92D5FFF EB000002
E8BD5FFF E1A04000
EAFD2FBE E92D4070
E3A04050 E3A05001
E59F1068 E59FC068
E59FE068 E59F0068
E5913000 E3530000
0A000010 E2832E17
E1D220B0 E152000C
8A00000C E59E6A00
E1026482 E1D262B4
E1D223BC EE066A90
EE072A10 EEF86A66
EEB87A47 EEC67A87
EDC37A0D EDC37A0E
EDC37A0F E5C3504C
E2811004 E1510000
1AFFFFE8 E8BD8070
083F84C0 000002D1
00617000 083F84D8
C:
void FixPokemonSize( void )
{
for ( u32 i = 0; i < 6; i++ )
{
u32 pkmMdl = *(u32*)( 0x83F84C0 + 4 * i ); // Base address of the 3D model
if ( pkmMdl == 0 )
continue;
u16 pkmNum = *(u16*)( pkmMdl + 0x170 ); // Pokédex number
if ( pkmNum >= 722 )
continue;
u32 pkmData = *(u32*)0x617A00 + 0x50 * pkmNum; // Personal data of the Pokémon
float realSize = (float)*(u16*)( pkmData + 0x24 ); // Actual height according to the Pokédex
float defaultSize = (float)*(u16*)( pkmData + 0x3C ); // Default displayed size in battle
float ratio = realSize / defaultSize;
// Update Pokémon scale
*(float*)( pkmMdl + 0x34 ) = ratio;
*(float*)( pkmMdl + 0x38 ) = ratio;
*(float*)( pkmMdl + 0x3C ) = ratio;
// Mark the model to be updated
*(bool*)( pkmMdl + 0x4C ) = true;
}
}











