Jump to content

PKHeX 21.08.06


ReignOfComputer

Recommended Posts

PKHeX is a save editor for core-series Pokémon games. With it, users can manipulate various save files including: .sav, .dsv, .dat, .gci, .raw, and .bin types. PKHeX can also read and write: .pk files, which are individual Pokémon files, and .pgt, .pcd, .pgf, .wc, which are Mystery Gift files.

Version 21.08.06 of PKHeX has been released, bringing several new legality updates and fixes.

 

 

Change log:

Quote

21/08/06 - New Update:
 - Legality:
 - - Added: Gen8 Sociability legality checks. Thanks @Lusamine!
 - - Added: Gen8 crossover weather checks have been added. Thanks @Lusamine & @Skadiv!
 - - Added: Gen6/8 Memory checks have been improved a little. Thanks @sora10pls & @Lusamine!
 - - Added: Gen6/7 Vivillon are now flagged if the form cannot be found in the trainer's 3DS Console Region. Thanks @Lusamine!
 - - Changed: Wordfilter checking speeds improved drastically by caching created regexes.
 - - Changed: Gen8 Master Rank ribbons now permitted again for legends due to Season 10 rules.
 - - Changed: Inaccessible wild encounters and raid dens have been removed from the encounter database.
 - - Fixed: Gen8 brilliant aura boosts are only permitted if the met level is the maximum allowed for that encounter.
 - - Fixed: Gen8 Fog encounters are now required to be at least level 60 due to weather not being available until postgame. Thanks @Lusamine!
 - - Fixed: Gen4 Pokéwalker encounters are now allowed to be recognized with CuteCharm if the TID/SID is appropriate.
 - - Fixed: Gen4 Bug Catching Contest slots are now loaded completely. Thanks jazpersona!
 - - Fixed: Gen2 Dark Cave swarm slots (Dunsparce) are now loaded correctly. Thanks Purrmewtations!
 - - Fixed: Gen1 Yellow encounters now compare the correct catch rate values when not yet transferred.
 - - Fixed: Gift egg encounters are now checked for their egg locations correctly across all generations. Thanks @sora10pls!
 - - Fixed: Variable form encounter templates like Unown and Vivillon are now handled correctly.
 - Added: Gen8 Sociability for individual Pokémon can now be edited in the Memories sub-editor.
 - Added: Gen7 Battle Agency participant data can now be viewed as a misc slot.
 - Added: Gen5 GTS and Fused stored data can now be viewed as a misc slot.
 - Added: Gen4 Pokéwalker stored data can now be viewed as a misc slot. Thanks @Atrius97!
 - Added: Batch Editor can now be extended via plugins by adding custom code for filters / modifications.
 - Added: Batch Editor filters can now be used in the Encounter Database (similar to the PKM Database advanced search).
 - Added: PKM File Naming format has been extracted, and can now be replaced by a plugin to name files differently.
 - Added: Program settings added for the Encounter Database, to try to make viewed templates match the currently loaded data.
 - Added: Program settings added for the PKM Database, to prevent loading of backups and extra locations to the database.
 - Added: Program settings added to allow converting backwards and across incompatible generations.
 - Fixed: Turkish operating system languages no longer fail to launch the program.
 - Fixed: Hovering over slots no longer errors on Linux platforms.
 - Fixed: Deleting slots in the PKM Database is now handled correctly.
 - Fixed: Gen8 encounter slot templates now load legally when viewed, using the Overworld RNG correlation. Thanks @Atrius97!
 - Fixed: Gen6 female trainer appearance customization for lip color and freckles now save correctly. Thanks @sora10pls!
 - Fixed: Gen6 trainer sprite is now shown for XY again, and the PGL photo can be saved correctly again.
 - Fixed: Gen6 Super Training flags for PKM data is now localized correctly.
 - Fixed: Gen5 C-Gear Skin images now import correctly. Thanks @Snaid1!
 - Fixed: Gen5 Dream World slots now have the correct gender restrictions. Thanks @Lusamine!
 - Fixed: Gen4->5 transfer names with halfwidth characters and symbols are now correct.
 - Fixed: Gen4 HGSS frontier data is now accessed correctly via the Misc Editor.
 - Fixed: Gen4 Pokédex seen flags are now set correctly when writing new data to the save file.
 - Fixed: Gen3 XD - Setting tons of non-XD encounter species will no longer cause an error with the Memo being full.
 - Changed: "Encounter Type" value saved by Gen4 encounters has been renamed to "Ground Tile" to match its actual function.
 - Changed: Most popup windows like the Encounter Database are now closed when a new save file is loaded, rather than remain open.
 - Changed: Gendered species (like Jellicent) now show their genders in the Encounter Database.
 - Changed: Cyber Gadget quirk workaround for completing the Pokédex in Gen6/7 is no longer necessary (defunct service), and has been removed.
 - Changed: Updated Chinese/Spanish/German translations. Thanks @easyworld, @ajtudela, @M1atias, @Korados, @JDox!

 

Download      |     FAQ     |     Support Forum


View full article

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
45 minutes ago, Mario60866 said:

Firstly, thank you so much for creating PkHex! I really love it, and it's helped a lot with rebuilding an improved but otherwise exact replica of my Pokemon Platinum save file!

I do need help however with making 3ds saves usable with PKhex when transferred to my computer via R4i save dongle. I want to extract various Pokemon data from my Ultra Moon file and take my Crystal Pokemon from my emulator to Ultra Moon (I wish I could have bought real VC Crystal but... Money shortage). Can someone guide me on how to do this? (Please avoid custom 3ds firmware; I cannot risk bricking my 3ds)

It's nearly impossible to brick a 3DS. The process is so refined.

  • V-Wheeeeeel!!! 1
Link to comment
Share on other sites

  • 4 weeks later...
4 minutes ago, Lt. Lynx said:

I must report again an error I have reported some time ago: if a roamer on the 5th gen is marked as Defeated or Captured, it is impossible to mark it as Not roamed. The option just doesn't pop up.

Thanks for reporting. Do you have a "before roaming save" and a "after roaming save" that is directly after the before roaming we could use to document it?

Link to comment
Share on other sites

14 hours ago, theSLAYER said:

Thanks for reporting. Do you have a "before roaming save" and a "after roaming save" that is directly after the before roaming we could use to document it?

The only save I have has it already captured. However, even with a recently started save, when you mark the roamer as Defeated or Captured and save it, the option for Not roamed disappears.

Link to comment
Share on other sites

17 minutes ago, Lt. Lynx said:

The only save I have has it already captured. However, even with a recently started save, when you mark the roamer as Defeated or Captured and save it, the option for Not roamed disappears.

Just to be clear, you're not trying to make it roam before you defeated E4 right?

In your original scenario, E4 was defeated and it was once roaming right?

Link to comment
Share on other sites

2 hours ago, theSLAYER said:

Just to be clear, you're not trying to make it roam before you defeated E4 right?

In your original scenario, E4 was defeated and it was once roaming right?

That doesn't matter. Before or after, if one of them is in PkHex selected as Defeated or Captured, the option for Not roaming is not available.

However, in my case, it was already legally captured. I'll show you with some images from a recently started save. It's the same for the save I have.

1.PNG

2.PNG

3.PNG

4.PNG

5.PNG

6.PNG

Link to comment
Share on other sites

Not a bug; PKHeX just prevents you from toggling the Captured/Defeated state back to any of the not-presented states because a simple ComboBox does not handle the changes required to set the requested not-roamed or roaming state.

                // CurrentStat:ComboboxSource
                // Not roamed: Not roamed/Defeated/Captured
                //    Roaming: Roaming/Defeated/Captured
                //   Defeated: Defeated/Captured
                //   Captured: Defeated/Captured
                // Top 2 bit acts as flags of some sorts
                for (int i = 0; i < cbr.Length; i++)
                {
                    int c = SAV.Data[ofsRoamer + 0x2E + i];
                    var states = GetStates();
                    if (states.All(z => z.Value != c))
                        states.Add(new ComboItem($"Unknown (0x{c:X2})", c));
                    cbr[i].Items.Clear();
                    cbr[i].InitializeBinding();
                    cbr[i].DataSource = new BindingSource(states.Where(v => v.Value >= 2 || v.Value == c).ToList(), null);

 

  • Like 1
Link to comment
Share on other sites

17 hours ago, Kaphotics said:

Not a bug; PKHeX just prevents you from toggling the Captured/Defeated state back to any of the not-presented states because a simple ComboBox does not handle the changes required to set the requested not-roamed or roaming state.

                // CurrentStat:ComboboxSource
                // Not roamed: Not roamed/Defeated/Captured
                //    Roaming: Roaming/Defeated/Captured
                //   Defeated: Defeated/Captured
                //   Captured: Defeated/Captured
                // Top 2 bit acts as flags of some sorts
                for (int i = 0; i < cbr.Length; i++)
                {
                    int c = SAV.Data[ofsRoamer + 0x2E + i];
                    var states = GetStates();
                    if (states.All(z => z.Value != c))
                        states.Add(new ComboItem($"Unknown (0x{c:X2})", c));
                    cbr[i].Items.Clear();
                    cbr[i].InitializeBinding();
                    cbr[i].DataSource = new BindingSource(states.Where(v => v.Value >= 2 || v.Value == c).ToList(), null);

 

Then, how could I set it as Not roamed or Roaming? That would be an interesting option.

Link to comment
Share on other sites

59 minutes ago, Kaphotics said:

By researching the changes required to the save file to get the state you want, documenting them, and implementing them into the program? PKHeX is not magic.

I don't have enough knowledge to do that, but I have helped a pair of times with another researches. Could I help with this in any way?

Link to comment
Share on other sites

  • 1 month later...

Hey there, I have been working with Ruby (2002), when I check the "is egg" box, the nickname is displayed in japanese regardless of the language I pick. This doesn't happen with other games (e.g. moon or sword). So I get an error when the system checks if it's legit or not. Am I missing something? Could you take a look? Thanks!

DEMO.png

Link to comment
Share on other sites

4 hours ago, Hide said:

Hey there, I have been working with Ruby (2002), when I check the "is egg" box, the nickname is displayed in japanese regardless of the language I pick. This doesn't happen with other games (e.g. moon or sword). So I get an error when the system checks if it's legit or not. Am I missing something? Could you take a look? Thanks!

DEMO.png

Yes that is how the game stores the eggs, with the nickname as Japanese, even if it doesn't show in-game. However, PKHeX won't push an error associated to that. Not sure what you did wrong here.

Link to comment
Share on other sites

Thanks! I noticed you applied “my workaround”.

So, Pokémon eggs (GEN III) must be encoded as Japanese region Pokémon regardless of the sav file region. Since I was not aware of this detail, I had the impression this was some sort of bug.

Then the """issue""" (not a real issue) is that Pokémon eggs are encoded with Asian characters; PKHex updates the OT name with the name in your sav file and if you load an English sav file, the OT name displays with non-Asian characters (e.g. NEKO instead of NEKO) and this returns the legality check issue.

If Pokémon eggs must be Japanese, it would be good to automatically switch the region of the Pokémon to JPN after checking the “is egg” box, just like the name is automatically changed to タマゴ (tamago, egg in Japanese).

An ideal addition would be automatically transposing the OT name from english to asian encoding (e.g. “A” to “A”) when checking the “is egg” box. Alternatively, we could have the error message changed from “OT name is too short” to “OT name should be in ASIAN text encoding”.

Link to comment
Share on other sites

48 minutes ago, Hide said:

Thanks! I noticed you applied “my workaround”.

So, Pokémon eggs (GEN III) must be encoded as Japanese region Pokémon regardless of the sav file region. Since I was not aware of this detail, I had the impression this was some sort of bug.

Then the """issue""" (not a real issue) is that Pokémon eggs are encoded with Asian characters; PKHex updates the OT name with the name in your sav file and if you load an English sav file, the OT name displays with non-Asian characters (e.g. NEKO instead of NEKO) and this returns the legality check issue.

If Pokémon eggs must be Japanese, it would be good to automatically switch the region of the Pokémon to JPN after checking the “is egg” box, just like the name is automatically changed to タマゴ (tamago, egg in Japanese).

An ideal addition would be automatically transposing the OT name from english to asian encoding (e.g. “A” to “A”) when checking the “is egg” box. Alternatively, we could have the error message changed from “OT name is too short” to “OT name should be in ASIAN text encoding”.

done https://github.com/kwsch/PKHeX/commit/640cb3bad10c568462071adf236fd73e26531b99

Link to comment
Share on other sites

1 hour ago, Hide said:

Thanks! I noticed you applied “my workaround”.

So, Pokémon eggs (GEN III) must be encoded as Japanese region Pokémon regardless of the sav file region. Since I was not aware of this detail, I had the impression this was some sort of bug.

Then the """issue""" (not a real issue) is that Pokémon eggs are encoded with Asian characters; PKHex updates the OT name with the name in your sav file and if you load an English sav file, the OT name displays with non-Asian characters (e.g. NEKO instead of NEKO) and this returns the legality check issue.

If Pokémon eggs must be Japanese, it would be good to automatically switch the region of the Pokémon to JPN after checking the “is egg” box, just like the name is automatically changed to タマゴ (tamago, egg in Japanese).

An ideal addition would be automatically transposing the OT name from english to asian encoding (e.g. “A” to “A”) when checking the “is egg” box. Alternatively, we could have the error message changed from “OT name is too short” to “OT name should be in ASIAN text encoding”.

Just a reminder to readers: this applies to Gen 3. The encoding/characters format changes in other generations.

I didn't apply your workaround. My egg is an egg I received in-game on an ENG save, free from modifications.

Relating to your "Asian encoding" statement, what you see is just a quirk with the Gen 3 encoding, or maybe I should say it is a quirk with eggs for how PKHeX chooses to display them.

The encoding table for Roman characters between both International and Japanese games are the same. It is just that PKHeX parses them differently based on the language selected on the Pokemon file.
image.pngimage.png

They are not actually encoded as "Asian" characters by themselves. The way they appear changes based on language byte.
(remember, Eggs in Gen 3 games come with JPN set as the language byte)

My Egg examples:
image.png
In-game caught Pokemon:
image.png

Notice how despite they appear different, the bytes are actually the same?

The issue here is with your OT name.
Why does it start with a terminator?
image.pngimage.png

There's data after the terminator, implying there other characters.
(Characters U, T and R)

So let me ask again.
Was the OT removed? What was the OT of the save that received the egg? :3

I'm curious. Did you delete the name? Maybe it bore other characters and PKHeX yeeted them? Maybe the other OT characters don't go into an egg before it hatches? Need to know what is your OT name, and whether this egg was modified before extraction. Perhaps provide your save so I can take a look.

Link to comment
Share on other sites

13 hours ago, theSLAYER said:

The original OT still exists. Oddly your file doesn't have an OT.
Was the OT removed? What was the OT of the save that received the egg?
 

No, I put an "english encoded" name (it was NEKO) but it did not save with the file. The name from my sav was Sutr, but since it had said issues I changed it to NEKO (but it seems the name was deleted after I saved the file).

Link to comment
Share on other sites

1 minute ago, Hide said:

No, I put an "english encoded" name (it was NEKO) but it did not save with the file.

Was the egg's OT name originally blank? Did you make this egg from scratch or received it in-game?

Writing an OT to the egg in current stable PKHeX doesn't stick. I had to modify the pk3 with Hex editor for the egg to show up legal.
image.png

image.png
I wrote the line into PK3 via hex editor

Link to comment
Share on other sites

3 hours ago, Kaphotics said:

That's very nice!

2 hours ago, theSLAYER said:

The way they appear changes based on language byte (...)
Writing an OT to the egg in current stable PKHeX doesn't stick. (...)

Yes, so regarding the comparison between SARA and SARA, perhaps what we see in the picture is the value that addresses the character in the font map.

So, hypothetically speaking, a full-width “S” stands as FF in the Japanese character map.
And the regular “S” stands as FF in the English character map.
However, if you enter a regular “S” in the Japanese character map, it doesn’t stick because it’s different than the fullwidth character “S”.

When you change the PKM region to JPN, an OT name in “fullwidth text”* is expected; if you enter a name with the “standard text” you get an error. The error being “name is to short”.

I can switch my keyboard input in the computer, so then I edited the OT “writing in Japanese” (that was my workaround). I did not have to change the name with the hex editor.

So, the name sticks if you employ (for example) Japanese input, this is why I suggested updating the error message from “name is to short” to “use asian encoding”. When I entered the name using fullwidth characters the error was gone, it also was gone when you hex-edited the file because you assigned the correct S “via code”.

BTW, I didn’t know the OT name wasn’t there until you asked for the OT name. I did not delete it, I saved the PKM egg using standard characters so you could see “the bug”. Interestingly, I changed the name to “Neko” but the file was saved with data from my sav file (hence the “utr” characters you pointed before).

*(which I have been calling “Asian text” or “Asian encoded text”).

Thank you both for the great replies.

Link to comment
Share on other sites

2 hours ago, Hide said:

BTW, I didn’t know the OT name wasn’t there until you asked for the OT name. I did not delete it, I saved the PKM egg using standard characters so you could see “the bug”. Interestingly, I changed the name to “Neko” but the file was saved with data from my sav file (hence the “utr” characters you pointed before).

Yeah the OT name was missing. I'm wondering if it is a remnant from you trying to change the OT name or something.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...