Jump to content

General Questions about the Coding of Pokémon: My Understanding Object-Oriented Programming


HmmWhatsHisFace

Recommended Posts

Preamble: I stepped away from Pokémon after playing Emerald but returned for Sword & Shield. Upon returning, I have become increasingly curious about the world of Pokémon gaming from tournaments (p2p) to genning.  I own a Mac so I can't investigate how the PKHeX software is setup to create and edit Pokémon.  Also, please tell me if this is the wrong forum section and what forum section to post.

I watched some videos, looked on the website, and have seen pictures of the program's interface (Sun and Moon).  It seems that the basic Pokémon object class is the same for all including Legendary Pokémon. Similarly, Poké Balls have their own specific parameters.  Basic Understanding Check - In practice, you can change the species, name, gender, level, coloration (shiny), etc.

Questions About Pokémon Code and Editing

  1. If you want to change the owner of a Pokémon, would you need a reference Pokémon that was caught in the new owner's game to get the secret ID? If you don't change the secret ID, will it not pass certain filters?
  2. If you caught a 6IV Ditto in the game of your native language, would it result in a coding error if you changed it's native language for the Masuda Method? Yes, I realize that if you are already coding the Pokémon you can just make it shiny but what if you want to give out breeding Dittos?
  3. Is the coding of a Ditto any different from other Pokémon? I have read that people have issues generating 6IV Dittos due to a random number generator factor.
  4. Where is the coding for the Egg Group that makes legendary Pokémon incapable of breeding? I didn't see the features in the Misc Tab.
  5. For Sword & Shield, is there a new checkbox for G-Max capability? Is this one reason why Pokémon taken from previous games and brought into SwSh can't return to their original games? The Pokémons' code has been changed too significantly when converted for use in SwSh that they can't be recognized by their previous games.
  6. If GMax is enabled in a Pokémon's code and the game doesn't have the code for the GMax sprite/model or GMax move set, does this cause a serious error?
  7. For GMax capable Pokémon and GMax moves, is it a matter of communication between the Pokémon's code and the environment (Raid Den or GMax Spot) that determines how a regular move becomes a GMax move (the PP of the moves remains the same, i.e. 10PP Earthquake becomes 10 PP G-Max Sandblast)?

This all comes from a place of genuine curiosity. If the moderators feel that this is a waste, please delete.

Edited by HmmWhatsHisFace
Link to comment
Share on other sites

25 minutes ago, HmmWhatsHisFace said:

If you want to change the owner of a Pokémon, would you need a reference Pokémon that was caught in the new owner's game to get the secret ID? If you don't change the secret ID, will it not pass certain filters?

Yes, OT, TID and SID, Trainer Gender needs to match the new owner.

25 minutes ago, HmmWhatsHisFace said:

If you caught a 6IV Ditto in the game of your native language, would it result in a coding error if you changed it's native language for the Masuda Method? Yes, I realize that if you are already coding the Pokémon you can just make it shiny but what if you want to give out breeding Dittos?

I've not tested if your ownership matters in Masuda Method. (In the sense that you own the ditto but changed the Language)
Presumably not.

25 minutes ago, HmmWhatsHisFace said:

Is the coding of a Ditto any different from other Pokémon? I have read that people have issues generating 6IV Dittos due to a random number generator factor

Back in Gen 3 or 4 days, I think the issue is people were trying to create a flawless Ditto, and to avoid dealing with the PID/IV/Nature correlation in those gens, their standard move was to set the Ditto as bred.
Except Ditto cannot be bred. And since they don't know how to deal with the PID/IV/Nature correlation in those gens,  they ended up not being able to make it.

So it's not that Ditto coding was different from any other mon. It was simply the encounter details were different.
In that sense, Ditto was similar to a Legendary mon in those gens (as in it can't be bred).
People too, needed to deal with the PID/IV correlations for Legendaries, in order to Gen a Legal one.

There's no correlations in Gen 8 games (beside from raids), so it's easy to make flawless Ditto now.

25 minutes ago, HmmWhatsHisFace said:

Where is the coding for the Egg Group that makes legendary Pokémon incapable of breeding? I didn't see the features in the Misc Tab.

I assume you mean you don't see it in Misc tab on PKHeX.

The personalinfo file in every game determines base stats, evolutionary group, breed group, level up moves, tutor moves etc.
It's not a save thing. It's a rom thing.

25 minutes ago, HmmWhatsHisFace said:

For Sword & Shield, is there a new checkbox for G-Max capability? Is this one reason why Pokémon taken from previous games and brought into SwSh can't return to their original games?

In terms of save related, yes. There's a byte that gets set for Gmax capability, and the "recognition" of the byte doesn't exist in past gens. Thus, even if you try to hack the value in that location in a pk7 (for example), Bank -> HOME would ignore it.

25 minutes ago, HmmWhatsHisFace said:

The Pokémons' code has been changed too significantly when converted for use in SwSh that they can't be recognized by their previous games.

Nah, they can be (illegally) brought down. PKHaX (hax mode) supports downgradings mon.

If we can recognize how "what byte represents what", and make it into a program,
then we can arrange that data in a way that it represents a mon from a lower generation.

The official methods just don't wanna support it.

25 minutes ago, HmmWhatsHisFace said:

If GMax is enabled in a Pokémon's code and the game doesn't have the code for the GMax sprite/model or GMax move set, does this cause a serious error?

No, they just Dynamax (instead of Gmax) when you opt it in battle.

25 minutes ago, HmmWhatsHisFace said:

For GMax capable Pokémon and GMax moves, is it a matter of communication between the Pokémon's code and the environment (Raid Den or GMax Spot) that determines how a regular move becomes a GMax move (the PP of the moves remains the same, i.e. 10PP Earthquake becomes 10 PP G-Max Sandblast)?

I'm unsure how PPs work, but basically if you opt to Dmax/Gmax, the move changes based on the moves original type.
Besides the restriction of Dmax/Gmax, don't see how that is related to environment.
 

Also I edited your text's font color. For some weird reason, they were all white.
It's as tho you copied it from another post or something.

I'm not in dark mode (and I guess a few others aren't), so font background and font color really matters.
If the colors aren't default, then it may not be visible to others in different themes.

  • Thanks 1
Link to comment
Share on other sites

4 hours ago, theSLAYER said:

Yes, OT, TID and SID, Trainer Gender needs to match the new owner.

I've not tested if your ownership matters in Masuda Method. (In the sense that you own the ditto but changed the Language)
Presumably not.

Back in Gen 3 or 4 days, I think the issue is people were trying to create a flawless Ditto, and to avoid dealing with the PID/IV/Nature correlation in those gens, their standard move was to set the Ditto as bred.
Except Ditto cannot be bred. And since they don't know how to deal with the PID/IV/Nature correlation in those gens,  they ended up not being able to make it.

So it's not that Ditto coding was different from any other mon. It was simply the encounter details were different.
In that sense, Ditto was similar to a Legendary mon in those gens (as in it can't be bred).
People too, needed to deal with the PID/IV correlations for Legendaries, in order to Gen a Legal one.

There's no correlations in Gen 8 games (beside from raids), so it's easy to make flawless Ditto now.

I assume you mean you don't see it in Misc tab on PKHeX.

The personalinfo file in every game determines base stats, evolutionary group, breed group, level up moves, tutor moves etc.
It's not a save thing. It's a rom thing.

In terms of save related, yes. There's a byte that gets set for Gmax capability, and the "recognition" of the byte doesn't exist in past gens. Thus, even if you try to hack the value in that location in a pk7 (for example), Bank -> HOME would ignore it.

Nah, they can be (illegally) brought down. PKHaX (hax mode) supports downgradings mon.

If we can recognize how "what byte represents what", and make it into a program,
then we can arrange that data in a way that it represents a mon from a lower generation.

The official methods just don't wanna support it.

No, they just Dynamax (instead of Gmax) when you opt it in battle.

I'm unsure how PPs work, but basically if you opt to Dmax/Gmax, the move changes based on the moves original type.
Besides the restriction of Dmax/Gmax, don't see how that is related to environment.
 

Also I edited your text's font color. For some weird reason, they were all white.
It's as tho you copied it from another post or something.

I'm not in dark mode (and I guess a few others aren't), so font background and font color really matters.
If the colors aren't default, then it may not be visible to others in different themes.

Thank you very much for the response!

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...