E-Sh4rk / CodeGenerator

ACE code generator for gen3 Pokemon games.
https://e-sh4rk.github.io/CodeGenerator/
3 stars 3 forks source link

The "Change and freeze PRNG seed" code for Italian Emerald doesn't work for wild Pokémon #1

Closed glu8716 closed 2 weeks ago

glu8716 commented 2 weeks ago

As the title says, I can't get the Change and freeze PRNG seed code working for wild Pokémon in the Italian version of Emerald. Every time I execute the code with the stable species (0x45B7) the game crashes. I have the Exit Code Bootstrap in the first slot of Box 14 and a Pokémon nicknamed ␣␣Dn’Jkl␣␣ just after it. And I should mention that it works with static Pokémon when ␣␣Dn’Jkl␣␣ isn't involved. I've also tried on the English version of the game (same save file but with 0x40E9) and it works. My guess is that the nickname ␣␣Dn’Jkl␣␣ isn't compatible with the Italian game.

E-Sh4rk commented 2 weeks ago

I see, the ␣ ␣ D n ’ J k l ␣ ␣ name does not contain any language-specific instruction so I think the issue might come from the fact that the summary of 0x45B7 is viewed without a strong exit code (which is the purpose of ␣ ␣ D n ’ J k l ␣ ␣, we want ACE to execute without leaving the summary). Have you tried viewing directly the Move page of 0x45B7 (using an adjacent pokemon), and exit quickly by pressing B ? Have you a way to extract your save so that I can test it directly ?

glu8716 commented 2 weeks ago

Yes, I've tried to view the moves page by switching from another Pokémon, but the game still crashes. And yes, I've tried to quickly press B to exit, but with no luck.

Here's my save file.

EDIT: a little bit of context: the seed I got from PokeFinder is 1B13516D an the seed I got from your converter is B2D59478. That is for a Trapinch. The box names you see are the ones generated from your website with the converted seed.

E-Sh4rk commented 2 weeks ago

Ok so after some tests, it appears that the move summary page makes the game crash, but not the statistics page. I will update the explanation of the code. Can you confirm it works if you open the statistics page of 0x45B7 ?

glu8716 commented 2 weeks ago

Yes! I can confirm that switching to the statistics page works. I hadn't thought of trying it, my bad. Thank you. I think you should also mention on the guide that the first Pokémon of your party shouldn't be a Pokémon with an ability that can mess with the RNG (eg: Synchronize). I kept getting the wrong Trapinch, then I realized my first Pokémon was an Absol with Pressure, and by using another one I could get the Trapinch I wanted. I don't know if this is the case for the normal code (Change PRNG seed) too.

And, not really related to this issue, but I have a question related to this code (both for Emerald and Ruby and Sapphire). Are the codes somehow messing with the probabilities of wild Pokémon generation methods? Because Ruby and Sapphire should generate wild Pokémon with Method H1, but when using your code I keep getting targets generated with Method H4 (sometimes I get H2 too). And yes, I know this is possible, but shouldn't be so frequent.

E-Sh4rk commented 2 weeks ago

ACE codes in general don't change the behavior of wild Pokemon generations.

The "Change and freeze PRNG" code makes the next encounter to be method H1. Any other ACE code should not influence encounters methods (for instance, the "Change PRNG Seed and Teleport" on Ruby and Saphirre).

However I am not an RNG expert, so maybe I am missing something. Maybe the fact that the "Change PRNG Seed and Teleport" code teleports the player in a unexpected way somehow affects the timing of vblank interruptions and thus affects the encounter method, but even if it is the case the effect would be temporary (until another area is loaded or until the save is reloaded).