kwsch / PKHeX

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

Origin Game, Met Location and Ball on Met Tab are not setting correctly on first View #4384

Open LBXComputers opened 3 hours ago

LBXComputers commented 3 hours ago

Describe the bug On the Main tab, right-clicking on a Pokémon and selecting View then changing to the Met tab you will see that the Met Location says "None" and had an orange background and the Ball says "Poké Ball" and also has an orange background. The "Origin Game" may not be correct either.

"Setting" this Pokémon in this state will fail validity checks.

This only appears to occur when under Options > Settings, the Blank Save Version from Generation 1 (where no location data exists). For example, mine is set to Red and can replicate this issue when I am opening a Heart Gold save file.

The issue does not occur if the Blank Save Version is from Generation 2 or later (where a location drop down field is available).

To Reproduce Steps to reproduce the behaviour:

  1. Delete any cfg.json file to ensure you're starting with a blank slate
  2. Launch PKHex (my version is the 24/07/27 release however it has been occurring for a few versions)
  3. Select Options > Settings
  4. Change the Blank Save Version from the default of Scarlet to Red, Blue, or Yellow
  5. Click the X to close settings
  6. Close PKHex (writes the updated cfg.json file) and re-open it.
  7. Confirm that the blank save is from Generation 1 as the default Pokémon will be Mew.
  8. Load a Generation 4 save game
  9. Whilst on the "Main" tab, right-click on a box or party Pokémon and select View.
  10. Change to the View tab to see the issue.
  11. View the same Pokémon again and the values will be corrected.
  12. It will continue to be correct for each Pokemon you view until you close and re-open the application again, whilst the Blank Save Version is from a gen 1 game.

Note that I have only tested this with Gen 1 and 4 games and saves for the purposes of raising this issue. I think the issue occurs with Gen 3, and 5+ are also loaded.

Expected behaviour When the application is in Gen 1 "mode" and a later save game is loaded, the Origin Game, Met Location and Ball values should be set correctly on the first view as is switches to the "mode" for the generation you've loaded.

Screenshots The origin game is incorrectly "Diamond" - the first item in the list - when this was a HG starter originally. Ignore the green tick here, clicking it will produce the validation error unless the origin game, met location and ball are corrected. image

Additional context I like the blank save version to be Gen 1 (i.e. Red) as I am playing the original games more often.

MrPerson0 commented 3 hours ago

"The issue does not occur if the Blank Save Version is from Generation 2 or later (where a location drop down field is available)."

It's probably best to stick with this as your fix. The issue is simply due to Gen 1 not having the Met Location tabs, which is why this error occurs.

LBXComputers commented 3 hours ago

Yes I will leave the Blank Save Version as the default from now on but I think this is still a bug that could be fixed.