-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Save data migrator to fix starters with no selectable forms #5425
[Bug] Save data migrator to fix starters with no selectable forms #5425
Conversation
This was tested on a save file with three caught forms: E-Max Eternatus, Rain Castform, and W Unown. This is what the starter select screen looks like in a previous version: After loading up the same save with the code in this PR, it looks like this: To test other forms, generate a new savefile. This can be done by using overrides such as
on a version of the code pre- #5385 . It is necessary to have a full party when catching the form, and refuse when asked to add it to the party. |
What are the changes the user will see?
Players who previously could select E-Max Eternatus or other forms supposed not to be selectable from the starter screen will now see the default form, as intended.
Why am I making these changes?
After #5119, catching a battle form did not automatically unlock the default form. This caused unintended behavior in the starter select screen, where the caught battle form would show up and be selectable, most noticeable for players who caught Eternatus in its E-Max form. The bug was fixed in #5385, and applies to Pokémon caught from 1.7.0 onwards, but the issue still exists for already problematic save data. In order to fix this, a save data migration is necessary.
What are the changes from a developer perspective?
A new migrator function is added to
systemMigrators
. Its purpose is to scandata.dexData
to find starters which are caught, but for which only unselectable forms are marked as caught. For any such starters, the default form is automatically marked as caught.Screenshots/Videos
How to test the changes?
Checklist
beta
as my base branchnpm run test
)npm run create-test
) or updated existing tests related to the PR's changes?