kwsch / PKHeX

Pokémon Save File Editor
https://projectpokemon.org/pkhex/
Other
3.72k stars 699 forks source link

Add reset for Gen 2 roamer encounter #3162

Closed brainard52 closed 3 years ago

brainard52 commented 3 years ago

Later gens have an option to edit or reset the encounter for roamers. Since it's now possible to use Lua scripts to reset for shinies before loading the save into the Virtual Console for transfer to modern games, I think this would be a great addition to gen 2.

kwsch commented 3 years ago

Research required:

brainard52 commented 3 years ago

Lua scripts: https://github.com/wwwwwwzx/gsclua and can be used in conjunction with https://github.com/TASVideos/vba-rerecording/ for botting the shinies. The ROM can be extracted from VC by means of GodMode9. The save can be exctracted from VC by means of CheckPoint. The save can be injected again by converting with https://sav2vc.fm1337.com/ and then replacing the sav.dat in the appropriate checkpoint backup folder on the SDCard and restoring the save backup.

Also: If I were to provide a save from prior to encountering a the roamers and after encountering the roamers, would that be sufficient?

kwsch commented 3 years ago

Pretty sure this was implemented via the above commit; please let me know if not.

brainard52 commented 3 years ago
Screen Shot 2021-04-04 at 7 53 10 PM

I unchecked "Legendary Beasts Disappeared from Burned Tower" and exported the save. This is what I got. I walked up to Suicune and clicked A

kwsch commented 3 years ago

@brainard52 Did you reset the event outside of the map, and then entered the area later?

"Object event." | オブジェイベント | Overworld | This text will appear when trying to talk to an object which has no event set for it.

brainard52 commented 3 years ago

@brainard52 Did you reset the event outside of the map, and then entered the area later?

"Object event." | オブジェイベント | Overworld | This text will appear when trying to talk to an object which has no event set for it.

I was in front of the Pokemon Center in the same town. Does that count as outside the map?

I believe the event is that I drop, and a script runs that makes them jump away. I wonder if it's because I didn't go down from the event after the rival battle. https://youtu.be/6W5bAwXUQ1g?t=329

kwsch commented 3 years ago

Added the recent resources, so they now show up in the second tab. https://github.com/kwsch/PKHeX/commit/d0258fa2f7f9637c23773b540b6683039d3da52f

Changing those /should/ work in making the event reset. (dev builds are available at pporg once the commit is built) https://projectpokemon.org/home/files/file/2445-pkhex-development-build/

brainard52 commented 3 years ago

https://user-images.githubusercontent.com/1023838/113548592-a75d0b00-95a4-11eb-9586-039469bcdba7.mov (might not play nicely with people that have photosensitivity)

The newest change allowed me to fall in the hole and set the beasties loose again. However, I cannot encounter them again for some reason. Is there some flag which says whether I've encountered a beast in the wild? I believe it stores their stats or something somehow, since they're always the same if you save after encountering one.

Lusamine commented 3 years ago

I tested this on a Crystal save that had already captured all 3 legendary beasts. The only two changes I made were: I reset the "Legendary Beasts Disappeared from Burned Tower" flag and I set the "Legendary Beasts (Burned Tower)" constant to "Not Awakened". This appropriately triggered the cutscene where the beasts run away in Burned Tower and Eusine appears. Afterwards, Raikou appeared on the Pokedex map, and I was able to encounter Raikou manually on a route. Maybe you haven't run the LUA script long enough?

EDIT: I checked Suicune as well but since it's a static encounter after multiple plot points, this isn't sufficient to reset it. It appeared in Cianwood, but Eusine didn't appear to fight me afterwards. Going to Tin Tower let me go up to fight Ho-Oh since I had already caught all 3. It's already resettable through the "Suicune (Tin Tower)" Event Constant though.